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