b6d5613e6524909d9d7aff7390a88c8c81093fab
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-05-02  Adam Roben  <aroben@apple.com>
2
3         Allow implicit conversion from nullptr_t to PassOwnPtr
4
5         This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
6         strict PassOwnPtr mode.
7
8         Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
9         doesn't work, but should
10
11         Reviewed by Adam Barth.
12
13         * wtf/PassOwnPtr.h:
14         (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
15
16         * wtf/MessageQueue.h:
17         (WTF::::waitForMessageFilteredWithTimeout):
18         (WTF::::tryGetMessage):
19         Use the new implicit conversion.
20
21 2011-05-02  Jessie Berlin  <jberlin@apple.com>
22
23         Rubber-stamped by Oliver Hunt.
24
25         Remove an assertion that Windows was hitting on launch.
26
27         * runtime/Structure.cpp:
28         (JSC::Structure::materializePropertyMap):
29         * runtime/Structure.h:
30         (JSC::Structure::typeInfo):
31         (JSC::Structure::previousID):
32         (JSC::Structure::propertyStorageCapacity):
33         (JSC::Structure::propertyStorageSize):
34         (JSC::Structure::get):
35         (JSC::Structure::materializePropertyMapIfNecessary):
36
37 2011-05-02  Mark Rowe  <mrowe@apple.com>
38
39         Reviewed by Geoff Garen.
40
41         <rdar://problem/9371948> JavaScriptCore should build with GCC 4.2
42
43         * Configurations/CompilerVersion.xcconfig:
44
45 2011-05-02  Gavin Barraclough  <barraclough@apple.com>
46
47         ARMv7 build fix.
48
49         * assembler/AbstractMacroAssembler.h:
50         (JSC::AbstractMacroAssembler::Jump::link):
51         (JSC::AbstractMacroAssembler::Jump::linkTo):
52
53 2011-05-02  Oliver Hunt  <oliver@apple.com>
54
55         Windows build fix.
56
57         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
58
59 2011-05-02  Michael Saboff  <msaboff@apple.com>
60
61         Reviewed by Geoffrey Garen.
62
63         crash in JSC::RegExp::match
64         https://bugs.webkit.org/show_bug.cgi?id=58922
65
66         Cleared chained backtrack data label when linking label even if that 
67         label doesn't chain itself.  This is needed so that subsequent 
68         backtrack data labels point to the next outer paren and not within 
69         the current paren.
70
71         * yarr/YarrJIT.cpp:
72         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
73
74 2011-05-02  Geoffrey Garen  <ggaren@apple.com>
75
76         Reviewed by Oliver Hunt.
77
78         Tiny bit of heap cleanup.
79
80         * heap/MarkedBlock.h:
81         (JSC::MarkedBlock::contains): Tightened up an assertion and a comment.
82
83         * heap/MarkedSpace.h:
84         (JSC::MarkedSpace::globalData):
85         (JSC::MarkedSpace::highWaterMark):
86         (JSC::MarkedSpace::setHighWaterMark): Moved inlines out of the class
87         definition, for better clarity.
88
89 2011-05-02  Oliver Hunt  <oliver@apple.com>
90
91         Reviewed by Gavin Barraclough.
92
93         Correct marking of interpreter data in mixed mode builds
94         https://bugs.webkit.org/show_bug.cgi?id=59962
95
96         We had a few places in mixed mode builds where we would not
97         track data used by the interpreter for marking.  This patch
98         corrects the problem and adds a number of assertions to catch
99         live Structures being collected.
100
101         * JavaScriptCore.exp:
102         * assembler/ARMv7Assembler.h:
103         (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
104         * bytecode/CodeBlock.cpp:
105         (JSC::CodeBlock::dump):
106         * bytecode/CodeBlock.h:
107         (JSC::CodeBlock::addPropertyAccessInstruction):
108         (JSC::CodeBlock::addGlobalResolveInstruction):
109         (JSC::CodeBlock::addStructureStubInfo):
110         (JSC::CodeBlock::addGlobalResolveInfo):
111         * bytecompiler/BytecodeGenerator.cpp:
112         (JSC::BytecodeGenerator::emitResolve):
113         (JSC::BytecodeGenerator::emitResolveWithBase):
114         (JSC::BytecodeGenerator::emitGetById):
115         (JSC::BytecodeGenerator::emitPutById):
116         (JSC::BytecodeGenerator::emitDirectPutById):
117         * runtime/Structure.cpp:
118         (JSC::Structure::materializePropertyMap):
119         * runtime/Structure.h:
120         (JSC::Structure::typeInfo):
121         (JSC::Structure::previousID):
122         (JSC::Structure::propertyStorageCapacity):
123         (JSC::Structure::propertyStorageSize):
124         (JSC::Structure::get):
125         (JSC::Structure::materializePropertyMapIfNecessary):
126
127 2011-05-02  Xan Lopez  <xlopez@igalia.com>
128
129         Reviewed by Alexey Proskuryakov.
130
131         Use native NullPtr when using GCC 4.6.0 and C++0x
132         https://bugs.webkit.org/show_bug.cgi?id=59252
133
134         GCC 4.6.0 has nullptr support, use it when possible.
135
136         * wtf/NullPtr.cpp: include config.h to pull in Platform.h before
137         NullPtr.h, since we need the GCC_VERSION_AT_LEAST definition.
138         * wtf/NullPtr.h: check for GCC >= 4.6.0 and C++0x in order to
139         use native nullptr.
140
141 2011-05-02  Gavin Barraclough  <barraclough@apple.com>
142
143         Reviewed by Oliver Hunt.
144
145         https://bugs.webkit.org/show_bug.cgi?id=59950
146         Clean up AssemblerBuffer to use a Vector internally.
147
148         AssemblerBuffer handles reallocing a byte array itself - stop that.
149
150         * assembler/ARMAssembler.cpp:
151         (JSC::ARMAssembler::executableCopy):
152         * assembler/AssemblerBuffer.h:
153         (JSC::AssemblerLabel::AssemblerLabel):
154         (JSC::AssemblerLabel::labelAtOffset):
155         (JSC::AssemblerBuffer::AssemblerBuffer):
156         (JSC::AssemblerBuffer::~AssemblerBuffer):
157         (JSC::AssemblerBuffer::isAvailable):
158         (JSC::AssemblerBuffer::ensureSpace):
159         (JSC::AssemblerBuffer::isAligned):
160         (JSC::AssemblerBuffer::putIntegral):
161         (JSC::AssemblerBuffer::putIntegralUnchecked):
162         (JSC::AssemblerBuffer::putByteUnchecked):
163         (JSC::AssemblerBuffer::putByte):
164         (JSC::AssemblerBuffer::putShortUnchecked):
165         (JSC::AssemblerBuffer::putShort):
166         (JSC::AssemblerBuffer::putIntUnchecked):
167         (JSC::AssemblerBuffer::putInt):
168         (JSC::AssemblerBuffer::putInt64Unchecked):
169         (JSC::AssemblerBuffer::putInt64):
170         (JSC::AssemblerBuffer::codeSize):
171         (JSC::AssemblerBuffer::label):
172         (JSC::AssemblerBuffer::executableCopy):
173         (JSC::AssemblerBuffer::rewindToLabel):
174         (JSC::AssemblerBuffer::debugOffset):
175         (JSC::AssemblerBuffer::append):
176         (JSC::AssemblerBuffer::grow):
177         * assembler/AssemblerBufferWithConstantPool.h:
178         * assembler/MacroAssemblerX86_64.h:
179         (JSC::MacroAssemblerX86_64::linkCall):
180         * assembler/X86Assembler.h:
181         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
182
183 2011-05-02  Jeff Miller  <jeffm@apple.com>
184
185         Reviewed by Alexy Proskuryakov.
186
187         Avoid potential buffer overflow in WTFLog() and WTFLogVerbose()
188         https://bugs.webkit.org/show_bug.cgi?id=59949
189
190         * wtf/Assertions.cpp: Check for 0 or empty format string in WTFLog() and WTFLogVerbose().
191
192 2011-05-02  Adam Barth  <abarth@webkit.org>
193
194         Reviewed by Alexey Proskuryakov.
195
196         StringImpl::endsWith has some insane code
197         https://bugs.webkit.org/show_bug.cgi?id=59900
198
199         * wtf/text/StringImpl.cpp:
200         (WTF::StringImpl::endsWith):
201             - m_data shadows a member variable of the same name.
202
203 2011-05-02  Gabor Loki  <loki@webkit.org>
204
205         Buildfix for ARM after r85448
206
207         * assembler/ARMAssembler.h:
208         (JSC::ARMAssembler::loadBranchTarget):
209
210 2011-05-01  Oliver Hunt  <oliver@apple.com>
211
212         Reviewed by Gavin Barraclough.
213
214         Strict-mode only reserved words not reserved
215         https://bugs.webkit.org/show_bug.cgi?id=55342
216
217         Fix line number tracking when we rollback the lexer.
218
219         * parser/JSParser.cpp:
220         (JSC::JSParser::parseSourceElements):
221
222 2011-05-01  Oliver Hunt  <oliver@apple.com>
223
224         Reviewed by Gavin Barraclough.
225
226         ES5 Strict mode does not allow getter and setter for same propId
227         https://bugs.webkit.org/show_bug.cgi?id=57295
228
229         Simplify and correct the logic for strict mode object literals.
230
231         * parser/JSParser.cpp:
232         (JSC::JSParser::parseStrictObjectLiteral):
233
234 2011-05-01  Oliver Hunt  <oliver@apple.com>
235
236         Reviewed by Gavin Barraclough.
237
238         Assigning to function identifier under strict should throw
239         https://bugs.webkit.org/show_bug.cgi?id=59289
240
241         Add logic to StaticScopeObject to ensure we don't silently consume
242         writes to constant properties.
243
244         * runtime/JSStaticScopeObject.cpp:
245         (JSC::JSStaticScopeObject::put):
246
247 2011-05-01  Gavin Barraclough  <barraclough@apple.com>
248
249         Reviewed by Sam Weinig.
250
251         https://bugs.webkit.org/show_bug.cgi?id=59903
252         Use AssemblerLabel throughout Assembler classes, AssemblerBuffer
253
254         Creating a lable() into the AssemblerBuffer should return an AssemblerLabel,
255         not an unsigned int.
256
257         * assembler/ARMAssembler.cpp:
258         (JSC::ARMAssembler::executableCopy):
259         * assembler/ARMAssembler.h:
260         (JSC::ARMAssembler::blx):
261         (JSC::ARMAssembler::label):
262         (JSC::ARMAssembler::loadBranchTarget):
263         * assembler/ARMv7Assembler.h:
264         (JSC::ARMv7Assembler::b):
265         (JSC::ARMv7Assembler::blx):
266         (JSC::ARMv7Assembler::bx):
267         (JSC::ARMv7Assembler::label):
268         (JSC::ARMv7Assembler::ARMInstructionFormatter::label):
269         * assembler/AssemblerBuffer.h:
270         (JSC::AssemblerBuffer::label):
271         * assembler/AssemblerBufferWithConstantPool.h:
272         * assembler/MIPSAssembler.h:
273         (JSC::MIPSAssembler::label):
274         (JSC::MIPSAssembler::relocateJumps):
275         * assembler/SH4Assembler.h:
276         (JSC::SH4Assembler::loadConstant):
277         (JSC::SH4Assembler::loadConstantUnReusable):
278         (JSC::SH4Assembler::call):
279         (JSC::SH4Assembler::jmp):
280         (JSC::SH4Assembler::jne):
281         (JSC::SH4Assembler::je):
282         (JSC::SH4Assembler::label):
283         (JSC::SH4Assembler::oneShortOp):
284         * assembler/X86Assembler.h:
285         (JSC::X86Assembler::call):
286         (JSC::X86Assembler::jmp_r):
287         (JSC::X86Assembler::label):
288         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
289         (JSC::X86Assembler::X86InstructionFormatter::label):
290
291 2011-05-01  Adam Barth  <abarth@webkit.org>
292
293         Reviewed by David Levin.
294
295         Enable strict mode for OwnPtr and PassOwnPtr
296         https://bugs.webkit.org/show_bug.cgi?id=59428
297
298         * wtf/OwnPtr.h:
299
300 2011-05-01  Patrick Gansterer  <paroga@webkit.org>
301
302         Reviewed by Adam Barth.
303
304         Enable strict OwnPtr for PLATFORM(WIN)
305         https://bugs.webkit.org/show_bug.cgi?id=59881
306
307         * wtf/OwnPtr.h:
308
309 2011-05-01  Gavin Barraclough  <barraclough@apple.com>
310
311         Reviewed by Sam Weinig.
312
313         https://bugs.webkit.org/show_bug.cgi?id=59896
314         Remove JmpSrc/JmpDst types.
315
316         The JmpSrc/JmpDst classes predate the MacroAssembler interface. Having these
317         object be per-assembler in unhelpful, causes unnecessary code duplication,
318         and prevents the AssemblerBuffer from providing a richer type for labels.
319         The limited semantic meaning that they did convey is undermined by the manner
320         in which their meanings have been overloaded (use of JmpSrc for Call, JmpDst
321         for data labels).
322
323         Jumps on ARMv7 have had additional information added to the object via the
324         ARMv7 JmpSrc. This data should probably be in the instruction stream. This
325         patch does not fix the problem, and moves the data (ifdefed) to
326         AbstractMacroAssembler::Jump (which is effectively where it was before!).
327         This at least closes the hole such that no further data may be added to JmpSrc,
328         but this is unfortunate, and should be cleaned up.
329
330         * assembler/ARMAssembler.h:
331         (JSC::ARMAssembler::blx):
332         (JSC::ARMAssembler::label):
333         (JSC::ARMAssembler::align):
334         (JSC::ARMAssembler::loadBranchTarget):
335         (JSC::ARMAssembler::jmp):
336         (JSC::ARMAssembler::linkPointer):
337         (JSC::ARMAssembler::linkJump):
338         (JSC::ARMAssembler::linkCall):
339         (JSC::ARMAssembler::getRelocatedAddress):
340         (JSC::ARMAssembler::getDifferenceBetweenLabels):
341         (JSC::ARMAssembler::getCallReturnOffset):
342         * assembler/ARMv7Assembler.h:
343         (JSC::ARMv7Assembler::b):
344         (JSC::ARMv7Assembler::blx):
345         (JSC::ARMv7Assembler::bx):
346         (JSC::ARMv7Assembler::label):
347         (JSC::ARMv7Assembler::align):
348         (JSC::ARMv7Assembler::getRelocatedAddress):
349         (JSC::ARMv7Assembler::getDifferenceBetweenLabels):
350         (JSC::ARMv7Assembler::getCallReturnOffset):
351         (JSC::ARMv7Assembler::linkJump):
352         (JSC::ARMv7Assembler::linkCall):
353         (JSC::ARMv7Assembler::linkPointer):
354         * assembler/AbstractMacroAssembler.h:
355         (JSC::AbstractMacroAssembler::Label::isSet):
356         (JSC::AbstractMacroAssembler::Call::Call):
357         (JSC::AbstractMacroAssembler::Jump::Jump):
358         (JSC::AbstractMacroAssembler::Jump::link):
359         (JSC::AbstractMacroAssembler::Jump::linkTo):
360         (JSC::AbstractMacroAssembler::linkPointer):
361         (JSC::AbstractMacroAssembler::getLinkerAddress):
362         * assembler/AssemblerBuffer.h:
363         (JSC::AssemblerLabel::AssemblerLabel):
364         (JSC::AssemblerLabel::isSet):
365         * assembler/LinkBuffer.h:
366         (JSC::LinkBuffer::patch):
367         * assembler/MIPSAssembler.h:
368         (JSC::MIPSAssembler::label):
369         (JSC::MIPSAssembler::align):
370         (JSC::MIPSAssembler::getRelocatedAddress):
371         (JSC::MIPSAssembler::getDifferenceBetweenLabels):
372         (JSC::MIPSAssembler::getCallReturnOffset):
373         (JSC::MIPSAssembler::linkJump):
374         (JSC::MIPSAssembler::linkCall):
375         (JSC::MIPSAssembler::linkPointer):
376         * assembler/MacroAssemblerARMv7.h:
377         (JSC::MacroAssemblerARMv7::branchDouble):
378         (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
379         (JSC::MacroAssemblerARMv7::jump):
380         (JSC::MacroAssemblerARMv7::nearCall):
381         (JSC::MacroAssemblerARMv7::call):
382         (JSC::MacroAssemblerARMv7::ret):
383         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
384         (JSC::MacroAssemblerARMv7::makeBranch):
385         * assembler/MacroAssemblerMIPS.h:
386         (JSC::MacroAssemblerMIPS::nearCall):
387         (JSC::MacroAssemblerMIPS::call):
388         (JSC::MacroAssemblerMIPS::tailRecursiveCall):
389         (JSC::MacroAssemblerMIPS::branchTrue):
390         (JSC::MacroAssemblerMIPS::branchFalse):
391         (JSC::MacroAssemblerMIPS::branchEqual):
392         (JSC::MacroAssemblerMIPS::branchNotEqual):
393         * assembler/SH4Assembler.h:
394         (JSC::SH4Assembler::call):
395         (JSC::SH4Assembler::jmp):
396         (JSC::SH4Assembler::jne):
397         (JSC::SH4Assembler::je):
398         (JSC::SH4Assembler::label):
399         (JSC::SH4Assembler::align):
400         (JSC::SH4Assembler::linkJump):
401         (JSC::SH4Assembler::linkCall):
402         (JSC::SH4Assembler::linkPointer):
403         (JSC::SH4Assembler::getCallReturnOffset):
404         (JSC::SH4Assembler::getRelocatedAddress):
405         (JSC::SH4Assembler::getDifferenceBetweenLabels):
406         (JSC::SH4Assembler::patchPointer):
407         * assembler/X86Assembler.h:
408         (JSC::X86Assembler::call):
409         (JSC::X86Assembler::jmp):
410         (JSC::X86Assembler::jmp_r):
411         (JSC::X86Assembler::jne):
412         (JSC::X86Assembler::jnz):
413         (JSC::X86Assembler::je):
414         (JSC::X86Assembler::jz):
415         (JSC::X86Assembler::jl):
416         (JSC::X86Assembler::jb):
417         (JSC::X86Assembler::jle):
418         (JSC::X86Assembler::jbe):
419         (JSC::X86Assembler::jge):
420         (JSC::X86Assembler::jg):
421         (JSC::X86Assembler::ja):
422         (JSC::X86Assembler::jae):
423         (JSC::X86Assembler::jo):
424         (JSC::X86Assembler::jp):
425         (JSC::X86Assembler::js):
426         (JSC::X86Assembler::jCC):
427         (JSC::X86Assembler::label):
428         (JSC::X86Assembler::labelFor):
429         (JSC::X86Assembler::align):
430         (JSC::X86Assembler::linkJump):
431         (JSC::X86Assembler::linkCall):
432         (JSC::X86Assembler::linkPointer):
433         (JSC::X86Assembler::getCallReturnOffset):
434         (JSC::X86Assembler::getRelocatedAddress):
435         (JSC::X86Assembler::getDifferenceBetweenLabels):
436         (JSC::X86Assembler::rewindToLabel):
437         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
438         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
439         * jit/JIT.cpp:
440         (JSC::JIT::privateCompileMainPass):
441         * jit/JIT.h:
442         * jit/JITInlineMethods.h:
443         (JSC::JIT::atJumpTarget):
444         (JSC::JIT::emitGetVirtualRegister):
445         * jit/JITOpcodes.cpp:
446         (JSC::JIT::emit_op_jmp):
447         (JSC::JIT::emit_op_jfalse):
448         (JSC::JIT::emit_op_jeq_null):
449         (JSC::JIT::emit_op_jneq_null):
450         (JSC::JIT::emit_op_jneq_ptr):
451         (JSC::JIT::emit_op_jsr):
452         (JSC::JIT::emit_op_jtrue):
453         (JSC::JIT::emit_op_jmp_scopes):
454
455 2011-05-01  Chao-ying Fu  <fu@mips.com>
456
457         Reviewed by Eric Seidel.
458
459         Fix MIPS build due to the split of "Condition" enum
460         https://bugs.webkit.org/show_bug.cgi?id=59407
461
462         * assembler/MIPSAssembler.h:
463         (JSC::MIPSAssembler::debugOffset):
464         * assembler/MacroAssemblerMIPS.h:
465         (JSC::MacroAssemblerMIPS::branch32):
466         (JSC::MacroAssemblerMIPS::compare32):
467
468 2011-04-30  Adam Barth  <abarth@webkit.org>
469
470         Reviewed by Adam Barth.
471
472         Enable strict OwnPtr for GTK
473         https://bugs.webkit.org/show_bug.cgi?id=59861
474
475         * wtf/OwnPtr.h:
476
477 2011-04-30  Gavin Barraclough  <barraclough@apple.com>
478
479         ARMv7 build fix.
480
481         * assembler/AssemblerBufferWithConstantPool.h:
482
483 2011-04-30  Gavin Barraclough  <barraclough@apple.com>
484
485         Reviewed by Oliver Hunt.
486
487         Bug 59869 - AssemblerBuffer cleanup - disambiguate size()
488
489         The method size() is called on the AssemblerBuffer both to acquire
490         the complete size of the code, and to get a position to use as a
491         label into the code. Instead, add an explicit 'label' method.
492
493         * assembler/ARMAssembler.cpp:
494         (JSC::ARMAssembler::executableCopy):
495         * assembler/ARMAssembler.h:
496         (JSC::ARMAssembler::blx):
497         (JSC::ARMAssembler::codeSize):
498         (JSC::ARMAssembler::label):
499         (JSC::ARMAssembler::loadBranchTarget):
500         * assembler/ARMv7Assembler.h:
501         (JSC::ARMv7Assembler::b):
502         (JSC::ARMv7Assembler::blx):
503         (JSC::ARMv7Assembler::bx):
504         (JSC::ARMv7Assembler::label):
505         (JSC::ARMv7Assembler::codeSize):
506         (JSC::ARMv7Assembler::ARMInstructionFormatter::codeSize):
507         (JSC::ARMv7Assembler::ARMInstructionFormatter::data):
508         * assembler/AbstractMacroAssembler.h:
509         * assembler/AssemblerBuffer.h:
510         (JSC::AssemblerBuffer::codeSize):
511         (JSC::AssemblerBuffer::label):
512         * assembler/AssemblerBufferWithConstantPool.h:
513         * assembler/LinkBuffer.h:
514         (JSC::LinkBuffer::LinkBuffer):
515         (JSC::LinkBuffer::linkCode):
516         * assembler/MIPSAssembler.h:
517         (JSC::MIPSAssembler::newJmpSrc):
518         (JSC::MIPSAssembler::appendJump):
519         (JSC::MIPSAssembler::label):
520         (JSC::MIPSAssembler::codeSize):
521         (JSC::MIPSAssembler::relocateJumps):
522         * assembler/SH4Assembler.h:
523         (JSC::SH4Assembler::loadConstant):
524         (JSC::SH4Assembler::loadConstantUnReusable):
525         (JSC::SH4Assembler::call):
526         (JSC::SH4Assembler::jmp):
527         (JSC::SH4Assembler::jne):
528         (JSC::SH4Assembler::je):
529         (JSC::SH4Assembler::label):
530         (JSC::SH4Assembler::executableCopy):
531         (JSC::SH4Assembler::oneShortOp):
532         (JSC::SH4Assembler::codeSize):
533         * assembler/X86Assembler.h:
534         (JSC::X86Assembler::call):
535         (JSC::X86Assembler::jmp_r):
536         (JSC::X86Assembler::codeSize):
537         (JSC::X86Assembler::label):
538         (JSC::X86Assembler::executableCopy):
539         (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
540         (JSC::X86Assembler::X86InstructionFormatter::codeSize):
541         (JSC::X86Assembler::X86InstructionFormatter::label):
542         (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
543         * dfg/DFGJITCompiler.cpp:
544         (JSC::DFG::JITCompiler::compileFunction):
545         * jit/JIT.cpp:
546         (JSC::JIT::privateCompile):
547         * jit/JITOpcodes.cpp:
548         (JSC::JIT::privateCompileCTIMachineTrampolines):
549         * jit/JITOpcodes32_64.cpp:
550         (JSC::JIT::privateCompileCTIMachineTrampolines):
551         * yarr/YarrJIT.cpp:
552         (JSC::Yarr::YarrGenerator::compile):
553
554 2011-04-29  Adam Barth  <abarth@webkit.org>
555
556         Attempt to fix the Windows build.
557
558         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
559
560 2011-04-29  Adam Barth  <abarth@webkit.org>
561
562         Reviewed by Eric Seidel.
563
564         CSP script-src should block eval
565         https://bugs.webkit.org/show_bug.cgi?id=59850
566
567         ggaren recommend a different approach to this patch, essentially
568         installing a new function for function-eval and changing the AST
569         representation of operator-eval to call function-eval.  However, I'm
570         not sure that approach is workable because the ASTBuilder doesn't know
571         about global objects, and there is added complication due to the cache.
572
573         This approach is more dynamic, adding a branch in EvalExecutable to
574         detect whether eval is current disabled in the lexical scope.  The spec
575         is slightly unclear about whether we should return undefined or throw
576         an exception.  I've asked Brandon to clarify the spec, but throwing an
577         exception seems natural.
578
579         * JavaScriptCore.exp:
580         * runtime/Executable.cpp:
581         (JSC::EvalExecutable::compileInternal):
582         * runtime/JSGlobalObject.cpp:
583         (JSC::JSGlobalObject::disableEval):
584         * runtime/JSGlobalObject.h:
585         (JSC::JSGlobalObject::JSGlobalObject):
586         (JSC::JSGlobalObject::isEvalEnabled):
587
588 2011-04-29  Gavin Barraclough  <barraclough@apple.com>
589
590         Reviewed by Oliver Hunt.
591
592         https://bugs.webkit.org/show_bug.cgi?id=59847
593         Remove linkOffset from LinkBuffer
594
595         This is redundant since removal of recompilation for exception info.
596
597         * assembler/LinkBuffer.h:
598         (JSC::LinkBuffer::LinkBuffer):
599         (JSC::LinkBuffer::linkCode):
600         * dfg/DFGJITCompiler.cpp:
601         (JSC::DFG::JITCompiler::compileFunction):
602         * jit/JIT.cpp:
603         (JSC::JIT::JIT):
604         (JSC::JIT::privateCompile):
605         * jit/JIT.h:
606         (JSC::JIT::compile):
607         (JSC::JIT::compileCTIMachineTrampolines):
608         (JSC::JIT::compileCTINativeCall):
609         * jit/JITOpcodes.cpp:
610         (JSC::JIT::privateCompileCTIMachineTrampolines):
611         * jit/JITOpcodes32_64.cpp:
612         (JSC::JIT::privateCompileCTIMachineTrampolines):
613         (JSC::JIT::privateCompileCTINativeCall):
614         * jit/JITPropertyAccess.cpp:
615         (JSC::JIT::stringGetByValStubGenerator):
616         (JSC::JIT::privateCompilePutByIdTransition):
617         (JSC::JIT::privateCompilePatchGetArrayLength):
618         (JSC::JIT::privateCompileGetByIdProto):
619         (JSC::JIT::privateCompileGetByIdSelfList):
620         (JSC::JIT::privateCompileGetByIdProtoList):
621         (JSC::JIT::privateCompileGetByIdChainList):
622         (JSC::JIT::privateCompileGetByIdChain):
623         * jit/JITPropertyAccess32_64.cpp:
624         (JSC::JIT::stringGetByValStubGenerator):
625         (JSC::JIT::privateCompilePutByIdTransition):
626         (JSC::JIT::privateCompilePatchGetArrayLength):
627         (JSC::JIT::privateCompileGetByIdProto):
628         (JSC::JIT::privateCompileGetByIdSelfList):
629         (JSC::JIT::privateCompileGetByIdProtoList):
630         (JSC::JIT::privateCompileGetByIdChainList):
631         (JSC::JIT::privateCompileGetByIdChain):
632         * jit/SpecializedThunkJIT.h:
633         (JSC::SpecializedThunkJIT::finalize):
634         * yarr/YarrJIT.cpp:
635         (JSC::Yarr::YarrGenerator::compile):
636
637 2011-04-29  Gavin Barraclough  <barraclough@apple.com>
638
639         Reviewed by Oliver Hunt & Geoff Garen.
640
641         https://bugs.webkit.org/show_bug.cgi?id=59221
642         [RegexFuzz] Regression blocking testing
643
644         Okay, so the bug here is that when, in the case of a TypeParentheticalAssertion
645         node, emitDisjunction recursively calls to itself to emit the nested disjunction
646         the value of parenthesesInputCountAlreadyChecked is bogus (doesn't take into
647         account the uncheck that has just taken place).
648
649         Also, the special handling given to countToCheck in the case of parenthetical
650         assertions is nonsense, delete it, along with the isParentheticalAssertion argument.
651
652         * yarr/YarrInterpreter.cpp:
653         (JSC::Yarr::ByteCompiler::emitDisjunction):
654
655 2011-04-29  Csaba Osztrogonác  <ossy@webkit.org>
656
657         Reviewed by Adam Barth.
658
659         Enable strict OwnPtr for Qt
660         https://bugs.webkit.org/show_bug.cgi?id=59667
661
662         * wtf/OwnPtr.h:
663
664 2011-04-29  Dean Jackson  <dino@apple.com>
665
666         Reviewed by Simon Fraser.
667
668         Add ENABLE macro for WebKitAnimation
669         https://bugs.webkit.org/show_bug.cgi?id=59729
670
671         Add new feature to toggle WebKit Animation API.
672
673         * Configurations/FeatureDefines.xcconfig:
674
675 2011-04-28  Sam Weinig  <sam@webkit.org>
676
677         Reviewed by Mark Rowe.
678
679         Install testapi.js along side testapi
680         https://bugs.webkit.org/show_bug.cgi?id=59773
681
682         * JavaScriptCore.xcodeproj/project.pbxproj:
683         Add new build phase to copy testapi.js to install path of testapi
684         on install.
685
686 2011-04-28  David Levin  <levin@chromium.org>
687
688         Reviewed by Adam Barth.
689
690         Remove IMAGE_RESIZER related code.
691         https://bugs.webkit.org/show_bug.cgi?id=59735
692
693         * Configurations/FeatureDefines.xcconfig:
694
695 2011-04-28  Gavin Barraclough  <barraclough@apple.com>
696
697         Reviewed by Oliver Hunt.
698
699         https://bugs.webkit.org/show_bug.cgi?id=59763
700         DFG JIT - Unify FPRReg & FPRegisterID
701
702         (Following on from GPRReg/RegisterID unification).
703
704         * dfg/DFGFPRInfo.h:
705         (JSC::DFG::FPRInfo::toRegister):
706         (JSC::DFG::FPRInfo::debugName):
707         * dfg/DFGGPRInfo.h:
708         * dfg/DFGJITCodeGenerator.cpp:
709         (JSC::DFG::JITCodeGenerator::fillDouble):
710         (JSC::DFG::JITCodeGenerator::checkConsistency):
711         * dfg/DFGJITCodeGenerator.h:
712         (JSC::DFG::JITCodeGenerator::boxDouble):
713         (JSC::DFG::JITCodeGenerator::unboxDouble):
714         (JSC::DFG::JITCodeGenerator::flushRegisters):
715         (JSC::DFG::JITCodeGenerator::isFlushed):
716         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
717         (JSC::DFG::JITCodeGenerator::setupStubArguments):
718         (JSC::DFG::JITCodeGenerator::callOperation):
719         (JSC::DFG::GPRResult::lockedResult):
720         (JSC::DFG::FPRResult::lockedResult):
721         * dfg/DFGJITCompiler.cpp:
722         (JSC::DFG::JITCompiler::fillNumericToDouble):
723         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
724         (JSC::DFG::JITCompiler::compileFunction):
725         * dfg/DFGJITCompiler.h:
726         * dfg/DFGNode.h:
727         * dfg/DFGNonSpeculativeJIT.cpp:
728         (JSC::DFG::EntryLocation::EntryLocation):
729         (JSC::DFG::NonSpeculativeJIT::valueToNumber):
730         (JSC::DFG::NonSpeculativeJIT::valueToInt32):
731         (JSC::DFG::NonSpeculativeJIT::numberToInt32):
732         (JSC::DFG::NonSpeculativeJIT::compile):
733         * dfg/DFGNonSpeculativeJIT.h:
734         (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
735         (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
736         * dfg/DFGRegisterBank.h:
737         (JSC::DFG::RegisterBank::iterator::regID):
738         (JSC::DFG::RegisterBank::iterator::debugName):
739         * dfg/DFGSpeculativeJIT.cpp:
740         (JSC::DFG::SpeculationCheck::SpeculationCheck):
741         (JSC::DFG::SpeculativeJIT::compile):
742         * dfg/DFGSpeculativeJIT.h:
743
744 2011-04-28  David Kilzer  <ddkilzer@apple.com>
745
746         Revert "<http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called"
747
748         This reverts commit r85195.  It was crashing DumpRenderTree on Lion.
749
750         * wtf/mac/MainThreadMac.mm:
751         (WTF::postTimer):
752
753 2011-04-28  Adam Barth  <abarth@webkit.org>
754
755         Reviewed by Eric Seidel.
756
757         Remove WML
758         https://bugs.webkit.org/show_bug.cgi?id=59678
759
760         Remove the WML configuration option from the Mac build system.
761
762         * Configurations/FeatureDefines.xcconfig:
763
764 2011-04-28  Sheriff Bot  <webkit.review.bot@gmail.com>
765
766         Unreviewed, rolling out r85233 and r85235.
767         http://trac.webkit.org/changeset/85233
768         http://trac.webkit.org/changeset/85235
769         https://bugs.webkit.org/show_bug.cgi?id=59754
770
771         Causes issues with jsc. (Requested by dave_levin on #webkit).
772
773         * GNUmakefile.list.am:
774         * JavaScriptCore.gypi:
775         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
776         * JavaScriptCore.xcodeproj/project.pbxproj:
777         * jit/ExecutableAllocator.h:
778         (JSC::ExecutablePool::ExecutablePool):
779         * parser/SourceProvider.h:
780         (JSC::SourceProvider::SourceProvider):
781         * runtime/RegExp.cpp:
782         (JSC::RegExp::RegExp):
783         * wtf/CMakeLists.txt:
784         * wtf/RefCounted.h:
785         (WTF::RefCountedBase::ref):
786         (WTF::RefCountedBase::hasOneRef):
787         (WTF::RefCountedBase::refCount):
788         (WTF::RefCountedBase::derefBase):
789         * wtf/SizeLimits.cpp:
790         * wtf/ThreadRestrictionVerifier.h: Removed.
791         * wtf/text/CString.h:
792         (WTF::CStringBuffer::CStringBuffer):
793
794 2011-04-28  Gavin Barraclough  <barraclough@apple.com>
795
796         Reviewed by Oliver Hunt.
797
798         Bug 59740 - DFG JIT - Unify GPRReg & RegisterID
799
800         Currently we use a mix of enum values throughout the DFG JIT to  represent
801         gpr registers - the RegisterID provided by the MacroAssembler, and the
802         GPRReg enum giving the sequential register set over which the RegisterBank
803         allocates. Unify the two.
804
805         Patch to unify FPRReg in a similar fashion will follow.
806
807         * JavaScriptCore.xcodeproj/project.pbxproj:
808         * dfg/DFGFPRInfo.h: Added.
809         (JSC::DFG::next):
810         (JSC::DFG::FPRBankInfo::toRegister):
811         (JSC::DFG::FPRBankInfo::toIndex):
812         * dfg/DFGGPRInfo.h: Added.
813         (JSC::DFG::GPRInfo::toRegister):
814         (JSC::DFG::GPRInfo::toIndex):
815         (JSC::DFG::GPRInfo::debugName):
816         * dfg/DFGJITCodeGenerator.cpp:
817         (JSC::DFG::JITCodeGenerator::fillInteger):
818         (JSC::DFG::JITCodeGenerator::fillDouble):
819         (JSC::DFG::JITCodeGenerator::fillJSValue):
820         (JSC::DFG::JITCodeGenerator::dump):
821         (JSC::DFG::JITCodeGenerator::checkConsistency):
822         (JSC::DFG::GPRTemporary::GPRTemporary):
823         (JSC::DFG::FPRTemporary::FPRTemporary):
824         * dfg/DFGJITCodeGenerator.h:
825         (JSC::DFG::JITCodeGenerator::boxDouble):
826         (JSC::DFG::JITCodeGenerator::unboxDouble):
827         (JSC::DFG::JITCodeGenerator::spill):
828         (JSC::DFG::JITCodeGenerator::flushRegisters):
829         (JSC::DFG::JITCodeGenerator::isFlushed):
830         (JSC::DFG::JITCodeGenerator::bitOp):
831         (JSC::DFG::JITCodeGenerator::shiftOp):
832         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
833         (JSC::DFG::JITCodeGenerator::setupStubArguments):
834         (JSC::DFG::JITCodeGenerator::callOperation):
835         (JSC::DFG::IntegerOperand::gpr):
836         (JSC::DFG::DoubleOperand::gpr):
837         (JSC::DFG::GPRTemporary::gpr):
838         (JSC::DFG::FPRTemporary::gpr):
839         (JSC::DFG::GPRResult::lockedResult):
840         * dfg/DFGJITCompiler.cpp:
841         (JSC::DFG::JITCompiler::fillNumericToDouble):
842         (JSC::DFG::JITCompiler::fillInt32ToInteger):
843         (JSC::DFG::JITCompiler::fillToJS):
844         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
845         (JSC::DFG::JITCompiler::compileFunction):
846         (JSC::DFG::JITCompiler::jitAssertIsInt32):
847         (JSC::DFG::JITCompiler::jitAssertIsJSInt32):
848         (JSC::DFG::JITCompiler::jitAssertIsJSNumber):
849         (JSC::DFG::JITCompiler::jitAssertIsJSDouble):
850         * dfg/DFGJITCompiler.h:
851         (JSC::DFG::JITCompiler::preserveReturnAddressAfterCall):
852         (JSC::DFG::JITCompiler::restoreReturnAddressBeforeReturn):
853         (JSC::DFG::JITCompiler::emitGetFromCallFrameHeaderPtr):
854         (JSC::DFG::JITCompiler::emitPutToCallFrameHeader):
855         (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
856         (JSC::DFG::JITCompiler::addressForGlobalVar):
857         (JSC::DFG::JITCompiler::addressFor):
858         (JSC::DFG::JITCompiler::tagFor):
859         (JSC::DFG::JITCompiler::payloadFor):
860         * dfg/DFGNonSpeculativeJIT.cpp:
861         (JSC::DFG::EntryLocation::EntryLocation):
862         (JSC::DFG::NonSpeculativeJIT::valueToNumber):
863         (JSC::DFG::NonSpeculativeJIT::valueToInt32):
864         (JSC::DFG::NonSpeculativeJIT::numberToInt32):
865         (JSC::DFG::NonSpeculativeJIT::compile):
866         * dfg/DFGNonSpeculativeJIT.h:
867         (JSC::DFG::NonSpeculativeJIT::silentSpillGPR):
868         (JSC::DFG::NonSpeculativeJIT::silentSpillFPR):
869         (JSC::DFG::NonSpeculativeJIT::silentFillGPR):
870         (JSC::DFG::NonSpeculativeJIT::silentFillFPR):
871         (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
872         (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
873         * dfg/DFGRegisterBank.h:
874         (JSC::DFG::RegisterBank::allocate):
875         (JSC::DFG::RegisterBank::retain):
876         (JSC::DFG::RegisterBank::release):
877         (JSC::DFG::RegisterBank::lock):
878         (JSC::DFG::RegisterBank::unlock):
879         (JSC::DFG::RegisterBank::isLocked):
880         (JSC::DFG::RegisterBank::name):
881         (JSC::DFG::RegisterBank::iterator::name):
882         (JSC::DFG::RegisterBank::iterator::isLocked):
883         (JSC::DFG::RegisterBank::iterator::release):
884         (JSC::DFG::RegisterBank::iterator::gpr):
885         (JSC::DFG::RegisterBank::iterator::debugName):
886         (JSC::DFG::RegisterBank::iterator::operator++):
887         (JSC::DFG::RegisterBank::iterator::operator!=):
888         (JSC::DFG::RegisterBank::iterator::index):
889         (JSC::DFG::RegisterBank::iterator::iterator):
890         (JSC::DFG::RegisterBank::begin):
891         (JSC::DFG::RegisterBank::end):
892         (JSC::DFG::RegisterBank::isLockedAtIndex):
893         (JSC::DFG::RegisterBank::nameAtIndex):
894         (JSC::DFG::RegisterBank::releaseAtIndex):
895         (JSC::DFG::RegisterBank::allocateInternal):
896         (JSC::DFG::RegisterBank::MapEntry::MapEntry):
897         * dfg/DFGScoreBoard.h:
898         (JSC::DFG::ScoreBoard::~ScoreBoard):
899         * dfg/DFGSpeculativeJIT.cpp:
900         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
901         (JSC::DFG::SpeculationCheck::SpeculationCheck):
902         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
903         (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
904         (JSC::DFG::SpeculativeJIT::compile):
905         (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
906         (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
907         * dfg/DFGSpeculativeJIT.h:
908         (JSC::DFG::SpeculateIntegerOperand::gpr):
909
910 2011-04-28  Oliver Hunt  <oliver@apple.com>
911
912         Reviewed by Gavin Barraclough.
913
914         Remove evil addressOfStructure() function
915         https://bugs.webkit.org/show_bug.cgi?id=59739
916
917         Remove the addressOfStructure function from JSCell, and update
918         callsites to use the same logic as testPrototype()
919
920         * jit/JITPropertyAccess.cpp:
921         (JSC::JIT::privateCompileGetByIdProto):
922         (JSC::JIT::privateCompileGetByIdProtoList):
923         * jit/JITPropertyAccess32_64.cpp:
924         (JSC::JIT::privateCompileGetByIdProto):
925         (JSC::JIT::privateCompileGetByIdProtoList):
926         * runtime/JSCell.h:
927
928 2011-04-28  Oliver Hunt  <oliver@apple.com>
929
930         Reviewed by Gavin Barraclough.
931
932         Clean up testPrototype()
933         https://bugs.webkit.org/show_bug.cgi?id=59734
934
935         Remove direct pointer to the inside of a GC object and just do
936         the indirect load manually.  Doesn't effect sunspider but does
937         clean up the code quite a bit, and simplifies the handling of
938         GC values.
939
940         * jit/JITPropertyAccess.cpp:
941         (JSC::JIT::testPrototype):
942
943 2011-04-28  David Levin  <levin@chromium.org>
944
945         Build fix.
946
947         * wtf/RefCounted.h: Fix inverted ifdef.
948
949 2011-04-07  David Levin  <levin@chromium.org>
950
951         Reviewed by Darin Adler.
952
953         Add asserts to RefCounted to make sure ref/deref happens on the right thread.
954         https://bugs.webkit.org/show_bug.cgi?id=31639
955
956         * GNUmakefile.list.am: Added new files to the build.
957         * JavaScriptCore.gypi: Ditto.
958         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
959         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
960         * jit/ExecutableAllocator.h:
961         (JSC::ExecutablePool::ExecutablePool): Turned off checks for this
962         due to not being able to figure out what was guarding it (bug 58091).
963         * parser/SourceProvider.h:
964         (JSC::SourceProvider::SourceProvider): Ditto.
965         * runtime/RegExp.cpp:
966         (JSC::RegExp::RegExp): Ditto.
967         * wtf/CMakeLists.txt: Added new files to the build.
968         * wtf/ThreadRestrictionVerifier.h: Added.
969         Everything is done in the header to avoid the issue with exports
970         that are only useful in debug but still needing to export them.
971         * wtf/RefCounted.h:
972         (WTF::RefCountedBase::ref): Added checks using the non thread safe verifier.
973         and filed bug 58171 about making it stricter.
974         (WTF::RefCountedBase::hasOneRef): Ditto.
975         (WTF::RefCountedBase::refCount): Ditto.
976         (WTF::RefCountedBase::setMutexForVerifier): Expose a way to change the checks to be based
977         on a mutex. This is in the header to avoid adding more exports from JavaScriptCore.
978         (WTF::RefCountedBase::deprecatedTurnOffVerifier): Temporary way to turn off verification.
979         Filed bug 58174 to remove this method.
980         (WTF::RefCountedBase::derefBase):
981         * wtf/SizeLimits.cpp: Adjusted the debug size check for RefCounted.
982         * wtf/text/CString.h:
983         (WTF::CStringBuffer::CStringBuffer): Turned off checks for this while a fix is being
984         done in Chromium's test_shell (bug 58093).
985
986 2011-04-28  Xan Lopez  <xlopez@igalia.com>
987
988         Unreviewed attempt to fix the build.
989
990         * GNUmakefile.am: add -lpthread.
991
992 2011-04-28  Oliver Hunt  <oliver@apple.com>
993
994         Reviewed by Gavin Barraclough.
995
996         Only need a single implementation of testPrototype
997         https://bugs.webkit.org/show_bug.cgi?id=59724
998
999         Remove excess copy of identical testPrototype() code
1000
1001         * jit/JITPropertyAccess.cpp:
1002         (JSC::JIT::testPrototype):
1003         * jit/JITPropertyAccess32_64.cpp:
1004
1005 2011-04-28  Xan Lopez  <xlopez@igalia.com>
1006
1007         Reviewed by Martin Robinson.
1008
1009         [Gtk] Split JSC and WebCore builds
1010         https://bugs.webkit.org/show_bug.cgi?id=19428
1011
1012         Build JavaScriptCore as a libtool shared library instead of a
1013         private convenience library.
1014
1015         * GNUmakefile.am: define new jsc library and adapt to new name for
1016         javascriptcore target.
1017         * GNUmakefile.list.am: ditto.
1018
1019 2011-04-28  David Kilzer  <ddkilzer@apple.com>
1020
1021         <http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called
1022
1023         Reviewed by Simon Fraser.
1024
1025         * wtf/mac/MainThreadMac.mm:
1026         (WTF::postTimer): Use RetainPtr to plug the leak.
1027
1028 2011-04-27  Sam Weinig  <sam@webkit.org>
1029
1030         Reviewed by David Kilzer.
1031
1032         Add way to install testapi in production builds
1033         https://bugs.webkit.org/show_bug.cgi?id=59674
1034
1035         * Configurations/TestAPI.xcconfig: Copied from Configurations/JavaScriptCore.xcconfig.
1036         Add configuration file for TestAPI. In addition to name, we now specify an install path
1037         and allow SKIP_INSTALL to be overridden by setting FORCE_TOOL_INSTALL.
1038
1039         * JavaScriptCore.xcodeproj/project.pbxproj:
1040         Remove in-project build settings and add missing configuration files. Added missing CompilerVersion.xcconfig
1041         file.
1042
1043 2011-04-27  Adam Barth  <abarth@webkit.org>
1044
1045         Reviewed by David Levin.
1046
1047         Enable strict OwnPtrs for Chromium
1048         https://bugs.webkit.org/show_bug.cgi?id=59666
1049
1050         * wtf/OwnPtr.h:
1051
1052 2011-04-27  Oliver Hunt  <oliver@apple.com>
1053
1054         Reviewed by Geoffrey Garen.
1055
1056         Add ability to remove keys from weakmap API
1057         https://bugs.webkit.org/show_bug.cgi?id=59645
1058
1059         Add JSWeakObjectMapRemove API
1060
1061         * API/JSWeakObjectMapRefPrivate.cpp:
1062         * API/JSWeakObjectMapRefPrivate.h:
1063         * JavaScriptCore.exp:
1064
1065 2011-04-27  Adam Barth  <abarth@webkit.org>
1066
1067         Reviewed by David Levin.
1068
1069         Enable strict mode for OwnPtr
1070         https://bugs.webkit.org/show_bug.cgi?id=59428
1071
1072         This patch enables strict mode for OwnPtr on PLATFORM(MAC) only.
1073
1074         * wtf/OwnPtr.h:
1075
1076 2011-04-27  Steve Block  <steveblock@google.com>
1077
1078         Reviewed by David Levin.
1079
1080         Remove Android build system
1081         https://bugs.webkit.org/show_bug.cgi?id=48111
1082
1083         This is to avoid the maintenance burden until the Android port is
1084         fully upstreamed.
1085
1086         * Android.mk: Removed.
1087         * Android.v8.wtf.mk: Removed.
1088
1089 2011-04-27  Mark Rowe  <mrowe@apple.com>
1090
1091         Fix 32-bit build after r85036.
1092
1093         * wtf/Platform.h: USE(PLUGIN_HOST_PROCESS) is only true for 64-bit.
1094
1095 2011-04-27  Csaba Osztrogonác  <ossy@webkit.org>
1096
1097         Unreviewed buildfix after r85036.
1098
1099         Readd non-dead code.
1100
1101         * wtf/OSAllocatorPosix.cpp:
1102         (WTF::OSAllocator::reserveAndCommit):
1103
1104 2011-04-27  Adam Barth  <abarth@webkit.org>
1105
1106         Reviewed by Kenneth Russell.
1107
1108         OwnPtr assignment operator should be private
1109         https://bugs.webkit.org/show_bug.cgi?id=59487
1110
1111         Unfortunately we can't remove the copy constructor because of some
1112         detail about gcc.  (The issue is documented in a comment already.)
1113
1114         * wtf/OwnPtr.h:
1115
1116 2011-04-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1117
1118         Unreviewed, rolling out r84977.
1119         http://trac.webkit.org/changeset/84977
1120         https://bugs.webkit.org/show_bug.cgi?id=59568
1121
1122         caused crashes on the SL WK2 bots (Requested by jessieberlin
1123         on #webkit).
1124
1125         * assembler/MacroAssemblerX86_64.h:
1126         (JSC::MacroAssemblerX86_64::call):
1127         (JSC::MacroAssemblerX86_64::tailRecursiveCall):
1128         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
1129
1130 2011-04-26  Kevin Ollivier  <kevino@theolliviers.com>
1131
1132         Rubberstamped by Eric Seidel.
1133
1134         Enable waf to be used to build other ports
1135         https://bugs.webkit.org/show_bug.cgi?id=58213
1136
1137         * wscript:
1138
1139 2011-04-26  Sam Weinig  <sam@webkit.org>
1140
1141         Reviewed by David Hyatt.
1142
1143         Remove Datagrid from the tree
1144         https://bugs.webkit.org/show_bug.cgi?id=59543
1145
1146         * Configurations/FeatureDefines.xcconfig:
1147         Remove feature.
1148
1149 2011-04-26  Adrienne Walker  <enne@google.com>
1150
1151         Reviewed by Geoffrey Garen.
1152
1153         Fix incorrect use of OwnPtr<T*> in GCActivityCallback
1154         https://bugs.webkit.org/show_bug.cgi?id=59559
1155
1156         * runtime/GCActivityCallback.h:
1157
1158 2011-04-26  Xan Lopez  <xlopez@igalia.com>
1159
1160         Reviewed by Daniel Bates.
1161
1162         Unused but set variable warning in MacroAssembelX86_64
1163         https://bugs.webkit.org/show_bug.cgi?id=59482
1164
1165         * assembler/MacroAssemblerX86_64.h:
1166         (JSC::MacroAssemblerX86_64::call): do not declare the label
1167         variable if we are not going to use it.
1168         (JSC::MacroAssemblerX86_64::tailRecursiveCall): ditto.
1169         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall): ditto.
1170
1171 2011-04-26  Dan Bernstein  <mitz@apple.com>
1172
1173         Reviewed by Mark Rowe.
1174
1175         Choose the compiler based on the Xcode version for Snow Leopard debug builds.
1176
1177         * Configurations/Base.xcconfig:
1178         * Configurations/CompilerVersion.xcconfig: Added.
1179
1180 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
1181
1182         Reviewed by Oliver Hunt.
1183
1184         Nixed special finalizer handling for WebCore strings
1185         https://bugs.webkit.org/show_bug.cgi?id=59425
1186         
1187         SunSpider reports no change.
1188         
1189         Not needed anymore, since weak handles have finalizers.
1190
1191         * runtime/JSString.cpp:
1192         (JSC::JSString::resolveRope):
1193         (JSC::JSString::resolveRopeSlowCase):
1194         (JSC::JSString::outOfMemory):
1195         (JSC::JSString::substringFromRope):
1196         (JSC::JSString::replaceCharacter): Updated for removal of union.
1197
1198         * runtime/JSString.h:
1199         (JSC::RopeBuilder::JSString):
1200         (JSC::RopeBuilder::~JSString):
1201         (JSC::RopeBuilder::appendStringInConstruct):
1202         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): No need for
1203         union or special constructor anymore.
1204
1205 2011-04-26  Gabor Loki  <loki@webkit.org>
1206
1207         Reviewed by Csaba Osztrogonác.
1208
1209         Speeding up SVG filters with multicore (SMP) support
1210         https://bugs.webkit.org/show_bug.cgi?id=43903
1211
1212         Some SVG filters execute a huge number of pixel manipulations, which
1213         cannot be sped up by graphics accelerators, since their algorithm is
1214         too complex. Using the power of Symmetric Multi Processing (SMP) we
1215         can split up a task to smaller (data independent) tasks, which can be
1216         executed independently.
1217
1218         The ParallelJobs framework provides a simple way for distributed
1219         programming. The framework is based on WebKit's threading infrastructure,
1220         Open Multi-Processing's (OpenMP) API, and libdispatch API.
1221
1222         * GNUmakefile.list.am:
1223         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1224         * JavaScriptCore.xcodeproj/project.pbxproj:
1225         * wtf/CMakeLists.txt:
1226         * wtf/ParallelJobs.h: Added.
1227         (WTF::ParallelJobs::ParallelJobs):
1228         (WTF::ParallelJobs::numberOfJobs):
1229         (WTF::ParallelJobs::parameterForJob):
1230         (WTF::ParallelJobs::executeJobs):
1231         * wtf/ParallelJobsGeneric.cpp: Added.
1232         (WTF::ParallelEnvironment::ThreadPrivate::tryLockFor):
1233         (WTF::ParallelEnvironment::ThreadPrivate::executeJob):
1234         (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
1235         (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
1236         * wtf/ParallelJobsGeneric.h: Added.
1237         (WTF::ParallelEnvironment::ParallelEnvironment):
1238         (WTF::ParallelEnvironment::numberOfJobs):
1239         (WTF::ParallelEnvironment::parameterForJob):
1240         (WTF::ParallelEnvironment::executeJobs):
1241         (WTF::ParallelEnvironment::ThreadPrivate::ThreadPrivate):
1242         (WTF::ParallelEnvironment::ThreadPrivate::create):
1243         * wtf/ParallelJobsLibdispatch.h: Added.
1244         (WTF::ParallelEnvironment::ParallelEnvironment):
1245         (WTF::ParallelEnvironment::numberOfJobs):
1246         (WTF::ParallelEnvironment::parameterForJob):
1247         (WTF::ParallelEnvironment::executeJobs):
1248         * wtf/ParallelJobsOpenMP.h: Added.
1249         (WTF::ParallelEnvironment::ParallelEnvironment):
1250         (WTF::ParallelEnvironment::numberOfJobs):
1251         (WTF::ParallelEnvironment::parameterForJob):
1252         (WTF::ParallelEnvironment::executeJobs):
1253         * wtf/Platform.h:
1254         * wtf/wtf.pri:
1255
1256 2011-04-26  Mihai Parparita  <mihaip@chromium.org>
1257
1258         Reviewed by Adam Barth.
1259
1260         Turn off make built-in implicit rules for derived sources makefile
1261         https://bugs.webkit.org/show_bug.cgi?id=59418
1262         
1263         We don't use any of make's built-in implicit rules, turning them off
1264         speeds up parsing of the makefile.
1265
1266         * JavaScriptCore.xcodeproj/project.pbxproj:
1267         * gyp/generate-derived-sources.sh:
1268
1269 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
1270
1271         Reviewed by Oliver Hunt.
1272
1273         Custom prototypes on DOM objects don't persist after garbage collection
1274         https://bugs.webkit.org/show_bug.cgi?id=59412
1275         
1276         SunSpider reports no change.
1277         
1278         The hasCustomProperties() check didn't check for a custom prototype.
1279
1280         * runtime/JSObject.h:
1281         (JSC::JSObject::hasCustomProperties): Changed to delegate to Structure
1282         because it is the "truth" about an object's pedigree.
1283
1284         * runtime/Structure.cpp:
1285         (JSC::Structure::Structure):
1286         * runtime/Structure.h:
1287         (JSC::Structure::didTransition): Track whether a Structure has ever
1288         transitioned for any reason. If so, we have to assume that the object
1289         holding it is custom in some way.
1290
1291 2011-04-25  Gavin Barraclough  <barraclough@apple.com>
1292
1293         Reviewed by Geoff Garen.
1294
1295         https://bugs.webkit.org/show_bug.cgi?id=59405
1296         DFG JIT - add type speculation for integer & array types, for vars & args.
1297
1298         If a var or argument is used as the base for a GetByVal or PutByVal access
1299         we are speculating that it is of type Array (we only generate code on the
1300         speculative path to perform array accesses). By typing the var or args slot
1301         as Array, and checking on entry to the function (in the case of args), and
1302         each time the local is written to, we can avoid a type check at each point
1303         the array is accessed. This will typically hoist type checks out of loops.
1304
1305         Similarly, any local that is incremented or decremented, or is the input or
1306         output or a bitwise operator, is likely to be an integer. By typing the
1307         local as int32 we can avoid speculation checks on access, and tagging when
1308         writing to the slot. All accesses can become 32bit instead of 64.
1309
1310         * dfg/DFGByteCodeParser.cpp:
1311         (JSC::DFG::ByteCodeParser::set):
1312         (JSC::DFG::ByteCodeParser::predictArray):
1313         (JSC::DFG::ByteCodeParser::predictInt32):
1314         (JSC::DFG::ByteCodeParser::parseBlock):
1315         * dfg/DFGGraph.h:
1316         (JSC::DFG::PredictionSlot::PredictionSlot):
1317         (JSC::DFG::Graph::Graph):
1318         (JSC::DFG::Graph::predict):
1319         (JSC::DFG::Graph::getPrediction):
1320         * dfg/DFGJITCompiler.cpp:
1321         (JSC::DFG::JITCompiler::compileFunction):
1322         * dfg/DFGJITCompiler.h:
1323         (JSC::DFG::JITCompiler::tagFor):
1324         (JSC::DFG::JITCompiler::payloadFor):
1325         * dfg/DFGNode.h:
1326         * dfg/DFGNonSpeculativeJIT.cpp:
1327         (JSC::DFG::NonSpeculativeJIT::compile):
1328         * dfg/DFGSpeculativeJIT.cpp:
1329         (JSC::DFG::SpeculativeJIT::compile):
1330         (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
1331         (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
1332         * dfg/DFGSpeculativeJIT.h:
1333         * runtime/Executable.cpp:
1334         (JSC::tryDFGCompile):
1335
1336 2011-04-25  David Levin  <levin@chromium.org>
1337
1338         Reviewed by James Robinson.
1339
1340         Fix OwnPtr strict mode violation in MessageQueue.h
1341         https://bugs.webkit.org/show_bug.cgi?id=59400
1342
1343         * wtf/MessageQueue.h:
1344         (WTF::::waitForMessage):
1345         (WTF::::waitForMessageFilteredWithTimeout):
1346         (WTF::::tryGetMessage):
1347
1348 2011-04-25  Adam Barth  <abarth@webkit.org>
1349
1350         Reviewed by Darin Adler.
1351
1352         JavaScriptCore should play nice strict OwnPtrs
1353         https://bugs.webkit.org/show_bug.cgi?id=59401
1354
1355         * dfg/DFGByteCodeParser.cpp:
1356         (JSC::DFG::ByteCodeParser::parse):
1357         * heap/Heap.cpp:
1358         (JSC::TypeCounter::TypeCounter):
1359         * jit/JITStubs.cpp:
1360         (JSC::JITThunks::JITThunks):
1361         * parser/JSParser.cpp:
1362         (JSC::JSParser::Scope::Scope):
1363         * yarr/YarrJIT.cpp:
1364         (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
1365
1366 2011-04-25  Mark Rowe  <mrowe@apple.com>
1367
1368         Build fix.
1369
1370         * wtf/ListHashSet.h:
1371
1372 2011-04-25  Gavin Barraclough  <barraclough@apple.com>
1373
1374         Reviewed by Oliver Hunt.
1375
1376         Bug 59370 - DFG JIT - fix leak of BlocksBlocks
1377         (put the blocks immediately into an OwnPtr).
1378
1379         * dfg/DFGByteCodeParser.cpp:
1380         (JSC::DFG::ByteCodeParser::parse):
1381
1382 2011-04-25  James Robinson  <jamesr@chromium.org>
1383
1384         Reviewed by David Levin.
1385
1386         Fix strict OwnPtr violations in ListHashSet and RenderLayerCompositor
1387         https://bugs.webkit.org/show_bug.cgi?id=59353
1388
1389         * wtf/ListHashSet.h:
1390         (WTF::::ListHashSet):
1391
1392 2011-04-25  David Levin  <levin@chromium.org>
1393
1394         Reviewed by Adam Barth.
1395
1396         Fix PassOwnPtr issues in Structure and JSGlobalData.cpp
1397         https://bugs.webkit.org/show_bug.cgi?id=59347
1398
1399         * runtime/JSGlobalData.cpp:
1400         (JSC::JSGlobalData::JSGlobalData):
1401         * runtime/Structure.cpp:
1402         (JSC::Structure::copyPropertyTable):
1403         (JSC::Structure::createPropertyMap):
1404         * runtime/Structure.h:
1405
1406 2011-04-25  Oliver Hunt  <oliver@apple.com>
1407
1408         Reviewed by Geoffrey Garen.
1409
1410         Make ClassInfo required when creating a Structure
1411         https://bugs.webkit.org/show_bug.cgi?id=59340
1412
1413         Add ClassInfo to all those types which currently don't
1414         have it, and add an assertion to Structure::create to
1415         ensure that the provided classInfo is not null.
1416
1417         * runtime/Executable.h:
1418         (JSC::EvalExecutable::createStructure):
1419         (JSC::ProgramExecutable::createStructure):
1420         (JSC::FunctionExecutable::createStructure):
1421         * runtime/GetterSetter.cpp:
1422         * runtime/GetterSetter.h:
1423         (JSC::GetterSetter::createStructure):
1424         * runtime/JSAPIValueWrapper.cpp:
1425         * runtime/JSAPIValueWrapper.h:
1426         (JSC::JSAPIValueWrapper::createStructure):
1427         * runtime/JSCell.cpp:
1428         * runtime/JSCell.h:
1429         * runtime/JSString.cpp:
1430         * runtime/JSString.h:
1431         (JSC::RopeBuilder::createStructure):
1432         * runtime/Structure.h:
1433         (JSC::Structure::create):
1434         (JSC::JSCell::createDummyStructure):
1435
1436 2011-04-25  David Levin  <levin@chromium.org>
1437
1438         Reviewed by Adam Barth.
1439
1440         PropertyMapHashTable.h should use adoptPtr instead of implicit conversions to PassRefPtr.
1441         https://bugs.webkit.org/show_bug.cgi?id=59342
1442
1443         This patch is to prepare for the strict OwnPtr hack-a-thon.
1444
1445         * runtime/PropertyMapHashTable.h:
1446         (JSC::PropertyTable::copy):
1447
1448 2011-04-25  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
1449
1450         Reviewed by Gavin Barraclough.
1451
1452         Rationalize MacroAssembler branch methods
1453         https://bugs.webkit.org/show_bug.cgi?id=58950
1454
1455         split out the 'Condition' enum into 'RelationalCondition' and 'ResultCondition' 
1456         and apply related changes (only for SH4 platforms).
1457
1458         * assembler/MacroAssemblerSH4.cpp:
1459         * assembler/MacroAssemblerSH4.h:
1460         (JSC::MacroAssemblerSH4::compare32):
1461         (JSC::MacroAssemblerSH4::branch32WithUnalignedHalfWords):
1462         (JSC::MacroAssemblerSH4::branchDouble):
1463         (JSC::MacroAssemblerSH4::branch32):
1464         (JSC::MacroAssemblerSH4::branchTest8):
1465         (JSC::MacroAssemblerSH4::branch8):
1466         (JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32):
1467         (JSC::MacroAssemblerSH4::test8):
1468         (JSC::MacroAssemblerSH4::branch16):
1469         (JSC::MacroAssemblerSH4::branchTest32):
1470         (JSC::MacroAssemblerSH4::branchAdd32):
1471         (JSC::MacroAssemblerSH4::branchMul32):
1472         (JSC::MacroAssemblerSH4::branchSub32):
1473         (JSC::MacroAssemblerSH4::branchOr32):
1474         (JSC::MacroAssemblerSH4::branchConvertDoubleToInt32):
1475         (JSC::MacroAssemblerSH4::branchPtrWithPatch):
1476         (JSC::MacroAssemblerSH4::SH4Condition):
1477         * assembler/SH4Assembler.h:
1478         (JSC::SH4Assembler::cmpEqImmR0):
1479
1480 2011-04-25  Adam Barth  <abarth@webkit.org>
1481
1482         Reviewed by Eric Seidel.
1483
1484         PropertyMapHashTable should work with strict OwnPtr
1485         https://bugs.webkit.org/show_bug.cgi?id=59337
1486
1487         This patch is in preparation for the strict OwnPtr hack-a-thon.
1488
1489         * runtime/PropertyMapHashTable.h:
1490         (JSC::PropertyTable::PropertyTable):
1491         (JSC::PropertyTable::addDeletedOffset):
1492
1493 2011-04-25  Geoffrey Garen  <ggaren@apple.com>
1494
1495         Reviewed by Sam Weinig.
1496
1497         Nixed MarkStack::deprecatedAppend, since it has no clients left.
1498
1499         * heap/MarkStack.h:
1500
1501 2011-04-23  Gavin Barraclough  <barraclough@apple.com>
1502
1503         Reviewed by Oliver Hunt.
1504
1505         Bug 59287 - DFG JIT - Handle temporaries as vars, allowing support for ?:
1506
1507         SetLocals to temporaries will only be generated if they are used within other
1508         blocks, due to the SSA based DCE.
1509
1510         * dfg/DFGByteCodeParser.cpp:
1511         (JSC::DFG::ByteCodeParser::ByteCodeParser):
1512         (JSC::DFG::ByteCodeParser::get):
1513         (JSC::DFG::ByteCodeParser::set):
1514         (JSC::DFG::ByteCodeParser::getLocal):
1515         (JSC::DFG::ByteCodeParser::setLocal):
1516         (JSC::DFG::ByteCodeParser::parseBlock):
1517         (JSC::DFG::ByteCodeParser::processPhiStack):
1518         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
1519         (JSC::DFG::ByteCodeParser::parse):
1520         * dfg/DFGGraph.h:
1521         (JSC::DFG::BasicBlock::BasicBlock):
1522
1523 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
1524
1525         Reviewed by Sam Weinig & Geoff Garen.
1526
1527         Bug 59266 - DFG JIT - Add SSA style DCE
1528
1529         This works by making GetLocal nodes reference SetLocal nodes from prior blocks,
1530         via intermediate Phi nodes. Whenever we add a GetLocal to the graph, also add a
1531         matching child Phi, and add the Phi to a work queue to add references to prior
1532         definitions once we have the full CFG & can determine predecessors. This process
1533         is iterative, inserting new phis into predecessors as necessary.
1534
1535         * dfg/DFGByteCodeParser.cpp:
1536         (JSC::DFG::ByteCodeParser::getVariable):
1537         (JSC::DFG::ByteCodeParser::setVariable):
1538         (JSC::DFG::ByteCodeParser::getArgument):
1539         (JSC::DFG::ByteCodeParser::setArgument):
1540         (JSC::DFG::ByteCodeParser::parseBlock):
1541         (JSC::DFG::ByteCodeParser::processWorkQueue):
1542         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
1543         (JSC::DFG::ByteCodeParser::parse):
1544         * dfg/DFGGraph.cpp:
1545         (JSC::DFG::Graph::dump):
1546         (JSC::DFG::Graph::refChildren):
1547         * dfg/DFGGraph.h:
1548         (JSC::DFG::Graph::ref):
1549         * dfg/DFGNode.h:
1550         (JSC::DFG::Node::ref):
1551         * dfg/DFGNonSpeculativeJIT.cpp:
1552         (JSC::DFG::NonSpeculativeJIT::compile):
1553         * dfg/DFGScoreBoard.h:
1554         (JSC::DFG::ScoreBoard::~ScoreBoard):
1555         (JSC::DFG::ScoreBoard::dump):
1556         * dfg/DFGSpeculativeJIT.cpp:
1557         (JSC::DFG::SpeculativeJIT::compile):
1558
1559 2011-04-22  Vitaly Repeshko  <vitalyr@chromium.org>
1560
1561         Reviewed by Adam Barth.
1562
1563         Add missing default constructors for HashMap iterator specializations.
1564         https://bugs.webkit.org/show_bug.cgi?id=59250
1565
1566         * wtf/HashIterators.h:
1567         * wtf/HashTable.h:
1568         (WTF::HashTableConstIterator::HashTableConstIterator): Added cast
1569         to help compiler find the function template.
1570
1571 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
1572
1573         Reviewed by Sam Weinig.
1574
1575         Bug 59262 - DFG JIT - reduce size of VariableRecord
1576
1577         We never need both the get & set node, only the most recent
1578         (which is always a set, if both exist).
1579
1580         * dfg/DFGByteCodeParser.cpp:
1581         (JSC::DFG::ByteCodeParser::getVariable):
1582         (JSC::DFG::ByteCodeParser::setVariable):
1583         (JSC::DFG::ByteCodeParser::getArgument):
1584         (JSC::DFG::ByteCodeParser::setArgument):
1585         (JSC::DFG::ByteCodeParser::parseBlock):
1586         * dfg/DFGGraph.h:
1587         (JSC::DFG::VariableRecord::VariableRecord):
1588
1589 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
1590
1591         Reviewed by Geoffrey Garen.
1592
1593         Bug 59254 - DFG JIT - retain VariableRecords for args/var in all basic blocks,
1594         such that this information is available for DCE.  Also, since this enlarges the
1595         size of BasicBlock, make Graph hold a vector of pointers to basic blocks, not a
1596         vector of blocks.
1597
1598         * dfg/DFGByteCodeParser.cpp:
1599         (JSC::DFG::ByteCodeParser::ByteCodeParser):
1600         (JSC::DFG::ByteCodeParser::get):
1601         (JSC::DFG::ByteCodeParser::set):
1602         (JSC::DFG::ByteCodeParser::getVariable):
1603         (JSC::DFG::ByteCodeParser::setVariable):
1604         (JSC::DFG::ByteCodeParser::getArgument):
1605         (JSC::DFG::ByteCodeParser::setArgument):
1606         (JSC::DFG::ByteCodeParser::parseBlock):
1607         (JSC::DFG::ByteCodeParser::setupPredecessors):
1608         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
1609         (JSC::DFG::ByteCodeParser::parse):
1610         * dfg/DFGGraph.cpp:
1611         (JSC::DFG::Graph::dump):
1612         * dfg/DFGGraph.h:
1613         (JSC::DFG::VariableRecord::VariableRecord):
1614         (JSC::DFG::BasicBlock::BasicBlock):
1615         (JSC::DFG::BasicBlock::getBytecodeBegin):
1616         (JSC::DFG::Graph::blockIndexForBytecodeOffset):
1617         (JSC::DFG::Graph::blockForBytecodeOffset):
1618         * dfg/DFGNonSpeculativeJIT.cpp:
1619         (JSC::DFG::NonSpeculativeJIT::compile):
1620         * dfg/DFGSpeculativeJIT.cpp:
1621         (JSC::DFG::SpeculativeJIT::compile):
1622         * dfg/DFGSpeculativeJIT.h:
1623         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
1624
1625 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
1626
1627         Errk, build fix.
1628
1629         * dfg/DFGSpeculativeJIT.cpp:
1630         (JSC::DFG::SpeculativeJIT::compile):
1631
1632 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
1633
1634         Reviewed by Sam Weinig.
1635
1636         Quick cleanup to SpeculativeJIT/NonSpeculativeJIT compile loop,
1637         move out the call to checkConsistency().
1638
1639         * dfg/DFGNonSpeculativeJIT.cpp:
1640         (JSC::DFG::NonSpeculativeJIT::compile):
1641         * dfg/DFGSpeculativeJIT.cpp:
1642         (JSC::DFG::SpeculativeJIT::compile):
1643         * dfg/DFGSpeculativeJIT.h:
1644         (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
1645         (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
1646
1647 2011-04-21  Vitaly Repeshko  <vitalyr@chromium.org>
1648
1649         Reviewed by Adam Barth.
1650
1651         Provide default constructors for HashMap iterators.
1652         https://bugs.webkit.org/show_bug.cgi?id=59151
1653
1654         These will be used to implement an iterator over EventTarget's
1655         listeners.
1656
1657         * wtf/HashTable.h:
1658         (WTF::HashTableConstIteratorAdapter::HashTableConstIteratorAdapter):
1659         (WTF::HashTableIteratorAdapter::HashTableIteratorAdapter):
1660
1661 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
1662
1663         Reviewed by Geoff Garen.
1664
1665         Bug 59232 - DFG JIT - Add predecessor links to BasicBlocks
1666
1667         These will be necessary for DCE support.
1668         Also factor allocateVirtualRegisters out into its own method.
1669
1670         * dfg/DFGByteCodeParser.cpp:
1671         (JSC::DFG::ByteCodeParser::setupPredecessors):
1672         (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
1673         (JSC::DFG::ByteCodeParser::parse):
1674         * dfg/DFGGraph.h:
1675         (JSC::DFG::Graph::blockForBytecodeOffset):
1676         * dfg/DFGNode.h:
1677         (JSC::DFG::Node::isTerminal):
1678
1679 2011-04-22  Oliver Hunt  <oliver@apple.com>
1680
1681         Reviewed by Geoffrey Garen.
1682
1683         Object.create creates uncachable objects
1684         https://bugs.webkit.org/show_bug.cgi?id=59164
1685
1686         Use the prototype object's inheritorID, as we
1687         should always have done
1688
1689         * runtime/JSGlobalObject.cpp:
1690         (JSC::JSGlobalObject::reset):
1691         (JSC::JSGlobalObject::visitChildren):
1692         * runtime/JSGlobalObject.h:
1693         (JSC::JSGlobalObject::nullPrototypeObjectStructure):
1694         * runtime/ObjectConstructor.cpp:
1695         (JSC::objectConstructorCreate):
1696
1697 2011-04-22  Gavin Barraclough  <barraclough@apple.com>
1698
1699         Reviewed by Sam Weinig.
1700
1701         Bug 59222 - DFG JIT - don't allocate virtual registers to nodes with no result
1702
1703         We currently allocate virtual registers to nodes which have no result - these are
1704         clearly unused, and may result in us allocating a larger than necessary stack frame.
1705
1706         Encapsulate Node::virtualRegister such that we can ASSERT this is only called on
1707         nodes that have results, and improve the quality of output from the consistency check.
1708
1709         * dfg/DFGByteCodeParser.cpp:
1710         (JSC::DFG::ByteCodeParser::parse):
1711         * dfg/DFGGraph.cpp:
1712         (JSC::DFG::Graph::dump):
1713         * dfg/DFGGraph.h:
1714         (JSC::DFG::Graph::ref):
1715         (JSC::DFG::Graph::deref):
1716         * dfg/DFGJITCodeGenerator.cpp:
1717         (JSC::DFG::JITCodeGenerator::fillInteger):
1718         (JSC::DFG::JITCodeGenerator::fillDouble):
1719         (JSC::DFG::JITCodeGenerator::fillJSValue):
1720         (JSC::DFG::JITCodeGenerator::dump):
1721         (JSC::DFG::JITCodeGenerator::checkConsistency):
1722         * dfg/DFGJITCodeGenerator.h:
1723         (JSC::DFG::JITCodeGenerator::canReuse):
1724         (JSC::DFG::JITCodeGenerator::isFilled):
1725         (JSC::DFG::JITCodeGenerator::isFilledDouble):
1726         (JSC::DFG::JITCodeGenerator::use):
1727         (JSC::DFG::JITCodeGenerator::integerResult):
1728         (JSC::DFG::JITCodeGenerator::noResult):
1729         (JSC::DFG::JITCodeGenerator::cellResult):
1730         (JSC::DFG::JITCodeGenerator::jsValueResult):
1731         (JSC::DFG::JITCodeGenerator::doubleResult):
1732         (JSC::DFG::JITCodeGenerator::initConstantInfo):
1733         * dfg/DFGJITCompiler.cpp:
1734         (JSC::DFG::JITCompiler::fillNumericToDouble):
1735         (JSC::DFG::JITCompiler::fillInt32ToInteger):
1736         (JSC::DFG::JITCompiler::fillToJS):
1737         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
1738         * dfg/DFGNode.h:
1739         (JSC::DFG::Node::Node):
1740         (JSC::DFG::Node::hasResult):
1741         (JSC::DFG::Node::virtualRegister):
1742         (JSC::DFG::Node::setVirtualRegister):
1743         (JSC::DFG::Node::refCount):
1744         (JSC::DFG::Node::ref):
1745         (JSC::DFG::Node::deref):
1746         (JSC::DFG::Node::adjustedRefCount):
1747         * dfg/DFGNonSpeculativeJIT.cpp:
1748         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
1749         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
1750         (JSC::DFG::NonSpeculativeJIT::compile):
1751         * dfg/DFGScoreBoard.h:
1752         (JSC::DFG::ScoreBoard::use):
1753         * dfg/DFGSpeculativeJIT.cpp:
1754         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
1755         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
1756         (JSC::DFG::SpeculativeJIT::compile):
1757
1758 2011-04-22  Sam Weinig  <sam@webkit.org>
1759
1760         Reviewed by Gavin Barraclough and Oliver Hunt.
1761
1762         Arrays should participate in global object forwarding fun
1763         https://bugs.webkit.org/show_bug.cgi?id=59215
1764
1765         * runtime/JSGlobalObject.h:
1766         (JSC::constructEmptyArray):
1767         (JSC::constructArray):
1768         Add variants of constructArray that take a global object.
1769
1770 2011-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1771
1772         Unreviewed, rolling out r84650 and r84654.
1773         http://trac.webkit.org/changeset/84650
1774         http://trac.webkit.org/changeset/84654
1775         https://bugs.webkit.org/show_bug.cgi?id=59218
1776
1777         Broke Windows build (Requested by bweinstein on #webkit).
1778
1779         * API/JSCallbackObjectFunctions.h:
1780         (JSC::::init):
1781         * JavaScriptCore.exp:
1782         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1783         * heap/Handle.h:
1784         (JSC::HandleBase::operator!):
1785         (JSC::HandleBase::operator UnspecifiedBoolType*):
1786         (JSC::HandleTypes::getFromSlot):
1787         * heap/HandleHeap.cpp:
1788         (JSC::HandleHeap::markStrongHandles):
1789         (JSC::HandleHeap::markWeakHandles):
1790         (JSC::HandleHeap::finalizeWeakHandles):
1791         (JSC::HandleHeap::writeBarrier):
1792         (JSC::HandleHeap::protectedGlobalObjectCount):
1793         (JSC::HandleHeap::isValidWeakNode):
1794         * heap/HandleHeap.h:
1795         (JSC::HandleHeap::copyWeak):
1796         (JSC::HandleHeap::makeWeak):
1797         (JSC::HandleHeap::Node::slot):
1798         * heap/HandleStack.cpp:
1799         (JSC::HandleStack::mark):
1800         (JSC::HandleStack::grow):
1801         * heap/HandleStack.h:
1802         (JSC::HandleStack::zapTo):
1803         (JSC::HandleStack::push):
1804         * heap/Heap.cpp:
1805         (JSC::HandleHeap::protectedObjectTypeCounts):
1806         * heap/Local.h:
1807         (JSC::::set):
1808         * heap/Strong.h:
1809         (JSC::Strong::set):
1810         * heap/Weak.h:
1811         (JSC::Weak::set):
1812         * runtime/StructureTransitionTable.h:
1813         (JSC::StructureTransitionTable::singleTransition):
1814         (JSC::StructureTransitionTable::setSingleTransition):
1815         * runtime/WeakGCMap.h:
1816         (JSC::WeakGCMap::add):
1817         (JSC::WeakGCMap::set):
1818         * runtime/WriteBarrier.h:
1819
1820 2011-04-22  Brian Weinstein  <bweinstein@apple.com>
1821
1822         Part of Windows build fix from r84650.
1823
1824         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1825
1826 2011-04-22  Oliver Hunt  <oliver@apple.com>
1827
1828         Reviewed by Geoffrey Garen.
1829
1830         Make it harder to use HandleSlot incorrectly
1831         https://bugs.webkit.org/show_bug.cgi?id=59205
1832
1833         Just add a little type fudging to make it harder to
1834         incorrectly assign through a HandleSlot.
1835
1836         * API/JSCallbackObjectFunctions.h:
1837         (JSC::::init):
1838         * JavaScriptCore.exp:
1839         * heap/Handle.h:
1840         (JSC::HandleBase::operator!):
1841         (JSC::HandleBase::operator UnspecifiedBoolType*):
1842         (JSC::HandleTypes::getFromSlot):
1843         * heap/HandleHeap.cpp:
1844         (JSC::HandleHeap::markStrongHandles):
1845         (JSC::HandleHeap::markWeakHandles):
1846         (JSC::HandleHeap::finalizeWeakHandles):
1847         (JSC::HandleHeap::writeBarrier):
1848         (JSC::HandleHeap::protectedGlobalObjectCount):
1849         (JSC::HandleHeap::isValidWeakNode):
1850         * heap/HandleHeap.h:
1851         (JSC::HandleHeap::copyWeak):
1852         (JSC::HandleHeap::makeWeak):
1853         (JSC::HandleHeap::Node::slot):
1854         * heap/HandleStack.cpp:
1855         (JSC::HandleStack::mark):
1856         (JSC::HandleStack::grow):
1857         * heap/HandleStack.h:
1858         (JSC::HandleStack::zapTo):
1859         (JSC::HandleStack::push):
1860         * heap/Heap.cpp:
1861         (JSC::HandleHeap::protectedObjectTypeCounts):
1862         * heap/Local.h:
1863         (JSC::::set):
1864         * heap/Strong.h:
1865         (JSC::Strong::set):
1866         * heap/Weak.h:
1867         (JSC::Weak::set):
1868         * runtime/StructureTransitionTable.h:
1869         (JSC::StructureTransitionTable::singleTransition):
1870         (JSC::StructureTransitionTable::setSingleTransition):
1871         * runtime/WeakGCMap.h:
1872         (JSC::WeakGCMap::add):
1873         (JSC::WeakGCMap::set):
1874         * runtime/WriteBarrier.h:
1875         (JSC::OpaqueJSValue::toJSValue):
1876         (JSC::OpaqueJSValue::toJSValueRef):
1877         (JSC::OpaqueJSValue::fromJSValue):
1878
1879 2011-04-22  Patrick Gansterer  <paroga@webkit.org>
1880
1881         Unreviewed. Build fix for ENABLE(INTERPRETER) after r84556.
1882
1883         * bytecode/CodeBlock.cpp:
1884         (JSC::CodeBlock::visitAggregate):
1885
1886 2011-04-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1887
1888         Unreviewed, rolling out r84583.
1889         http://trac.webkit.org/changeset/84583
1890         https://bugs.webkit.org/show_bug.cgi?id=59173
1891
1892         "broke
1893         http://trac.webkit.org/export/84593/trunk/LayoutTests/fast/js
1894         /Object-create.html" (Requested by ggaren on #webkit).
1895
1896         * runtime/ObjectConstructor.cpp:
1897         (JSC::objectConstructorCreate):
1898
1899 2011-04-21  Maciej Stachowiak  <mjs@apple.com>
1900
1901         Reviewed by Adam Roben.
1902
1903         Add a feature define to allow <details> and <summary> to be disabled
1904         https://bugs.webkit.org/show_bug.cgi?id=59118
1905         <rdar://problem/9257045>
1906
1907         * Configurations/FeatureDefines.xcconfig:
1908
1909 2011-04-21  Oliver Hunt  <oliver@apple.com>
1910
1911         Reviewed by Geoffrey Garen.
1912
1913         Object.create creates uncachable objects
1914         https://bugs.webkit.org/show_bug.cgi?id=59164
1915
1916         Use the prototype object's inheritorID, as we
1917         should always have done
1918
1919         * runtime/ObjectConstructor.cpp:
1920         (JSC::objectConstructorCreate):
1921
1922 2011-04-21  Oliver Hunt  <oliver@apple.com>
1923
1924         Reviewed by Geoffrey Garen.
1925
1926         Start moving to a general visitor pattern for GC traversal
1927         https://bugs.webkit.org/show_bug.cgi?id=59141
1928
1929         This is just a rename:
1930             markChildren -> visitChildren
1931             markAggregate -> visitAggregate
1932             markStack -> visitor
1933             MarkStack -> typedef'd to SlotVisitor
1934
1935         * API/JSCallbackObject.h:
1936         (JSC::JSCallbackObjectData::visitChildren):
1937         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
1938         (JSC::JSCallbackObject::visitChildren):
1939         * JavaScriptCore.exp:
1940         * bytecode/CodeBlock.cpp:
1941         (JSC::CodeBlock::visitStructures):
1942         (JSC::EvalCodeCache::visitAggregate):
1943         (JSC::CodeBlock::visitAggregate):
1944         * bytecode/CodeBlock.h:
1945         * bytecode/EvalCodeCache.h:
1946         * bytecode/Instruction.h:
1947         (JSC::PolymorphicAccessStructureList::visitAggregate):
1948         * bytecode/StructureStubInfo.cpp:
1949         (JSC::StructureStubInfo::visitAggregate):
1950         * bytecode/StructureStubInfo.h:
1951         * debugger/DebuggerActivation.cpp:
1952         (JSC::DebuggerActivation::visitChildren):
1953         * debugger/DebuggerActivation.h:
1954         * heap/HandleHeap.cpp:
1955         (JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
1956         (JSC::HandleHeap::markStrongHandles):
1957         (JSC::HandleHeap::markWeakHandles):
1958         * heap/HandleHeap.h:
1959         * heap/HandleStack.cpp:
1960         (JSC::HandleStack::mark):
1961         * heap/HandleStack.h:
1962         * heap/Heap.cpp:
1963         (JSC::Heap::markProtectedObjects):
1964         (JSC::Heap::markTempSortVectors):
1965         (JSC::Heap::markRoots):
1966         * heap/Heap.h:
1967         * heap/MarkStack.cpp:
1968         (JSC::MarkStack::visitChildren):
1969         (JSC::MarkStack::drain):
1970         * heap/MarkStack.h:
1971         (JSC::HeapRootVisitor::HeapRootVisitor):
1972         (JSC::HeapRootVisitor::mark):
1973         (JSC::HeapRootVisitor::visitor):
1974         * heap/MarkedSpace.h:
1975         * runtime/ArgList.cpp:
1976         (JSC::MarkedArgumentBuffer::markLists):
1977         * runtime/ArgList.h:
1978         * runtime/Arguments.cpp:
1979         (JSC::Arguments::visitChildren):
1980         * runtime/Arguments.h:
1981         * runtime/Executable.cpp:
1982         (JSC::EvalExecutable::visitChildren):
1983         (JSC::ProgramExecutable::visitChildren):
1984         (JSC::FunctionExecutable::visitChildren):
1985         * runtime/Executable.h:
1986         * runtime/GetterSetter.cpp:
1987         (JSC::GetterSetter::visitChildren):
1988         * runtime/GetterSetter.h:
1989         (JSC::GetterSetter::createStructure):
1990         * runtime/JSAPIValueWrapper.h:
1991         (JSC::JSAPIValueWrapper::createStructure):
1992         * runtime/JSActivation.cpp:
1993         (JSC::JSActivation::visitChildren):
1994         * runtime/JSActivation.h:
1995         * runtime/JSArray.cpp:
1996         (JSC::JSArray::visitChildren):
1997         * runtime/JSArray.h:
1998         (JSC::JSArray::visitDirect):
1999         * runtime/JSCell.h:
2000         (JSC::JSCell::JSCell::visitChildren):
2001         * runtime/JSFunction.cpp:
2002         (JSC::JSFunction::visitChildren):
2003         * runtime/JSFunction.h:
2004         * runtime/JSGlobalObject.cpp:
2005         (JSC::visitIfNeeded):
2006         (JSC::JSGlobalObject::visitChildren):
2007         * runtime/JSGlobalObject.h:
2008         * runtime/JSONObject.cpp:
2009         * runtime/JSObject.cpp:
2010         (JSC::JSObject::visitChildren):
2011         * runtime/JSObject.h:
2012         (JSC::JSObject::visitDirect):
2013         * runtime/JSPropertyNameIterator.cpp:
2014         (JSC::JSPropertyNameIterator::visitChildren):
2015         * runtime/JSPropertyNameIterator.h:
2016         (JSC::JSPropertyNameIterator::createStructure):
2017         * runtime/JSStaticScopeObject.cpp:
2018         (JSC::JSStaticScopeObject::visitChildren):
2019         * runtime/JSStaticScopeObject.h:
2020         * runtime/JSTypeInfo.h:
2021         (JSC::TypeInfo::TypeInfo):
2022         (JSC::TypeInfo::overridesVisitChildren):
2023         * runtime/JSWrapperObject.cpp:
2024         (JSC::JSWrapperObject::visitChildren):
2025         * runtime/JSWrapperObject.h:
2026         * runtime/JSZombie.h:
2027         (JSC::JSZombie::visitChildren):
2028         * runtime/NativeErrorConstructor.cpp:
2029         (JSC::NativeErrorConstructor::visitChildren):
2030         * runtime/NativeErrorConstructor.h:
2031         * runtime/RegExpObject.cpp:
2032         (JSC::RegExpObject::visitChildren):
2033         * runtime/RegExpObject.h:
2034         * runtime/ScopeChain.cpp:
2035         (JSC::ScopeChainNode::visitChildren):
2036         * runtime/ScopeChain.h:
2037         * runtime/SmallStrings.cpp:
2038         (JSC::SmallStrings::visitChildren):
2039         * runtime/SmallStrings.h:
2040         * runtime/Structure.cpp:
2041         (JSC::Structure::Structure):
2042         (JSC::Structure::visitChildren):
2043         * runtime/Structure.h:
2044         * runtime/StructureChain.cpp:
2045         (JSC::StructureChain::visitChildren):
2046         * runtime/StructureChain.h:
2047         (JSC::StructureChain::createStructure):
2048
2049 2011-04-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2050
2051         Unreviewed, rolling out r84548.
2052         http://trac.webkit.org/changeset/84548
2053         https://bugs.webkit.org/show_bug.cgi?id=59144
2054
2055         Broke chromium-win build (Requested by aklein on #webkit).
2056
2057         * wtf/Platform.h:
2058
2059 2011-04-21  Adam Klein  <adamk@chromium.org>
2060
2061         Reviewed by David Levin.
2062
2063         [fileapi] Worker File API calls that create Blobs fail in debug builds due to random number generator thread assertion
2064         https://bugs.webkit.org/show_bug.cgi?id=55728
2065
2066         Enable WTF_MULTIPLE_THREADS for Chromium.
2067
2068         * wtf/Platform.h:
2069
2070 2011-04-20  Michael Saboff  <msaboff@apple.com>
2071
2072         Reviewed by Geoff Garen.
2073
2074         JSString::resolveRope inefficient for common 2 fiber case
2075         https://bugs.webkit.org/show_bug.cgi?id=58994
2076
2077         Split JSString::resolveRope into three routines.
2078         resolveRope allocates the new buffer and handles the 1 or 2
2079         fiber case with single level fibers.
2080         resolveRopeSlowCase handles the general case.
2081         outOfMemory handles the rare out of memory exception case.
2082
2083         * runtime/JSString.cpp:
2084         (JSC::JSString::resolveRope):
2085         (JSC::JSString::resolveRopeSlowCase):
2086         (JSC::JSString::outOfMemory):
2087         * runtime/JSString.h:
2088
2089 2011-04-20  Adam Klein  <adamk@chromium.org>
2090
2091         Reviewed by David Levin.
2092
2093         Rename all uses of JSC_MULTIPLE_THREADS under wtf/... to WTF_MULTIPLE_THREADS
2094         https://bugs.webkit.org/show_bug.cgi?id=59040
2095
2096         This will be used to fix https://bugs.webkit.org/show_bug.cgi?id=55728
2097         by enabling WTF_MULTIPLE_THREADS for Chromium.
2098
2099         * wtf/CryptographicallyRandomNumber.cpp:
2100         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
2101         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
2102         * wtf/FastMalloc.cpp:
2103         * wtf/Platform.h:
2104         Enable WTF_MULTIPLE_THREADS whenever JSC_MULTIPLE_THREADS is enabled.
2105         * wtf/RandomNumber.cpp:
2106         (WTF::randomNumber):
2107         * wtf/RefCountedLeakCounter.cpp:
2108         (WTF::RefCountedLeakCounter::increment):
2109         (WTF::RefCountedLeakCounter::decrement):
2110         * wtf/dtoa.cpp:
2111         (WTF::pow5mult):
2112
2113 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2114
2115         Rubber stamped by Geoff Garen
2116
2117         Bug 59069 - DFG JIT - register allocate r8, r9, r10
2118
2119         * dfg/DFGJITCompiler.h:
2120         (JSC::DFG::JITCompiler::gprToRegisterID):
2121
2122 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2123
2124         Build fix - revert accidental change.
2125
2126         * wtf/Platform.h:
2127
2128 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2129
2130         Reviewed by Sam Weinig.
2131
2132         Add SAMPLING_FLAGS tool to DFG JIT.
2133
2134         * bytecode/SamplingTool.h:
2135         (JSC::SamplingFlags::addressOfFlags):
2136         * dfg/DFGJITCompiler.cpp:
2137         (JSC::DFG::JITCompiler::setSamplingFlag):
2138         (JSC::DFG::JITCompiler::clearSamplingFlag):
2139         * dfg/DFGJITCompiler.h:
2140         * jit/JITInlineMethods.h:
2141         (JSC::JIT::setSamplingFlag):
2142         (JSC::JIT::clearSamplingFlag):
2143         * wtf/Platform.h:
2144
2145 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2146
2147         Reviewed by Oliver Hunt.
2148
2149         Bug 59022 - DFG JIT - Optimize branch-on-relational-compare
2150
2151         If a relational compare (< or <=) is immediately followed by a branch,
2152         we can combine the two, avoiding generation of a boolean into a register.
2153
2154         * assembler/MacroAssemblerX86Common.h:
2155         (JSC::MacroAssemblerX86Common::branch32):
2156         (JSC::MacroAssemblerX86Common::invert):
2157         (JSC::MacroAssemblerX86Common::commute):
2158         * dfg/DFGNode.h:
2159         (JSC::DFG::Node::adjustedRefCount):
2160         * dfg/DFGSpeculativeJIT.cpp:
2161         (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
2162         (JSC::DFG::SpeculativeJIT::compile):
2163         * dfg/DFGSpeculativeJIT.h:
2164         (JSC::DFG::SpeculativeJIT::isJSConstantWithInt32Value):
2165         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
2166
2167 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2168
2169         ARMv7 build fix II.
2170
2171         * jit/JITOpcodes32_64.cpp:
2172         (JSC::JIT::softModulo):
2173
2174 2011-04-20  Gavin Barraclough  <barraclough@apple.com>
2175
2176         ARMv7 build fix.
2177
2178         * assembler/MacroAssemblerARM.h:
2179         (JSC::MacroAssemblerARM::test8):
2180
2181 2011-04-19  Gavin Barraclough  <barraclough@apple.com>
2182
2183         Reviewed by Oliver Hunt.
2184
2185         Rationalize MacroAssembler branch methods
2186         https://bugs.webkit.org/show_bug.cgi?id=58950
2187
2188         The MacroAssembler currently exposes x86's weird behaviour that the 'setcc'
2189         instruction only sets the low 8 bits of a register. Stop that.
2190
2191         Having done so, to clarify remove the 'set32' prefix from test & compare
2192         instructions - these methods all now set a full 32/64 bit register (Ptr size).
2193         The size in the function name should indicate the amount of data being compared.
2194
2195         Also split out the 'Condition' enum into 'RelationalCondition' and
2196         'ResultCondition'. The former is used in binary comparison, the latter is a unary
2197         condition check on the result of an operation.
2198
2199         * JavaScriptCore.xcodeproj/project.pbxproj:
2200         * assembler/MacroAssembler.h:
2201         (JSC::MacroAssembler::branchPtr):
2202         (JSC::MacroAssembler::branch32):
2203         (JSC::MacroAssembler::branch16):
2204         (JSC::MacroAssembler::branchTestPtr):
2205         (JSC::MacroAssembler::comparePtr):
2206         (JSC::MacroAssembler::branchAddPtr):
2207         (JSC::MacroAssembler::branchSubPtr):
2208         (JSC::MacroAssembler::branchTest8):
2209         * assembler/MacroAssemblerARM.h:
2210         (JSC::MacroAssemblerARM::branch8):
2211         (JSC::MacroAssemblerARM::branch32):
2212         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
2213         (JSC::MacroAssemblerARM::branch16):
2214         (JSC::MacroAssemblerARM::branchTest8):
2215         (JSC::MacroAssemblerARM::branchTest32):
2216         (JSC::MacroAssemblerARM::branchAdd32):
2217         (JSC::MacroAssemblerARM::branchMul32):
2218         (JSC::MacroAssemblerARM::branchSub32):
2219         (JSC::MacroAssemblerARM::branchNeg32):
2220         (JSC::MacroAssemblerARM::branchOr32):
2221         (JSC::MacroAssemblerARM::compare32):
2222         (JSC::MacroAssemblerARM::test32):
2223         (JSC::MacroAssemblerARM::test8):
2224         (JSC::MacroAssemblerARM::branchPtrWithPatch):
2225         (JSC::MacroAssemblerARM::ARMCondition):
2226         * assembler/MacroAssemblerARMv7.h:
2227         (JSC::MacroAssemblerARMv7::branch32):
2228         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
2229         (JSC::MacroAssemblerARMv7::branch16):
2230         (JSC::MacroAssemblerARMv7::branch8):
2231         (JSC::MacroAssemblerARMv7::branchTest32):
2232         (JSC::MacroAssemblerARMv7::branchTest8):
2233         (JSC::MacroAssemblerARMv7::branchAdd32):
2234         (JSC::MacroAssemblerARMv7::branchMul32):
2235         (JSC::MacroAssemblerARMv7::branchOr32):
2236         (JSC::MacroAssemblerARMv7::branchSub32):
2237         (JSC::MacroAssemblerARMv7::compare32):
2238         (JSC::MacroAssemblerARMv7::test32):
2239         (JSC::MacroAssemblerARMv7::test8):
2240         (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
2241         (JSC::MacroAssemblerARMv7::makeBranch):
2242         (JSC::MacroAssemblerARMv7::armV7Condition):
2243         * assembler/MacroAssemblerMIPS.h:
2244         (JSC::MacroAssemblerMIPS::branch8):
2245         (JSC::MacroAssemblerMIPS::branch32):
2246         (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
2247         (JSC::MacroAssemblerMIPS::branch16):
2248         (JSC::MacroAssemblerMIPS::branchTest32):
2249         (JSC::MacroAssemblerMIPS::branchTest8):
2250         (JSC::MacroAssemblerMIPS::branchAdd32):
2251         (JSC::MacroAssemblerMIPS::branchMul32):
2252         (JSC::MacroAssemblerMIPS::branchSub32):
2253         (JSC::MacroAssemblerMIPS::branchOr32):
2254         (JSC::MacroAssemblerMIPS::compare32):
2255         (JSC::MacroAssemblerMIPS::test8):
2256         (JSC::MacroAssemblerMIPS::test32):
2257         (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
2258         * assembler/MacroAssemblerX86.h:
2259         (JSC::MacroAssemblerX86::branch32):
2260         (JSC::MacroAssemblerX86::branchPtrWithPatch):
2261         * assembler/MacroAssemblerX86Common.h:
2262         (JSC::MacroAssemblerX86Common::branch8):
2263         (JSC::MacroAssemblerX86Common::branch32):
2264         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
2265         (JSC::MacroAssemblerX86Common::branch16):
2266         (JSC::MacroAssemblerX86Common::branchTest32):
2267         (JSC::MacroAssemblerX86Common::branchTest8):
2268         (JSC::MacroAssemblerX86Common::branchAdd32):
2269         (JSC::MacroAssemblerX86Common::branchMul32):
2270         (JSC::MacroAssemblerX86Common::branchSub32):
2271         (JSC::MacroAssemblerX86Common::branchNeg32):
2272         (JSC::MacroAssemblerX86Common::branchOr32):
2273         (JSC::MacroAssemblerX86Common::compare32):
2274         (JSC::MacroAssemblerX86Common::test8):
2275         (JSC::MacroAssemblerX86Common::test32):
2276         (JSC::MacroAssemblerX86Common::x86Condition):
2277         * assembler/MacroAssemblerX86_64.h:
2278         (JSC::MacroAssemblerX86_64::comparePtr):
2279         (JSC::MacroAssemblerX86_64::branchPtr):
2280         (JSC::MacroAssemblerX86_64::branchTestPtr):
2281         (JSC::MacroAssemblerX86_64::branchAddPtr):
2282         (JSC::MacroAssemblerX86_64::branchSubPtr):
2283         (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
2284         (JSC::MacroAssemblerX86_64::branchTest8):
2285         * dfg/DFGSpeculativeJIT.cpp:
2286         (JSC::DFG::SpeculativeJIT::compile):
2287         * jit/JITOpcodes.cpp:
2288         (JSC::JIT::emit_op_eq):
2289         (JSC::JIT::emit_op_neq):
2290         (JSC::JIT::compileOpStrictEq):
2291         (JSC::JIT::emit_op_eq_null):
2292         (JSC::JIT::emit_op_neq_null):
2293         * jit/JITOpcodes32_64.cpp:
2294         (JSC::JIT::emit_op_eq):
2295         (JSC::JIT::emit_op_neq):
2296         (JSC::JIT::compileOpStrictEq):
2297         (JSC::JIT::emit_op_eq_null):
2298         (JSC::JIT::emit_op_neq_null):
2299
2300 2011-04-20  Balazs Kelemen  <kbalazs@webkit.org>
2301
2302         Reviewed by Csaba Osztrogonác.
2303
2304         [Qt] Cleanup includepath adjustment for generated files
2305         https://bugs.webkit.org/show_bug.cgi?id=58869
2306
2307         * JavaScriptCore.pri:  Add the directory of generated files to the include
2308         path with absolute path to make it valid in the final build step.
2309
2310 2011-04-19  Oliver Hunt  <oliver@apple.com>
2311
2312         Reviewed by Gavin Barraclough.
2313
2314         Remove unneeded deprecated methods from MarkStack
2315         https://bugs.webkit.org/show_bug.cgi?id=58853
2316
2317         Remove deprecated methods
2318
2319         * heap/MarkStack.h:
2320
2321 2011-04-19  Mark Rowe  <mrowe@apple.com>
2322
2323         Things work best when the Xcode project refers to the file at a path that exists.
2324
2325         * JavaScriptCore.xcodeproj/project.pbxproj:
2326
2327 2011-04-19  Renata Hodovan  <reni@webkit.org>
2328
2329         Reviewed by Eric Seidel.
2330
2331         Move the alignment related macros in Vector.h to new Alignment.h.
2332         https://bugs.webkit.org/show_bug.cgi?id=56000
2333
2334         * JavaScriptCore.gypi:
2335         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2336         * JavaScriptCore.xcodeproj/project.pbxproj:
2337         * wtf/Alignment.h: Added.
2338         * wtf/CMakeLists.txt:
2339         * wtf/Vector.h:
2340
2341 2011-04-19  Oliver Hunt  <oliver@apple.com>
2342
2343         Reviewed by Gavin Barraclough.
2344
2345         Remove DeprecatedPtr
2346         https://bugs.webkit.org/show_bug.cgi?id=58718
2347
2348         Remove the class an all functions that still exist to support it.
2349
2350         * heap/MarkStack.h:
2351         (JSC::MarkStack::append):
2352         * runtime/JSValue.h:
2353         * runtime/WriteBarrier.h:
2354
2355 2011-04-19  Jungshik Shin  <jshin@chromium.org>
2356
2357         Reviewed by David Levin
2358
2359         Add U+FEFF (Zero width no-break space) to CharacterNames.h.
2360         It's added to the list of characters to treat as zero-width
2361         in WebCore.
2362
2363         https://bugs.webkit.org/show_bug.cgi?id=48860
2364
2365         * wtf/unicode/CharacterNames.h:
2366
2367 2011-04-19  Csaba Osztrogonác  <ossy@webkit.org>
2368
2369         [Qt] REGRESSION(84176): http/tests/xmlhttprequest/event-listener-gc.html fails
2370         https://bugs.webkit.org/show_bug.cgi?id=58871
2371
2372         Unreviewed, rolling out r84176, r84178, r84186, r84212 and r84231.
2373         http://trac.webkit.org/changeset/84176 (original patch)
2374         http://trac.webkit.org/changeset/84178 (original patch - part 2)
2375         http://trac.webkit.org/changeset/84186 (build fix)
2376         http://trac.webkit.org/changeset/84212
2377         http://trac.webkit.org/changeset/84231 (skip failing test)
2378
2379         original bugs:
2380          - https://bugs.webkit.org/show_bug.cgi?id=58718
2381          - https://bugs.webkit.org/show_bug.cgi?id=58853
2382
2383         * heap/MarkStack.h:
2384         (JSC::MarkStack::deprecatedAppendValues):
2385         (JSC::MarkStack::append):
2386         (JSC::MarkStack::deprecatedAppend):
2387         * runtime/JSValue.h:
2388         * runtime/WriteBarrier.h:
2389         (JSC::DeprecatedPtr::DeprecatedPtr):
2390         (JSC::DeprecatedPtr::get):
2391         (JSC::DeprecatedPtr::operator*):
2392         (JSC::DeprecatedPtr::operator->):
2393         (JSC::DeprecatedPtr::slot):
2394         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
2395         (JSC::DeprecatedPtr::operator!):
2396         (JSC::operator==):
2397
2398 2011-04-18  Oliver Hunt  <oliver@apple.com>
2399
2400         Reviewed by Gavin Barraclough.
2401
2402         Remove unneeded deprecated methods from MarkStack
2403         https://bugs.webkit.org/show_bug.cgi?id=58853
2404
2405         Remove deprecated methods
2406
2407         * heap/MarkStack.h:
2408
2409 2011-04-18  Oliver Hunt  <oliver@apple.com>
2410
2411         Reviewed by Adam Roben.
2412
2413         Off by one initialising repeat callframe
2414         https://bugs.webkit.org/show_bug.cgi?id=58838
2415         <rdar://problem/8756810>
2416
2417         If the end of a callframe made for a repeat call landed on
2418         a page boundary the following page may not have been committed
2419         which means that the off by one could lead to a crash.  However
2420         it could only happen in this case and only on windows which is
2421         why it was so hard to repro.  Alas given the steps needed to
2422         reproduce are such that it's not really possible to make a
2423         testcase.
2424
2425         This fix makes the code a little less squirrely by not trying
2426         to avoid the unnecessary initialisation of |this|.
2427
2428         * interpreter/Interpreter.cpp:
2429         (JSC::Interpreter::prepareForRepeatCall):
2430
2431 2011-04-18  Gavin Barraclough  <barraclough@apple.com>
2432
2433         Reviewed by Geoff Garen.
2434
2435         Bug 58829 - DFG JIT - Optimize add/sub immediate, multiply.
2436
2437         Add code generation for add/subtract instruction with immediate operands
2438         (where a child is a constant), and don't bail to non-speculative if an
2439         integer multiple results in a +0 result (only if it should be generating -0).
2440
2441         * dfg/DFGSpeculativeJIT.cpp:
2442         (JSC::DFG::SpeculativeJIT::compile):
2443         * dfg/DFGSpeculativeJIT.h:
2444         (JSC::DFG::SpeculativeJIT::isDoubleConstantWithInt32Value):
2445
2446 2011-04-18  Gavin Barraclough  <barraclough@apple.com>
2447
2448         Reviewed by Geoff Garen.
2449
2450         Bug 58817 - DFG JIT - if speculative compilation fails, throw away code.
2451
2452         If we detect a logical conflict, throw away generated code,
2453         and only compile through the NonSpeculativeJIT.
2454
2455         * assembler/AbstractMacroAssembler.h:
2456         (JSC::AbstractMacroAssembler::rewindToLabel):
2457         * assembler/AssemblerBuffer.h:
2458         (JSC::AssemblerBuffer::rewindToOffset):
2459         * assembler/MacroAssemblerX86Common.h:
2460         (JSC::MacroAssemblerX86Common::branchAdd32):
2461         (JSC::MacroAssemblerX86Common::branchSub32):
2462         * assembler/X86Assembler.h:
2463         (JSC::X86Assembler::rewindToLabel):
2464         (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
2465         * dfg/DFGJITCompiler.cpp:
2466         (JSC::DFG::JITCompiler::linkSpeculationChecks):
2467         (JSC::DFG::JITCompiler::compileFunction):
2468         * dfg/DFGNode.h:
2469         * dfg/DFGNonSpeculativeJIT.cpp:
2470         (JSC::DFG::NonSpeculativeJIT::compile):
2471         * dfg/DFGSpeculativeJIT.cpp:
2472         (JSC::DFG::SpeculativeJIT::compile):
2473         * dfg/DFGSpeculativeJIT.h:
2474         (JSC::DFG::SpeculationCheckIndexIterator::SpeculationCheckIndexIterator):
2475
2476 2011-04-18  Oliver Hunt  <oliver@apple.com>
2477
2478         Reviewed by Gavin Barraclough.
2479
2480         Remove DeprecatedPtr
2481         https://bugs.webkit.org/show_bug.cgi?id=58718
2482
2483         As simple as it sounds.
2484
2485         * runtime/JSValue.h:
2486         * runtime/WriteBarrier.h:
2487
2488 2011-04-17  Cameron Zwarich  <zwarich@apple.com>
2489
2490         Reviewed by Dan Bernstein.
2491
2492         JSC no longer builds with Clang due to -Woverloaded-virtual warning
2493         https://bugs.webkit.org/show_bug.cgi?id=58760
2494
2495         Rename Structure's specificValue overload of put to putSpecificValue to avoid
2496         Clang's warning for overloading a virtual function.
2497
2498         * runtime/Structure.cpp:
2499         (JSC::Structure::addPropertyTransition):
2500         (JSC::Structure::addPropertyWithoutTransition):
2501         (JSC::Structure::putSpecificValue):
2502         * runtime/Structure.h:
2503
2504 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
2505
2506         Reviewed by Adam Barth.
2507
2508         Remove WTF_PLATFORM_SGL
2509         https://bugs.webkit.org/show_bug.cgi?id=58743
2510
2511         WTF_PLATFORM_SGL and PLATFORM(SGL) are not used in the code anywhere.
2512
2513         * wtf/Platform.h:
2514
2515 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
2516
2517         Reviewed by Adam Barth.
2518
2519         Rename PLATFORM(CA) to USE(CA)
2520         https://bugs.webkit.org/show_bug.cgi?id=58742
2521
2522         * wtf/Platform.h:
2523
2524 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
2525
2526         Reviewed by Adam Barth.
2527
2528         Rename PLATFORM(CG) to USE(CG)
2529         https://bugs.webkit.org/show_bug.cgi?id=58729
2530
2531         * wtf/Platform.h:
2532
2533 2011-04-16  Patrick Gansterer  <paroga@webkit.org>
2534
2535         Reviewed by Eric Seidel.
2536
2537         Rename PLATFORM(CAIRO) to USE(CAIRO)
2538         https://bugs.webkit.org/show_bug.cgi?id=55192
2539
2540         * wtf/Platform.h:
2541         * wtf/gobject/GTypedefs.h:
2542
2543 2011-04-15  Sheriff Bot  <webkit.review.bot@gmail.com>
2544
2545         Unreviewed, rolling out r84067.
2546         http://trac.webkit.org/changeset/84067
2547         https://bugs.webkit.org/show_bug.cgi?id=58724
2548
2549         qt build are failing. (Requested by loislo2 on #webkit).
2550
2551         * heap/MarkStack.h:
2552         (JSC::MarkStack::append):
2553         * runtime/JSValue.h:
2554         * runtime/WriteBarrier.h:
2555         (JSC::DeprecatedPtr::DeprecatedPtr):
2556         (JSC::DeprecatedPtr::get):
2557         (JSC::DeprecatedPtr::operator*):
2558         (JSC::DeprecatedPtr::operator->):
2559         (JSC::DeprecatedPtr::slot):
2560         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
2561         (JSC::DeprecatedPtr::operator!):
2562         (JSC::operator==):
2563
2564 2011-04-15  Shishir Agrawal  <shishir@chromium.org>
2565
2566         Reviewed by James Robinson.
2567
2568         Add a flag to guard Page Visibility API changes.
2569         https://bugs.webkit.org/show_bug.cgi?id=58464
2570
2571         * Configurations/FeatureDefines.xcconfig:
2572
2573 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
2574
2575         Errrk! - build fix from !x86-64.
2576
2577         * dfg/DFGNode.h:
2578
2579 2011-04-15  David Levin  <levin@chromium.org>
2580
2581         Revert of r83974.
2582
2583         JavaScriptCore shouldn't depend on ../ThirdParty/gtest/xcode/gtest.xcodeproj
2584         https://bugs.webkit.org/show_bug.cgi?id=58716
2585
2586         * JavaScriptCore.xcodeproj/project.pbxproj:
2587         * wtf/tests/RunAllWtfTests.cpp: Removed.
2588         * wtf/tests/StringTests.cpp: Removed.
2589
2590 2011-04-15  Oliver Hunt  <oliver@apple.com>
2591
2592         Reviewed by Gavin Barraclough.
2593
2594         Remove DeprecatedPtr
2595         https://bugs.webkit.org/show_bug.cgi?id=58718
2596
2597         As simple as it sounds.
2598
2599         * heap/MarkStack.h:
2600         (JSC::MarkStack::append):
2601         * runtime/JSValue.h:
2602         * runtime/WriteBarrier.h:
2603
2604 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
2605
2606         Reviewed by Oliver Hunt.
2607
2608         Add a simple tool to gather statistics on whether functions
2609         are completed through the new or old JIT.
2610
2611         * dfg/DFGNode.h:
2612         * dfg/DFGNonSpeculativeJIT.cpp:
2613         (JSC::DFG::NonSpeculativeJIT::compile):
2614         * dfg/DFGSpeculativeJIT.cpp:
2615         (JSC::DFG::SpeculativeJIT::compile):
2616         * jit/JIT.cpp:
2617         (JSC::JIT::privateCompile):
2618
2619 2011-04-15  Oliver Hunt  <oliver@apple.com>
2620
2621         GC allocate Structure
2622         https://bugs.webkit.org/show_bug.cgi?id=58483
2623
2624         Rolling r83894 r83827 r83810 r83809 r83808 back in with
2625         a workaround for the gcc bug seen by the gtk bots
2626
2627         * API/JSCallbackConstructor.cpp:
2628         (JSC::JSCallbackConstructor::JSCallbackConstructor):
2629         * API/JSCallbackConstructor.h:
2630         (JSC::JSCallbackConstructor::createStructure):
2631         * API/JSCallbackFunction.h:
2632         (JSC::JSCallbackFunction::createStructure):
2633         * API/JSCallbackObject.h:
2634         (JSC::JSCallbackObject::createStructure):
2635         * API/JSCallbackObjectFunctions.h:
2636         (JSC::::JSCallbackObject):
2637         * API/JSContextRef.cpp:
2638         * JavaScriptCore.JSVALUE32_64only.exp:
2639         * JavaScriptCore.JSVALUE64only.exp:
2640         * JavaScriptCore.exp:
2641         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2642         * bytecode/CodeBlock.cpp:
2643         (JSC::CodeBlock::~CodeBlock):
2644         (JSC::CodeBlock::markStructures):
2645         (JSC::CodeBlock::markAggregate):
2646         * bytecode/CodeBlock.h:
2647         (JSC::MethodCallLinkInfo::setSeen):
2648         (JSC::GlobalResolveInfo::GlobalResolveInfo):
2649         * bytecode/Instruction.h:
2650         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2651         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2652         (JSC::PolymorphicAccessStructureList::markAggregate):
2653         (JSC::Instruction::Instruction):
2654         * bytecode/StructureStubInfo.cpp:
2655         (JSC::StructureStubInfo::deref):
2656         (JSC::StructureStubInfo::markAggregate):
2657         * bytecode/StructureStubInfo.h:
2658         (JSC::StructureStubInfo::initGetByIdSelf):
2659         (JSC::StructureStubInfo::initGetByIdProto):
2660         (JSC::StructureStubInfo::initGetByIdChain):
2661         (JSC::StructureStubInfo::initPutByIdTransition):
2662         (JSC::StructureStubInfo::initPutByIdReplace):
2663         * debugger/DebuggerActivation.cpp:
2664         (JSC::DebuggerActivation::DebuggerActivation):
2665         * debugger/DebuggerActivation.h:
2666         (JSC::DebuggerActivation::createStructure):
2667         * heap/Handle.h:
2668         * heap/MarkStack.cpp:
2669         (JSC::MarkStack::markChildren):
2670         (JSC::MarkStack::drain):
2671         * heap/MarkedBlock.cpp:
2672         (JSC::MarkedBlock::MarkedBlock):
2673         (JSC::MarkedBlock::sweep):
2674         * heap/Strong.h:
2675         (JSC::Strong::Strong):
2676         (JSC::Strong::set):
2677         * interpreter/Interpreter.cpp:
2678         (JSC::Interpreter::resolveGlobal):
2679         (JSC::Interpreter::resolveGlobalDynamic):
2680         (JSC::Interpreter::tryCachePutByID):
2681         (JSC::Interpreter::uncachePutByID):
2682         (JSC::Interpreter::tryCacheGetByID):
2683         (JSC::Interpreter::uncacheGetByID):
2684         (JSC::Interpreter::privateExecute):
2685         * jit/JIT.h:
2686         * jit/JITPropertyAccess.cpp:
2687         (JSC::JIT::privateCompilePutByIdTransition):
2688         (JSC::JIT::patchMethodCallProto):
2689         (JSC::JIT::privateCompileGetByIdProto):
2690         (JSC::JIT::privateCompileGetByIdSelfList):
2691         (JSC::JIT::privateCompileGetByIdProtoList):
2692         (JSC::JIT::privateCompileGetByIdChainList):
2693         (JSC::JIT::privateCompileGetByIdChain):
2694         * jit/JITPropertyAccess32_64.cpp:
2695         (JSC::JIT::privateCompilePutByIdTransition):
2696         (JSC::JIT::patchMethodCallProto):
2697         (JSC::JIT::privateCompileGetByIdProto):
2698         (JSC::JIT::privateCompileGetByIdSelfList):
2699         (JSC::JIT::privateCompileGetByIdProtoList):
2700         (JSC::JIT::privateCompileGetByIdChainList):
2701         (JSC::JIT::privateCompileGetByIdChain):
2702         * jit/JITStubs.cpp:
2703         (JSC::JITThunks::tryCachePutByID):
2704         (JSC::JITThunks::tryCacheGetByID):
2705         (JSC::DEFINE_STUB_FUNCTION):
2706         (JSC::getPolymorphicAccessStructureListSlot):
2707         * jit/JSInterfaceJIT.h:
2708         (JSC::JSInterfaceJIT::storePtrWithWriteBarrier):
2709         * jsc.cpp:
2710         (cleanupGlobalData):
2711         * runtime/Arguments.h:
2712         (JSC::Arguments::createStructure):
2713         (JSC::Arguments::Arguments):
2714         (JSC::JSActivation::copyRegisters):
2715         * runtime/ArrayConstructor.cpp:
2716         (JSC::ArrayConstructor::ArrayConstructor):
2717         (JSC::constructArrayWithSizeQuirk):
2718         * runtime/ArrayConstructor.h:
2719         * runtime/ArrayPrototype.cpp:
2720         (JSC::ArrayPrototype::ArrayPrototype):
2721         (JSC::arrayProtoFuncSplice):
2722         * runtime/ArrayPrototype.h:
2723         (JSC::ArrayPrototype::createStructure):
2724         * runtime/BatchedTransitionOptimizer.h:
2725         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
2726         * runtime/BooleanConstructor.cpp:
2727         (JSC::BooleanConstructor::BooleanConstructor):
2728         * runtime/BooleanConstructor.h:
2729         * runtime/BooleanObject.cpp:
2730         (JSC::BooleanObject::BooleanObject):
2731         * runtime/BooleanObject.h:
2732         (JSC::BooleanObject::createStructure):
2733         * runtime/BooleanPrototype.cpp:
2734         (JSC::BooleanPrototype::BooleanPrototype):
2735         * runtime/BooleanPrototype.h:
2736         * runtime/DateConstructor.cpp:
2737         (JSC::DateConstructor::DateConstructor):
2738         * runtime/DateConstructor.h:
2739         * runtime/DateInstance.cpp:
2740         (JSC::DateInstance::DateInstance):
2741         * runtime/DateInstance.h:
2742         (JSC::DateInstance::createStructure):
2743         * runtime/DatePrototype.cpp:
2744         (JSC::DatePrototype::DatePrototype):
2745         * runtime/DatePrototype.h:
2746         (JSC::DatePrototype::createStructure):
2747         * runtime/Error.cpp:
2748         (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
2749         * runtime/ErrorConstructor.cpp:
2750         (JSC::ErrorConstructor::ErrorConstructor):
2751         * runtime/ErrorConstructor.h:
2752         * runtime/ErrorInstance.cpp:
2753         (JSC::ErrorInstance::ErrorInstance):
2754         (JSC::ErrorInstance::create):
2755         * runtime/ErrorInstance.h:
2756         (JSC::ErrorInstance::createStructure):
2757         * runtime/ErrorPrototype.cpp:
2758         (JSC::ErrorPrototype::ErrorPrototype):
2759         * runtime/ErrorPrototype.h:
2760         * runtime/ExceptionHelpers.cpp:
2761         (JSC::InterruptedExecutionError::InterruptedExecutionError):
2762         (JSC::TerminatedExecutionError::TerminatedExecutionError):
2763         * runtime/Executable.cpp:
2764         * runtime/Executable.h:
2765         (JSC::ExecutableBase::ExecutableBase):
2766         (JSC::ExecutableBase::createStructure):
2767         (JSC::NativeExecutable::createStructure):
2768         (JSC::NativeExecutable::NativeExecutable):
2769         (JSC::ScriptExecutable::ScriptExecutable):
2770         (JSC::EvalExecutable::createStructure):
2771         (JSC::ProgramExecutable::createStructure):
2772         (JSC::FunctionExecutable::createStructure):
2773         * runtime/FunctionConstructor.cpp:
2774         (JSC::FunctionConstructor::FunctionConstructor):
2775         * runtime/FunctionConstructor.h:
2776         * runtime/FunctionPrototype.cpp:
2777         (JSC::FunctionPrototype::FunctionPrototype):
2778         * runtime/FunctionPrototype.h:
2779         (JSC::FunctionPrototype::createStructure):
2780         * runtime/GetterSetter.h:
2781         (JSC::GetterSetter::GetterSetter):
2782         (JSC::GetterSetter::createStructure):
2783         * runtime/InitializeThreading.cpp:
2784         (JSC::initializeThreadingOnce):
2785         * runtime/InternalFunction.cpp:
2786         (JSC::InternalFunction::InternalFunction):
2787         * runtime/InternalFunction.h:
2788         (JSC::InternalFunction::createStructure):
2789         * runtime/JSAPIValueWrapper.h:
2790         (JSC::JSAPIValueWrapper::createStructure):
2791         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2792         * runtime/JSActivation.cpp:
2793         (JSC::JSActivation::JSActivation):
2794         * runtime/JSActivation.h:
2795         (JSC::JSActivation::createStructure):
2796         * runtime/JSArray.cpp:
2797         (JSC::JSArray::JSArray):
2798         * runtime/JSArray.h:
2799         (JSC::JSArray::createStructure):
2800         * runtime/JSByteArray.cpp:
2801         (JSC::JSByteArray::JSByteArray):
2802         (JSC::JSByteArray::createStructure):
2803         * runtime/JSByteArray.h:
2804         (JSC::JSByteArray::JSByteArray):
2805         * runtime/JSCell.cpp:
2806         (JSC::isZombie):
2807         * runtime/JSCell.h:
2808         (JSC::JSCell::JSCell::JSCell):
2809         (JSC::JSCell::JSCell::addressOfStructure):
2810         (JSC::JSCell::JSCell::structure):
2811         (JSC::JSCell::JSCell::markChildren):
2812         (JSC::JSCell::JSValue::isZombie):
2813         * runtime/JSFunction.cpp:
2814         (JSC::JSFunction::JSFunction):
2815         * runtime/JSFunction.h:
2816         (JSC::JSFunction::createStructure):
2817         * runtime/JSGlobalData.cpp:
2818         (JSC::JSGlobalData::storeVPtrs):
2819         (JSC::JSGlobalData::JSGlobalData):
2820         (JSC::JSGlobalData::clearBuiltinStructures):
2821         (JSC::JSGlobalData::createLeaked):
2822         * runtime/JSGlobalData.h:
2823         (JSC::allocateGlobalHandle):
2824         * runtime/JSGlobalObject.cpp:
2825         (JSC::JSGlobalObject::reset):
2826         (JSC::JSGlobalObject::markChildren):
2827         (JSC::JSGlobalObject::copyGlobalsFrom):
2828         * runtime/JSGlobalObject.h:
2829         (JSC::JSGlobalObject::JSGlobalObject):
2830         (JSC::JSGlobalObject::createStructure):
2831         (JSC::Structure::prototypeChain):
2832         (JSC::Structure::isValid):
2833         (JSC::constructEmptyArray):
2834         * runtime/JSNotAnObject.h:
2835         (JSC::JSNotAnObject::JSNotAnObject):
2836         (JSC::JSNotAnObject::createStructure):
2837         * runtime/JSONObject.cpp:
2838         (JSC::JSONObject::JSONObject):
2839         * runtime/JSONObject.h:
2840         (JSC::JSONObject::createStructure):
2841         * runtime/JSObject.cpp:
2842         (JSC::JSObject::defineGetter):
2843         (JSC::JSObject::defineSetter):
2844         (JSC::JSObject::seal):
2845         (JSC::JSObject::freeze):
2846         (JSC::JSObject::preventExtensions):
2847         (JSC::JSObject::removeDirect):
2848         (JSC::JSObject::createInheritorID):
2849         * runtime/JSObject.h:
2850         (JSC::JSObject::createStructure):
2851         (JSC::JSObject::JSObject):
2852         (JSC::JSNonFinalObject::createStructure):
2853         (JSC::JSNonFinalObject::JSNonFinalObject):
2854         (JSC::JSFinalObject::create):
2855         (JSC::JSFinalObject::createStructure):
2856         (JSC::JSFinalObject::JSFinalObject):
2857         (JSC::constructEmptyObject):
2858         (JSC::createEmptyObjectStructure):
2859         (JSC::JSObject::~JSObject):
2860         (JSC::JSObject::setPrototype):
2861         (JSC::JSObject::setStructure):
2862         (JSC::JSObject::inheritorID):
2863         (JSC::JSObject::putDirectInternal):
2864         (JSC::JSObject::transitionTo):
2865         (JSC::JSObject::markChildrenDirect):
2866         * runtime/JSObjectWithGlobalObject.cpp:
2867         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
2868         * runtime/JSObjectWithGlobalObject.h:
2869         (JSC::JSObjectWithGlobalObject::createStructure):
2870         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
2871         * runtime/JSPropertyNameIterator.cpp:
2872         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2873         (JSC::JSPropertyNameIterator::create):
2874         (JSC::JSPropertyNameIterator::get):
2875         * runtime/JSPropertyNameIterator.h:
2876         (JSC::JSPropertyNameIterator::createStructure):
2877         (JSC::JSPropertyNameIterator::setCachedStructure):
2878         (JSC::Structure::setEnumerationCache):
2879         * runtime/JSStaticScopeObject.h:
2880         (JSC::JSStaticScopeObject::JSStaticScopeObject):
2881         (JSC::JSStaticScopeObject::createStructure):
2882         * runtime/JSString.h:
2883         (JSC::RopeBuilder::JSString):
2884         (JSC::RopeBuilder::createStructure):
2885         * runtime/JSType.h:
2886         * runtime/JSTypeInfo.h:
2887         (JSC::TypeInfo::TypeInfo):
2888         * runtime/JSValue.h:
2889         * runtime/JSVariableObject.h:
2890         (JSC::JSVariableObject::createStructure):
2891         (JSC::JSVariableObject::JSVariableObject):
2892         (JSC::JSVariableObject::copyRegisterArray):
2893         * runtime/JSWrapperObject.h:
2894         (JSC::JSWrapperObject::createStructure):
2895         (JSC::JSWrapperObject::JSWrapperObject):
2896         * runtime/JSZombie.cpp:
2897         * runtime/JSZombie.h:
2898         (JSC::JSZombie::JSZombie):
2899         (JSC::JSZombie::createStructure):
2900         * runtime/MathObject.cpp:
2901         (JSC::MathObject::MathObject):
2902         * runtime/MathObject.h:
2903         (JSC::MathObject::createStructure):
2904         * runtime/NativeErrorConstructor.cpp:
2905         (JSC::NativeErrorConstructor::NativeErrorConstructor):
2906         (JSC::NativeErrorConstructor::markChildren):
2907         (JSC::constructWithNativeErrorConstructor):
2908         * runtime/NativeErrorConstructor.h:
2909         (JSC::NativeErrorConstructor::createStructure):
2910         * runtime/NativeErrorPrototype.cpp:
2911         (JSC::NativeErrorPrototype::NativeErrorPrototype):
2912         * runtime/NativeErrorPrototype.h:
2913         * runtime/NumberConstructor.cpp:
2914         (JSC::NumberConstructor::NumberConstructor):
2915         * runtime/NumberConstructor.h:
2916         (JSC::NumberConstructor::createStructure):
2917         * runtime/NumberObject.cpp:
2918         (JSC::NumberObject::NumberObject):
2919         * runtime/NumberObject.h:
2920         (JSC::NumberObject::createStructure):
2921         * runtime/NumberPrototype.cpp:
2922         (JSC::NumberPrototype::NumberPrototype):
2923         * runtime/NumberPrototype.h:
2924         * runtime/ObjectConstructor.cpp:
2925         (JSC::ObjectConstructor::ObjectConstructor):
2926         * runtime/ObjectConstructor.h:
2927         (JSC::ObjectConstructor::createStructure):
2928         * runtime/ObjectPrototype.cpp:
2929         (JSC::ObjectPrototype::ObjectPrototype):
2930         * runtime/ObjectPrototype.h:
2931         * runtime/PropertyMapHashTable.h:
2932         (JSC::PropertyTable::PropertyTable):
2933         * runtime/RegExpConstructor.cpp:
2934         (JSC::RegExpConstructor::RegExpConstructor):
2935         (JSC::RegExpMatchesArray::RegExpMatchesArray):
2936         * runtime/RegExpConstructor.h:
2937         (JSC::RegExpConstructor::createStructure):
2938         * runtime/RegExpObject.cpp:
2939         (JSC::RegExpObject::RegExpObject):
2940         * runtime/RegExpObject.h:
2941         (JSC::RegExpObject::createStructure):
2942         * runtime/RegExpPrototype.cpp:
2943         (JSC::RegExpPrototype::RegExpPrototype):
2944         * runtime/RegExpPrototype.h:
2945         * runtime/ScopeChain.h:
2946         (JSC::ScopeChainNode::ScopeChainNode):
2947         (JSC::ScopeChainNode::createStructure):
2948         * runtime/StrictEvalActivation.cpp:
2949         (JSC::StrictEvalActivation::StrictEvalActivation):
2950         * runtime/StringConstructor.cpp:
2951         (JSC::StringConstructor::StringConstructor):
2952         * runtime/StringConstructor.h:
2953         * runtime/StringObject.cpp:
2954         (JSC::StringObject::StringObject):
2955         * runtime/StringObject.h:
2956         (JSC::StringObject::createStructure):
2957         * runtime/StringObjectThatMasqueradesAsUndefined.h:
2958         (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
2959         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2960         * runtime/StringPrototype.cpp:
2961         (JSC::StringPrototype::StringPrototype):
2962         * runtime/StringPrototype.h:
2963         (JSC::StringPrototype::createStructure):
2964         * runtime/Structure.cpp:
2965         (JSC::StructureTransitionTable::remove):
2966         (JSC::StructureTransitionTable::add):
2967         (JSC::Structure::Structure):
2968         (JSC::Structure::~Structure):
2969         (JSC::Structure::materializePropertyMap):
2970         (JSC::Structure::addPropertyTransitionToExistingStructure):
2971         (JSC::Structure::addPropertyTransition):
2972         (JSC::Structure::removePropertyTransition):
2973         (JSC::Structure::changePrototypeTransition):
2974         (JSC::Structure::despecifyFunctionTransition):
2975         (JSC::Structure::getterSetterTransition):
2976         (JSC::Structure::toDictionaryTransition):
2977         (JSC::Structure::toCacheableDictionaryTransition):
2978         (JSC::Structure::toUncacheableDictionaryTransition):
2979         (JSC::Structure::sealTransition):
2980         (JSC::Structure::freezeTransition):
2981         (JSC::Structure::preventExtensionsTransition):
2982         (JSC::Structure::flattenDictionaryStructure):
2983         (JSC::Structure::copyPropertyTable):
2984         (JSC::Structure::put):
2985         (JSC::Structure::markChildren):
2986         * runtime/Structure.h:
2987         (JSC::Structure::create):
2988         (JSC::Structure::setPrototypeWithoutTransition):
2989         (JSC::Structure::createStructure):
2990         (JSC::JSCell::createDummyStructure):
2991         (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer):
2992         * runtime/StructureChain.cpp:
2993         (JSC::StructureChain::StructureChain):
2994         (JSC::StructureChain::markChildren):
2995         * runtime/StructureChain.h:
2996         (JSC::StructureChain::create):
2997         (JSC::StructureChain::head):
2998         (JSC::StructureChain::createStructure):
2999         * runtime/StructureTransitionTable.h:
3000         (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::finalizerContextFor):
3001         (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::keyForFinalizer):
3002         (JSC::StructureTransitionTable::~StructureTransitionTable):
3003         (JSC::StructureTransitionTable::slot):
3004         (JSC::StructureTransitionTable::setMap):
3005         (JSC::StructureTransitionTable::singleTransition):
3006         (JSC::StructureTransitionTable::clearSingleTransition):
3007         (JSC::StructureTransitionTable::setSingleTransition):
3008         * runtime/WeakGCMap.h:
3009         (JSC::DefaultWeakGCMapFinalizerCallback::finalizerContextFor):
3010         (JSC::DefaultWeakGCMapFinalizerCallback::keyForFinalizer):
3011         (JSC::WeakGCMap::contains):
3012         (JSC::WeakGCMap::find):
3013         (JSC::WeakGCMap::remove):
3014         (JSC::WeakGCMap::add):
3015         (JSC::WeakGCMap::set):
3016         (JSC::WeakGCMap::finalize):
3017         * runtime/WriteBarrier.h:
3018         (JSC::writeBarrier):
3019         (JSC::WriteBarrierBase::set):
3020         (JSC::WriteBarrierBase::operator*):
3021         (JSC::WriteBarrierBase::operator->):
3022         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
3023
3024 2011-04-15  Fridrich Strba  <fridrich.strba@bluewin.ch>
3025
3026         Reviewed by Gavin Barraclough.
3027
3028         Correctly prefix symbols. Since gcc 4.5.0, Windows x64 symbols
3029         are not prefixed by underscore anymore. This is consistent with
3030         what MSVC does.
3031         https://bugs.webkit.org/show_bug.cgi?id=58573
3032
3033         * jit/JITStubs.cpp:
3034
3035 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
3036
3037         Reviewed by Geoff Garen.
3038
3039         Bug 58705 - DFG JIT Add support for flow control (branch, jump).
3040
3041         Add support for control flow by breaking the CodeBlock up into multiple
3042         basic blocks, generating code for each basic block in turn through the
3043         speculative JIT & then the non-speculative JIT.
3044
3045         * dfg/DFGByteCodeParser.cpp:
3046         (JSC::DFG::ByteCodeParser::setTemporary):
3047         (JSC::DFG::ByteCodeParser::addToGraph):
3048         (JSC::DFG::ByteCodeParser::parseBlock):
3049         (JSC::DFG::ByteCodeParser::parse):
3050         * dfg/DFGGraph.cpp:
3051         (JSC::DFG::Graph::dump):
3052         * dfg/DFGGraph.h:
3053         (JSC::DFG::BasicBlock::BasicBlock):
3054         (JSC::DFG::BasicBlock::getBytecodeOffset):
3055         (JSC::DFG::Graph::blockIndexForBytecodeOffset):
3056         * dfg/DFGJITCodeGenerator.h:
3057         (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
3058         (JSC::DFG::JITCodeGenerator::addBranch):
3059         (JSC::DFG::JITCodeGenerator::linkBranches):
3060         (JSC::DFG::JITCodeGenerator::BranchRecord::BranchRecord):
3061         * dfg/DFGNode.h:
3062         (JSC::DFG::Node::Node):
3063         (JSC::DFG::Node::isJump):
3064         (JSC::DFG::Node::isBranch):
3065         (JSC::DFG::Node::takenBytecodeOffset):
3066         (JSC::DFG::Node::notTakenBytecodeOffset):
3067         * dfg/DFGNonSpeculativeJIT.cpp:
3068         (JSC::DFG::NonSpeculativeJIT::compile):
3069         * dfg/DFGNonSpeculativeJIT.h:
3070         * dfg/DFGSpeculativeJIT.cpp:
3071         (JSC::DFG::SpeculativeJIT::compile):
3072         * dfg/DFGSpeculativeJIT.h:
3073
3074 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
3075
3076         Reviewed by Geoff Garen.
3077
3078         Bug 58701 - DFG JIT - add GetLocal/SetLocal nodes
3079
3080         Use these for both access to arguments & local variables, adds ability
3081         to set locals, such that values will persist between basic blocks.
3082
3083         * dfg/DFGByteCodeParser.cpp:
3084         (JSC::DFG::ByteCodeParser::ByteCodeParser):
3085         (JSC::DFG::ByteCodeParser::get):
3086         (JSC::DFG::ByteCodeParser::set):
3087         (JSC::DFG::ByteCodeParser::getVariable):
3088         (JSC::DFG::ByteCodeParser::setVariable):
3089         (JSC::DFG::ByteCodeParser::getArgument):
3090         (JSC::DFG::ByteCodeParser::setArgument):
3091         (JSC::DFG::ByteCodeParser::getThis):
3092         (JSC::DFG::ByteCodeParser::setThis):
3093         (JSC::DFG::ByteCodeParser::VariableRecord::VariableRecord):
3094         (JSC::DFG::ByteCodeParser::parseBlock):
3095         * dfg/DFGGraph.cpp:
3096         (JSC::DFG::Graph::dump):
3097         (JSC::DFG::Graph::derefChildren):
3098         * dfg/DFGGraph.h:
3099         (JSC::DFG::Graph::ref):
3100         (JSC::DFG::Graph::deref):
3101         * dfg/DFGNode.h:
3102         (JSC::DFG::Node::hasLocal):
3103         (JSC::DFG::Node::local):
3104         * dfg/DFGNonSpeculativeJIT.cpp:
3105         (JSC::DFG::NonSpeculativeJIT::compile):
3106         * dfg/DFGSpeculativeJIT.cpp:
3107         (JSC::DFG::SpeculativeJIT::compile):
3108
3109 2011-04-15  Gavin Barraclough  <barraclough@apple.com>
3110
3111         Reviewed by Sam Weinig.
3112
3113         Bug 58696 - DFG JIT split handling of vars/temporaries
3114
3115         Presently all callee registers are treated as having single block scope,
3116         since the DFG JIT can only compile single block functions. In order to
3117         expand the JIT to support control flow we will need to change to retaining
3118         locals (but not temporaries) across basic block boundaries.
3119
3120         * dfg/DFGByteCodeParser.cpp:
3121         (JSC::DFG::ByteCodeParser::ByteCodeParser):
3122         (JSC::DFG::ByteCodeParser::get):
3123         (JSC::DFG::ByteCodeParser::set):
3124         (JSC::DFG::ByteCodeParser::getVariable):
3125         (JSC::DFG::ByteCodeParser::setVariable):
3126         (JSC::DFG::ByteCodeParser::getTemporary):
3127         (JSC::DFG::ByteCodeParser::setTemporary):
3128         (JSC::DFG::ByteCodeParser::getArgument):
3129         (JSC::DFG::ByteCodeParser::getInt32Constant):
3130         (JSC::DFG::ByteCodeParser::getDoubleConstant):
3131         (JSC::DFG::ByteCodeParser::getJSConstant):
3132         (JSC::DFG::ByteCodeParser::constantUndefined):
3133         (JSC::DFG::ByteCodeParser::constantNull):
3134         (JSC::DFG::ByteCodeParser::one):
3135         (JSC::DFG::ByteCodeParser::parseBlock):
3136         (JSC::DFG::ByteCodeParser::parse):
3137         (JSC::DFG::parse):
3138         * dfg/DFGNode.h:
3139         * dfg/DFGScoreBoard.h:
3140         (JSC::DFG::ScoreBoard::ScoreBoard):
3141         (JSC::DFG::ScoreBoard::~ScoreBoard):
3142         (JSC::DFG::ScoreBoard::allocate):
3143         (JSC::DFG::ScoreBoard::use):
3144
3145 2011-04-15  Michael Saboff  <msaboff@apple.com>
3146
3147         Reviewed by Oliver Hunt.
3148
3149         globalObject moved to JSObjectWithGlobalObject.cpp inhibits inlining
3150         https://bugs.webkit.org/show_bug.cgi?id=58677
3151
3152         Moved JSObjectWithGlobalObject::globalObject() to 
3153         runtime/JSObjectWithGlobalObject.h to allow the compiler to inline
3154         it for a performance benefit.  An equivalent instance had been in
3155         a header file before r60057.
3156
3157         * JavaScriptCore.exp:
3158         * runtime/JSObjectWithGlobalObject.cpp:
3159         * runtime/JSObjectWithGlobalObject.h:
3160         (JSC::JSObjectWithGlobalObject::globalObject):
3161
3162 2011-04-14  Oliver Hunt  <oliver@apple.com>
3163
3164         Reviewed by Geoffrey Garen.
3165
3166         Make JSNodeFilterCondition handle its lifetime correctly
3167         https://bugs.webkit.org/show_bug.cgi?id=58622
3168
3169         Add export
3170
3171         * JavaScriptCore.exp:
3172
3173 2011-04-14  Alexey Proskuryakov  <ap@apple.com>
3174
3175         Reviewed by Dan Bernstein.
3176
3177         WebKit2: Password field input does not switch to ASCII-compatible source
3178         https://bugs.webkit.org/show_bug.cgi?id=58583
3179         <rdar://problem/9059651>
3180
3181         * wtf/Platform.h: Removed WTF_USE_CARBON_SECURE_INPUT_MODE. It's now only used by Chromium,
3182         and shouldn't be enabled on any other platforms, so there is no reason to make it
3183         configurable via Platform.h.
3184
3185 2011-04-15  Dmitry Lomov  <dslomov@google.com>
3186
3187         Reviewed by David Levin.
3188
3189         Add a sample test case for GTest framework
3190         https://bugs.webkit.org/show_bug.cgi?id=58509
3191
3192         Add an example of GTest testcase, complete with a runner, to JavaScriptCore.
3193
3194         * JavaScriptCore.xcodeproj/project.pbxproj:
3195         * wtf/tests/RunAllWtfTests.cpp: Added.
3196         (main):
3197         * wtf/tests/StringTests.cpp: Added.
3198
3199 2011-04-15  Anna Cavender  <annacc@chromium.org>
3200
3201         Reviewed by Eric Carlson.
3202
3203         Renaming TRACK feature define to VIDEO_TRACK
3204         https://bugs.webkit.org/show_bug.cgi?id=53556
3205
3206         * Configurations/FeatureDefines.xcconfig:
3207
3208 2011-04-14  Gavin Barraclough  <barraclough@apple.com>
3209
3210         Rubber stamped by Geoffrey Garen.
3211
3212         Hide DFG_JIT_RESTRICTIONS behind ARITHMETIC_OP() macro, and rename
3213         m_regressionGuard to m_parseFailed, such that it can be reused for
3214         other failure cases.
3215
3216         * dfg/DFGByteCodeParser.cpp:
3217         (JSC::DFG::ByteCodeParser::ByteCodeParser):
3218         (JSC::DFG::ByteCodeParser::parse):
3219
3220 2011-04-14  Gavin Barraclough  <barraclough@apple.com>
3221
3222         Reviewed by Geoffrey Garen.
3223
3224         Bug 58620 - DFG JIT - loading of arguments should not be lazy
3225
3226         This optimization is overly simplistic. It only works because we never
3227         write out definitions to arguments (since we currently only compile
3228         single block functions). Revert this for now, we may want to reintroduce
3229         something like this again in the future, but it will need to be aware
3230         how to schedule definitions to arguments versus lazy loads that have not
3231         yet been performed.
3232
3233         * dfg/DFGGenerationInfo.h:
3234         (JSC::DFG::GenerationInfo::needsSpill):
3235         * dfg/DFGGraph.cpp:
3236         (JSC::DFG::Graph::dump):
3237         * dfg/DFGGraph.h:
3238         * dfg/DFGJITCodeGenerator.cpp:
3239         (JSC::DFG::JITCodeGenerator::fillInteger):
3240         (JSC::DFG::JITCodeGenerator::fillDouble):
3241         (JSC::DFG::JITCodeGenerator::fillJSValue):
3242         * dfg/DFGJITCodeGenerator.h:
3243         (JSC::DFG::JITCodeGenerator::initConstantInfo):
3244         * dfg/DFGJITCompiler.cpp:
3245         (JSC::DFG::JITCompiler::fillNumericToDouble):
3246         (JSC::DFG::JITCompiler::fillInt32ToInteger):
3247         (JSC::DFG::JITCompiler::fillToJS):
3248         * dfg/DFGNonSpeculativeJIT.cpp:
3249         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
3250         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
3251         (JSC::DFG::NonSpeculativeJIT::compile):
3252         * dfg/DFGSpeculativeJIT.cpp:
3253         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
3254         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
3255         (JSC::DFG::SpeculativeJIT::compile):
3256
3257 2011-04-14  Gavin Barraclough  <barraclough@apple.com>
3258
3259         Reviewed by Geoffrey Garen.
3260
3261         Bug 58600 - DFG JIT bugs in ValueToInt, PutByVal
3262
3263         The bug in PutByVal is that an operand is in JSValueOperand - when this
3264         locks an integer into a register it will always retag the value without
3265         checking if the register is already locked. This is a problem where the
3266         value being stored by a PutByVal is the same as the subscript.
3267         The subscript is locked into a register first, as a strict integer.
3268         Locking the value results in the subscript being modified.
3269
3270         The bug in ValueToInt related to the function of sillentFillAllRegisters.
3271         The problem is that this method will restore all register values from
3272         prior to the call, overwriting the result of the call out. Allow a
3273         register to be passed to specifically be excluded from being preserved.
3274
3275         * assembler/ARMAssembler.h:
3276         (JSC::ARMAssembler::debugOffset):
3277         * assembler/ARMv7Assembler.h:
3278         (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
3279         * assembler/AbstractMacroAssembler.h:
3280         (JSC::AbstractMacroAssembler::debugOffset):
3281         * assembler/AssemblerBuffer.h:
3282         (JSC::AssemblerBuffer::debugOffset):
3283         * assembler/LinkBuffer.h:
3284         (JSC::LinkBuffer::debugAddress):
3285         * assembler/MIPSAssembler.h:
3286         (JSC::MIPSAssembler::debugOffset):
3287         * assembler/MacroAssemblerX86_64.h:
3288         (JSC::MacroAssemblerX86_64::orPtr):
3289         * assembler/X86Assembler.h:
3290         (JSC::X86Assembler::debugOffset):
3291         (JSC::X86Assembler::X86InstructionFormatter::debugOffset):
3292         * dfg/DFGByteCodeParser.cpp:
3293         (JSC::DFG::ByteCodeParser::parse):
3294         * dfg/DFGGenerationInfo.h:
3295         * dfg/DFGJITCodeGenerator.cpp:
3296         (JSC::DFG::JITCodeGenerator::fillJSValue):
3297         * dfg/DFGJITCodeGenerator.h:
3298         (JSC::DFG::JITCodeGenerator::isConstant):
3299         * dfg/DFGJITCompiler.cpp:
3300         (JSC::DFG::JITCompiler::compileFunction):
3301         * dfg/DFGJITCompiler.h:
3302         (JSC::DFG::JITCompiler::isConstant):
3303         * dfg/DFGNonSpeculativeJIT.cpp:
3304         (JSC::DFG::NonSpeculativeJIT::valueToNumber):
3305         (JSC::DFG::NonSpeculativeJIT::valueToInt32):
3306         (JSC::DFG::NonSpeculativeJIT::numberToInt32):
3307         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
3308         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
3309         (JSC::DFG::NonSpeculativeJIT::compile):
3310         * dfg/DFGNonSpeculativeJIT.h:
3311         (JSC::DFG::NonSpeculativeJIT::silentSpillGPR):
3312         (JSC::DFG::NonSpeculativeJIT::silentSpillFPR):
3313         (JSC::DFG::NonSpeculativeJIT::silentFillGPR):
3314         (JSC::DFG::NonSpeculativeJIT::silentFillFPR):
3315         (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
3316         (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
3317         * dfg/DFGSpeculativeJIT.cpp:
3318         (JSC::DFG::SpeculativeJIT::compile):
3319
3320 2011-04-14  Geoffrey Garen  <ggaren@apple.com>
3321
3322         Reviewed by Oliver Hunt.
3323
3324         Drain the mark stack while marking weak handles, not after.
3325         https://bugs.webkit.org/show_bug.cgi?id=58574
3326
3327         Otherwise, items that would have caused more weak handle marking are
3328         processed after all weak handle marking has finished, and referenced
3329         weak handles get recycled.
3330
3331         * heap/HandleHeap.cpp:
3332         (JSC::HandleHeap::markWeakHandles): Removed looping from here, since we
3333         want Heap::markRoots to be responsible for draining the mark stack.
3334
3335         * heap/Heap.cpp:
3336         (JSC::Heap::markRoots): Moved looping to here, as explained above.
3337         
3338         For efficiency's sake, drain the mark stack before starting to mark weak
3339         handles. Otherwise, items drained while marking weak handles may force
3340         an extra trip through the weak handle list.
3341
3342         For correctness's sake, drain the mark stack each time through the weak
3343         handle list. Otherwise, opaque roots that would make weak handles reachable
3344         are not discovered until after weak handle marking is over.
3345
3346 2011-04-14  Oliver Hunt  <oliver@apple.com>
3347
3348         Reviewed by Geoffrey Garen.
3349
3350         Make protected object list in caches window reflect reality
3351         https://bugs.webkit.org/show_bug.cgi?id=58565
3352
3353         Make sure the heap includes objects protected by Strong handles
3354         in its list of protected objects.
3355
3356         * heap/HandleHeap.h:
3357         * heap/Heap.cpp:
3358         (JSC::HandleHeap::protectedObjectTypeCounts):
3359
3360 2011-04-14  Satish Sampath  <satish@chromium.org>
3361
3362         Reviewed by Anders Carlsson.
3363
3364         Don't emit RegExp tables for chromium where they are not used
3365         https://bugs.webkit.org/show_bug.cgi?id=58544
3366
3367         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3368         * create_regex_tables: Added the "--notables" command line argument.
3369
3370 2011-04-13  Geoffrey Garen  <ggaren@apple.com>
3371
3372         Try to fix ASSERTs seen on Windows bots.
3373
3374         * wtf/HashTable.h:
3375         (WTF::hashTableSwap): Force MSVC to use the right version of swap.
3376
3377 2011-04-13  Ryuan Choi  <ryuan.choi@samsung.com>
3378
3379         Reviewed by Kenneth Rohde Christiansen.
3380
3381         [CMAKE] Separate DerivedSources.
3382         https://bugs.webkit.org/show_bug.cgi?id=58427
3383
3384         * CMakeLists.txt: Change DERIVED_SOURCES_DIR to DERIVED_SOURCES_JAVASCRIPTCORE_DIR.
3385
3386 2011-04-13  Geoffrey Garen  <ggaren@apple.com>
3387
3388         Reviewed by Oliver Hunt.
3389
3390         Switched DOM wrappers to use HashMap of Weak<T> instead of WeakGCMap<T>
3391         https://bugs.webkit.org/show_bug.cgi?id=58482
3392         
3393         This will allow wrappers to make individual decisions about their lifetimes.
3394
3395         * heap/HandleHeap.h:
3396         (JSC::HandleHeap::copyWeak): New function for copying a weak handle.
3397         It's wasn't previously possible to perform this operation using HandleHeap
3398         API because the HandleHeap doesn't expose its underlying Node structure.
3399
3400         * heap/Local.h:
3401         (JSC::::set):
3402         * heap/Strong.h:
3403         (JSC::Strong::set): Added ASSERTs to verify that dead objects are not
3404         resurrected by placement into handles.
3405
3406         (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
3407         is efficient.
3408
3409         * heap/Weak.h:
3410         (JSC::Weak::Weak): Fixed a bug where copying a weak pointer would not
3411         copy its weak callback and context.
3412
3413         (JSC::Weak::operator=): Added an assignment operator, since the default
3414         C++ assignment operator did the wrong thing.
3415
3416         (JSC::Weak::set): Added ASSERTs to verify that dead objects are not
3417         resurrected by placement into handles.
3418
3419         (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
3420         is efficient, and can be done without copying, which is illegal during
3421         the handle finalization phase.
3422
3423 2011-04-13  Oliver Hunt  <oliver@apple.com>
3424
3425         Reviewed by Gavin Barraclough.
3426
3427         Make PropertyMapEntry use a WriteBarrier for specificValue
3428         https://bugs.webkit.org/show_bug.cgi?id=58407
3429
3430         Make PropertyMapEntry use a WriteBarrier for specificValue, and then
3431         propagate the required JSGlobalData through all the methods it ends
3432         up being needed.
3433
3434         * API/JSClassRef.cpp:
3435         (OpaqueJSClass::prototype):
3436         * API/JSContextRef.cpp:
3437         * API/JSObjectRef.cpp:
3438         (JSObjectMake):
3439         (JSObjectSetPrototype):
3440         * JavaScriptCore.exp:
3441         * bytecompiler/BytecodeGenerator.cpp:
3442         (JSC::BytecodeGenerator::BytecodeGenerator):
3443         * interpreter/Interpreter.cpp:
3444         (JSC::appendSourceToError):
3445         (JSC::Interpreter::tryCacheGetByID):
3446         (JSC::Interpreter::privateExecute):
3447         * jit/JITStubs.cpp:
3448         (JSC::JITThunks::tryCacheGetByID):
3449         (JSC::DEFINE_STUB_FUNCTION):
3450         * runtime/BatchedTransitionOptimizer.h:
3451         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3452         * runtime/InternalFunction.cpp:
3453         (JSC::InternalFunction::name):
3454         (JSC::InternalFunction::displayName):
3455         * runtime/JSActivation.cpp:
3456         (JSC::JSActivation::getOwnPropertySlot):
3457         * runtime/JSFunction.cpp:
3458         (JSC::JSFunction::name):
3459         (JSC::JSFunction::displayName):
3460         (JSC::JSFunction::getOwnPropertySlot):
3461         * runtime/JSGlobalObject.cpp:
3462         (JSC::JSGlobalObject::putWithAttributes):
3463         (JSC::JSGlobalObject::reset):
3464         (JSC::JSGlobalObject::resetPrototype):
3465         * runtime/JSGlobalObject.h:
3466         * runtime/JSObject.cpp:
3467         (JSC::JSObject::put):
3468         (JSC::JSObject::deleteProperty):
3469         (JSC::JSObject::defineGetter):
3470         (JSC::JSObject::defineSetter):
3471         (JSC::JSObject::lookupGetter):
3472         (JSC::JSObject::lookupSetter):
3473         (JSC::JSObject::getPropertySpecificValue):
3474         (JSC::JSObject::getOwnPropertyNames):
3475         (JSC::JSObject::seal):
3476         (JSC::JSObject::freeze):
3477         (JSC::JSObject::preventExtensions):
3478         (JSC::JSObject::removeDirect):
3479         (JSC::JSObject::getOwnPropertyDescriptor):
3480         (JSC::JSObject::defineOwnProperty):
3481         * runtime/JSObject.h:
3482         (JSC::JSObject::getDirect):
3483         (JSC::JSObject::getDirectLocation):
3484         (JSC::JSObject::isSealed):
3485         (JSC::JSObject::isFrozen):
3486         (JSC::JSObject::setPrototypeWithCycleCheck):
3487         (JSC::JSObject::setPrototype):
3488         (JSC::JSObject::inlineGetOwnPropertySlot):
3489         (JSC::JSObject::putDirectInternal):
3490         (JSC::JSObject::putDirectWithoutTransition):
3491         (JSC::JSObject::putDirectFunctionWithoutTransition):
3492         * runtime/Lookup.cpp:
3493         (JSC::setUpStaticFunctionSlot):
3494         * runtime/ObjectConstructor.cpp:
3495         (JSC::objectConstructorCreate):
3496         (JSC::objectConstructorSeal):
3497         (JSC::objectConstructorFreeze):
3498         (JSC::objectConstructorPreventExtensions):
3499         (JSC::objectConstructorIsSealed):
3500         (JSC::objectConstructorIsFrozen):
3501         * runtime/Operations.h:
3502         (JSC::normalizePrototypeChain):
3503         * runtime/PropertyMapHashTable.h:
3504         (JSC::PropertyMapEntry::PropertyMapEntry):
3505         (JSC::PropertyTable::PropertyTable):
3506         (JSC::PropertyTable::copy):
3507         * runtime/Structure.cpp:
3508         (JSC::Structure::materializePropertyMap):
3509         (JSC::Structure::despecifyDictionaryFunction):
3510         (JSC::Structure::addPropertyTransition):
3511         (JSC::Structure::removePropertyTransition):
3512         (JSC::Structure::changePrototypeTransition):
3513         (JSC::Structure::despecifyFunctionTransition):
3514         (JSC::Structure::getterSetterTransition):
3515         (JSC::Structure::toDictionaryTransition):
3516         (JSC::Structure::toCacheableDictionaryTransition):
3517         (JSC::Structure::toUncacheableDictionaryTransition):
3518         (JSC::Structure::sealTransition):
3519         (JSC::Structure::freezeTransition):
3520         (JSC::Structure::preventExtensionsTransition):
3521         (JSC::Structure::isSealed):
3522         (JSC::Structure::isFrozen):
3523         (JSC::Structure::addPropertyWithoutTransition):
3524         (JSC::Structure::removePropertyWithoutTransition):
3525         (JSC::Structure::copyPropertyTable):
3526         (JSC::Structure::get):
3527         (JSC::Structure::despecifyFunction):
3528         (JSC::Structure::despecifyAllFunctions):
3529         (JSC::Structure::put):
3530         (JSC::Structure::getPropertyNames):
3531         * runtime/Structure.h:
3532         (JSC::Structure::get):
3533         (JSC::Structure::materializePropertyMapIfNecessary):
3534
3535 2011-04-13  Paul Knight  <pknight@apple.com>
3536
3537         Reviewed by Gavin Barraclough.
3538
3539         BACKTRACE() macro should check for Debug configuration in macro, not WTFReportBacktrace definition
3540         https://bugs.webkit.org/show_bug.cgi?id=58405
3541
3542         The BACKTRACE() macro requires JavaScriptCore be built with a Debug
3543         configuration in order for it to be enabled. Move the NDEBUG check to
3544         the header so it will be enabled when the calling framework or
3545         application is built with a Debug configuration, similar to how
3546         ASSERT() and friends work.
3547
3548         * wtf/Assertions.cpp:
3549         * wtf/Assertions.h:
3550
3551 2011-04-12  Ben Taylor  <bentaylor.solx86@gmail.com>
3552
3553         Reviewed by Alexey Proskuryakov.
3554
3555         https://bugs.webkit.org/show_bug.cgi?id=58131
3556
3557         Provide a workaround for an obscure Studio 12 compiler bug, which
3558         couldn't call src->~T() on a const T *src.
3559
3560         * wtf/Vector.h:
3561
3562 2011-04-12  Gavin Barraclough  <barraclough@apple.com>
3563
3564         Reviewed by Oliver Hunt.
3565
3566         https://bugs.webkit.org/show_bug.cgi?id=58395
3567         Exceptions thrown from property getters called from Array prototype functions can be missed
3568
3569         This is caught by an ASSERT in the top of Interpreter::executeCall.
3570         Check for exceptions after accessing properties that could be getters.
3571
3572         * runtime/ArrayPrototype.cpp:
3573         (JSC::arrayProtoFuncSort):
3574         (JSC::arrayProtoFuncFilter):
3575         (JSC::arrayProtoFuncMap):
3576         (JSC::arrayProtoFuncEvery):
3577         (JSC::arrayProtoFuncForEach):
3578         (JSC::arrayProtoFuncSome):
3579         (JSC::arrayProtoFuncReduce):
3580         (JSC::arrayProtoFuncReduceRight):
3581             - Add exception checks.
3582
3583 2011-04-12  Oliver Hunt  <oliver@apple.com>
3584
3585         Reviewed by Geoffrey Garen.
3586
3587         Make API callback objects use weak handles to run their finalizers
3588         https://bugs.webkit.org/show_bug.cgi?id=58389
3589
3590         Make the API object's private data struct act as a finalizer for
3591         an api object if the callback object has a API defined finalizer.
3592
3593         * API/JSCallbackObject.cpp:
3594         (JSC::JSCallbackObjectData::finalize):
3595         * API/JSCallbackObject.h:
3596         * API/JSCallbackObjectFunctions.h:
3597         (JSC::::init):
3598         * heap/Handle.h:
3599
3600 2011-04-12  Geoffrey Garen  <ggaren@apple.com>
3601
3602         Reviewed by Geoffrey Garen.
3603
3604         Cleaned up hash traits, and added hash traits for handles
3605         https://bugs.webkit.org/show_bug.cgi?id=58381
3606
3607         * heap/Handle.h:
3608         (JSC::HandleBase::swap):
3609         (JSC::Handle::Handle):
3610         (JSC::Handle::swap): Implemented swap, so we can rehash efficiently, and
3611         without creating new handles (which is not allowed during handle finalization).
3612
3613         * heap/Strong.h:
3614         (JSC::Strong::swap): Use new SimpleClassHashTraits to avoid duplication.
3615
3616         * heap/Weak.h:
3617         (JSC::Weak::isHashTableDeletedValue):
3618         (JSC::Weak::Weak):
3619         (JSC::Weak::swap):
3620         (JSC::Weak::hashTableDeletedValue): Ditto.
3621
3622         * wtf/HashTraits.h:
3623         (WTF::SimpleClassHashTraits::constructDeletedValue):
3624         (WTF::SimpleClassHashTraits::isDeletedValue): Added SimpleClassHashTraits,
3625         which are analogous to SimpleClassVectorTraits, since they are used in a
3626         bunch of places.
3627
3628         * wtf/RetainPtr.h: Use new SimpleClassHashTraits to avoid duplication.
3629
3630         * wtf/text/StringHash.h: Use new SimpleClassHashTraits to avoid duplication.
3631
3632 2011-04-12  Geoffrey Garen  <ggaren@apple.com>
3633
3634         Reviewed by Sam Weinig.
3635
3636         Cleaned up some Vector traits, and added missing Vector traits for handles
3637         https://bugs.webkit.org/show_bug.cgi?id=58372
3638
3639         * heap/Local.h: Inherit from SimpleClassVectorTraits to avoid duplication.
3640
3641         * heap/Strong.h: Ditto.
3642
3643         * heap/Weak.h: Ditto.
3644
3645         * parser/JSParser.cpp: Fixed a traits error. No test case because this
3646         particular trait is not currently exercised by the parser.
3647
3648         * runtime/UString.h: No need to override canInitializeWithMemset, since
3649         our base class sets it to true.
3650
3651         * wtf/VectorTraits.h: Inherit from VectorTraitsBase to avoid duplication.
3652
3653         * wtf/text/WTFString.h: No need to override canInitializeWithMemset, since
3654         our base class sets it to true.
3655
3656 2011-04-12  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
3657
3658         Reviewed by Eric Seidel.
3659
3660         [Qt] Enable JIT build for SH4 platforms.
3661         https://bugs.webkit.org/show_bug.cgi?id=58317
3662         enable JIT build for QT backend  for SH4 platforms.
3663
3664         * JavaScriptCore.pro:
3665         * wtf/Platform.h:
3666
3667 2011-04-11  Ben Taylor  <bentaylor.solx86@gmail.com>
3668
3669         Reviewed by Alexey Proskuryakov.
3670
3671         https://bugs.webkit.org/show_bug.cgi?id=58289
3672
3673         Fix compilation on Solaris/Studio 12 C++ in wtf/FastMalloc.cpp,
3674         WTF::TCMalloc_PageHeap::runScavengerThread(void*) expected to return a value.
3675
3676         * wtf/FastMalloc.cpp:
3677         (WTF::TCMalloc_PageHeap::runScavengerThread):
3678
3679 2011-04-11  Mark Rowe  <mrowe@apple.com>
3680
3681         Fix the build.
3682
3683         * JavaScriptCore.xcodeproj/project.pbxproj: Headers used outside of JavaScriptCore need to be marked as private.
3684
3685 2011-04-11  Anna Cavender  <annacc@chromium.org>
3686
3687         Reviewed by Eric Carlson.
3688
3689         Setup ENABLE(TRACK) feature define
3690         https://bugs.webkit.org/show_bug.cgi?id=53556
3691
3692
3693         * Configurations/FeatureDefines.xcconfig:
3694
3695 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
3696
3697         Try to fix a few builds.
3698         
3699         Updated a few more build configurations for file moves.
3700
3701         * CMakeListsWinCE.txt:
3702
3703 2011-04-11  Gavin Barraclough  <barraclough@apple.com>
3704
3705         Reviewed by Sam Weinig.
3706
3707         Bug 58263 - Use EncodedValueDescriptor on both JSVALUE32_64, JSVALUE64
3708
3709         The JSJITInterface already uses EncodedValueDescriptor to access the tag/payload
3710         separately on JSVALUE64, even though EncodedValueDescriptor is not used in
3711         JSVALUE64's implementation of JSValue. Remove the separate definition for m_ptr
3712         on X86_64. Using the union allows us to remove a layer of makeImmediate()/
3713         immedaiteValue() methods.
3714
3715         * dfg/DFGNonSpeculativeJIT.cpp:
3716         (JSC::DFG::NonSpeculativeJIT::compile):
3717         * dfg/DFGSpeculativeJIT.cpp:
3718         (JSC::DFG::SpeculativeJIT::compile):
3719         * jit/JITInlineMethods.h:
3720         (JSC::JIT::emitTagAsBoolImmediate):
3721         * jit/JITOpcodes.cpp:
3722         (JSC::JIT::emit_op_not):
3723         (JSC::JIT::emit_op_jeq_null):
3724         (JSC::JIT::emit_op_jneq_null):
3725         (JSC::JIT::emit_op_get_pnames):
3726         (JSC::JIT::emit_op_eq_null):
3727         (JSC::JIT::emit_op_neq_null):
3728         (JSC::JIT::emitSlow_op_not):
3729         * runtime/JSCell.h:
3730         * runtime/JSValue.h:
3731         * runtime/JSValueInlineMethods.h:
3732         (JSC::JSValue::encode):
3733         (JSC::JSValue::decode):
3734         (JSC::JSValue::operator==):
3735         (JSC::JSValue::operator!=):
3736         (JSC::JSValue::JSValue):
3737         (JSC::JSValue::operator bool):
3738         (JSC::JSValue::asInt32):
3739         (JSC::JSValue::isUndefinedOrNull):
3740         (JSC::JSValue::isBoolean):
3741         (JSC::JSValue::isCell):
3742         (JSC::JSValue::isInt32):
3743         (JSC::JSValue::asDouble):
3744         (JSC::JSValue::isNumber):
3745         (JSC::JSValue::asCell):
3746
3747 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
3748
3749         Try to fix a few builds.
3750         
3751         Updated a few more build configurations for file moves.
3752
3753         * CMakeListsEfl.txt:
3754         * wscript:
3755
3756 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
3757
3758         Build fix: Updated a file name.
3759
3760         * CMakeLists.txt:
3761
3762 2011-04-11  Geoffrey Garen  <ggaren@apple.com>
3763
3764         Rubber-stamped by Sam Weinig.
3765         
3766         Moved remaining heap implementation files to the heap folder.
3767
3768         * Android.mk:
3769         * CMakeLists.txt:
3770         * GNUmakefile.list.am:
3771         * JavaScriptCore.gypi:
3772         * JavaScriptCore.pro:
3773         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3774         * JavaScriptCore.xcodeproj/project.pbxproj:
3775         * heap/ConservativeRoots.cpp: Copied from runtime/ConservativeSet.cpp.
3776         * heap/ConservativeRoots.h: Copied from runtime/ConservativeSet.h.
3777         * heap/Handle.h:
3778         * heap/Heap.cpp:
3779         * heap/MachineStackMarker.cpp: Copied from runtime/MachineStackMarker.cpp.
3780         * heap/MachineStackMarker.h: Copied from runtime/MachineStackMarker.h.
3781         * heap/MarkStack.cpp: Copied from runtime/MarkStack.cpp.
3782         * heap/MarkStack.h: Copied from runtime/MarkStack.h.
3783         * heap/MarkStackPosix.cpp: Copied from runtime/MarkStackPosix.cpp.
3784         * heap/MarkStackSymbian.cpp: Copied from runtime/MarkStackSymbian.cpp.
3785         * heap/MarkStackWin.cpp: Copied from runtime/MarkStackWin.cpp.
3786         * heap/MarkedBlock.cpp: Copied from runtime/MarkedBlock.cpp.
3787         * heap/MarkedBlock.h: Copied from runtime/MarkedBlock.h.
3788         * heap/MarkedSpace.cpp: Copied from runtime/MarkedSpace.cpp.
3789         * heap/MarkedSpace.h: Copied from runtime/MarkedSpace.h.
3790         * interpreter/RegisterFile.cpp:
3791         * runtime/ConservativeSet.cpp: Removed.
3792         * runtime/ConservativeSet.h: Removed.
3793         * runtime/MachineStackMarker.cpp: Removed.
3794         * runtime/MachineStackMarker.h: Removed.
3795         * runtime/MarkStack.cpp: Removed.
3796         * runtime/MarkStack.h: Removed.
3797         * runtime/MarkStackPosix.cpp: Removed.
3798         * runtime/MarkStackSymbian.cpp: Removed.
3799         * runtime/MarkStackWin.cpp: Removed.
3800         * runtime/MarkedBlock.cpp: Removed.
3801         * runtime/MarkedBlock.h: Removed.
3802         * runtime/MarkedSpace.cpp: Removed.
3803         * runtime/MarkedSpace.h: Removed.
3804
3805 2011-04-11  Gavin Barraclough  <barraclough@apple.com>
3806
3807         Windows build fix.
3808
3809         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3810
3811 2011-04-09  Gavin Barraclough  <barraclough@apple.com>
3812
3813         Reviewed by Sam Weinig.
3814
3815         Bug 58198 - Clean up JSValue implementation for JSVALUE64
3816
3817         Remove JSNumberCell, JSImmediate, unify some methods between JSVALUE32_64/JSVALUE64
3818
3819         JSNumberCell.h largely just contained the constructors for JSValue on JSVALUE64,
3820         which should not have been here.  JSImmediate mostly contained uncalled methods,
3821         along with the internal implementation of the JSValue constructors split unnecessarily
3822         across a number of layers of function calls. These could largely be merged back
3823         together. Many methods and constructors from JSVALUE32_64 and JSVALUE64 can by unified.
3824
3825         The .cpp files were empty.
3826
3827         Moving all these methods into JSValue.h seems to be a repro measurable regression, so
3828         I have kept these methods in a separate JSValueInlineMethods.h. Adding the 64-bit tag
3829         values as static const members of JSValue also measures as a repro regression, so I
3830         have made these #defines.
3831
3832         * Android.mk:
3833         * CMakeLists.txt:
3834         * GNUmakefile.list.am:
3835         * JavaScriptCore.exp:
3836         * JavaScriptCore.gypi:
3837         * JavaScriptCore.pro:
3838         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3839         * JavaScriptCore.xcodeproj/project.pbxproj:
3840             - Removed JSImmediate.h, JSNumberCell.h.
3841         * bytecompiler/BytecodeGenerator.cpp:
3842         (JSC::BytecodeGenerator::emitLoad):
3843             - Removed class JSImmediate.
3844         * dfg/DFGNonSpeculativeJIT.cpp:
3845         (JSC::DFG::NonSpeculativeJIT::compile):
3846             - Removed class JSImmediate.
3847         * dfg/DFGSpeculativeJIT.cpp:
3848         (JSC::DFG::SpeculativeJIT::compile):
3849             - Removed class JSImmediate.
3850         * jit/JITArithmetic.cpp:
3851         (JSC::JIT::compileBinaryArithOpSlowCase):
3852             - Removed class JSImmediate.
3853         * jit/JITInlineMethods.h:
3854         (JSC::JIT::emitJumpIfJSCell):
3855         (JSC::JIT::emitJumpIfNotJSCell):
3856         (JSC::JIT::emitJumpIfImmediateInteger):
3857         (JSC::JIT::emitJumpIfNotImmediateInteger):
3858         (JSC::JIT::emitFastArithDeTagImmediate):
3859         (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
3860         (JSC::JIT::emitFastArithReTagImmediate):
3861         (JSC::JIT::emitTagAsBoolImmediate):
3862             - Removed class JSImmediate.
3863         * jit/JITOpcodes.cpp:
3864         (JSC::JIT::emit_op_not):
3865         (JSC::JIT::emit_op_jeq_null):
3866         (JSC::JIT::emit_op_jneq_null):
3867         (JSC::JIT::emit_op_get_pnames):
3868         (JSC::JIT::emit_op_eq_null):
3869         (JSC::JIT::emit_op_neq_null):
3870         (JSC::JIT::emitSlow_op_not):
3871             - Removed class JSImmediate.
3872         * jit/JSInterfaceJIT.h:
3873             - Removed class JSImmediate.
3874         * runtime/JSCell.h:
3875             - Removed JSImmediate.h, JSNumberCell.h.
3876         * runtime/JSImmediate.cpp: Removed.
3877         * runtime/JSImmediate.h: Removed.
3878         * runtime/JSNumberCell.cpp: Removed.
3879         * runtime/JSNumberCell.h: Removed.
3880             - Removed.
3881         * runtime/JSObject.h:
3882             - Removed JSImmediate.h, JSNumberCell.h.
3883         * runtime/JSString.h:
3884             - Removed JSImmediate.h, JSNumberCell.h.
3885         * runtime/JSValue.h:
3886             - Added tags for JSVALUE64, moved out some JSVALUE32_64 methods, unified with JSVALUE64.
3887         * runtime/JSValueInlineMethods.h: Added.
3888         (JSC::JSValue::toInt32):
3889         (JSC::JSValue::toUInt32):
3890         (JSC::JSValue::isUInt32):
3891         (JSC::JSValue::asUInt32):
3892         (JSC::JSValue::uncheckedGetNumber):
3893         (JSC::JSValue::toJSNumber):
3894         (JSC::jsNaN):
3895         (JSC::JSValue::getNumber):
3896         (JSC::JSValue::getBoolean):
3897         (JSC::JSValue::JSValue):
3898         (JSC::JSValue::encode):
3899         (JSC::JSValue::decode):
3900         (JSC::JSValue::operator bool):
3901         (JSC::JSValue::operator==):
3902         (JSC::JSValue::operator!=):
3903         (JSC::JSValue::isUndefined):
3904         (JSC::JSValue::isNull):
3905         (JSC::JSValue::isUndefinedOrNull):
3906         (JSC::JSValue::isCell):
3907         (JSC::JSValue::isInt32):
3908         (JSC::JSValue::isDouble):
3909         (JSC::JSValue::isTrue):
3910         (JSC::JSValue::isFalse):
3911         (JSC::JSValue::tag):
3912         (JSC::JSValue::payload):
3913         (JSC::JSValue::asInt32):
3914         (JSC::JSValue::asDouble):
3915         (JSC::JSValue::asCell):
3916         (JSC::JSValue::isNumber):
3917         (JSC::JSValue::isBoolean):
3918         (JSC::JSValue::makeImmediate):
3919         (JSC::JSValue::immediateValue):
3920         (JSC::reinterpretDoubleToIntptr):
3921         (JSC::reinterpretIntptrToDouble):
3922             - Methods moved here from JSImmediate.h/JSNumberCell.h/JSValue.h.
3923         * runtime/Operations.h:
3924             - Removed JSImmediate.h, JSNumberCell.h.
3925         * wtf/StdLibExtras.h:
3926             - Export bitwise_cast.
3927
3928 2011-04-11  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
3929
3930         Reviewed by Oliver Hunt.
3931
3932         SH4 JIT SUPPORT.
3933         https://bugs.webkit.org/show_bug.cgi?id=44329
3934
3935         Add JIT remaining part for SH4 platforms.
3936
3937         * assembler/MacroAssemblerSH4.h:
3938         * jit/JIT.h:
3939         * jit/JITInlineMethods.h:
3940         * jit/JITOpcodes32_64.cpp:
3941         * jit/JITPropertyAccess32_64.cpp:
3942         * jit/JITStubs.cpp:
3943         * jit/JITStubs.h:
3944         * jit/JSInterfaceJIT.h:
3945
3946 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
3947
3948         Rubber-stamped by Beth Dakin.
3949
3950         Moved Heap.h and Heap.cpp to the heap folder, because anything less 
3951         would be uncivilized.
3952
3953         * Android.mk:
3954         * CMakeLists.txt:
3955         * GNUmakefile.list.am:
3956         * JavaScriptCore.gypi:
3957         * JavaScriptCore.pro:
3958         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3959         * JavaScriptCore.xcodeproj/project.pbxproj:
3960         * heap/Heap.cpp: Copied from JavaScriptCore/runtime/Heap.cpp.
3961         * heap/Heap.h: Copied from JavaScriptCore/runtime/Heap.h.
3962         * runtime/Heap.cpp: Removed.
3963         * runtime/Heap.h: Removed.
3964
3965 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
3966
3967         Reviewed by Darin Adler.
3968
3969         Remove duplicated code from AtomicString::fromUTF8()
3970         https://bugs.webkit.org/show_bug.cgi?id=53711
3971
3972         * JavaScriptCore.exp:
3973         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3974         * wtf/text/AtomicString.cpp:
3975         (WTF::AtomicString::fromUTF8Internal):
3976         * wtf/text/AtomicString.h:
3977         (WTF::AtomicString::fromUTF8):
3978         * wtf/unicode/UTF8.cpp:
3979         (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
3980         * wtf/unicode/UTF8.h:
3981
3982 2011-04-10  Maciej Stachowiak  <mjs@apple.com>
3983
3984         Not reviewed.
3985
3986         Fix build (at least on Lion) by adding some newish header files to
3987         PrivateHeaders.
3988
3989         * JavaScriptCore.xcodeproj/project.pbxproj:
3990
3991 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
3992
3993         Not reviewed.
3994
3995         Try recommitting some things svn left out of its last commit.
3996
3997         * heap/Handle.h:
3998         (JSC::HandleBase::operator!):
3999         (JSC::HandleBase::HandleBase):
4000         (JSC::HandleBase::slot):
4001         (JSC::HandleBase::setSlot):
4002         (JSC::Handle::Handle):
4003         * heap/HandleHeap.cpp:
4004         (JSC::HandleHeap::markWeakHandles):
4005         (JSC::HandleHeap::finalizeWeakHandles):
4006         (JSC::HandleHeap::isValidWeakNode):
4007         * heap/HandleHeap.h:
4008         (JSC::HandleHeap::globalData):
4009
4010 2011-04-08  Geoffrey Garen  <ggaren@apple.com>
4011
4012         Reviewed by Oliver Hunt.
4013
4014         A few heap-related renames and file moves.
4015         
4016         WeakGCPtr<T> => Weak<T>
4017         Global<T> => Strong<T>
4018         collector/ => heap/
4019         collector/* => heap/*
4020         runtime/WeakGCPtr.h => heap/Weak.h
4021         
4022         (Eventually, even more files should move into the heap directory. Like
4023         Heap.h and Heap.cpp, for example.)
4024
4025         * API/JSClassRef.h:
4026         * CMakeLists.txt:
4027         * GNUmakefile.am:
4028         * GNUmakefile.list.am:
4029         * JavaScriptCore.gypi:
4030         * JavaScriptCore.pri:
4031         * JavaScriptCore.pro:
4032         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4033         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
4034         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
4035         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
4036         * JavaScriptCore.xcodeproj/project.pbxproj:
4037         * bytecode/SamplingTool.h:
4038         * bytecompiler/BytecodeGenerator.h:
4039         * collector: Removed.
4040         * collector/handles: Removed.
4041         * collector/handles/Global.h: Removed.
4042         * collector/handles/Handle.h: Removed.
4043         * collector/handles/HandleHeap.cpp: Removed.
4044         * collector/handles/HandleHeap.h: Removed.
4045         * collector/handles/HandleStack.cpp: Removed.
4046         * collector/handles/HandleStack.h: Removed.
4047         * collector/handles/Local.h: Removed.
4048         * collector/handles/LocalScope.h: Removed.
4049         * heap: Copied from collector.
4050         * heap/Handle.h: Copied from collector/handles/Handle.h.
4051         * heap/HandleHeap.cpp: Copied from collector/handles/HandleHeap.cpp.
4052         * heap/HandleHeap.h: Copied from collector/handles/HandleHeap.h.
4053         * heap/HandleStack.cpp: Copied from collector/handles/HandleStack.cpp.
4054         * heap/HandleStack.h: Copied from collector/handles/HandleStack.h.
4055         * heap/Local.h: Copied from collector/handles/Local.h.
4056         * heap/LocalScope.h: Copied from collector/handles/LocalScope.h.
4057         * heap/Strong.h: Copied from collector/handles/Global.h.
4058         (JSC::Strong::Strong):
4059         (JSC::Strong::~Strong):
4060         (JSC::Strong::operator=):
4061         * heap/Weak.h: Copied from runtime/WeakGCPtr.h.
4062         (JSC::Weak::Weak):
4063         (JSC::Weak::~Weak):
4064         * heap/handles: Removed.
4065         * interpreter/RegisterFile.h:
4066         * jit/JITStubs.cpp:
4067         (JSC::JITThunks::hostFunctionStub):
4068         * jit/JITStubs.h:
4069         * runtime/Structure.h:
4070         * runtime/WeakGCPtr.h: Removed.
4071
4072 2011-04-08  Alpha Lam  <hclam@chromium.org>
4073
4074         Unreviewed, rolling out r83335.
4075         http://trac.webkit.org/changeset/83335
4076         https://bugs.webkit.org/show_bug.cgi?id=53556
4077
4078         GTK and QT bots are broken
4079
4080         * Configurations/FeatureDefines.xcconfig:
4081
4082 2011-04-08  Gavin Barraclough  <barraclough@apple.com>
4083
4084         Ooops, typo, build fix.
4085
4086         * dfg/DFGByteCodeParser.cpp:
4087         (JSC::DFG::ByteCodeParser::parse):
4088
4089 2011-04-08  Gavin Barraclough  <barraclough@apple.com>
4090
4091         Reviewed by Oliver Hunt.
4092
4093         Bug 58154 - Add support for comparison operators to the DFG JIT.
4094
4095         Add support for <, <=, ==, ===, and also !.  Add support for all corresponding
4096         bytecode ops, including the not- and -null forms.  Initially add functionally