2011-03-30 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
[WebKit.git] / Source / JavaScriptCore / ChangeLog
1 2011-03-30  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
2
3         Reviewed by Maciej Stachowiak.
4
5         Add the NEXT_OPCODE() macro to the DFG-JIT parser
6         https://bugs.webkit.org/show_bug.cgi?id=57322
7
8         In JavaScriptCore we use macros to jump to the next opcode
9         (both in interpreter and JIT). This macro is added to the
10         DFG-JIT parser as well.
11
12         * dfg/DFGByteCodeParser.cpp:
13         (JSC::DFG::ByteCodeParser::parse):
14
15 2011-03-29  Geoffrey Garen  <ggaren@apple.com>
16
17         Reviewed by Darin Adler.
18
19         ~25% regression on v8-splay in the SunSpider harness
20         https://bugs.webkit.org/show_bug.cgi?id=56128
21         
22         I'm not sure if this is the root cause of the regression Stephanie
23         measured, but it seems to get us back to previous v8-splay times.
24         
25         SunSpider reports no change. v8-splay says 41% faster.
26
27         * runtime/Heap.cpp:
28         (JSC::Heap::reset): Make marking proportional to 1X the size of the heap,
29         not .5X the size of the heap. When the heap is large, this makes a big
30         difference. (Our old heap growth policy matched this. You can see by
31         looking at resizeBlocks in revisions prior to r77699.)
32
33 2011-03-29  Steve Falkenburg  <sfalken@apple.com>
34
35         Reviewed by Darin Adler.
36
37         Use per-configuration vsprops in JavaScriptCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
38         https://bugs.webkit.org/show_bug.cgi?id=57350
39         
40         Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
41         InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
42         the IDE. To avoid this, add a separate vsprops file for each project configuration that
43         contains the required inherited property sheets.
44
45         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
46         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops: Added.
47         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops: Added.
48         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops: Added.
49         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops: Added.
50         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops: Added.
51         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Added.
52         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: Added.
53         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: Added.
54         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
55         * JavaScriptCore.vcproj/WTF/WTFDebug.vsprops: Added.
56         * JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops: Added.
57         * JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops: Added.
58         * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops: Added.
59         * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops: Added.
60         * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Added.
61         * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops: Added.
62         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
63         * JavaScriptCore.vcproj/jsc/jscDebug.vsprops: Added.
64         * JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops: Added.
65         * JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops: Added.
66         * JavaScriptCore.vcproj/jsc/jscRelease.vsprops: Added.
67         * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops: Added.
68         * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Added.
69         * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: Added.
70         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
71         * JavaScriptCore.vcproj/testapi/testapiDebug.vsprops: Added.
72         * JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops: Added.
73         * JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops: Added.
74         * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops: Added.
75         * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops: Added.
76         * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Added.
77
78 2011-03-29  Oliver Hunt  <oliver@apple.com>
79
80         Reviewed by Eric Seidel.
81
82         REGRESSION(r82173): Causes assertion and test failures in run-javascriptcore-tests on Windows (Requested by aroben on #webkit).
83         https://bugs.webkit.org/show_bug.cgi?id=57333
84
85         constructDate now takes the global object explicitly as it may be called
86         by functions other than the constructor itself.
87
88         * API/JSObjectRef.cpp:
89         (JSObjectMakeDate):
90         * runtime/DateConstructor.cpp:
91         (JSC::constructDate):
92         (JSC::constructWithDateConstructor):
93         * runtime/DateConstructor.h:
94
95 2011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
96
97         Reviewed by Benjamin Poulain.
98
99         https://bugs.webkit.org/show_bug.cgi?id=41953
100
101         Fix compile error on Solaris 10/Sun Studio 12 CC emanating from MathExtras.h
102
103         * wtf/MathExtras.h:
104
105 2011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
106
107         Reviewed by Darin Adler.
108
109         https://bugs.webkit.org/show_bug.cgi?id=57231
110         Add conditional for SUNCC supporting alignment macros
111
112         Compile fix for Solaris 10/Sun Studio 12 CC
113
114         * wtf/Vector.h:
115
116 2011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
117
118         Reviewed by Darin Adler.
119
120         https://bugs.webkit.org/show_bug.cgi?id=57256
121
122         Fix crash on misaligned reads on Solaris 10/Sparc
123
124         * wtf/text/AtomicString.cpp:
125         (WTF::equal):
126
127 2011-03-28  Oliver Hunt  <oliver@apple.com>
128
129         Reviewed by Geoffrey Garen.
130
131         instanceof Array test fails when using iframes
132         https://bugs.webkit.org/show_bug.cgi?id=17250
133
134         This is a problem with all built in constructors, the use of
135         lexicalGlobalObject rather than the constructors own 
136         global object reference means that a builtin will always use
137         the prototype from the lexical global object rather than that
138         of the constructors origin.
139
140         * API/JSObjectRef.cpp:
141         (JSObjectMakeFunction):
142         (JSObjectMakeRegExp):
143         * JavaScriptCore.exp:
144         * runtime/ArrayConstructor.cpp:
145         (JSC::constructArrayWithSizeQuirk):
146         * runtime/BooleanConstructor.cpp:
147         (JSC::constructBoolean):
148         (JSC::constructBooleanFromImmediateBoolean):
149         * runtime/BooleanConstructor.h:
150         * runtime/DateConstructor.cpp:
151         (JSC::constructDate):
152         * runtime/DateInstance.cpp:
153         * runtime/DateInstance.h:
154         * runtime/ErrorConstructor.cpp:
155         (JSC::constructWithErrorConstructor):
156         (JSC::callErrorConstructor):
157         * runtime/FunctionConstructor.cpp:
158         (JSC::constructWithFunctionConstructor):
159         (JSC::callFunctionConstructor):
160         (JSC::constructFunction):
161         * runtime/FunctionConstructor.h:
162         * runtime/JSCell.cpp:
163         (JSC::JSCell::getOwnPropertySlot):
164         (JSC::JSCell::put):
165         (JSC::JSCell::deleteProperty):
166         (JSC::JSCell::toThisObject):
167         (JSC::JSCell::toObject):
168         * runtime/JSCell.h:
169         (JSC::JSCell::JSValue::toObject):
170         * runtime/JSNotAnObject.cpp:
171         (JSC::JSNotAnObject::toObject):
172         * runtime/JSNotAnObject.h:
173         * runtime/JSObject.cpp:
174         (JSC::JSObject::toObject):
175         * runtime/JSObject.h:
176         * runtime/JSString.cpp:
177         (JSC::StringObject::create):
178         (JSC::JSString::toObject):
179         (JSC::JSString::toThisObject):
180         * runtime/JSString.h:
181         * runtime/JSValue.cpp:
182         (JSC::JSValue::toObjectSlowCase):
183         (JSC::JSValue::toThisObjectSlowCase):
184         (JSC::JSValue::synthesizeObject):
185         * runtime/JSValue.h:
186         * runtime/NumberConstructor.cpp:
187         (JSC::constructWithNumberConstructor):
188         * runtime/NumberObject.cpp:
189         (JSC::constructNumber):
190         * runtime/NumberObject.h:
191         * runtime/ObjectConstructor.cpp:
192         (JSC::constructObject):
193         (JSC::constructWithObjectConstructor):
194         (JSC::callObjectConstructor):
195         * runtime/RegExpConstructor.cpp:
196         (JSC::constructRegExp):
197         (JSC::constructWithRegExpConstructor):
198         (JSC::callRegExpConstructor):
199         * runtime/RegExpConstructor.h:
200         * runtime/StringConstructor.cpp:
201         (JSC::constructWithStringConstructor):
202         * runtime/StringObject.h:
203
204 2011-03-28  Geoffrey Garen  <ggaren@apple.com>
205
206         Reviewed by Oliver Hunt.
207
208         REGRESSION [r78794-r79249] Allocation of memory is slow when number of active objects is large
209         https://bugs.webkit.org/show_bug.cgi?id=56823
210         
211         Partial fix for most of the problem. (TOT still shows a regression, though.)
212
213         * runtime/Heap.cpp:
214         (JSC::Heap::reportExtraMemoryCostSlowCase): Use highWaterMark(), instead of
215         capacity(), since capacity() is O(n) relative to the size of the heap.
216
217         In limited circumstances, capacity() is also worse than highWaterMark()
218         for measuring extra cost relative to heap size, since capacity() only
219         measures the *current* capacity of the heap, but the heap will grow if
220         necessary to attain highWaterMark().
221
222 2011-03-28  Oliver Hunt  <oliver@apple.com>
223
224         REGRESSION(r82130): It made all tests crash (Requested by Ossy on #webkit).
225         https://bugs.webkit.org/show_bug.cgi?id=57251
226
227         Build fix, had remnant of another patch in r82130
228
229         * jit/JITPropertyAccess.cpp:
230         (JSC::JIT::privateCompileGetByIdChainList):
231
232 2011-03-27  Oliver Hunt  <oliver@apple.com>
233
234         Reviewed by Maciej Stachowiak.
235
236         Add additional immediate types to allow us to distinguish the source of a JIT immediate
237         https://bugs.webkit.org/show_bug.cgi?id=57190
238
239         Allow us to distinguish whether a JIT immediate is a value that we
240         control (TrustedImm32 and TrustedImmPtr) vs. ones that can be controlled
241         or influenced by code we are compiling.  Currently we do nothing with this
242         information -- this change is large and mechanical but would obscure any
243         logic changes that we would have made.
244
245         * assembler/AbstractMacroAssembler.h:
246         (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
247         (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
248         (JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):
249         (JSC::AbstractMacroAssembler::Imm32::Imm32):
250         * assembler/MacroAssembler.h:
251         (JSC::MacroAssembler::pop):
252         (JSC::MacroAssembler::poke):
253         (JSC::MacroAssembler::branchPtr):
254         (JSC::MacroAssembler::branch32):
255         (JSC::MacroAssembler::addPtr):
256         (JSC::MacroAssembler::andPtr):
257         (JSC::MacroAssembler::orPtr):
258         (JSC::MacroAssembler::subPtr):
259         (JSC::MacroAssembler::xorPtr):
260         (JSC::MacroAssembler::setPtr):
261         (JSC::MacroAssembler::storePtr):
262         (JSC::MacroAssembler::branchTestPtr):
263         (JSC::MacroAssembler::branchSubPtr):
264         (JSC::MacroAssembler::branchTest8):
265         * assembler/MacroAssemblerARM.h:
266         (JSC::MacroAssemblerARM::add32):
267         (JSC::MacroAssemblerARM::and32):
268         (JSC::MacroAssemblerARM::lshift32):
269         (JSC::MacroAssemblerARM::mul32):
270         (JSC::MacroAssemblerARM::or32):
271         (JSC::MacroAssemblerARM::rshift32):
272         (JSC::MacroAssemblerARM::urshift32):
273         (JSC::MacroAssemblerARM::sub32):
274         (JSC::MacroAssemblerARM::xor32):
275         (JSC::MacroAssemblerARM::store32):
276         (JSC::MacroAssemblerARM::push):
277         (JSC::MacroAssemblerARM::move):
278         (JSC::MacroAssemblerARM::branch8):
279         (JSC::MacroAssemblerARM::branch32):
280         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
281         (JSC::MacroAssemblerARM::branch16):
282         (JSC::MacroAssemblerARM::branchTest8):
283         (JSC::MacroAssemblerARM::branchTest32):
284         (JSC::MacroAssemblerARM::branchAdd32):
285         (JSC::MacroAssemblerARM::branchMul32):
286         (JSC::MacroAssemblerARM::branchSub32):
287         (JSC::MacroAssemblerARM::set32Compare32):
288         (JSC::MacroAssemblerARM::set8Compare32):
289         (JSC::MacroAssemblerARM::set32Test32):
290         (JSC::MacroAssemblerARM::set32Test8):
291         (JSC::MacroAssemblerARM::moveWithPatch):
292         (JSC::MacroAssemblerARM::branchPtrWithPatch):
293         (JSC::MacroAssemblerARM::storePtrWithPatch):
294         * assembler/MacroAssemblerARMv7.h:
295         (JSC::MacroAssemblerARMv7::add32):
296         (JSC::MacroAssemblerARMv7::and32):
297         (JSC::MacroAssemblerARMv7::lshift32):
298         (JSC::MacroAssemblerARMv7::mul32):
299         (JSC::MacroAssemblerARMv7::or32):
300         (JSC::MacroAssemblerARMv7::rshift32):
301         (JSC::MacroAssemblerARMv7::urshift32):
302         (JSC::MacroAssemblerARMv7::sub32):
303         (JSC::MacroAssemblerARMv7::xor32):
304         (JSC::MacroAssemblerARMv7::load32):
305         (JSC::MacroAssemblerARMv7::load32WithAddressOffsetPatch):
306         (JSC::MacroAssemblerARMv7::load16):
307         (JSC::MacroAssemblerARMv7::store32WithAddressOffsetPatch):
308         (JSC::MacroAssemblerARMv7::store32):
309         (JSC::MacroAssemblerARMv7::loadDouble):
310         (JSC::MacroAssemblerARMv7::storeDouble):
311         (JSC::MacroAssemblerARMv7::push):
312         (JSC::MacroAssemblerARMv7::move):
313         (JSC::MacroAssemblerARMv7::compare32):
314         (JSC::MacroAssemblerARMv7::test32):
315         (JSC::MacroAssemblerARMv7::branch32):
316         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
317         (JSC::MacroAssemblerARMv7::branch16):
318         (JSC::MacroAssemblerARMv7::branch8):
319         (JSC::MacroAssemblerARMv7::branchTest32):
320         (JSC::MacroAssemblerARMv7::branchTest8):
321         (JSC::MacroAssemblerARMv7::branchAdd32):
322         (JSC::MacroAssemblerARMv7::branchMul32):
323         (JSC::MacroAssemblerARMv7::branchSub32):
324         (JSC::MacroAssemblerARMv7::nearCall):
325         (JSC::MacroAssemblerARMv7::call):
326         (JSC::MacroAssemblerARMv7::set32Compare32):
327         (JSC::MacroAssemblerARMv7::set8Compare32):
328         (JSC::MacroAssemblerARMv7::set32Test32):
329         (JSC::MacroAssemblerARMv7::set32Test8):
330         (JSC::MacroAssemblerARMv7::moveWithPatch):
331         (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
332         (JSC::MacroAssemblerARMv7::storePtrWithPatch):
333         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
334         (JSC::MacroAssemblerARMv7::makeJump):
335         (JSC::MacroAssemblerARMv7::makeBranch):
336         (JSC::MacroAssemblerARMv7::setupArmAddress):
337         (JSC::MacroAssemblerARMv7::makeBaseIndexBase):
338         (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
339         * assembler/MacroAssemblerMIPS.h:
340         (JSC::MacroAssemblerMIPS::add32):
341         (JSC::MacroAssemblerMIPS::and32):
342         (JSC::MacroAssemblerMIPS::lshift32):
343         (JSC::MacroAssemblerMIPS::mul32):
344         (JSC::MacroAssemblerMIPS::or32):
345         (JSC::MacroAssemblerMIPS::rshift32):
346         (JSC::MacroAssemblerMIPS::urshift32):
347         (JSC::MacroAssemblerMIPS::sub32):
348         (JSC::MacroAssemblerMIPS::xor32):
349         (JSC::MacroAssemblerMIPS::load32):
350         (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch):
351         (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch):
352         (JSC::MacroAssemblerMIPS::store32):
353         (JSC::MacroAssemblerMIPS::push):
354         (JSC::MacroAssemblerMIPS::move):
355         (JSC::MacroAssemblerMIPS::branch8):
356         (JSC::MacroAssemblerMIPS::branch32):
357         (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
358         (JSC::MacroAssemblerMIPS::branch16):
359         (JSC::MacroAssemblerMIPS::branchTest32):
360         (JSC::MacroAssemblerMIPS::branchTest8):
361         (JSC::MacroAssemblerMIPS::branchAdd32):
362         (JSC::MacroAssemblerMIPS::branchMul32):
363         (JSC::MacroAssemblerMIPS::branchSub32):
364         (JSC::MacroAssemblerMIPS::set8Compare32):
365         (JSC::MacroAssemblerMIPS::set32Compare32):
366         (JSC::MacroAssemblerMIPS::set32Test8):
367         (JSC::MacroAssemblerMIPS::set32Test32):
368         (JSC::MacroAssemblerMIPS::moveWithPatch):
369         (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
370         (JSC::MacroAssemblerMIPS::storePtrWithPatch):
371         (JSC::MacroAssemblerMIPS::tailRecursiveCall):
372         (JSC::MacroAssemblerMIPS::loadDouble):
373         (JSC::MacroAssemblerMIPS::storeDouble):
374         (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
375         * assembler/MacroAssemblerX86.h:
376         (JSC::MacroAssemblerX86::add32):
377         (JSC::MacroAssemblerX86::addWithCarry32):
378         (JSC::MacroAssemblerX86::and32):
379         (JSC::MacroAssemblerX86::or32):
380         (JSC::MacroAssemblerX86::sub32):
381         (JSC::MacroAssemblerX86::store32):
382         (JSC::MacroAssemblerX86::branch32):
383         (JSC::MacroAssemblerX86::moveWithPatch):
384         (JSC::MacroAssemblerX86::branchPtrWithPatch):
385         (JSC::MacroAssemblerX86::storePtrWithPatch):
386         * assembler/MacroAssemblerX86Common.h:
387         (JSC::MacroAssemblerX86Common::add32):
388         (JSC::MacroAssemblerX86Common::and32):
389         (JSC::MacroAssemblerX86Common::lshift32):
390         (JSC::MacroAssemblerX86Common::mul32):
391         (JSC::MacroAssemblerX86Common::or32):
392         (JSC::MacroAssemblerX86Common::rshift32):
393         (JSC::MacroAssemblerX86Common::urshift32):
394         (JSC::MacroAssemblerX86Common::sub32):
395         (JSC::MacroAssemblerX86Common::xor32):
396         (JSC::MacroAssemblerX86Common::store32):
397         (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
398         (JSC::MacroAssemblerX86Common::push):
399         (JSC::MacroAssemblerX86Common::move):
400         (JSC::MacroAssemblerX86Common::branch8):
401         (JSC::MacroAssemblerX86Common::branch32):
402         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
403         (JSC::MacroAssemblerX86Common::branch16):
404         (JSC::MacroAssemblerX86Common::branchTest32):
405         (JSC::MacroAssemblerX86Common::branchTest8):
406         (JSC::MacroAssemblerX86Common::branchAdd32):
407         (JSC::MacroAssemblerX86Common::branchMul32):
408         (JSC::MacroAssemblerX86Common::branchSub32):
409         (JSC::MacroAssemblerX86Common::set8Compare32):
410         (JSC::MacroAssemblerX86Common::set32Compare32):
411         (JSC::MacroAssemblerX86Common::set32Test8):
412         (JSC::MacroAssemblerX86Common::set32Test32):
413         * assembler/MacroAssemblerX86_64.h:
414         (JSC::MacroAssemblerX86_64::add32):
415         (JSC::MacroAssemblerX86_64::and32):
416         (JSC::MacroAssemblerX86_64::or32):
417         (JSC::MacroAssemblerX86_64::sub32):
418         (JSC::MacroAssemblerX86_64::loadDouble):
419         (JSC::MacroAssemblerX86_64::addDouble):
420         (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
421         (JSC::MacroAssemblerX86_64::store32):
422         (JSC::MacroAssemblerX86_64::call):
423         (JSC::MacroAssemblerX86_64::tailRecursiveCall):
424         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
425         (JSC::MacroAssemblerX86_64::addPtr):
426         (JSC::MacroAssemblerX86_64::andPtr):
427         (JSC::MacroAssemblerX86_64::orPtr):
428         (JSC::MacroAssemblerX86_64::subPtr):
429         (JSC::MacroAssemblerX86_64::xorPtr):
430         (JSC::MacroAssemblerX86_64::storePtr):
431         (JSC::MacroAssemblerX86_64::setPtr):
432         (JSC::MacroAssemblerX86_64::branchPtr):
433         (JSC::MacroAssemblerX86_64::branchTestPtr):
434         (JSC::MacroAssemblerX86_64::branchSubPtr):
435         (JSC::MacroAssemblerX86_64::moveWithPatch):
436         (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
437         (JSC::MacroAssemblerX86_64::storePtrWithPatch):
438         (JSC::MacroAssemblerX86_64::branchTest8):
439         * dfg/DFGJITCodeGenerator.h:
440         (JSC::DFG::JITCodeGenerator::callOperation):
441         * dfg/DFGJITCompiler.cpp:
442         (JSC::DFG::JITCompiler::jitAssertIsInt32):
443         (JSC::DFG::JITCompiler::emitCount):
444         * dfg/DFGJITCompiler.h:
445         (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
446         * dfg/DFGNonSpeculativeJIT.cpp:
447         (JSC::DFG::NonSpeculativeJIT::compile):
448         * dfg/DFGSpeculativeJIT.cpp:
449         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
450         (JSC::DFG::SpeculativeJIT::compile):
451         * jit/JIT.cpp:
452         (JSC::JIT::emitTimeoutCheck):
453         (JSC::JIT::privateCompile):
454         * jit/JIT.h:
455         * jit/JITArithmetic.cpp:
456         (JSC::JIT::emit_op_urshift):
457         (JSC::JIT::emitSlow_op_urshift):
458         (JSC::JIT::emit_op_post_inc):
459         (JSC::JIT::emit_op_post_dec):
460         (JSC::JIT::emit_op_pre_inc):
461         (JSC::JIT::emit_op_pre_dec):
462         (JSC::JIT::emit_op_mod):
463         * jit/JITArithmetic32_64.cpp:
464         (JSC::JIT::emit_op_negate):
465         (JSC::JIT::emit_op_jnless):
466         (JSC::JIT::emit_op_jless):
467         (JSC::JIT::emit_op_jlesseq):
468         (JSC::JIT::emit_op_lshift):
469         (JSC::JIT::emitRightShift):
470         (JSC::JIT::emitRightShiftSlowCase):
471         (JSC::JIT::emit_op_bitand):
472         (JSC::JIT::emit_op_bitor):
473         (JSC::JIT::emit_op_bitxor):
474         (JSC::JIT::emit_op_bitnot):
475         (JSC::JIT::emit_op_post_inc):
476         (JSC::JIT::emit_op_post_dec):
477         (JSC::JIT::emitSlow_op_post_dec):
478         (JSC::JIT::emit_op_pre_inc):
479         (JSC::JIT::emit_op_pre_dec):
480         (JSC::JIT::emit_op_add):
481         (JSC::JIT::emitAdd32Constant):
482         (JSC::JIT::emit_op_sub):
483         (JSC::JIT::emitSub32Constant):
484         (JSC::JIT::emitBinaryDoubleOp):
485         (JSC::JIT::emit_op_mul):
486         (JSC::JIT::emitSlow_op_mul):
487         (JSC::JIT::emit_op_div):
488         (JSC::JIT::emit_op_mod):
489         * jit/JITCall.cpp:
490         (JSC::JIT::compileOpCallVarargs):
491         (JSC::JIT::compileOpCall):
492         (JSC::JIT::compileOpCallSlowCase):
493         * jit/JITCall32_64.cpp:
494         (JSC::JIT::compileOpCallVarargs):
495         (JSC::JIT::emit_op_ret_object_or_this):
496         (JSC::JIT::compileOpCall):
497         (JSC::JIT::compileOpCallSlowCase):
498         * jit/JITInlineMethods.h:
499         (JSC::JIT::emitPutCellToCallFrameHeader):
500         (JSC::JIT::emitPutIntToCallFrameHeader):
501         (JSC::JIT::emitPutImmediateToCallFrameHeader):
502         (JSC::JIT::emitLoadCharacterString):
503         (JSC::JIT::restoreArgumentReferenceForTrampoline):
504         (JSC::JIT::checkStructure):
505         (JSC::JIT::setSamplingFlag):
506         (JSC::JIT::clearSamplingFlag):
507         (JSC::JIT::emitCount):
508         (JSC::JIT::sampleInstruction):
509         (JSC::JIT::sampleCodeBlock):
510         (JSC::JIT::emitStoreInt32):
511         (JSC::JIT::emitStoreCell):
512         (JSC::JIT::emitStoreBool):
513         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
514         (JSC::JIT::emitInitRegister):
515         (JSC::JIT::emitJumpIfJSCell):
516         (JSC::JIT::emitJumpIfNotJSCell):
517         (JSC::JIT::emitJumpIfImmediateInteger):
518         (JSC::JIT::emitJumpIfNotImmediateInteger):
519         (JSC::JIT::emitFastArithDeTagImmediate):
520         (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
521         (JSC::JIT::emitFastArithReTagImmediate):
522         (JSC::JIT::emitTagAsBoolImmediate):
523         * jit/JITOpcodes.cpp:
524         (JSC::JIT::privateCompileCTIMachineTrampolines):
525         (JSC::JIT::privateCompileCTINativeCall):
526         (JSC::JIT::emit_op_check_has_instance):
527         (JSC::JIT::emit_op_instanceof):
528         (JSC::JIT::emit_op_ret_object_or_this):
529         (JSC::JIT::emit_op_resolve):
530         (JSC::JIT::emit_op_to_primitive):
531         (JSC::JIT::emit_op_resolve_base):
532         (JSC::JIT::emit_op_ensure_property_exists):
533         (JSC::JIT::emit_op_resolve_skip):
534         (JSC::JIT::emit_op_resolve_global):
535         (JSC::JIT::emitSlow_op_resolve_global):
536         (JSC::JIT::emit_op_not):
537         (JSC::JIT::emit_op_jfalse):
538         (JSC::JIT::emit_op_jeq_null):
539         (JSC::JIT::emit_op_jneq_null):
540         (JSC::JIT::emit_op_jneq_ptr):
541         (JSC::JIT::emit_op_jsr):
542         (JSC::JIT::emit_op_resolve_with_base):
543         (JSC::JIT::emit_op_new_func_exp):
544         (JSC::JIT::emit_op_jtrue):
545         (JSC::JIT::emit_op_get_pnames):
546         (JSC::JIT::emit_op_next_pname):
547         (JSC::JIT::emit_op_to_jsnumber):
548         (JSC::JIT::emit_op_push_new_scope):
549         (JSC::JIT::emit_op_catch):
550         (JSC::JIT::emit_op_eq_null):
551         (JSC::JIT::emit_op_neq_null):
552         (JSC::JIT::emit_op_init_lazy_reg):
553         (JSC::JIT::emit_op_convert_this):
554         (JSC::JIT::emit_op_convert_this_strict):
555         (JSC::JIT::emitSlow_op_not):
556         (JSC::JIT::emitSlow_op_neq):
557         (JSC::JIT::emit_op_get_arguments_length):
558         (JSC::JIT::emitSlow_op_get_arguments_length):
559         (JSC::JIT::emit_op_get_argument_by_val):
560         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
561         (JSC::JIT::emit_op_new_regexp):
562         (JSC::JIT::emit_op_load_varargs):
563         (JSC::JIT::emitSlow_op_load_varargs):
564         (JSC::JIT::emit_op_new_func):
565         * jit/JITOpcodes32_64.cpp:
566         (JSC::JIT::privateCompileCTIMachineTrampolines):
567         (JSC::JIT::privateCompileCTINativeCall):
568         (JSC::JIT::emit_op_loop_if_lesseq):
569         (JSC::JIT::emit_op_check_has_instance):
570         (JSC::JIT::emit_op_instanceof):
571         (JSC::JIT::emit_op_get_scoped_var):
572         (JSC::JIT::emit_op_put_scoped_var):
573         (JSC::JIT::emit_op_tear_off_activation):
574         (JSC::JIT::emit_op_tear_off_arguments):
575         (JSC::JIT::emit_op_resolve):
576         (JSC::JIT::emit_op_to_primitive):
577         (JSC::JIT::emit_op_resolve_base):
578         (JSC::JIT::emit_op_ensure_property_exists):
579         (JSC::JIT::emit_op_resolve_skip):
580         (JSC::JIT::emit_op_resolve_global):
581         (JSC::JIT::emitSlow_op_resolve_global):
582         (JSC::JIT::emit_op_not):
583         (JSC::JIT::emit_op_jfalse):
584         (JSC::JIT::emit_op_jtrue):
585         (JSC::JIT::emit_op_jeq_null):
586         (JSC::JIT::emit_op_jneq_null):
587         (JSC::JIT::emit_op_jneq_ptr):
588         (JSC::JIT::emit_op_jsr):
589         (JSC::JIT::emit_op_eq):
590         (JSC::JIT::emitSlow_op_eq):
591         (JSC::JIT::emit_op_neq):
592         (JSC::JIT::emitSlow_op_neq):
593         (JSC::JIT::compileOpStrictEq):
594         (JSC::JIT::emit_op_eq_null):
595         (JSC::JIT::emit_op_neq_null):
596         (JSC::JIT::emit_op_resolve_with_base):
597         (JSC::JIT::emit_op_new_func_exp):
598         (JSC::JIT::emit_op_get_pnames):
599         (JSC::JIT::emit_op_next_pname):
600         (JSC::JIT::emit_op_to_jsnumber):
601         (JSC::JIT::emit_op_push_new_scope):
602         (JSC::JIT::emit_op_catch):
603         (JSC::JIT::emit_op_create_activation):
604         (JSC::JIT::emit_op_create_arguments):
605         (JSC::JIT::emit_op_convert_this):
606         (JSC::JIT::emit_op_convert_this_strict):
607         (JSC::JIT::emit_op_get_arguments_length):
608         (JSC::JIT::emitSlow_op_get_arguments_length):
609         (JSC::JIT::emit_op_get_argument_by_val):
610         (JSC::JIT::softModulo):
611         * jit/JITPropertyAccess.cpp:
612         (JSC::JIT::stringGetByValStubGenerator):
613         (JSC::JIT::emit_op_get_by_val):
614         (JSC::JIT::emitSlow_op_get_by_val):
615         (JSC::JIT::emit_op_get_by_pname):
616         (JSC::JIT::emit_op_put_by_val):
617         (JSC::JIT::emit_op_put_by_index):
618         (JSC::JIT::emit_op_put_getter):
619         (JSC::JIT::emit_op_put_setter):
620         (JSC::JIT::emit_op_del_by_id):
621         (JSC::JIT::emit_op_get_by_id):
622         (JSC::JIT::emit_op_put_by_id):
623         (JSC::JIT::emit_op_method_check):
624         (JSC::JIT::compileGetByIdHotPath):
625         (JSC::JIT::compileGetByIdSlowCase):
626         (JSC::JIT::emitSlow_op_put_by_id):
627         (JSC::JIT::testPrototype):
628         (JSC::JIT::privateCompilePutByIdTransition):
629         (JSC::JIT::privateCompilePatchGetArrayLength):
630         (JSC::JIT::privateCompileGetByIdProto):
631         (JSC::JIT::privateCompileGetByIdSelfList):
632         (JSC::JIT::privateCompileGetByIdProtoList):
633         (JSC::JIT::privateCompileGetByIdChainList):
634         (JSC::JIT::privateCompileGetByIdChain):
635         * jit/JITPropertyAccess32_64.cpp:
636         (JSC::JIT::emit_op_put_getter):
637         (JSC::JIT::emit_op_put_setter):
638         (JSC::JIT::emit_op_del_by_id):
639         (JSC::JIT::emit_op_get_by_id):
640         (JSC::JIT::emit_op_put_by_id):
641         (JSC::JIT::emit_op_method_check):
642         (JSC::JIT::stringGetByValStubGenerator):
643         (JSC::JIT::emit_op_get_by_val):
644         (JSC::JIT::emitSlow_op_get_by_val):
645         (JSC::JIT::emit_op_put_by_val):
646         (JSC::JIT::compileGetByIdHotPath):
647         (JSC::JIT::compileGetByIdSlowCase):
648         (JSC::JIT::emitSlow_op_put_by_id):
649         (JSC::JIT::testPrototype):
650         (JSC::JIT::privateCompilePutByIdTransition):
651         (JSC::JIT::privateCompilePatchGetArrayLength):
652         (JSC::JIT::privateCompileGetByIdProto):
653         (JSC::JIT::privateCompileGetByIdSelfList):
654         (JSC::JIT::privateCompileGetByIdProtoList):
655         (JSC::JIT::privateCompileGetByIdChainList):
656         (JSC::JIT::privateCompileGetByIdChain):
657         (JSC::JIT::emit_op_get_by_pname):
658         * jit/JITStubCall.h:
659         (JSC::JITStubCall::addArgument):
660         * jit/JITStubs.cpp:
661         (JSC::getPolymorphicAccessStructureListSlot):
662         (JSC::DEFINE_STUB_FUNCTION):
663         * jit/JSInterfaceJIT.h:
664         (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
665         (JSC::JSInterfaceJIT::emitLoadInt32):
666         (JSC::JSInterfaceJIT::emitLoadDouble):
667         * jit/SpecializedThunkJIT.h:
668         (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
669         (JSC::SpecializedThunkJIT::loadJSStringArgument):
670         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
671         (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
672         * jit/ThunkGenerators.cpp:
673         (JSC::charToString):
674         (JSC::powThunkGenerator):
675         * yarr/YarrJIT.cpp:
676         (JSC::Yarr::YarrGenerator::matchCharacterClass):
677         (JSC::Yarr::YarrGenerator::storeToFrame):
678         (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
679         (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
680         (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
681         (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
682         (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
683         (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
684         (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
685         (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
686         (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
687         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
688         (JSC::Yarr::YarrGenerator::generateDisjunction):
689
690 2011-03-28  Andras Becsi  <abecsi@webkit.org>
691
692         Reviewed by Csaba Osztrogonác.
693
694         [Qt] Fix the linking of jsc with MinGW after r81963.
695
696         * jsc.pro: add -l and remove the lib suffix.
697
698 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
699
700         Reviewed by Alexey Proskuryakov.
701
702         https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
703         in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
704
705         Compile fix only, no actual code change.
706
707         * wtf/MessageQueue.h:
708
709 2011-03-25  Oliver Hunt  <oliver@apple.com>
710
711         Reviewed by Darin Adler.
712
713         Allow defineOwnProperty to work on DOMObjects
714         https://bugs.webkit.org/show_bug.cgi?id=57129
715
716         Fix a couple of places where we uses getter()/setter() rather
717         than [gs]etterPresent().
718
719         * runtime/JSObject.cpp:
720         (JSC::JSObject::defineOwnProperty):
721
722 2011-03-25  Geoffrey Garen  <ggaren@apple.com>
723
724         Reviewed by Oliver Hunt.
725
726         Crash when paused at a breakpoint caused by inaccurate Activation records.
727         https://bugs.webkit.org/show_bug.cgi?id=57120
728
729         * runtime/JSActivation.cpp:
730         (JSC::JSActivation::symbolTableGet):
731         (JSC::JSActivation::symbolTablePut):
732         (JSC::JSActivation::getOwnPropertyNames):
733         (JSC::JSActivation::symbolTablePutWithAttributes):
734
735 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
736
737         Reviewed by Oliver Hunt.
738
739         Crash in debugger beneath MarkStack::drain @ me.com, ibm.com
740         https://bugs.webkit.org/show_bug.cgi?id=57080
741         <rdar://problem/8525907>
742
743         The crash was caused by changes in the executable after recompilation.
744
745         The fix is for the activation to copy the data it needs instead of
746         relying on the data in the executable.
747         
748         SunSpider and v8 report no change.
749
750         * runtime/Arguments.h:
751         (JSC::JSActivation::copyRegisters): Use our own data members instead of
752         reading data out of the executable.
753
754         * runtime/JSActivation.cpp:
755         (JSC::JSActivation::JSActivation): Initialize our data members.
756
757         (JSC::JSActivation::markChildren):
758         (JSC::JSActivation::symbolTableGet):
759         (JSC::JSActivation::symbolTablePut):
760         (JSC::JSActivation::getOwnPropertyNames):
761         (JSC::JSActivation::symbolTablePutWithAttributes):
762         (JSC::JSActivation::isDynamicScope):
763         (JSC::JSActivation::argumentsGetter): Use our own data members instead of
764         reading data out of the executable.
765
766         * runtime/JSActivation.h: Added new data members to track data previously
767         tracked by the executable. Since I've removed the executable pointer,
768         on a 64bit system, I've only made activations bigger by an int.
769
770 2011-03-25  David Kilzer  <ddkilzer@apple.com>
771
772         Remove duplicate entry from JavaScriptCore.exp
773
774         JSC::createStackOverflowError(JSC::ExecState*) was originally
775         exported in r60057, then duplicated in r60392.
776
777         * JavaScriptCore.exp: Removed duplicate entry.
778
779 2011-03-25  Jarred Nicholls  <jarred@sencha.com>
780
781         Reviewed by Ariya Hidayat.
782
783         [Qt] MSVC Build Error - need to link advapi32.lib for jsc.exe
784         https://bugs.webkit.org/show_bug.cgi?id=56098
785
786         Need to link advapi32.lib for jsc.exe since wtf/OSRandomSource.cpp uses the Win32 Crypto API
787
788         * jsc.pro:
789
790 2011-03-24  Nikolas Zimmermann  <nzimmermann@rim.com>
791
792         Reviewed by Darin Adler.
793
794         Introduce WTF HexNumber.h
795         https://bugs.webkit.org/show_bug.cgi?id=56099
796
797         Introduce a set of functions that ease converting from a bye or a number to a hex string,
798         replacing several of these conversions and String::format("%x") usages all over WebCore.
799
800         * GNUmakefile.am: Add HexNumber.h to build.
801         * JavaScriptCore.exp: Export StringBuilder::reserveCapacity.
802         * JavaScriptCore.gypi: Add HexNumber.h to build.
803         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export StringBuilder::reserveCapacity.
804         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add HexNumber.h to build.
805         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
806         * wtf/CMakeLists.txt: Ditto.
807         * wtf/HexNumber.h: Added.
808         (WTF::Internal::hexDigitsForMode): Internal helper.
809         (WTF::appendByteAsHex): Free function, that appends a byte as hex string into a destination.
810         (WTF::placeByteAsHex): Ditto, but places the result using *foo++ = '..' or foo[index++] = '..'
811         (WTF::appendUnsignedAsHex): Free function, that appends a number as hex string into a destination.
812
813 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
814
815         Windows build fix take 2: Add new symobl.
816         
817         (I should have used the EWS bots for this!)
818
819         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
820
821 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
822
823         Windows build fix take 1: Removed old symobl.
824
825         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
826
827 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
828
829         Reviewed by Oliver Hunt.
830
831         Ensure that all compilation takes place within a dynamic global object scope
832         https://bugs.webkit.org/show_bug.cgi?id=57054
833         <rdar://problem/9083011>        
834
835         Otherwise, entry to the global object scope might throw away the code
836         we just compiled, causing a crash.
837
838         * JavaScriptCore.exp: Updated for signature change.
839
840         * debugger/Debugger.cpp:
841         (JSC::evaluateInGlobalCallFrame):
842         * debugger/DebuggerCallFrame.cpp:
843         (JSC::DebuggerCallFrame::evaluate): Removed explicit compilation calls
844         here because (a) they took place outside a dynamic global object scope
845         and (b) they were redundant.
846
847         * interpreter/CachedCall.h:
848         (JSC::CachedCall::CachedCall): Updated for signature change.
849
850         * interpreter/Interpreter.cpp:
851         (JSC::Interpreter::execute):
852         (JSC::Interpreter::executeCall):
853         (JSC::Interpreter::executeConstruct): Declare our dynamic global object
854         scope earlier, to ensure that compilation takes place within it.
855
856         * runtime/Completion.cpp:
857         (JSC::evaluate): Removed explicit compilation calls here because (a)
858         they took place outside a dynamic global object scope and (b) they were
859         redundant.
860
861         * runtime/Executable.h:
862         (JSC::EvalExecutable::compile):
863         (JSC::ProgramExecutable::compile):
864         (JSC::FunctionExecutable::compileForCall):
865         (JSC::FunctionExecutable::compileForConstruct): Added an ASSERT to
866         verify our new invariant that all compilation takes place within a
867         dynamic global object scope.
868
869         * runtime/JSGlobalObject.cpp:
870         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
871         * runtime/JSGlobalObject.h: Changed the signature of DynamicGlobalObjectScope
872         to require a JSGlobalData instead of an ExecState* since it is often
873         easier to provide the former, and the latter was not necessary.
874
875 2011-03-24  Oliver Hunt  <oliver@apple.com>
876
877         Reviewed by Geoffrey Garen.
878
879         REGRESSION (r79987-r80210): Crash in JSWeakObjectMapClear
880         https://bugs.webkit.org/show_bug.cgi?id=55671
881
882         This is no longer necessary, and it seems that with the new weakmap
883         model it's simply unsafe, so this reduces it to a no-op. 
884
885         * API/JSWeakObjectMapRefPrivate.cpp:
886
887 2011-03-24  Ben Taylor  <bentaylor.solx86@gmail.com>
888
889         Reviewed by Darin Adler.
890
891         https://bugs.webkit.org/show_bug.cgi?id=20302
892         Correct implementation of signbit on Solaris
893
894         * wtf/MathExtras.h:
895         (signbit):
896
897 2011-03-23  Mark Rowe  <mrowe@apple.com>
898
899         Reviewed by Darin Adler.
900
901         <rdar://problem/7959320> Threads that use APIs above the BSD layer must be registered with the Obj-C GC.
902
903         * wtf/ThreadingPthreads.cpp:
904         (WTF::initializeCurrentThreadInternal):
905
906 2011-03-23  Mark Rowe  <mrowe@apple.com>
907
908         Stop setting OTHER_OPTIONS in JavaScriptCore's Makefile.
909
910         It's not necessary to pass "-target All" as xcodebuild always builds the
911         first target in the project unless otherwise specified. The presence of
912         that option also breaks "make clean" since that results in both the
913         -target and -alltargets options being passed to xcodebuild.
914
915         * Makefile:
916
917 2011-03-23  Pavel Feldman  <pfeldman@chromium.org>
918
919         Not reviewed: bring back Vector::contains that was removed as a part of roll back.
920
921         * wtf/Vector.h:
922         (WTF::::contains):
923
924 2011-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
925
926         Unreviewed, rolling out r81686.
927         http://trac.webkit.org/changeset/81686
928         https://bugs.webkit.org/show_bug.cgi?id=56914
929
930         Breaks webkit_tests in Chromium again. (Requested by pfeldman
931         on #webkit).
932
933         * wtf/Vector.h:
934
935 2011-03-23  Adam Barth  <abarth@webkit.org>
936
937         Reviewed by Eric Seidel.
938
939         JavaScriptCore GYP build should work on a case-sensitive file system
940         https://bugs.webkit.org/show_bug.cgi?id=56911
941
942         The issue is that there are two UString.h headers, one named UString.h
943         and one named ustring.h.  This patch excludes ustring.h from the header
944         map to avoid confusion.  While I was editing this part of the GYP file,
945         I cleaned up the exclude rules to be more modern.
946
947         * gyp/JavaScriptCore.gyp:
948
949 2011-03-22  Geoffrey Garen  <ggaren@apple.com>
950
951         Reviewed by Maciej Stachowiak.
952
953         REGRESSION (r78382): No scripts appear in the Web Inspector's Scripts
954         panel on Windows, and many inspector regression tests are failing
955         https://bugs.webkit.org/show_bug.cgi?id=54490
956         
957         The bug was caused by two different classes using the same name (Recompiler).
958
959         * debugger/Debugger.cpp:
960         * runtime/JSGlobalData.cpp:
961         (WTF::Recompiler::operator()): Put Recompiler in an anonymous namespace,
962         so our two recompilers' inline functions don't stomp each other at
963         link time.
964
965 2011-03-22  Sam Weinig  <sam@webkit.org>
966
967         Reviewed by Mark Rowe.
968
969         Remove USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
970         <rdar://problem/8944718> 
971
972         * DerivedSources.make:
973         Remove generation of USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
974
975 2011-03-22  Gabor Loki  <loki@webkit.org>
976
977         Reviewed by Csaba Osztrogonác.
978
979         [Qt] Add DFG module to build system (disabled by default).
980         https://bugs.webkit.org/show_bug.cgi?id=56845
981
982         * JavaScriptCore.pri:
983         * JavaScriptCore.pro:
984
985 2011-03-22  Eric Seidel  <eric@webkit.org>
986
987         Reviewed by Adam Barth.
988
989         Add support to build-webkit for building with gyp-generated project files
990         https://bugs.webkit.org/show_bug.cgi?id=56877
991
992         Found a couple missing Private headers while trying to make WebCore build.
993
994         * JavaScriptCore.gypi:
995
996 2011-03-22  Eric Seidel  <eric@webkit.org>
997
998         Reviewed by Adam Barth.
999
1000         Make it possible to build JavaScriptCore and WebCore gyp builds outside of Source
1001         https://bugs.webkit.org/show_bug.cgi?id=56867
1002
1003         This should make it possible to build the gyp-generated JavaScriptCore.xcodeproj
1004         from a JavaScriptCore directory outside of Source.
1005
1006         * gyp/JavaScriptCore.gyp:
1007         * gyp/run-if-exists.sh: Added.
1008         * gyp/update-info-plist.sh: Added.
1009
1010 2011-03-22  Eric Seidel  <eric@webkit.org>
1011
1012         Reviewed by Adam Barth.
1013
1014         Add Profiling Configuration to JavaScriptCore gyp build
1015         https://bugs.webkit.org/show_bug.cgi?id=56862
1016
1017         It appears this is identical to Release, but I suspect
1018         there is someone/thing who uses the Profiling target
1019         so we're adding it for completeness.
1020
1021         * gyp/JavaScriptCore.gyp:
1022
1023 2011-03-22  Adam Barth  <abarth@webkit.org>
1024
1025         Reviewed by Eric Seidel.
1026
1027         Remove os_win32_files variable from the GYP build
1028         https://bugs.webkit.org/show_bug.cgi?id=56804
1029
1030         Now that our understanding of GYP is sufficiently advanced, we don't
1031         need os_win32_files any more.  (Turns out Eric was right, as he always
1032         is.)
1033
1034         * JavaScriptCore.gypi:
1035
1036 2011-03-22  Adam Barth  <abarth@webkit.org>
1037
1038         Reviewed by Eric Seidel.
1039
1040         GYP build of JavaScriptCore should be able to link from an empty WebKitBuild directory
1041         https://bugs.webkit.org/show_bug.cgi?id=56803
1042
1043         Previously, we thought we should generate the derived source files in
1044         the shared intermediate build products directory, but there are
1045         assumptions built into other parts of the Mac build system that the
1046         derived source files will be generated in a particular subdirectory of
1047         the build products directory.
1048
1049         This patch is a partial revert of the change that moved the derived
1050         source files to the shared intermediate directory.  After this patch,
1051         the GYP build can build JavaScriptCore without help from the main
1052         normal build system.
1053
1054         * JavaScriptCore.gypi:
1055         * gyp/JavaScriptCore.gyp:
1056         * gyp/generate-derived-sources.sh:
1057         * gyp/generate-dtrace-header.sh:
1058
1059 2011-03-22  Jay Civelli  <jcivelli@chromium.org>
1060
1061         Reviewed by David Levin.
1062
1063         Adding a contains method to Vector.
1064         https://bugs.webkit.org/show_bug.cgi?id=55859
1065
1066         * wtf/Vector.h:
1067         (WTF::Vector::contains):
1068
1069 2011-03-22  Gabor Loki  <loki@webkit.org>
1070
1071         Reviewed by Alexey Proskuryakov.
1072
1073         Fix a bunch of typos in DFG.
1074         https://bugs.webkit.org/show_bug.cgi?id=56813
1075
1076         * dfg/DFGByteCodeParser.cpp:
1077         (JSC::DFG::parse):
1078         * dfg/DFGGenerationInfo.h:
1079         (JSC::DFG::GenerationInfo::setSpilled):
1080         * dfg/DFGGraph.cpp:
1081         (JSC::DFG::Graph::dump):
1082         * dfg/DFGGraph.h:
1083         * dfg/DFGJITCodeGenerator.h:
1084         (JSC::DFG::JITCodeGenerator::setupStubArguments):
1085         * dfg/DFGJITCompiler.cpp:
1086         (JSC::DFG::JITCompiler::compileFunction):
1087         * dfg/DFGJITCompiler.h:
1088         * dfg/DFGNode.h:
1089         * dfg/DFGNonSpeculativeJIT.h:
1090         * dfg/DFGOperations.h:
1091         * dfg/DFGRegisterBank.h:
1092         (JSC::DFG::RegisterBank::allocate):
1093         * dfg/DFGScoreBoard.h:
1094         (JSC::DFG::ScoreBoard::~ScoreBoard):
1095         (JSC::DFG::ScoreBoard::allocate):
1096         * dfg/DFGSpeculativeJIT.cpp:
1097         (JSC::DFG::SpeculativeJIT::compile):
1098         * dfg/DFGSpeculativeJIT.h:
1099
1100 2011-03-22  Adam Barth  <abarth@webkit.org>
1101
1102         Reviewed by Eric Seidel.
1103
1104         Production configuration in GYP isn&apos;t set up correctly
1105         https://bugs.webkit.org/show_bug.cgi?id=56786
1106
1107         Update JavaScriptCore.gyp with information mined from
1108         JavaScriptCore.xcodeproj.
1109
1110         * JavaScriptCore.gypi:
1111         * gyp/JavaScriptCore.gyp:
1112
1113 2011-03-22  Kent Tamura  <tkent@chromium.org>
1114
1115         Reviewed by Eric Seidel.
1116
1117         REGRESSION(r80096): Number type input unexpectedly rounds fractional values
1118         https://bugs.webkit.org/show_bug.cgi?id=56367
1119
1120         Introduce clampToInteger(unsigned).
1121         
1122         * wtf/MathExtras.h:
1123         (clampToInteger): Added.
1124
1125 2011-03-21  Adam Barth  <abarth@webkit.org>
1126
1127         Reviewed by Eric Seidel.
1128
1129         GYP build should not have include paths that point within the source tree
1130         https://bugs.webkit.org/show_bug.cgi?id=56788
1131
1132         Turns out we don't need these include paths anymore now that we have
1133         header maps working properly.
1134
1135         * gyp/JavaScriptCore.gyp:
1136             - Also, remove jsc.cpp from the excluded list because it's not part
1137               of the jsc_files variable instead of the javascriptcore_files
1138               variable.
1139
1140 2011-03-21  Adam Barth  <abarth@webkit.org>
1141
1142         Reviewed by Eric Seidel.
1143
1144         Solve the Assertions.cpp / -Wno-missing-format-attribute mystery
1145         https://bugs.webkit.org/show_bug.cgi?id=56780
1146
1147         The reason we couldn't resolve this warning in the GYP build was that
1148         the normal build disables this warning specifically for this file.
1149         This patch takes the same approach as the previous patch to
1150         WebCoreObjCExtras.mm in that it uses a pragma to suppress the warning
1151         (rather than a build system configuration).
1152
1153         * JavaScriptCore.xcodeproj/project.pbxproj:
1154             - Remove the special-case for this file.
1155         * gyp/JavaScriptCore.gyp:
1156             - Remove the work-around for this issue.
1157         * wtf/Assertions.cpp:
1158             - Add a pragma disabling this warning for this file.
1159
1160 2011-03-21  Adam Barth  <abarth@webkit.org>
1161
1162         Reviewed by Dimitri Glazkov.
1163
1164         WebCore GYP build shouldn't crash on startup
1165         https://bugs.webkit.org/show_bug.cgi?id=56776
1166
1167         Debug builds shouldn't define NDEBUG.  This same logic exists in the
1168         project.pbxproj file.
1169
1170         * gyp/JavaScriptCore.gyp:
1171
1172 2011-03-21  Robert Kroeger  <rjkroege@chromium.org>
1173
1174         Reviewed by Antonio Gomes.
1175
1176         Flag to enable/disable a GestureReocognizer framework
1177
1178         https://bugs.webkit.org/show_bug.cgi?id=49345
1179
1180         * wtf/Platform.h:
1181
1182 2011-03-21  Adam Barth  <abarth@webkit.org>
1183
1184         Reviewed by Dimitri Glazkov.
1185
1186         Add new files to JavaScriptCore.gypi
1187         https://bugs.webkit.org/show_bug.cgi?id=56766
1188
1189         * JavaScriptCore.gypi:
1190
1191 2011-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1192
1193         Unreviewed, rolling out r81377.
1194         http://trac.webkit.org/changeset/81377
1195         https://bugs.webkit.org/show_bug.cgi?id=56765
1196
1197         WebPageSerializerTest.MultipleFrames is broken (Requested by
1198         simonjam on #webkit).
1199
1200         * wtf/Vector.h:
1201
1202 2011-03-21  Gabor Loki  <loki@webkit.org>
1203
1204         Reviewed by Csaba Osztrogonác.
1205
1206         Extend constant pool to be able to store 16 bit instructions with a constant
1207         https://bugs.webkit.org/show_bug.cgi?id=46796
1208
1209         The putShortWithConstantInt function inserts a 16 bit instruction which
1210         refers a 32 bits constant or literal. This is a vital function for those
1211         target which loads a PC relative value with a 16 bit instruction (like
1212         Thumb-2 instruction set and SH4 architecture).
1213
1214         * assembler/AssemblerBuffer.h:
1215         (JSC::AssemblerBuffer::putIntegral):
1216         (JSC::AssemblerBuffer::putIntegralUnchecked):
1217         * assembler/AssemblerBufferWithConstantPool.h:
1218
1219 2011-03-21  Philippe Normand  <pnormand@igalia.com>
1220
1221         Unreviewed, GTK distcheck build fix.
1222
1223         * GNUmakefile.am:
1224
1225 2011-03-20  Bill Budge  <bbudge@chromium.org>
1226
1227         Reviewed by Adam Barth.
1228
1229         Rename ThreadSafeShared to ThreadSafeRefCounted
1230         https://bugs.webkit.org/show_bug.cgi?id=56714
1231
1232         No new tests. Exposes no new functionality.
1233
1234         * API/JSClassRef.h:
1235         * API/OpaqueJSString.h:
1236         * GNUmakefile.am:
1237         * JavaScriptCore.gypi:
1238         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1239         * JavaScriptCore.xcodeproj/project.pbxproj:
1240         * wtf/Atomics.h:
1241         * wtf/CMakeLists.txt:
1242         * wtf/CrossThreadRefCounted.h:
1243         (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
1244         (WTF::::crossThreadCopy):
1245         * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
1246         (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
1247         (WTF::ThreadSafeRefCountedBase::ref):
1248         (WTF::ThreadSafeRefCountedBase::refCount):
1249         (WTF::ThreadSafeRefCountedBase::derefBase):
1250         (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
1251         * wtf/ThreadSafeShared.h: Removed.
1252         * wtf/Threading.h:
1253
1254 2011-03-19  Patrick Gansterer  <paroga@webkit.org>
1255
1256         Reviewed by Darin Adler.
1257
1258         Remove StringImpl::computeHash()
1259         https://bugs.webkit.org/show_bug.cgi?id=49894
1260
1261         Replace remainig StringImpl::computeHash with StringImpl::computeHashStringHasher.
1262
1263         * wtf/text/AtomicString.cpp:
1264         (WTF::CStringTranslator::hash):
1265         (WTF::UCharBufferTranslator::hash):
1266         (WTF::HashAndCharactersTranslator::hash):
1267         * wtf/text/StringImpl.h:
1268         (WTF::StringImpl::setHash):
1269         (WTF::StringImpl::hash):
1270
1271 2011-03-19  Patrick Gansterer  <paroga@webkit.org>
1272
1273         Reviewed by Darin Adler.
1274
1275         Rename WTF::StringHasher methods
1276         https://bugs.webkit.org/show_bug.cgi?id=53532
1277
1278         Rename createHash to computeHash and createBlobHash to hashMemory.
1279         Also add a using WTF::StringHasher in the header file.
1280
1281         * profiler/CallIdentifier.h:
1282         (JSC::CallIdentifier::Hash::hash):
1283         * runtime/Identifier.cpp:
1284         (JSC::IdentifierCStringTranslator::hash):
1285         (JSC::IdentifierUCharBufferTranslator::hash):
1286         * wtf/StringHasher.h:
1287         (WTF::StringHasher::computeHash):
1288         (WTF::StringHasher::hashMemory):
1289         * wtf/text/StringHash.h:
1290         (WTF::CaseFoldingHash::hash):
1291         * wtf/text/StringImpl.h:
1292         (WTF::StringImpl::computeHash):
1293         * wtf/unicode/UTF8.cpp:
1294         (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
1295
1296 2011-03-18  Geoffrey Garen  <ggaren@apple.com>
1297
1298         Reviewed by Oliver Hunt.
1299
1300         [GTK] JSC crashes in 32bit Release bots after r80743
1301         https://bugs.webkit.org/show_bug.cgi?id=56180
1302         
1303         The crash was caused by referencing GC memory from a GC destructor. This
1304         is not safe because destruction time / order is not guaranteed.
1305
1306         * profiler/ProfileGenerator.cpp:
1307         (JSC::ProfileGenerator::create):
1308         (JSC::ProfileGenerator::ProfileGenerator):
1309         (JSC::ProfileGenerator::willExecute):
1310         (JSC::ProfileGenerator::didExecute):
1311         * profiler/ProfileGenerator.h:
1312         (JSC::ProfileGenerator::origin): Made ExecState* the first argument,
1313         to match the rest of this class and JSC.
1314         
1315         Use a JSGlobalObject* instead of an ExecState* with an indirect reference
1316         to a JSGlobalObject* to track our origin. This is simpler and more
1317         efficient, and it removes the destruction order dependency that was causing
1318         our crash.
1319
1320         * profiler/Profiler.cpp:
1321         (JSC::Profiler::startProfiling): Updated for change to JSGlobalObject*.
1322         (JSC::Profiler::stopProfiling): New function for stopping all profiles
1323         for a given global object. This is more straight-forward than multiplexing
1324         through the old function.
1325
1326         (JSC::dispatchFunctionToProfiles): Updated for change to JSGlobalObject*.
1327         * profiler/Profiler.h: Ditto.
1328
1329         * runtime/JSGlobalObject.cpp:
1330         (JSC::JSGlobalObject::~JSGlobalObject): Ditto.
1331
1332 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
1333
1334         Reviewed by Oliver Hunt.
1335
1336         1 Structure leaked beneath JSGlobalData::storeVPtrs()
1337         https://bugs.webkit.org/show_bug.cgi?id=56595
1338
1339         * runtime/Executable.cpp:
1340         (JSC::EvalExecutable::EvalExecutable):
1341         (JSC::ProgramExecutable::ProgramExecutable):
1342         (JSC::FunctionExecutable::FunctionExecutable):
1343         * runtime/Executable.h:
1344         (JSC::ExecutableBase::ExecutableBase):
1345         (JSC::NativeExecutable::NativeExecutable):
1346         (JSC::VPtrHackExecutable::VPtrHackExecutable):
1347         (JSC::ScriptExecutable::ScriptExecutable): Use a raw pointer instead of
1348         PassRefPtr, like JSString does, since JSGlobalData owns the singleton
1349         exectuable structure.
1350
1351 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
1352
1353         Reviewed by Mark Rowe.
1354
1355         Fixed some string leaks seen on the buildbot
1356         https://bugs.webkit.org/show_bug.cgi?id=56619
1357
1358         * runtime/PropertyMapHashTable.h:
1359         (JSC::PropertyTable::~PropertyTable): DEref!
1360
1361 2011-03-17  Oliver Hunt  <oliver@apple.com>
1362
1363         Reviewed by Geoffrey Garen.
1364
1365         Crash in  JSC::MarkStack::drain Under Stress
1366         https://bugs.webkit.org/show_bug.cgi?id=56470
1367
1368         We perform a number of gc allocations while when
1369         we are setting up new globals in a piece of global
1370         code.  We do this by adding new properties to the
1371         symbol table, and then expanding the storage to fit
1372         at the end.
1373
1374         If a GC happens during this time we will report an
1375         incorrect size for the global object's symbol table
1376         storage.
1377
1378         This patch corrects this by growing the storage size
1379         before we starting adding entries to the symbol table.
1380
1381         * bytecompiler/BytecodeGenerator.cpp:
1382         (JSC::BytecodeGenerator::BytecodeGenerator):
1383         * runtime/JSGlobalObject.cpp:
1384         (JSC::JSGlobalObject::resizeRegisters):
1385
1386 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
1387
1388         Reviewed by Oliver Hunt.
1389
1390         1 Structure leaked beneath JSGlobalData::storeVPtrs()
1391         https://bugs.webkit.org/show_bug.cgi?id=56595
1392
1393         * runtime/JSGlobalData.cpp:
1394         (JSC::JSGlobalData::storeVPtrs): Take local ownership of the Structure
1395         we're using, since the Executable is not designed to own the Structure.
1396
1397 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
1398
1399         Rubber Stamped by Sam Weinig.
1400
1401         Add missing register-register branchTest8 to MacroAssemblerX86Common/X86Assembler.
1402
1403         * assembler/MacroAssemblerX86Common.h:
1404         (JSC::MacroAssemblerX86Common::branchTest8):
1405         * assembler/X86Assembler.h:
1406         (JSC::X86Assembler::testb_rr):
1407
1408 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
1409
1410         Reviewed by Sam Weinig.
1411
1412         Bug 56603 - DFG JIT related cleanup
1413         Move node generation out to separate function, move binarySearch algorithm out
1414         to StdLibExtras, fix Graph::dump() to print comma between non-node children,
1415         even if there are no node children.
1416
1417         * bytecode/CodeBlock.h:
1418         (JSC::getCallReturnOffset):
1419         (JSC::CodeBlock::getStubInfo):
1420         (JSC::CodeBlock::getCallLinkInfo):
1421         (JSC::CodeBlock::getMethodCallLinkInfo):
1422         (JSC::CodeBlock::bytecodeOffset):
1423             - Move binaryChop to binarySearch in StdLibExtras
1424         * dfg/DFGByteCodeParser.cpp:
1425         (JSC::DFG::ByteCodeParser::ByteCodeParser):
1426         (JSC::DFG::ByteCodeParser::parse):
1427         (JSC::DFG::parse):
1428             - Make m_noArithmetic a member, initialize m_currentIndex in the constructor.
1429         * dfg/DFGByteCodeParser.h:
1430             - Change parse() to not take a start index (always 0).
1431         * dfg/DFGGraph.cpp:
1432         (JSC::DFG::Graph::dump):
1433             - Fix Graph::dump() to print comma between non-node children, even if there are no node children.
1434         * dfg/DFGJITCodeGenerator.h:
1435         (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
1436             - Initialize m_compileIndex in constructor.
1437         * dfg/DFGNonSpeculativeJIT.cpp:
1438         (JSC::DFG::NonSpeculativeJIT::compile):
1439         * dfg/DFGNonSpeculativeJIT.h:
1440             - Spilt out compilation of individual node.
1441         * dfg/DFGOperations.cpp:
1442         (JSC::DFG::operationConvertThis):
1443         * dfg/DFGOperations.h:
1444             - Cleanup parameter name.
1445         * dfg/DFGSpeculativeJIT.cpp:
1446         (JSC::DFG::SpeculativeJIT::compile):
1447         * dfg/DFGSpeculativeJIT.h:
1448             - Spilt out compilation of individual node.
1449         * runtime/Executable.cpp:
1450         (JSC::tryDFGCompile):
1451             - Change parse() to not take a start index (always 0).
1452         * wtf/StdLibExtras.h:
1453         (WTF::binarySearch):
1454             - Move binaryChop to binarySearch in StdLibExtras
1455
1456 2011-03-17  Anders Carlsson  <andersca@apple.com>
1457
1458         Reviewed by Geoffrey Garen.
1459
1460         Fix clang build.
1461
1462         * runtime/JSGlobalData.cpp:
1463         (JSC::JSGlobalData::storeVPtrs):
1464
1465 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
1466
1467         Reviewed by Darin Adler.
1468
1469         1 Structure leaked beneath JSGlobalData::storeVPtrs()
1470         https://bugs.webkit.org/show_bug.cgi?id=56595
1471
1472         * JavaScriptCore.xcodeproj/project.pbxproj:
1473         * runtime/JSGlobalData.cpp:
1474         (JSC::JSGlobalData::storeVPtrs): Now that we have an executable, we need
1475         to explicitly run its destructor.
1476
1477 2011-03-17  Jeff Miller  <jeffm@apple.com>
1478
1479         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
1480         
1481         *.mode*
1482         *.pbxuser
1483         *.perspective*
1484         project.xcworkspace
1485         xcuserdata
1486
1487         * JavaScriptCore.xcodeproj: Modified property svn:ignore.
1488
1489 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
1490
1491         Reverting r81197, breaks JIT + INTERPRETER build.
1492
1493         * bytecode/CodeBlock.cpp:
1494         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
1495         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
1496         * bytecode/CodeBlock.h:
1497         (JSC::CodeBlock::addPropertyAccessInstruction):
1498         (JSC::CodeBlock::addGlobalResolveInstruction):
1499         (JSC::CodeBlock::addStructureStubInfo):
1500         * bytecode/Opcode.h:
1501         * bytecode/StructureStubInfo.h:
1502         * bytecompiler/BytecodeGenerator.cpp:
1503         (JSC::BytecodeGenerator::emitResolve):
1504         (JSC::BytecodeGenerator::emitResolveWithBase):
1505         (JSC::BytecodeGenerator::emitGetById):
1506         (JSC::BytecodeGenerator::emitPutById):
1507         (JSC::BytecodeGenerator::emitDirectPutById):
1508         (JSC::BytecodeGenerator::emitCall):
1509         (JSC::BytecodeGenerator::emitConstruct):
1510         (JSC::BytecodeGenerator::emitCatch):
1511
1512 2011-03-17  Ben Taylor  <bentaylor.solx86@gmail.com>
1513
1514         Reviewed by Alexey Proskuryakov.
1515
1516         Add a COMPILER(SUNCC) define for Sun Studio 12. 
1517         https://bugs.webkit.org/show_bug.cgi?56444
1518         derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932
1519
1520         * wtf/Platform.h:
1521
1522 2011-03-17  Jay Civelli  <jcivelli@chromium.org>
1523
1524         Reviewed by David Levin.
1525
1526         Adding a contains method to Vector.
1527         https://bugs.webkit.org/show_bug.cgi?id=55859
1528
1529         * wtf/Vector.h:
1530         (WTF::::operator):
1531         (WTF::::contains):
1532
1533 2011-03-17  Patrick Gansterer  <paroga@webkit.org>
1534
1535         Fix the interpreter build.
1536
1537         * interpreter/Interpreter.cpp:
1538         (JSC::Interpreter::privateExecute): Added globalData to inheritorID().
1539
1540 2011-03-16  Sam Weinig  <sam@webkit.org>
1541
1542         Fix the interpreter build.
1543
1544         * interpreter/Interpreter.cpp:
1545         (JSC::Interpreter::resolve):
1546         (JSC::Interpreter::resolveSkip):
1547         (JSC::Interpreter::resolveGlobal):
1548         (JSC::Interpreter::resolveGlobalDynamic):
1549         (JSC::Interpreter::resolveBaseAndProperty):
1550         (JSC::Interpreter::privateExecute):
1551         Remove .get()s.
1552
1553 2011-03-16  Adam Barth  <abarth@webkit.org>
1554
1555         Reviewed by James Robinson.
1556
1557         Remove USE(BUILTIN_UTF8_CODEC)
1558         https://bugs.webkit.org/show_bug.cgi?id=56508
1559
1560         We added this recently when we were unsure about the stability of the
1561         built-in UTF-8 codec.  However, the codec seems to be stable, so we
1562         don't need the macro.
1563
1564         * wtf/Platform.h:
1565
1566 2011-03-16  Daniel Bates  <dbates@rim.com>
1567
1568         Reviewed by Darin Adler.
1569
1570         Make JIT build for ARM Thumb-2 with RVCT
1571         https://bugs.webkit.org/show_bug.cgi?id=56440
1572
1573         Derived from a patch by Dave Tapuska.
1574
1575         Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment.
1576
1577         * jit/JITStubs.cpp:
1578
1579 2011-03-16  Chao-ying Fu  <fu@mips.com>
1580
1581         Reviewed by Darin Adler.
1582
1583         Fix MIPS build with const *void
1584         https://bugs.webkit.org/show_bug.cgi?id=56513
1585
1586         * assembler/MacroAssemblerMIPS.h:
1587         (JSC::MacroAssemblerMIPS::load32):
1588         (JSC::MacroAssemblerMIPS::store32):
1589
1590 2011-03-16  Oliver Hunt  <oliver@apple.com>
1591
1592         Reviewed by Darin Adler.
1593
1594         Remove unnecessary caller tracking shenanigans from CodeBlock
1595         https://bugs.webkit.org/show_bug.cgi?id=56483
1596
1597         This removes some leftover cruft from when we made CodeBlock
1598         mark its callees.  Removing it gives us a 0.7% progression,
1599         reducing the overall regression to ~1.3%.
1600
1601         * bytecode/CodeBlock.cpp:
1602         (JSC::CodeBlock::shrinkToFit):
1603         * bytecode/CodeBlock.h:
1604         (JSC::CallLinkInfo::CallLinkInfo):
1605         * jit/JIT.cpp:
1606         (JSC::JIT::linkCall):
1607         (JSC::JIT::linkConstruct):
1608
1609 2011-03-15  Oliver Hunt  <oliver@apple.com>
1610
1611         Reviewed by Geoffrey Garen.
1612
1613         Make Structure creation require a JSGlobalData
1614         https://bugs.webkit.org/show_bug.cgi?id=56438
1615
1616         Mechanical change to make Structure::create require JSGlobalData&, and
1617         require all users to provide the globalData.
1618
1619         * API/JSCallbackConstructor.h:
1620         (JSC::JSCallbackConstructor::createStructure):
1621         * API/JSCallbackFunction.h:
1622         (JSC::JSCallbackFunction::createStructure):
1623         * API/JSCallbackObject.h:
1624         (JSC::JSCallbackObject::createStructure):
1625         * API/JSContextRef.cpp:
1626         * JavaScriptCore.exp:
1627         * debugger/DebuggerActivation.cpp:
1628         (JSC::DebuggerActivation::DebuggerActivation):
1629         * debugger/DebuggerActivation.h:
1630         (JSC::DebuggerActivation::createStructure):
1631         * jit/JITStubs.cpp:
1632         (JSC::DEFINE_STUB_FUNCTION):
1633         * jsc.cpp:
1634         (GlobalObject::GlobalObject):
1635         (functionRun):
1636         (jscmain):
1637         * runtime/Arguments.h:
1638         (JSC::Arguments::createStructure):
1639         * runtime/ArrayPrototype.h:
1640         (JSC::ArrayPrototype::createStructure):
1641         * runtime/BooleanObject.h:
1642         (JSC::BooleanObject::createStructure):
1643         * runtime/DateInstance.h:
1644         (JSC::DateInstance::createStructure):
1645         * runtime/DatePrototype.h:
1646         (JSC::DatePrototype::createStructure):
1647         * runtime/ErrorInstance.h:
1648         (JSC::ErrorInstance::createStructure):
1649         * runtime/Executable.h:
1650         (JSC::ExecutableBase::createStructure):
1651         (JSC::EvalExecutable::createStructure):
1652         (JSC::ProgramExecutable::createStructure):
1653         (JSC::FunctionExecutable::createStructure):
1654         * runtime/FunctionPrototype.h:
1655         (JSC::FunctionPrototype::createStructure):
1656         * runtime/GetterSetter.h:
1657         (JSC::GetterSetter::createStructure):
1658         * runtime/InternalFunction.h:
1659         (JSC::InternalFunction::createStructure):
1660         * runtime/JSAPIValueWrapper.h:
1661         (JSC::JSAPIValueWrapper::createStructure):
1662         * runtime/JSActivation.h:
1663         (JSC::JSActivation::createStructure):
1664         * runtime/JSArray.cpp:
1665         (JSC::JSArray::JSArray):
1666         * runtime/JSArray.h:
1667         (JSC::JSArray::createStructure):
1668         * runtime/JSByteArray.cpp:
1669         (JSC::JSByteArray::createStructure):
1670         * runtime/JSByteArray.h:
1671         (JSC::JSByteArray::JSByteArray):
1672         * runtime/JSCell.h:
1673         (JSC::JSCell::JSCell::createDummyStructure):
1674         * runtime/JSFunction.h:
1675         (JSC::JSFunction::createStructure):
1676         * runtime/JSGlobalData.cpp:
1677         (JSC::JSGlobalData::storeVPtrs):
1678         (JSC::JSGlobalData::JSGlobalData):
1679         * runtime/JSGlobalObject.cpp:
1680         (JSC::JSGlobalObject::reset):
1681         * runtime/JSGlobalObject.h:
1682         (JSC::JSGlobalObject::JSGlobalObject):
1683         (JSC::JSGlobalObject::createStructure):
1684         * runtime/JSNotAnObject.h:
1685         (JSC::JSNotAnObject::createStructure):
1686         * runtime/JSONObject.h:
1687         (JSC::JSONObject::createStructure):
1688         * runtime/JSObject.cpp:
1689         (JSC::JSObject::createInheritorID):
1690         * runtime/JSObject.h:
1691         (JSC::JSObject::createStructure):
1692         (JSC::JSNonFinalObject::createStructure):
1693         (JSC::JSFinalObject::createStructure):
1694         (JSC::createEmptyObjectStructure):
1695         (JSC::JSObject::inheritorID):
1696         * runtime/JSObjectWithGlobalObject.h:
1697         (JSC::JSObjectWithGlobalObject::createStructure):
1698         * runtime/JSPropertyNameIterator.h:
1699         (JSC::JSPropertyNameIterator::createStructure):
1700         * runtime/JSStaticScopeObject.h:
1701         (JSC::JSStaticScopeObject::createStructure):
1702         * runtime/JSString.h:
1703         (JSC::RopeBuilder::createStructure):
1704         * runtime/JSVariableObject.h:
1705         (JSC::JSVariableObject::createStructure):
1706         * runtime/JSWrapperObject.h:
1707         (JSC::JSWrapperObject::createStructure):
1708         * runtime/JSZombie.h:
1709         (JSC::JSZombie::createStructure):
1710         * runtime/MathObject.h:
1711         (JSC::MathObject::createStructure):
1712         * runtime/NativeErrorConstructor.cpp:
1713         (JSC::NativeErrorConstructor::NativeErrorConstructor):
1714         * runtime/NativeErrorConstructor.h:
1715         (JSC::NativeErrorConstructor::createStructure):
1716         * runtime/NumberConstructor.h:
1717         (JSC::NumberConstructor::createStructure):
1718         * runtime/NumberObject.h:
1719         (JSC::NumberObject::createStructure):
1720         * runtime/ObjectConstructor.h:
1721         (JSC::ObjectConstructor::createStructure):
1722         * runtime/RegExpConstructor.h:
1723         (JSC::RegExpConstructor::createStructure):
1724         * runtime/RegExpObject.h:
1725         (JSC::RegExpObject::createStructure):
1726         * runtime/ScopeChain.h:
1727         (JSC::ScopeChainNode::createStructure):
1728         * runtime/StringObject.h:
1729         (JSC::StringObject::createStructure):
1730         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1731         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1732         * runtime/StringPrototype.h:
1733         (JSC::StringPrototype::createStructure):
1734         * runtime/Structure.h:
1735         (JSC::Structure::create):
1736
1737 2011-03-16  Geoffrey Garen  <ggaren@apple.com>
1738
1739         Reviewed by Oliver Hunt.
1740
1741         Some conservative root gathering cleanup
1742         https://bugs.webkit.org/show_bug.cgi?id=56447
1743         
1744         SunSpider says 0.5% - 1.8% faster.
1745
1746         * interpreter/RegisterFile.cpp:
1747         (JSC::RegisterFile::gatherConservativeRoots):
1748         * interpreter/RegisterFile.h: New helper function for doing the
1749         conservative gathering of the register file. It's still conservative,
1750         since the register file may contain uninitialized values, but it's
1751         moving-safe, because it only visits values tagged as pointers, so there's
1752         no risk of mistaking an integer for a pointer and accidentally changing it.
1753
1754         * runtime/ConservativeSet.cpp:
1755         (JSC::ConservativeRoots::add):
1756         * runtime/ConservativeSet.h: Added a single-value add function, used above.
1757
1758         * runtime/Heap.cpp:
1759         (JSC::Heap::markRoots): Separated machine stack conservative roots from
1760         register file conservative roots because machine stack roots must be
1761         pinned, but register file roots need not be pinned.
1762         
1763         Adopted new interface for passing the current stack extent to the machine
1764         stack root gathering routine. This allows us to exclude marking-related
1765         data structures on the stack, and thus avoid double-marking the set of
1766         machine roots.
1767
1768         * runtime/MachineStackMarker.cpp:
1769         (JSC::MachineThreads::gatherFromCurrentThread):
1770         (JSC::MachineThreads::gatherConservativeRoots):
1771         * runtime/MachineStackMarker.h: Added new interface, described above.
1772
1773         * runtime/MarkedBlock.h:
1774         (JSC::MarkedBlock::firstAtom):
1775         * wtf/StdLibExtras.h:
1776         (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
1777         by MachineStacks.
1778
1779 2011-03-16  Geoffrey Garen  <ggaren@apple.com>
1780
1781         Reviewed by Oliver Hunt.
1782
1783         A little bit of MarkStack cleanup
1784         https://bugs.webkit.org/show_bug.cgi?id=56443
1785         
1786         Moved MarkStack functions into MarkStack.h/.cpp.
1787         
1788         SunSpider reports no change.
1789
1790         * runtime/JSArray.h:
1791         * runtime/JSCell.h: Moved from here...
1792         * runtime/MarkStack.cpp:
1793         (JSC::MarkStack::markChildren):
1794         (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
1795         a huge function, and not called many times.
1796
1797         * runtime/MarkStack.h:
1798         (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
1799         (JSC::MarkStack::append):
1800         (JSC::MarkStack::deprecatedAppend):
1801         (JSC::MarkStack::internalAppend): Moved to here.
1802
1803 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
1804
1805         Reviewed by Oliver Hunt.
1806
1807         Removed another deprecatedAppend
1808         https://bugs.webkit.org/show_bug.cgi?id=56429
1809
1810         * collector/handles/HandleHeap.cpp:
1811         (JSC::HandleHeap::markStrongHandles):
1812         * collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are
1813         marked directly by the Heap.
1814
1815         * runtime/Heap.cpp:
1816         (JSC::Heap::markRoots): Ditto.
1817
1818 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
1819
1820         Reviewed by Oliver Hunt.
1821
1822         Removed some more deprecated / unsafe append
1823         https://bugs.webkit.org/show_bug.cgi?id=56428
1824
1825         * collector/handles/HandleStack.cpp:
1826         (JSC::HandleStack::mark):
1827         * collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot
1828         marker, since it's a heap root.
1829         
1830         * runtime/ArgList.cpp:
1831         (JSC::MarkedArgumentBuffer::markLists):
1832         (JSC::MarkedArgumentBuffer::slowAppend):
1833         * runtime/ArgList.h: Ditto.
1834
1835         * runtime/Heap.cpp:
1836         (JSC::Heap::markRoots): Added a mark call for marking the handle stack.
1837         It seems like Oliver forgot this in his last patch. (!)
1838
1839         * runtime/MarkStack.h: Removed appendSlots, since it would allow an
1840         object to embed JSValues directly instead of using WriteBarrier.
1841
1842         (JSC::MarkStack::append): Added a private append for a list of values.
1843
1844         (JSC::HeapRootMarker::mark): Access to the above.
1845
1846 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
1847
1848         Reviewed by Oliver Hunt.
1849
1850         Removed a few more deprecatedAppends, and removed HeapRoot<T>
1851         https://bugs.webkit.org/show_bug.cgi?id=56422
1852         
1853         Added HeapRootMarker, a privileged class for marking direct heap roots
1854         that are iterated during each garbage collection. This is easier to use
1855         and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
1856
1857         * debugger/Debugger.cpp:
1858         (JSC::evaluateInGlobalCallFrame):
1859         * debugger/DebuggerCallFrame.cpp:
1860         (JSC::DebuggerCallFrame::evaluate):
1861         * interpreter/CallFrame.h:
1862         (JSC::ExecState::exception):
1863         * jit/JITStubs.cpp:
1864         (JSC::DEFINE_STUB_FUNCTION):
1865         * runtime/Completion.cpp:
1866         (JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
1867         call .get() on it.
1868
1869         * runtime/Heap.cpp:
1870         (JSC::Heap::markProtectedObjects):
1871         (JSC::Heap::markTempSortVectors):
1872         (JSC::Heap::markRoots):
1873         * runtime/Heap.h: Updated to use HeapRootMarker.
1874
1875         * runtime/JSCell.h:
1876         (JSC::JSCell::MarkStack::append): Added private functions for
1877         HeapRootMarker to use.
1878
1879         * runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
1880
1881         * runtime/MarkStack.h:
1882         (JSC::HeapRootMarker::HeapRootMarker):
1883         (JSC::HeapRootMarker::mark): Added private functions for
1884         HeapRootMarker to use.
1885
1886         * runtime/SmallStrings.cpp:
1887         (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
1888
1889         * runtime/SmallStrings.h:
1890         (JSC::SmallStrings::emptyString):
1891         (JSC::SmallStrings::singleCharacterString):
1892         (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
1893
1894         * runtime/WriteBarrier.h: Removed HeapRoot<T>.
1895
1896 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
1897
1898         Reviewed by Oliver Hunt.
1899
1900         Made the global object moving-GC-safe
1901         https://bugs.webkit.org/show_bug.cgi?id=56348
1902         
1903         SunSpider reports no change.
1904
1905         * runtime/JSGlobalObject.cpp:
1906         (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
1907         suggested we do not need to visit all our references during GC, since
1908         that is not true in a moving GC.
1909
1910         Re-sorted data members by type, removed one duplicate, and added back
1911         the one missing mark I found.
1912
1913         * runtime/JSGlobalObject.h: Re-sorted data members by type.
1914
1915 2011-03-15  Oliver Hunt  <oliver@apple.com>
1916
1917         Reviewed by Geoffrey Garen.
1918
1919         Introduce Local<T> to allow us to start moving to precise marking of locals
1920         https://bugs.webkit.org/show_bug.cgi?id=56394
1921
1922         Introduce a new handle type, Local<T> and a scoping mechanism
1923         LocalScope to allow us to start moving towards precise marking
1924         of temporaries and local variables.
1925
1926         We also start to use the new Local<> type in the JSON stringifier
1927         so that we can have some coverage of their behaviour in the initial
1928         checkin.
1929
1930         * GNUmakefile.am:
1931         * JavaScriptCore.gypi:
1932         * JavaScriptCore.pro:
1933         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1934         * JavaScriptCore.xcodeproj/project.pbxproj:
1935         * collector/handles/Handle.h:
1936         (JSC::::asObject):
1937         * collector/handles/HandleStack.cpp: Added.
1938         (JSC::HandleStack::HandleStack):
1939         (JSC::HandleStack::mark):
1940         (JSC::HandleStack::grow):
1941         * collector/handles/HandleStack.h: Added.
1942         (JSC::HandleStack::enterScope):
1943         (JSC::HandleStack::zapTo):
1944         (JSC::HandleStack::leaveScope):
1945         (JSC::HandleStack::push):
1946         * collector/handles/Local.h: Added.
1947         (JSC::Local::internalSet):
1948         (JSC::::Local):
1949         (JSC::::operator):
1950         (JSC::LocalStack::LocalStack):
1951         (JSC::LocalStack::peek):
1952         (JSC::LocalStack::pop):
1953         (JSC::LocalStack::push):
1954         (JSC::LocalStack::isEmpty):
1955         (JSC::LocalStack::size):
1956         * collector/handles/LocalScope.h: Added.
1957         (JSC::LocalScope::LocalScope):
1958         (JSC::LocalScope::~LocalScope):
1959         (JSC::LocalScope::release):
1960         * runtime/Heap.cpp:
1961         (JSC::Heap::markRoots):
1962         * runtime/Heap.h:
1963         (JSC::Heap::allocateLocalHandle):
1964         (JSC::Heap::handleStack):
1965         * runtime/JSCell.h:
1966         (JSC::JSCell::::getString):
1967         * runtime/JSGlobalData.cpp:
1968         (JSC::JSGlobalData::JSGlobalData):
1969         * runtime/JSGlobalData.h:
1970         (JSC::JSGlobalData::allocateLocalHandle):
1971         * runtime/JSONObject.cpp:
1972         (JSC::Stringifier::Stringifier):
1973         (JSC::Stringifier::stringify):
1974         (JSC::Stringifier::appendStringifiedValue):
1975         (JSC::Stringifier::Holder::Holder):
1976         (JSC::Walker::Walker):
1977         (JSC::Walker::walk):
1978         (JSC::JSONProtoFuncParse):
1979         (JSC::JSONProtoFuncStringify):
1980         (JSC::JSONStringify):
1981         * runtime/JSONObject.h:
1982         * runtime/MarkStack.h:
1983         (JSC::MarkStack::appendValues):
1984         (JSC::MarkStack::appendSlots):
1985
1986 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
1987
1988         Rubber Stamped by Sam Weinig.
1989
1990         Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler
1991         Some methods have unnecessary differences in name/arguments for interpreter/JIT.
1992
1993         * bytecode/CodeBlock.cpp:
1994         * bytecode/CodeBlock.h:
1995         (JSC::HandlerInfo::HandlerInfo):
1996         (JSC::CodeBlock::addPropertyAccessInfo):
1997         (JSC::CodeBlock::addGlobalResolveInfo):
1998         (JSC::CodeBlock::addCallLinkInfo):
1999         (JSC::CodeBlock::globalResolveInfo):
2000         * bytecode/Opcode.h:
2001         * bytecode/StructureStubInfo.h:
2002         * bytecompiler/BytecodeGenerator.cpp:
2003         (JSC::BytecodeGenerator::emitResolve):
2004         (JSC::BytecodeGenerator::emitResolveWithBase):
2005         (JSC::BytecodeGenerator::emitGetById):
2006         (JSC::BytecodeGenerator::emitPutById):
2007         (JSC::BytecodeGenerator::emitDirectPutById):
2008         (JSC::BytecodeGenerator::emitCall):
2009         (JSC::BytecodeGenerator::emitConstruct):
2010         (JSC::BytecodeGenerator::emitCatch):
2011
2012 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
2013
2014         Reviewed by Sam Weinig.
2015
2016         Fix broken assert in new code.
2017
2018         * dfg/DFGAliasTracker.h:
2019         (JSC::DFG::AliasTracker::recordPutByVal):
2020             - recordPutByVal is called for both PutByVal & PutByValAlias.
2021
2022 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
2023
2024         Rubber stamped by Sam Weinig.
2025
2026         Removed redundant code from BytecodeGenerator.
2027
2028         * bytecompiler/BytecodeGenerator.cpp:
2029         * bytecompiler/BytecodeGenerator.h:
2030             - delete uncalled code missed when reparsing was removed.
2031
2032 2011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
2033
2034         Reviewed by Darin Adler.
2035
2036         Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
2037         info into the headers rather than in export symbol definition files, but disable it on 
2038         all platforms initially so we can deal with port build issues one port at a time.
2039         
2040         https://bugs.webkit.org/show_bug.cgi?id=27551
2041
2042         * API/JSBase.h:
2043         * config.h:
2044         * wtf/Assertions.h:
2045         * wtf/ExportMacros.h: Added.
2046         * wtf/Platform.h:
2047
2048 2011-03-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2049
2050         Unreviewed build fix.
2051
2052         Buildfix when JIT is not enabled after r81079
2053         https://bugs.webkit.org/show_bug.cgi?id=56361
2054
2055         * runtime/Executable.cpp:
2056
2057 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
2058
2059         Reviewed by Oliver Hunt.
2060
2061         Made the global object moving-GC-safe
2062         https://bugs.webkit.org/show_bug.cgi?id=56348
2063         
2064         SunSpider reports no change.
2065
2066         * runtime/JSGlobalObject.cpp:
2067         (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
2068         suggested we do not need to visit all our references during GC, since
2069         that is not true in a moving GC.
2070
2071         Re-sorted data members by type, removed one duplicate, and added back
2072         the one missing mark I found.
2073
2074         * runtime/JSGlobalObject.h: Re-sorted data members by type.
2075
2076 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
2077
2078         Reviewed by Oliver Hunt.
2079
2080         Made JSWrapperObject and subclasses moving-GC-safe
2081         https://bugs.webkit.org/show_bug.cgi?id=56346
2082         
2083         SunSpider reports no change.
2084
2085         * runtime/BooleanObject.cpp:
2086         (JSC::BooleanObject::BooleanObject):
2087         * runtime/DateInstance.cpp:
2088         (JSC::DateInstance::DateInstance): No more need for JSGlobalData, since
2089         we don't initialize the wrapped value in our constructor.
2090
2091         * runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because
2092         we do not in fact override markChildren.
2093
2094         * runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object
2095         no longer does so for us. Also added an ASSERT to catch a latent bug,
2096         where DatePrototype stomped on its base class's anonymous slot. Hard-coded
2097         anonymous slots are a plague on our code. This doesn't cause any problems
2098         in our existing code since the base class never reads the anonymous slot
2099         it declares, but it caused crashes when I tried to start using the slot
2100         in an initial version of this patch.
2101
2102         * runtime/JSWrapperObject.h:
2103         (JSC::JSWrapperObject::JSWrapperObject):
2104         (JSC::JSWrapperObject::internalValue):
2105         (JSC::JSWrapperObject::setInternalValue): Resolved a problem where
2106         our internal value was stored in two places: an anonymous slot, and a
2107         data member which was not always visited during GC. Now, we only use the
2108         data member, and we always visit it. (Instead of relying on certain
2109         subclasses to set the OverridesMarkChildren bit, we set it ourselves.)
2110
2111         * runtime/NumberObject.cpp:
2112         (JSC::NumberObject::NumberObject): No more need for JSGlobalData, since
2113         we don't initialize the wrapped value in our constructor.
2114
2115         * runtime/NumberObject.h: Removed meaningless declaration.
2116
2117         * runtime/StringObject.cpp:
2118         (JSC::StringObject::StringObject): No more need for JSGlobalData, since
2119         we don't initialize the wrapped value in our constructor.
2120
2121         * runtime/StringObject.h: Don't set the OverridesMarkChildren flag because
2122         we do not in fact override markChildren.
2123
2124         * runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object
2125         no longer does so for us. Also added an ASSERT to catch a latent bug,
2126         where DatePrototype stomped on its base class's anonymous slot. Hard-coded
2127         anonymous slots are a plague on our code.
2128
2129 2011-03-14  Michael Saboff  <msaboff@apple.com>
2130
2131         Reviewed by Gavin Barraclough.
2132
2133         Look-ahead assertions with back references don’t work as expected
2134         https://bugs.webkit.org/show_bug.cgi?id=56082
2135
2136         Changed parentheses assertion processing to temporarily back out the 
2137         number of known characters after the assertion while processing the 
2138         assertion.  This was done so that assertions don't fail due to 
2139         checking the number of required characters as additional to the 
2140         rest of the express since assertions don't "consume" input.
2141         Added a byte code to uncheck characters to support the change.
2142
2143         * yarr/YarrInterpreter.cpp:
2144         (JSC::Yarr::Interpreter::matchDisjunction):
2145         (JSC::Yarr::ByteCompiler::uncheckInput):
2146         (JSC::Yarr::ByteCompiler::emitDisjunction):
2147         * yarr/YarrInterpreter.h:
2148         (JSC::Yarr::ByteTerm::UncheckInput):
2149
2150 2011-03-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2151
2152         Reviewed by Laszlo Gombos.
2153
2154         [Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian.
2155         https://bugs.webkit.org/show_bug.cgi?id=56133
2156
2157         Add condition to not compile webkit internal math round functions on RVCT compiler versions 
2158         from 3.0.0 because they are already defined in compiler math library.
2159
2160         * wtf/MathExtras.h:
2161
2162 2011-03-14  Gavin Barraclough  <barraclough@apple.com>
2163
2164         Reviewed by Geoffrey Garen & Oliver Hunt.
2165
2166         Bug 56284 - Add a dataflow intermediate representation for use in JIT generation.
2167
2168         The JSC JIT presently generates code directly from the bytecode used by the interpreter.
2169         This is not an optimal intermediate representation for JIT code generation, since it does
2170         not capture liveness information of values, and provides little opportunity to perform
2171         any static analysis for even primitive types. The JIT currently generates two code paths,
2172         a fast path handling common cases, and a slower path handling less common operand types.
2173         However the slow path jumps back into the fast path, meaning that information arising
2174         from the earlier type checks cannot be propagated to later operations.
2175
2176         This patch adds:
2177             * a dataflow intermediate representation capable of describing a single basic block
2178               of operations,
2179             * a mechanism to convert a simple, single-block bytecode functions to the new IR,
2180             * and a JIT code generator capable of generating code from this representation.
2181
2182         The JIT generates two code paths, with the slower path not reentering the fast path
2183         mid-block, allowing speculative optimizations to be made on the hot path, with type
2184         information arising from these speculative decisions able to be propagated through the
2185         dataflow. Code generation of both speculative and non-speculative paths exploits the type
2186         and liveness information represented in the dataflow graph to attempt to avoid redundant
2187         boxing and type-checking of values, and to remove unnecessary spills of temporary values
2188         to the RegisterFile.
2189
2190         The dataflow JIT currently can only support a subset of bytecode operations, limited to
2191         arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the
2192         dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be
2193         expanded to include, control-flow, function calls, and then the long-tail of remaining
2194         bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of
2195         this only supports x86-64.
2196
2197         The status of the dataflow JIT is currently work-in-progress. Limitations of the present
2198         JIT code generation may cause performance regressions, particularly:
2199             * the policy to only generate arithmetic code on the speculative path using integer
2200               instructions, never using floating point.
2201             * the policy to only generate arithmetic code on the non-speculative path using
2202               floating point instructions, never using integer.
2203             * always generating JSValue adds on the non-speculative path as a call out to a
2204               C-function, never handling this in JIT code.
2205             * always assuming by-Value property accesses on the speculative path to be array
2206               accesses.
2207             * generating all by-Value property accesses from the non-speculative path as a call
2208               out to a C-function.
2209             * generating all by-Indentifer property accesses as a call out to a C-function.
2210         Due to these regressions, the code is landed in a state where it is disabled in most
2211         cases by the ENABLE_DFG_JIT_RESTRICTIONS guard in Platform.h. As these regressions are
2212         addressed, the JIT will be allowed to trigger in more cases.
2213
2214         * JavaScriptCore.xcodeproj/project.pbxproj:
2215             - Added new files to Xcode project.
2216         * dfg: Added.
2217             - Added directory for new code.
2218         * dfg/DFGByteCodeParser.cpp: Added.
2219         * dfg/DFGByteCodeParser.h: Added.
2220             - Contruct a DFG::Graph representation from a bytecode CodeBlock.
2221         * dfg/DFGGenerationInfo.h: Added.
2222             - Track type & register information for VirtualRegisters during JIT code generation.
2223         * dfg/DFGGraph.cpp: Added.
2224         * dfg/DFGGraph.h: Added.
2225             - Dataflow graph intermediate representation for code generation.
2226         * dfg/DFGJITCodeGenerator.cpp: Added.
2227         * dfg/DFGJITCodeGenerator.h: Added.
2228             - Base class for SpeculativeJIT & NonSpeculativeJIT to share common functionality.
2229         * dfg/DFGJITCompiler.cpp: Added.
2230         * dfg/DFGJITCompiler.h: Added.
2231             - Class responsible for driving code generation of speculativeJIT & non-speculative
2232               code paths from the dataflow graph.
2233         * dfg/DFGNonSpeculativeJIT.cpp: Added.
2234         * dfg/DFGNonSpeculativeJIT.h: Added.
2235             - Used to generate the non-speculative code path, this make no assumptions
2236               about operand types.
2237         * dfg/DFGOperations.cpp: Added.
2238         * dfg/DFGOperations.h: Added.
2239             - Helper functions called from the JIT generated code.
2240         * dfg/DFGRegisterBank.h: Added.
2241             - Used to track contents of physical registers during JIT code generation.
2242         * dfg/DFGSpeculativeJIT.cpp: Added.
2243         * dfg/DFGSpeculativeJIT.h: Added.
2244             - Used to generate the speculative code path, this make assumptions about
2245               operand types to enable optimization.
2246         * runtime/Executable.cpp:
2247             - Add code to attempt to use the DFG JIT to compile a function, with fallback
2248               to the existing JIT.
2249         * wtf/Platform.h:
2250             - Added compile guards to enable the DFG JIT.
2251
2252 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
2253
2254         Reviewed by Oliver Hunt.
2255
2256         Removed more cases of DeprecatedPtr (exception, SmallStrings)
2257         https://bugs.webkit.org/show_bug.cgi?id=56332
2258
2259         * runtime/Identifier.cpp:
2260         (JSC::Identifier::add):
2261         (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded
2262         constant, to make this code less brittle.
2263
2264         * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because
2265         this reference is owned and managed directly by the heap.
2266
2267         * runtime/JSString.cpp:
2268         (JSC::JSString::substringFromRope):
2269         * runtime/JSString.h:
2270         (JSC::jsSingleCharacterString):
2271         (JSC::jsSingleCharacterSubstring):
2272         (JSC::jsString):
2273         (JSC::jsStringWithFinalizer):
2274         (JSC::jsSubstring):
2275         (JSC::jsOwnedString): Use a variable instead of a hard-coded
2276         constant, to make this code less brittle.
2277
2278         * runtime/SmallStrings.cpp:
2279         (JSC::SmallStringsStorage::rep):
2280         (JSC::SmallStringsStorage::SmallStringsStorage):
2281         (JSC::SmallStrings::SmallStrings):
2282         (JSC::SmallStrings::markChildren):
2283         (JSC::SmallStrings::clear):
2284         (JSC::SmallStrings::count): Use a variable instead of a hard-coded
2285         constant, to make this code less brittle.
2286
2287         * runtime/SmallStrings.h:
2288         (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of
2289         DeprecatedPtr because these references are owned and managed directly by
2290         the heap.
2291         
2292         Stop using FixedArray because we only want a very limited set
2293         of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.)
2294
2295         * runtime/WriteBarrier.h:
2296         (JSC::operator==):
2297         (JSC::WriteBarrier::WriteBarrier):
2298         (JSC::HeapRoot::HeapRoot):
2299         (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set
2300         without write barrier because we assume all HeapRoots are scanned during
2301         all GC passes.
2302
2303 2011-03-14  Brian Weinstein  <bweinstein@apple.com>
2304
2305         Reviewed by Adam Roben and Gavin Barraclough.
2306
2307         FileSystemWin.cpp needs listDirectory() implementation
2308         https://bugs.webkit.org/show_bug.cgi?id=56331
2309         <rdar://problem/9126635>
2310         
2311         Give StringConcatenate the ability to deal with const UChar*'s as a String type to append.
2312
2313         * wtf/text/StringConcatenate.h:
2314
2315 2011-03-14  Mark Rowe  <mrowe@apple.com>
2316
2317         Reviewed by Oliver Hunt.
2318
2319         <http://webkit.org/b/56304> REGRESSION(r80892): 100,000+ leaks seen on the build bot
2320
2321         * API/JSClassRef.cpp:
2322         (OpaqueJSClass::OpaqueJSClass): Don't leak any existing entry for the given name if
2323         the class definition contains duplicates. This also removes what look to be leaks
2324         of the StringImpl instances that are used as keys: the HashMap key type is a RefPtr
2325         which retains / releases the instances at the appropriate time, so explicitly calling
2326         ref is not necessary.
2327
2328 2011-03-14  Oliver Hunt  <oliver@apple.com>
2329
2330         Fix windows build
2331
2332         * jit/JSInterfaceJIT.h:
2333         (JSC::JSInterfaceJIT::emitLoadInt32):
2334         (JSC::JSInterfaceJIT::tagFor):
2335         (JSC::JSInterfaceJIT::payloadFor):
2336         (JSC::JSInterfaceJIT::intPayloadFor):
2337         (JSC::JSInterfaceJIT::intTagFor):
2338         (JSC::JSInterfaceJIT::addressFor):
2339
2340 2011-03-11  Oliver Hunt  <oliver@apple.com>
2341
2342         Reviewed by Gavin Barraclough.
2343
2344         Ensure all values are correctly tagged in the registerfile
2345         https://bugs.webkit.org/show_bug.cgi?id=56214
2346
2347         This patch makes sure that all JSCell pointers written to
2348         the registerfile are correctly tagged as JSCells, and replaces
2349         raw int usage with the immediate representation.
2350
2351         For performance, register pressure, and general saneness reasons
2352         I've added abstractions for reading and writing the tag
2353         and payload of integer registers directly for the JSVALUE64
2354         encoding.
2355
2356         * interpreter/Register.h:
2357         (JSC::Register::withInt):
2358         (JSC::Register::withCallee):
2359         (JSC::Register::operator=):
2360         (JSC::Register::i):
2361         (JSC::Register::activation):
2362         (JSC::Register::function):
2363         (JSC::Register::propertyNameIterator):
2364         (JSC::Register::scopeChain):
2365         * jit/JIT.h:
2366         * jit/JITCall.cpp:
2367         (JSC::JIT::compileOpCallInitializeCallFrame):
2368         (JSC::JIT::compileOpCallVarargs):
2369         (JSC::JIT::compileOpCall):
2370         * jit/JITCall32_64.cpp:
2371         (JSC::JIT::compileOpCallInitializeCallFrame):
2372         (JSC::JIT::compileOpCallVarargs):
2373         (JSC::JIT::compileOpCall):
2374         (JSC::JIT::compileOpCallSlowCase):
2375         * jit/JITInlineMethods.h:
2376         (JSC::JIT::emitPutToCallFrameHeader):
2377         (JSC::JIT::emitPutCellToCallFrameHeader):
2378         (JSC::JIT::emitPutIntToCallFrameHeader):
2379         * jit/JITOpcodes.cpp:
2380         (JSC::JIT::privateCompileCTINativeCall):
2381         (JSC::JIT::emit_op_get_pnames):
2382         (JSC::JIT::emit_op_next_pname):
2383         (JSC::JIT::emit_op_load_varargs):
2384         (JSC::JIT::emitSlow_op_load_varargs):
2385         * jit/JITOpcodes32_64.cpp:
2386         (JSC::JIT::privateCompileCTINativeCall):
2387         (JSC::JIT::emit_op_get_pnames):
2388         (JSC::JIT::emit_op_next_pname):
2389         * jit/JSInterfaceJIT.h:
2390         (JSC::JSInterfaceJIT::intPayloadFor):
2391         (JSC::JSInterfaceJIT::intTagFor):
2392         * jit/SpecializedThunkJIT.h:
2393         (JSC::SpecializedThunkJIT::returnJSValue):
2394         (JSC::SpecializedThunkJIT::returnDouble):
2395         (JSC::SpecializedThunkJIT::returnInt32):
2396         (JSC::SpecializedThunkJIT::returnJSCell):
2397
2398 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
2399
2400         Reviewed by Sam Weinig.
2401
2402         A few Heap-related renames (sans file moves, which should come next)
2403         https://bugs.webkit.org/show_bug.cgi?id=56283
2404         
2405         ConservativeSet => ConservativeRoots. "Set" was misleading, since items
2406         are not uniqued. Also, "Roots" is more specific about what's in the set.
2407         
2408         MachineStackMarker => MachineThreads. "Threads" is more descriptive of
2409         the fact that this class maintains a set of all threads using JSC.
2410         "Stack" was misleading, since this class traverses stacks and registers.
2411         "Mark" was misleading, since this class doesn't mark anything anymore.
2412         
2413         registerThread => addCurrentThread. "Current" is more specific.
2414         unregisterThread => removeCurrentThread. "Current" is more specific.
2415         
2416         "currentThreadRegistrar" => threadSpecific. The only point of this data
2417         structure is to register a thread-specific destructor with a pointer to
2418         this.
2419         
2420         "mark...Conservatively" => "gather". "Mark" is not true, since these
2421         functions don't mark anything. "Conservatively" is redundant, since they
2422         take "ConservativeRoots" as an argument.
2423
2424         * API/APIShims.h:
2425         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2426         * JavaScriptCore.exp:
2427         * runtime/ConservativeSet.cpp:
2428         (JSC::ConservativeRoots::grow):
2429         (JSC::ConservativeRoots::add):
2430         * runtime/ConservativeSet.h:
2431         (JSC::ConservativeRoots::ConservativeRoots):
2432         (JSC::ConservativeRoots::~ConservativeRoots):
2433         (JSC::ConservativeRoots::size):
2434         (JSC::ConservativeRoots::roots):
2435         * runtime/Heap.cpp:
2436         (JSC::Heap::Heap):
2437         (JSC::Heap::markRoots):
2438         * runtime/Heap.h:
2439         (JSC::Heap::machineThreads):
2440         * runtime/JSGlobalData.h:
2441         (JSC::JSGlobalData::makeUsableFromMultipleThreads):
2442         * runtime/MachineStackMarker.cpp:
2443         (JSC::MachineThreads::MachineThreads):
2444         (JSC::MachineThreads::~MachineThreads):
2445         (JSC::MachineThreads::makeUsableFromMultipleThreads):
2446         (JSC::MachineThreads::addCurrentThread):
2447         (JSC::MachineThreads::removeThread):
2448         (JSC::MachineThreads::removeCurrentThread):
2449         (JSC::MachineThreads::gatherFromCurrentThreadInternal):
2450         (JSC::MachineThreads::gatherFromCurrentThread):
2451         (JSC::MachineThreads::gatherFromOtherThread):
2452         (JSC::MachineThreads::gatherConservativeRoots):
2453         * runtime/MachineStackMarker.h:
2454         * runtime/MarkStack.h:
2455         (JSC::MarkStack::append):
2456
2457 2011-03-13  David Kilzer  <ddkilzer@apple.com>
2458
2459         BUILD FIX for armv7 after r80969
2460
2461         Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
2462         <https://bugs.webkit.org/show_bug.cgi?id=56270>
2463
2464         * assembler/MacroAssemblerARMv7.h:
2465         (JSC::MacroAssemblerARMv7::load32): Made void* address argument
2466         const.
2467         (JSC::MacroAssemblerARMv7::store32): Ditto.
2468
2469 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
2470
2471         Not reviewed.
2472
2473         Try to fix the Mac build.
2474
2475         * JavaScriptCore.xcodeproj/project.pbxproj: Make sure to forward
2476         ConervativeSet.h, since it's now visible when compiling other projects.
2477
2478 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
2479
2480         Reviewed by Oliver Hunt.
2481
2482         Removed another case of DeprecatedPtr (ConservativeSet)
2483         https://bugs.webkit.org/show_bug.cgi?id=56281
2484         
2485         The ConservativeSet is an internal data structure used during marking,
2486         so direct pointers are fine.
2487
2488         * runtime/ConservativeSet.cpp:
2489         (JSC::ConservativeSet::grow):
2490         * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append.
2491         (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated
2492         the size of the set based on sizeof(DeprecatedPtr<T>*) instead of
2493         sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not.
2494         (JSC::ConservativeSet::size):
2495         (JSC::ConservativeSet::set): Use direct pointers, as stated above. 
2496
2497         * runtime/Heap.cpp:
2498         (JSC::Heap::markRoots):
2499         * runtime/MarkStack.h:
2500         (JSC::MarkStack::append): Created a special case of append for
2501         ConservativeSet. I didn't want to add back a generic "append JSCell*"
2502         function, since other class might start using that wrong. (In the end,
2503         this function might go away, since the Heap will want to do something
2504         slightly more interesting with the conservative set, but this is OK for
2505         now.)
2506
2507 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
2508
2509         Reviewed by Oliver Hunt.
2510
2511         Removed another case of DeprecatedPtr (PutPropertySlot)
2512         https://bugs.webkit.org/show_bug.cgi?id=56278
2513
2514         * runtime/PutPropertySlot.h:
2515         (JSC::PutPropertySlot::setExistingProperty):
2516         (JSC::PutPropertySlot::setNewProperty):
2517         (JSC::PutPropertySlot::base): Direct pointer is fine for PutPropertySlot,
2518         since it's a stack-allocated temporary.
2519
2520 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
2521
2522         Reviewed by Oliver Hunt.
2523
2524         Removed one case of DeprecatedPtr (ScopeChainIterator)
2525         https://bugs.webkit.org/show_bug.cgi?id=56277
2526
2527         * runtime/ScopeChain.h: Direct pointer is fine for ScopeChainIterator,
2528         since it's a stack-allocated temporary.
2529
2530 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
2531
2532         Reviewed by Sam Weinig.
2533
2534         Bug 56273 - Add three operand forms to MacroAssember operations.
2535
2536         Adding for X86(_64) for now, should be rolled out to other backends as necessary.
2537         These may allow more efficient code generation in some cases, avoiding the need
2538         for unnecessary register-register move instructions.
2539
2540         * assembler/AbstractMacroAssembler.h:
2541         (JSC::AbstractMacroAssembler::Jump::link):
2542         (JSC::AbstractMacroAssembler::Jump::linkTo):
2543             - marked these methods const.
2544         (JSC::AbstractMacroAssembler::Jump::isSet):
2545             - add a method to check whether a Jump object has been set to
2546               reference an instruction, or is in a null, unset state. 
2547         * assembler/MacroAssemblerCodeRef.h:
2548         (JSC::FunctionPtr::FunctionPtr):
2549             - add non-explicit constructor, for FunctionPtr's to C/C++ functions.
2550         * assembler/MacroAssemblerX86Common.h:
2551         (JSC::MacroAssemblerX86Common::and32):
2552         (JSC::MacroAssemblerX86Common::lshift32):
2553         (JSC::MacroAssemblerX86Common::or32):
2554         (JSC::MacroAssemblerX86Common::rshift32):
2555         (JSC::MacroAssemblerX86Common::urshift32):
2556         (JSC::MacroAssemblerX86Common::xor32):
2557         (JSC::MacroAssemblerX86Common::moveDouble):
2558         (JSC::MacroAssemblerX86Common::addDouble):
2559         (JSC::MacroAssemblerX86Common::divDouble):
2560         (JSC::MacroAssemblerX86Common::subDouble):
2561         (JSC::MacroAssemblerX86Common::mulDouble):
2562         (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
2563         (JSC::MacroAssemblerX86Common::branchTest32):
2564         (JSC::MacroAssemblerX86Common::branchTest8):
2565         (JSC::MacroAssemblerX86Common::branchAdd32):
2566         (JSC::MacroAssemblerX86Common::branchMul32):
2567         (JSC::MacroAssemblerX86Common::branchSub32):
2568             - add three operand forms of these instructions.
2569         * assembler/MacroAssemblerX86_64.h:
2570         (JSC::MacroAssemblerX86_64::addDouble):
2571         (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
2572         (JSC::MacroAssemblerX86_64::loadPtr):
2573         (JSC::MacroAssemblerX86_64::branchTestPtr):
2574         * assembler/X86Assembler.h:
2575         (JSC::X86Assembler::JmpSrc::isSet):
2576             - add a method to check whether a JmpSrc object has been set to
2577               reference an instruction, or is in a null, unset state. 
2578         (JSC::X86Assembler::movsd_rr):
2579             - added FP register-register move.
2580         (JSC::X86Assembler::linkJump):
2581             - Add an assert to check jumps aren't linked more than once.
2582         * jit/JITInlineMethods.h:
2583         (JSC::JIT::emitLoadInt32ToDouble):
2584             - load integers to the FPU via regsiters on x86-64.
2585
2586 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
2587
2588         ARM build fix.
2589
2590         * assembler/MacroAssemblerARM.h:
2591         (JSC::MacroAssemblerARM::load32):
2592
2593 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
2594
2595         Reviewed by Sam Weinig.
2596
2597         Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
2598
2599         The JIT need to 'friend' other classes in order to be able to calculate offsets
2600         of various properties, or the absolute addresses of members within specific objects,
2601         in order to JIT generate code that will access members within the class when run.
2602
2603         Instead of using friends in these cases, switch to providing specific accessor
2604         methods to provide this information.  In the case of offsets, these can be static
2605         functions, and in the case of pointers to members within a specific object these can
2606         be const methods returning pointers to const values, to prevent clients from
2607         modifying values otherwise encapsulated within classes.
2608
2609         * bytecode/SamplingTool.h:
2610         * interpreter/Register.h:
2611         * interpreter/RegisterFile.h:
2612         * runtime/JSArray.h:
2613         * runtime/JSCell.h:
2614         * runtime/JSTypeInfo.h:
2615         * runtime/JSVariableObject.h:
2616         * runtime/Structure.h:
2617         * wtf/RefCounted.h:
2618             - Change these classes to no longer friend the JIT, add accessors for member offsets.
2619         * jit/JIT.cpp:
2620         * jit/JITCall32_64.cpp:
2621         * jit/JITInlineMethods.h:
2622         * jit/JITOpcodes.cpp:
2623         * jit/JITOpcodes32_64.cpp:
2624         * jit/JITPropertyAccess.cpp:
2625         * jit/JITPropertyAccess32_64.cpp:
2626             - Change the JIT to use class accessors, rather than taking object ofsets directly.
2627         * assembler/AbstractMacroAssembler.h:
2628         * assembler/MacroAssemblerX86_64.h:
2629         * assembler/X86Assembler.h:
2630             - Since the accessors for objects members return const pointers to retain encapsulation,
2631               methods generating code with absolute addresses must be able to handle const pointers
2632               (the JIT doesn't write to these values, do dies treat the pointer to value as const
2633               from within the C++ code of the JIT, if not at runtime!).
2634
2635 2011-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2636
2637         Unreviewed, rolling out r80919.
2638         http://trac.webkit.org/changeset/80919
2639         https://bugs.webkit.org/show_bug.cgi?id=56251
2640
2641         all windows bots failed to compile this change (Requested by
2642         loislo on #webkit).
2643
2644         * JavaScriptCore.xcodeproj/project.pbxproj:
2645         * bytecode/StructureStubInfo.cpp:
2646         * interpreter/Register.h:
2647         (JSC::Register::withInt):
2648         (JSC::Register::withCallee):
2649         (JSC::Register::operator=):
2650         (JSC::Register::i):
2651         (JSC::Register::activation):
2652         (JSC::Register::function):
2653         (JSC::Register::propertyNameIterator):
2654         (JSC::Register::scopeChain):
2655         * jit/JIT.h:
2656         * jit/JITCall.cpp:
2657         (JSC::JIT::compileOpCallInitializeCallFrame):
2658         (JSC::JIT::compileOpCallVarargs):
2659         (JSC::JIT::compileOpCall):
2660         * jit/JITCall32_64.cpp:
2661         (JSC::JIT::compileOpCallInitializeCallFrame):
2662         (JSC::JIT::compileOpCallVarargs):
2663         (JSC::JIT::compileOpCall):
2664         (JSC::JIT::compileOpCallSlowCase):
2665         * jit/JITInlineMethods.h:
2666         (JSC::JIT::emitPutToCallFrameHeader):
2667         * jit/JITOpcodes.cpp:
2668         (JSC::JIT::privateCompileCTINativeCall):
2669         (JSC::JIT::emit_op_get_pnames):
2670         (JSC::JIT::emit_op_next_pname):
2671         (JSC::JIT::emit_op_load_varargs):
2672         (JSC::JIT::emitSlow_op_load_varargs):
2673         * jit/JITOpcodes32_64.cpp:
2674         (JSC::JIT::privateCompileCTINativeCall):
2675         (JSC::JIT::emit_op_get_pnames):
2676         (JSC::JIT::emit_op_next_pname):
2677         * jit/JSInterfaceJIT.h:
2678         (JSC::JSInterfaceJIT::payloadFor):
2679         * jit/SpecializedThunkJIT.h:
2680         (JSC::SpecializedThunkJIT::returnJSValue):
2681         (JSC::SpecializedThunkJIT::returnDouble):
2682         (JSC::SpecializedThunkJIT::returnInt32):
2683         (JSC::SpecializedThunkJIT::returnJSCell):
2684         * runtime/ArgList.cpp:
2685         * runtime/DateConversion.cpp:
2686         * runtime/GCActivityCallbackCF.cpp:
2687         * runtime/Identifier.cpp:
2688         * runtime/JSActivation.h:
2689         (JSC::asActivation):
2690         * runtime/JSLock.cpp:
2691         * runtime/JSNumberCell.cpp:
2692         * runtime/JSObject.h:
2693         * runtime/JSPropertyNameIterator.h:
2694         * runtime/JSValue.h:
2695         * runtime/JSZombie.cpp:
2696         * runtime/MarkedBlock.cpp:
2697         * runtime/MarkedSpace.cpp:
2698         * runtime/PropertyNameArray.cpp:
2699         * runtime/ScopeChain.h:
2700         (JSC::ExecState::globalThisValue):
2701         * wtf/DateMath.cpp:
2702
2703 2011-03-11  Oliver Hunt  <oliver@apple.com>
2704
2705         Reviewed by Gavin Barraclough.
2706
2707         Ensure all values are correctly tagged in the registerfile
2708         https://bugs.webkit.org/show_bug.cgi?id=56214
2709
2710         This patch makes sure that all JSCell pointers written to
2711         the registerfile are correctly tagged as JSCells, and replaces
2712         raw int usage with the immediate representation.
2713
2714         For performance, register pressure, and general saneness reasons
2715         I've added abstractions for reading and writing the tag
2716         and payload of integer registers directly for the JSVALUE64
2717         encoding.
2718
2719         * interpreter/Register.h:
2720         (JSC::Register::withInt):
2721         (JSC::Register::withCallee):
2722         (JSC::Register::operator=):
2723         (JSC::Register::i):
2724         (JSC::Register::activation):
2725         (JSC::Register::function):
2726         (JSC::Register::propertyNameIterator):
2727         (JSC::Register::scopeChain):
2728         * jit/JIT.h:
2729         * jit/JITCall.cpp:
2730         (JSC::JIT::compileOpCallInitializeCallFrame):
2731         (JSC::JIT::compileOpCallVarargs):
2732         (JSC::JIT::compileOpCall):
2733         * jit/JITCall32_64.cpp:
2734         (JSC::JIT::compileOpCallInitializeCallFrame):
2735         (JSC::JIT::compileOpCallVarargs):
2736         (JSC::JIT::compileOpCall):
2737         (JSC::JIT::compileOpCallSlowCase):
2738         * jit/JITInlineMethods.h:
2739         (JSC::JIT::emitPutToCallFrameHeader):
2740         (JSC::JIT::emitPutCellToCallFrameHeader):
2741         (JSC::JIT::emitPutIntToCallFrameHeader):
2742         * jit/JITOpcodes.cpp:
2743         (JSC::JIT::privateCompileCTINativeCall):
2744         (JSC::JIT::emit_op_get_pnames):
2745         (JSC::JIT::emit_op_next_pname):
2746         (JSC::JIT::emit_op_load_varargs):
2747         (JSC::JIT::emitSlow_op_load_varargs):
2748         * jit/JITOpcodes32_64.cpp:
2749         (JSC::JIT::privateCompileCTINativeCall):
2750         (JSC::JIT::emit_op_get_pnames):
2751         (JSC::JIT::emit_op_next_pname):
2752         * jit/JSInterfaceJIT.h:
2753         (JSC::JSInterfaceJIT::intPayloadFor):
2754         (JSC::JSInterfaceJIT::intTagFor):
2755         * jit/SpecializedThunkJIT.h:
2756         (JSC::SpecializedThunkJIT::returnJSValue):
2757         (JSC::SpecializedThunkJIT::returnDouble):
2758         (JSC::SpecializedThunkJIT::returnInt32):
2759         (JSC::SpecializedThunkJIT::returnJSCell):
2760
2761 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
2762
2763         Reviewed by Eric Seidel.
2764
2765         Introduce project_dir variable and make paths a whole lot saner. Ok, a little bit saner.
2766         https://bugs.webkit.org/show_bug.cgi?id=56231
2767
2768         * JavaScriptCore.gypi: Added project_dir variable.
2769         * gyp/JavaScriptCore.gyp: Changed to use project_dir, rather than DEPTH/JavaScriptCore.
2770         * gyp/generate-dtrace-header.sh: Changed to use project_dir.
2771
2772 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
2773
2774         Reviewed by Adam Barth.
2775
2776         Start using derived sources correctly and link minidom with JavaScriptCore gyp project.
2777         https://bugs.webkit.org/show_bug.cgi?id=56217
2778
2779         * gyp/JavaScriptCore.gyp: Added derived source files and passing of shared directory
2780             to the scripts.
2781         * gyp/generate-derived-sources.sh: Changed to use passed directory.
2782         * gyp/generate-dtrace-header.sh: Ditto.
2783
2784 2011-03-11  Eric Carlson  <eric.carlson@apple.com>
2785
2786         Reviewed by Sam Weinig.
2787
2788         <rdar://problem/8955589> Adopt AVFoundation media back end on Lion.
2789
2790         No new tests, existing media tests cover this.
2791
2792         * JavaScriptCore.exp: Export cancelCallOnMainThread
2793         * wtf/Platform.h: Define WTF_USE_AVFOUNDATION.
2794
2795 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
2796
2797         Reviewed by Adam Barth.
2798
2799         Tweak dylib paths and add dtrace header generation action to JavaScriptCore gyp project.
2800         https://bugs.webkit.org/show_bug.cgi?id=56207
2801
2802         * JavaScriptCore.gypi: Added Tracing.d to the sources.
2803         * gyp/generate-dtrace-header.sh: Added.
2804         * gyp/JavaScriptCore.gyp: Updated dylib paths (now the project can see them),
2805             and added DTrace header generating step.
2806
2807 2011-03-10  Oliver Hunt  <oliver@apple.com>
2808
2809         Reviewed by Gavin Barraclough.
2810
2811         Fix allocation of native function with a cached thunk
2812         https://bugs.webkit.org/show_bug.cgi?id=56127
2813
2814         Fix this race condition found while fixing zombies.
2815
2816         * collector/handles/HandleHeap.cpp:
2817         (JSC::HandleHeap::clearWeakPointers):
2818         * runtime/Heap.cpp:
2819         (JSC::Heap::reset):
2820         * runtime/JSFunction.cpp:
2821         (JSC::JSFunction::JSFunction):
2822         (JSC::JSFunction::markChildren):
2823         * runtime/JSValue.h:
2824         (JSC::JSValue::decode):
2825         * runtime/JSZombie.cpp:
2826         (JSC::JSZombie::leakedZombieStructure):
2827         * runtime/JSZombie.h:
2828         (JSC::JSZombie::createStructure):
2829         * runtime/MarkedBlock.cpp:
2830
2831 2011-03-10  Luiz Agostini  <luiz.agostini@openbossa.org>
2832
2833         Reviewed by Andreas Kling.
2834
2835         [Qt] fast/workers/stress-js-execution.html is crashing on Qt bot (intermittently)
2836         https://bugs.webkit.org/show_bug.cgi?id=33008
2837
2838         Defining WTF_USE_PTHREAD_BASED_QT=1 for platforms where QThread uses pthread internally.
2839         Symbian is excluded because pthread_kill does not work on it. Mac is excluded because
2840         it has its own ways to do JSC threading.
2841
2842         Defining WTF_USE_PTHREADS inside MachineStackMarker.cpp if USE(PTHREAD_BASED_QT) is true.
2843
2844         * runtime/MachineStackMarker.cpp:
2845         * wtf/Platform.h:
2846
2847 2011-03-10  Gavin Barraclough  <barraclough@apple.com>
2848
2849         Reviewed by Oliver Hunt.
2850
2851         Bug 56077 - ES5 conformance issues with RegExp.prototype
2852
2853         There are three issues causing test failures in sputnik.
2854
2855         (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden).
2856         (2) The 'length' property of the test/exec functions should be 1.
2857         (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input.
2858
2859         * runtime/RegExpObject.cpp:
2860         (JSC::RegExpObject::markChildren):
2861             - Added to mark lastIndex
2862         (JSC::regExpObjectLastIndex):
2863         (JSC::setRegExpObjectLastIndex):
2864             - lastIndex is now stored as a JSValue.
2865         (JSC::RegExpObject::match):
2866             - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double).
2867         * runtime/RegExpObject.h:
2868         (JSC::RegExpObject::setLastIndex):
2869         (JSC::RegExpObject::setLastIndex):
2870             - Set lastIndex, either from a size_t or a JSValue.
2871         (JSC::RegExpObject::getLastIndex):
2872             - Get lastIndex.
2873         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
2874             - Initialize as a JSValue.
2875         * runtime/RegExpPrototype.cpp:
2876         (JSC::RegExpPrototype::RegExpPrototype):
2877             - Add test/exec properties with length 1.
2878         * runtime/StringPrototype.cpp:
2879         (JSC::stringProtoFuncMatch):
2880         (JSC::stringProtoFuncSearch):
2881             - Do not read RegExp.input if none is provided.
2882         * tests/mozilla/js1_2/regexp/RegExp_input.js:
2883         * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js:
2884             - Update these tests (they relied on non-ES5 behaviour).
2885
2886 2011-03-10  Geoffrey Garen  <ggaren@apple.com>
2887
2888         Reviewed by Oliver Hunt.
2889
2890         Rolled back in 80277 and 80280 with event handler layout test failures fixed.
2891         https://bugs.webkit.org/show_bug.cgi?id=55653        
2892
2893         The failures were caused by a last minute typo: assigning to currentEvent
2894         instead of m_currentEvent.
2895
2896         * JavaScriptCore.exp:
2897         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2898         * JavaScriptCore.xcodeproj/project.pbxproj:
2899         * bytecompiler/BytecodeGenerator.cpp:
2900         * jit/JITOpcodes.cpp:
2901         * jit/JITOpcodes32_64.cpp:
2902         * runtime/Arguments.h:
2903         * runtime/JSActivation.cpp:
2904         * runtime/JSActivation.h:
2905         * runtime/JSCell.h:
2906         * runtime/JSGlobalObject.cpp:
2907         * runtime/JSGlobalObject.h:
2908         * runtime/JSObject.cpp:
2909         * runtime/JSStaticScopeObject.cpp:
2910         * runtime/JSStaticScopeObject.h:
2911         * runtime/JSVariableObject.h:
2912         * runtime/MarkedSpace.cpp:
2913         * runtime/MarkedSpace.h:
2914
2915 2011-03-09  Oliver Hunt  <oliver@apple.com>
2916
2917         Reviewed by Gavin Barraclough.
2918
2919         jquery/manipulation.html fails after r80598
2920         https://bugs.webkit.org/show_bug.cgi?id=56019
2921
2922         When linking a call, codeblock now takes ownership of the linked function
2923         This removes the need for unlinking, and thus the incorrectness that was
2924         showing up in these tests.
2925
2926         * bytecode/CodeBlock.cpp:
2927         (JSC::CodeBlock::~CodeBlock):
2928         (JSC::CodeBlock::markAggregate):
2929         * bytecode/CodeBlock.h:
2930         (JSC::CallLinkInfo::CallLinkInfo):
2931         (JSC::CallLinkInfo::setUnlinked):
2932         (JSC::CodeBlock::addCaller):
2933         * jit/JIT.cpp:
2934         (JSC::JIT::privateCompile):
2935         (JSC::JIT::linkCall):
2936         (JSC::JIT::linkConstruct):
2937         * jit/JIT.h:
2938         * runtime/Executable.cpp:
2939         * runtime/Executable.h:
2940
2941 2011-03-09  Daniel Bates  <dbates@rim.com>
2942
2943         Attempt to fix the WinCE build after changeset 80684 <http://trac.webkit.org/changeset/80684>
2944         (Bug #56041<https://bugs.webkit.org/show_bug.cgi?id=56041>).
2945
2946         * interpreter/Interpreter.cpp:
2947         (JSC::Interpreter::privateExecute): Substitute variable callFrame for exec in call to createSyntaxError().
2948
2949 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
2950
2951         Reviewed by Sam Weinig.
2952
2953         Bug 56041 - RexExp constructor should only accept flags "gim"
2954         Fix for issues introduced in r80667.
2955
2956         Invalid flags to a RegExp literal are a late syntax error!
2957
2958         * bytecode/CodeBlock.h:
2959         (JSC::CodeBlock::addRegExp):
2960             - Pass a PassRefPtr<RegExp>
2961         * bytecompiler/BytecodeGenerator.cpp:
2962         (JSC::BytecodeGenerator::addRegExp):
2963         (JSC::BytecodeGenerator::emitNewRegExp):
2964         * bytecompiler/BytecodeGenerator.h:
2965             - Pass a PassRefPtr<RegExp>
2966         * bytecompiler/NodesCodegen.cpp:
2967         (JSC::RegExpNode::emitBytecode):
2968             - Should not be ASSERTing that the flags are valid - this is a late(er) error.
2969         * interpreter/Interpreter.cpp:
2970         (JSC::Interpreter::privateExecute):
2971             - Need to check for error from RegExp constructor.
2972         * jit/JITStubs.cpp:
2973         (JSC::DEFINE_STUB_FUNCTION):
2974             - Need to check for error from RegExp constructor.
2975         * runtime/RegExp.h:
2976         (JSC::RegExp::isValid):
2977             - Make isValid check that the regexp was created with valid flags.
2978         * runtime/RegExpKey.h:
2979             - Since we'll not create RegExp objects with invalid flags, separate out the deleted value.
2980
2981 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
2982
2983         Windows build fix part 2.
2984
2985         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2986
2987 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
2988
2989         Windows build fix part 1.
2990
2991         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2992
2993 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
2994
2995         Reviewed by Darin Adler.
2996
2997         Bug 56041 - RexExp constructor should only accept flags "gim"
2998         We also should be passing the flags around as a bitfield rather than a string,
2999         and should not have redundant, incompatible code for converting the string to a bitfield!
3000
3001         * JavaScriptCore.exp:
3002         * bytecompiler/NodesCodegen.cpp:
3003         (JSC::RegExpNode::emitBytecode):
3004             - Need to parse flags string to enum.
3005         * runtime/RegExp.cpp:
3006         (JSC::regExpFlags):
3007         (JSC::RegExp::RegExp):
3008         (JSC::RegExp::create):
3009             - Add method to parse flags string to enum, change constructor/create args to take enum.
3010         * runtime/RegExp.h:
3011         (JSC::RegExp::global):
3012         (JSC::RegExp::ignoreCase):
3013         (JSC::RegExp::multiline):
3014             - Change to use new enum values.
3015         * runtime/RegExpCache.cpp:
3016         (JSC::RegExpCache::lookupOrCreate):
3017         (JSC::RegExpCache::create):
3018         * runtime/RegExpCache.h:
3019             - Changed to use regExpFlags enum instead of int/const UString&.
3020         * runtime/RegExpConstructor.cpp:
3021         (JSC::constructRegExp):
3022             - Add use new enum parsing, check for error.
3023         * runtime/RegExpKey.h:
3024         (JSC::RegExpKey::RegExpKey):
3025         * runtime/RegExpPrototype.cpp:
3026         (JSC::RegExpPrototype::RegExpPrototype):
3027             - Pass NoFlags value instead of empty string.
3028         (JSC::regExpProtoFuncCompile):
3029             - Add use new enum parsing, check for error.
3030         * runtime/StringPrototype.cpp:
3031         (JSC::stringProtoFuncMatch):
3032         (JSC::stringProtoFuncSearch):
3033             - Pass NoFlags value instead of empty string.
3034
3035 2011-03-08  Gavin Barraclough  <barraclough@apple.com>
3036
3037         Reviewed by Sam Weinig
3038
3039         Bug 55994 - Functions on Array.prototype should check length first.
3040         These methods are designed to work on generic objects too, and if 'length'
3041         is a getter that throws an exception, ensure this is correctly thrown
3042         (even if other exceptions would be thrown, too).
3043
3044         Make the length check the first thing we do.
3045         This change shows a progression on SunSpider on my machine, but this is likely bogus.
3046
3047         * runtime/ArrayPrototype.cpp:
3048         (JSC::arrayProtoFuncToString):
3049         (JSC::arrayProtoFuncToLocaleString):
3050         (JSC::arrayProtoFuncJoin):
3051         (JSC::arrayProtoFuncPop):
3052         (JSC::arrayProtoFuncPush):
3053         (JSC::arrayProtoFuncReverse):
3054         (JSC::arrayProtoFuncShift):
3055         (JSC::arrayProtoFuncSlice):
3056         (JSC::arrayProtoFuncSort):
3057         (JSC::arrayProtoFuncSplice):
3058         (JSC::arrayProtoFuncUnShift):
3059         (JSC::arrayProtoFuncFilter):
3060         (JSC::arrayProtoFuncMap):
3061         (JSC::arrayProtoFuncEvery):
3062         (JSC::arrayProtoFuncForEach):
3063         (JSC::arrayProtoFuncSome):
3064         (JSC::arrayProtoFuncReduce):
3065         (JSC::arrayProtoFuncReduceRight):
3066         (JSC::arrayProtoFuncIndexOf):
3067         (JSC::arrayProtoFuncLastIndexOf):
3068
3069 2011-03-07  Oliver Hunt  <oliver@apple.com>
3070
3071         Reviewed by Gavin Barraclough.
3072
3073         Make CodeBlock GC write barrier safe
3074         https://bugs.webkit.org/show_bug.cgi?id=55910
3075
3076         In order to make CodeBlock WriteBarrier safe it was necessary
3077         to make it have a single GC owner, and for that reason I have
3078         made ExecutableBase a GC allocated object.  This required
3079         updating their creation routines as well as all sites that hold
3080         a reference to them.  GC objects that held Executable's have been
3081         converted to WriteBarriers, and all other sites now use Global<>.
3082
3083         As an added benefit this gets rid of JSGlobalData's list of
3084         GlobalCodeBlocks.
3085
3086         Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
3087         on SunSpider.  Given none of the tests that show regressions
3088         demonstrate a regression on their own, and sampling shows up nothing.
3089         I suspect we're just getting one or two additional gc passes at
3090         the end of the run.
3091
3092         * bytecode/CodeBlock.cpp:
3093         (JSC::CodeBlock::dump):
3094         (JSC::CodeBlock::CodeBlock):
3095         (JSC::EvalCodeCache::markAggregate):
3096         (JSC::CodeBlock::markAggregate):
3097         * bytecode/CodeBlock.h:
3098         (JSC::CodeBlock::ownerExecutable):
3099         (JSC::CodeBlock::addConstant):
3100         (JSC::CodeBlock::constantRegister):
3101         (JSC::CodeBlock::getConstant):
3102         (JSC::CodeBlock::addFunctionDecl):
3103         (JSC::CodeBlock::addFunctionExpr):
3104         (JSC::GlobalCodeBlock::GlobalCodeBlock):
3105         (JSC::ExecState::r):
3106         * bytecode/EvalCodeCache.h:
3107         (JSC::EvalCodeCache::get):
3108         * bytecode/SamplingTool.h:
3109         (JSC::ScriptSampleRecord::ScriptSampleRecord):
3110         * bytecompiler/BytecodeGenerator.cpp:
3111         (JSC::BytecodeGenerator::addConstantValue):
3112         (JSC::BytecodeGenerator::emitEqualityOp):
3113         * bytecompiler/BytecodeGenerator.h:
3114         (JSC::BytecodeGenerator::makeFunction):
3115         * debugger/Debugger.cpp:
3116         (JSC::evaluateInGlobalCallFrame):
3117         * debugger/DebuggerCallFrame.cpp:
3118         (JSC::DebuggerCallFrame::evaluate):
3119         * interpreter/Interpreter.cpp:
3120         (JSC::Interpreter::callEval):
3121         * jit/JITInlineMethods.h:
3122         (JSC::JIT::emitLoadDouble):
3123         (JSC::JIT::emitLoadInt32ToDouble):
3124         * jit/JITStubs.cpp:
3125         (JSC::JITThunks::JITThunks):
3126         (JSC::JITThunks::hostFunctionStub):
3127         (JSC::JITThunks::clearHostFunctionStubs):
3128         * jit/JITStubs.h:
3129         * runtime/Completion.cpp:
3130         (JSC::checkSyntax):
3131         (JSC::evaluate):
3132         * runtime/Executable.cpp:
3133         (JSC::EvalExecutable::EvalExecutable):
3134         (JSC::ProgramExecutable::ProgramExecutable):
3135         (JSC::FunctionExecutable::FunctionExecutable):
3136         (JSC::FunctionExecutable::~FunctionExecutable):
3137         (JSC::EvalExecutable::markChildren):
3138         (JSC::ProgramExecutable::markChildren):
3139         (JSC::FunctionExecutable::markChildren):
3140         (JSC::FunctionExecutable::fromGlobalCode):
3141         * runtime/Executable.h:
3142         (JSC::ExecutableBase::ExecutableBase):
3143         (JSC::ExecutableBase::createStructure):
3144         (JSC::NativeExecutable::create):
3145         (JSC::NativeExecutable::NativeExecutable):
3146         (JSC::VPtrHackExecutable::VPtrHackExecutable):
3147         (JSC::ScriptExecutable::ScriptExecutable):
3148         (JSC::EvalExecutable::create):
3149         (JSC::EvalExecutable::createStructure):
3150         (JSC::ProgramExecutable::create):
3151         (JSC::ProgramExecutable::createStructure):
3152         (JSC::FunctionExecutable::create):
3153         (JSC::FunctionExecutable::createStructure):
3154         * runtime/FunctionConstructor.cpp:
3155         (JSC::constructFunction):
3156         * runtime/Heap.cpp:
3157         (JSC::Heap::destroy):
3158         (JSC::Heap::markRoots):
3159         * runtime/Heap.h:
3160         * runtime/JSActivation.cpp:
3161         (JSC::JSActivation::JSActivation):
3162         (JSC::JSActivation::markChildren):
3163         * runtime/JSActivation.h:
3164         (JSC::JSActivation::JSActivationData::JSActivationData):
3165         * runtime/JSCell.h:
3166         * runtime/JSFunction.cpp:
3167         (JSC::JSFunction::JSFunction):
3168         (JSC::JSFunction::~JSFunction):
3169         (JSC::JSFunction::markChildren):
3170         * runtime/JSFunction.h:
3171         * runtime/JSGlobalData.cpp:
3172         (JSC::JSGlobalData::storeVPtrs):
3173         (JSC::JSGlobalData::JSGlobalData):
3174         (JSC::JSGlobalData::getHostFunction):
3175         * runtime/JSGlobalData.h:
3176         * runtime/JSGlobalObjectFunctions.cpp:
3177         (JSC::globalFuncEval):
3178         * runtime/JSObject.cpp:
3179         * runtime/JSStaticScopeObject.cpp:
3180         (JSC::JSStaticScopeObject::markChildren):
3181         * runtime/JSStaticScopeObject.h:
3182         (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
3183         (JSC::JSStaticScopeObject::JSStaticScopeObject):
3184         * runtime/JSZombie.cpp:
3185         (JSC::JSZombie::leakedZombieStructure):
3186         * runtime/JSZombie.h:
3187         (JSC::JSZombie::createStructure):
3188         * runtime/MarkedSpace.h:
3189
3190 2011-03-07  Andy Estes  <aestes@apple.com>
3191
3192         Reviewed by Dan Bernstein.
3193
3194         REGRESSION (r79060): Timestamp is missing from tweets in twitter.
3195         https://bugs.webkit.org/show_bug.cgi?id=55228
3196
3197         A change to the date parser to handle the case where the year is
3198         specified before the time zone inadvertently started accepting strings
3199         such as '+0000' as valid years. Those strings actually represent time
3200         zones in an offset of hours and minutes from UTC, not years.
3201
3202         * wtf/DateMath.cpp:
3203         (WTF::parseDateFromNullTerminatedCharacters): If the current character
3204         in dateString is '+' or '-', do not try to parse the next token as a
3205         year.
3206
3207 2011-03-06  Yuta Kitamura  <yutak@chromium.org>
3208
3209         Reviewed by Kent Tamura.
3210
3211         Add SHA-1 for new WebSocket protocol
3212         https://bugs.webkit.org/show_bug.cgi?id=55039
3213
3214         The code is based on Chromium's portable SHA-1 implementation
3215         (src/base/sha1_portable.cc). Modifications were made in order
3216         to make the code comply with WebKit coding style.
3217
3218         * GNUmakefile.am:
3219         * JavaScriptCore.exp:
3220         * JavaScriptCore.gypi:
3221         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3222         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3223         * JavaScriptCore.xcodeproj/project.pbxproj:
3224         * wtf/CMakeLists.txt:
3225         * wtf/MD5.cpp:
3226         (WTF::MD5::MD5):
3227         * wtf/SHA1.cpp: Added.
3228         (WTF::testSHA1): This function will be run the first time SHA1
3229         constructor is called. This function computes a few hash values
3230         and checks the results in debug builds. However, constructor is
3231         probably not a good place to run these tests, so we need to find
3232         a good place for it (bug 55853).
3233         (WTF::expectSHA1):
3234         (WTF::f):
3235         (WTF::k):
3236         (WTF::rotateLeft):
3237         (WTF::SHA1::SHA1):
3238         (WTF::SHA1::addBytes):
3239         (WTF::SHA1::computeHash):
3240         (WTF::SHA1::finalize):
3241         (WTF::SHA1::processBlock):
3242         (WTF::SHA1::reset):
3243         * wtf/SHA1.h: Added.
3244         (WTF::SHA1::addBytes):
3245         * wtf/wtf.pri:
3246
3247 2011-03-05  Adam Barth  <abarth@webkit.org>
3248
3249         Reviewed by Dimitri Glazkov.
3250
3251         Add Derived Sources to WebCore GYP build
3252         https://bugs.webkit.org/show_bug.cgi?id=55813
3253
3254         Rename the action to be friendlier.
3255
3256         * gyp/JavaScriptCore.gyp:
3257
3258 2011-03-04  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
3259
3260         Reviewed by Laszlo Gombos.
3261
3262         [Qt] Need symbian version of cryptographicallyRandomValuesFromOS
3263         https://bugs.webkit.org/show_bug.cgi?id=55782
3264
3265         Implement Symbian version of cryptographicallyRandomValuesFromOS
3266
3267         * wtf/OSRandomSource.cpp:
3268         (WTF::cryptographicallyRandomValuesFromOS):
3269
3270 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
3271
3272         Reviewed by Cameron Zwarich.
3273
3274         Bug 55815 - Should throw an exception from JSObject::defineOwnProperty if !isExtensible().
3275
3276         * runtime/JSObject.cpp:
3277         (JSC::JSObject::defineOwnProperty):
3278             Add missing check.
3279
3280 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
3281
3282         Rubber stamped by olliej.
3283
3284         Bug 54945 - The web page hangs towards the end of page load in Interpreter enabled javascript code in the latest webkit trunk.
3285
3286         * interpreter/Interpreter.cpp:
3287         (JSC::Interpreter::privateExecute):
3288             (1) don't infinite loop.
3289             (2) goto 1.
3290
3291 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
3292
3293         cmake build fix.
3294
3295         * CMakeLists.txt:
3296
3297 2011-03-04  Adam Barth  <abarth@webkit.org>
3298
3299         Reviewed by Dimitri Glazkov.
3300
3301         Add Copy Files step to JavaScriptCore GYP build for apitest and minidom
3302         https://bugs.webkit.org/show_bug.cgi?id=55798
3303
3304         * JavaScriptCore.gypi:
3305         * gyp/JavaScriptCore.gyp:
3306
3307 2011-03-04  Adam Barth  <abarth@webkit.org>
3308
3309         Reviewed by Dimitri Glazkov.
3310
3311         Remove unneeded round-trips through ../Source in the Chromium GYP build
3312         https://bugs.webkit.org/show_bug.cgi?id=55795
3313
3314         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3315
3316 2011-03-04  Adam Barth  <abarth@webkit.org>
3317
3318         Reviewed by Dimitri Glazkov.
3319
3320         Use target_defaults to reduce boilerplate in GYP build system
3321         https://bugs.webkit.org/show_bug.cgi?id=55790
3322
3323         Instead of setting up the configuration in each target, just defer to
3324         target_defaults.  Also, removed a define that was redundant with the
3325         xcconfig.
3326
3327         * gyp/JavaScriptCore.gyp:
3328
3329 2011-03-03  Gavin Barraclough  <barraclough@apple.com>
3330
3331         Reviewed by Sam Weinig.
3332
3333         Bug 55736 - Implement seal/freeze/preventExtensions for normal object types.
3334         Provide basic functionallity from section 15.2.4 of ECMA-262.
3335         This support will need expanding to cover arrays, too.
3336
3337         Shows a 0.5% progression on SunSpidey, this seems to be due to changing
3338         ObjectConstructor to use a static table.
3339
3340         * DerivedSources.make:
3341         * JavaScriptCore.exp:
3342         * interpreter/CallFrame.h:
3343         (JSC::ExecState::objectConstructorTable):
3344             Add a static table for ObjectConstructor.
3345         * runtime/CommonIdentifiers.h:
3346         * runtime/JSGlobalData.cpp:
3347         (JSC::JSGlobalData::JSGlobalData):
3348         (JSC::JSGlobalData::~JSGlobalData):
3349             Add a static table for ObjectConstructor.
3350         * runtime/JSGlobalData.h:
3351         * runtime/JSGlobalObject.cpp:
3352         (JSC::JSGlobalObject::reset):
3353             Add a static table for ObjectConstructor.
3354         * runtime/JSObject.cpp:
3355         (JSC::JSObject::seal):
3356         (JSC::JSObject::freeze):
3357         (JSC::JSObject::preventExtensions):
3358             Transition the object's structure.
3359         (JSC::JSObject::defineOwnProperty):
3360             Check isExtensible.
3361         * runtime/JSObject.h:
3362         (JSC::JSObject::isSealed):
3363         (JSC::JSObject::isFrozen):
3364         (JSC::JSObject::isExtensible):
3365             These wrap method on structure.
3366         (JSC::JSObject::putDirectInternal):
3367             Check isExtensible.
3368         * runtime/ObjectConstructor.cpp:
3369         (JSC::ObjectConstructor::ObjectConstructor):
3370         (JSC::ObjectConstructor::getOwnPropertySlot):
3371         (JSC::ObjectConstructor::getOwnPropertyDescriptor):
3372             Change ObjectConstructor to use a static table.
3373         (JSC::objectConstructorSeal):
3374         (JSC::objectConstructorFreeze):
3375         (JSC::objectConstructorPreventExtensions):
3376         (JSC::objectConstructorIsSealed):
3377         (JSC::objectConstructorIsFrozen):
3378         (JSC::objectConstructorIsExtensible):
3379             Add new methods on Object.
3380         * runtime/ObjectConstructor.h:
3381         (JSC::ObjectConstructor::createStructure):
3382         * runtime/Structure.cpp:
3383         (JSC::Structure::Structure):
3384             init/propagate  m_preventExtensions
3385         (JSC::Structure::sealTransition):
3386         (JSC::Structure::freezeTransition):
3387         (JSC::Structure::preventExtensionsTransition):
3388             transition the structure, materializing the property map, setting m_preventExtensions & changing attributes.
3389         (JSC::Structure::isSealed):
3390         (JSC::Structure::isFrozen):
3391             check attributes to detect if object is sealed/frozen.
3392         * runtime/Structure.h:
3393         (JSC::Structure::isExtensible):
3394             checks the m_preventExtensions flag.
3395
3396 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
3397
3398         Reviewed by Jon Honeycutt.
3399
3400         Adopt VersionStamper tool for Windows WebKit DLLs
3401         https://bugs.webkit.org/show_bug.cgi?id=55784
3402         <rdar://problem/9021273>
3403         
3404         We now use a tool to stamp the version number onto the Apple WebKit DLLs
3405         during the post-build step.
3406
3407         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Removed.
3408         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3409         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
3410         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
3411
3412 2011-03-04  Adam Barth  <abarth@webkit.org>
3413
3414         Reviewed by Dimitri Glazkov.
3415
3416         JavaScriptCore GYP build should use a header map
3417         https://bugs.webkit.org/show_bug.cgi?id=55712
3418
3419         This patch moves the os-win32 files into their own variable so that we
3420         can use a header map in the Apple Mac Xcode build.  The problem is that
3421         the header map searches the whole project rather than just the files
3422         included in a given target.  Another solution to this problem is to
3423         make GYP smarter about filtering out what files are added to the
3424         project file.
3425
3426         * JavaScriptCore.gypi:
3427         * gyp/JavaScriptCore.gyp:
3428
3429 2011-03-03  Ryosuke Niwa  <rniwa@webkit.org>
3430
3431         Reviewed by Darin Adler.
3432
3433         Remove LOOSE_PASS_OWN_ARRAY_PTR from PassOwnArrayPtr.h
3434         https://bugs.webkit.org/show_bug.cgi?id=55554
3435
3436         * runtime/JSGlobalObject.cpp:
3437         (JSC::JSGlobalObject::copyGlobalsTo): Pass nullptr instead of 0.
3438         (JSC::JSGlobalObject::resizeRegisters): Ditto; also use OwnArrayPtr instead of a raw pointer.
3439         * runtime/JSGlobalObject.h:
3440         (JSC::JSGlobalObject::addStaticGlobals): Ditto.
3441         * wtf/PassOwnArrayPtr.h: Removed #define LOOSE_PASS_OWN_ARRAY_PTR
3442         (WTF::PassOwnArrayPtr::PassOwnArrayPtr): Added a constructor that takes nullptr_t.
3443
3444 2011-03-03  Adam Barth  <abarth@webkit.org>
3445
3446         Reviewed by Dimitri Glazkov.
3447
3448         Add jsc to JavaScriptCore GYP build
3449         https://bugs.webkit.org/show_bug.cgi?id=55711
3450
3451         * JavaScriptCore.gypi:
3452             - Move jsc.cpp into jsc_files because it's really part of the jsc
3453               target.
3454         * JavaScriptCore.xcodeproj/project.pbxproj:
3455             - Remove extraneous files from the normal jsc build.  I probably
3456               added these by mistake at some point.
3457         * gyp/JavaScriptCore.gyp:
3458             - Add the jsc target to the GYP file.
3459
3460 2011-03-03  Adam Barth  <abarth@webkit.org>
3461
3462         Reviewed by Dimitri Glazkov.
3463
3464         Add testapi to JavaScriptCore GYP build
3465         https://bugs.webkit.org/show_bug.cgi?id=55707
3466
3467         The new testapi target is slightly incomplete.  There's a resource
3468         copying step that we don't quite have yet.
3469
3470         This patch also cleans up some of the configuration issues in
3471         JavaScriptCore.xcodeproj.  It seems kind of wordy to repeat these for
3472         each target.  I suspect there's a more compact way of defining the
3473         configurations, but this removes the "Default" configuration, which is
3474         progress.
3475
3476         * JavaScriptCore.gypi:
3477         * gyp/JavaScriptCore.gyp:
3478
3479 2011-03-03  Adam Barth  <abarth@webkit.org>
3480
3481         Reviewed by Eric Seidel.
3482
3483         Teach JavaScriptCore GYP build about private headers
3484         https://bugs.webkit.org/show_bug.cgi?id=55532
3485
3486         This patch distinguishes between public and private framework headers
3487         so that public headers are copied into the Headers directory and
3488         private headers are copied into the PrivateHeaders directory.
3489
3490         * gyp/JavaScriptCore.gyp:
3491
3492 2011-03-03  Geoffrey Garen  <ggaren@apple.com>
3493
3494         Rolled out 80277 and 80280 because they caused event handler layout test
3495         failures.