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