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