4d1d28898cd3f365750051ef5b593f21f8818206
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
2
3         Reviewed by Darin Adler.
4
5         Allow custom memory allocation control for JavaScriptCore's MatchFrame struct
6         https://bugs.webkit.org/show_bug.cgi?id=27344
7
8         Inherits MatchFrame struct from FastAllocBase because it has
9         been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359.
10
11         * pcre/pcre_exec.cpp:
12
13 2009-07-20  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
14
15         Reviewed by Holger Freyther.
16
17         Remove some outdated S60 platform specific code
18         https://bugs.webkit.org/show_bug.cgi?id=27423
19
20         * wtf/Platform.h:
21
22 2009-07-20  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
23
24         Reviewed by Simon Hausmann.
25
26         Qt build fix with MSVC and MinGW.
27
28         * jsc.pro: Make sure jsc is a console application, and turn off
29         exceptions and stl support to fix the build.
30
31 2009-07-20  Xan Lopez  <xlopez@igalia.com>
32
33         Reviewed by Gustavo Noronha.
34
35         Do not use C++-style comments in preprocessor directives.
36
37         GCC does not like this in some configurations, using C-style
38         comments is safer.
39
40         * wtf/Platform.h:
41
42 2009-07-17  Peter Kasting  <pkasting@google.com>
43
44         Reviewed by Steve Falkenburg.
45
46         https://bugs.webkit.org/show_bug.cgi?id=27323
47         Only add Cygwin to the path when it isn't already there.  This avoids
48         causing problems for people who purposefully have non-Cygwin versions of
49         executables like svn in front of the Cygwin ones in their paths.
50
51         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
52         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
53         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
54         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
55         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
56
57 2009-07-17  Gabor Loki  <loki@inf.u-szeged.hu>
58
59         Reviewed by Gavin Barraclough.
60
61         Add YARR support for generic ARM platforms (disabled by default).
62         https://bugs.webkit.org/show_bug.cgi?id=24986
63
64         Add generic ARM port for MacroAssembler. It supports the whole
65         MacroAssembler functionality except floating point.
66
67         The class JmpSrc is extended with a flag which enables to patch
68         the jump destination offset during execution. This feature is
69         required for generic ARM port.
70
71         Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
72         Signed off by Gabor Loki <loki@inf.u-szeged.hu>
73
74         * JavaScriptCore.pri:
75         * assembler/ARMAssembler.cpp: Added.
76         (JSC::ARMAssembler::getLdrImmAddress):
77         (JSC::ARMAssembler::linkBranch):
78         (JSC::ARMAssembler::patchConstantPoolLoad):
79         (JSC::ARMAssembler::getOp2):
80         (JSC::ARMAssembler::genInt):
81         (JSC::ARMAssembler::getImm):
82         (JSC::ARMAssembler::moveImm):
83         (JSC::ARMAssembler::dataTransfer32):
84         (JSC::ARMAssembler::baseIndexTransfer32):
85         (JSC::ARMAssembler::executableCopy):
86         * assembler/ARMAssembler.h: Added.
87         (JSC::ARM::):
88         (JSC::ARMAssembler::ARMAssembler):
89         (JSC::ARMAssembler::):
90         (JSC::ARMAssembler::JmpSrc::JmpSrc):
91         (JSC::ARMAssembler::JmpSrc::enableLatePatch):
92         (JSC::ARMAssembler::JmpDst::JmpDst):
93         (JSC::ARMAssembler::JmpDst::isUsed):
94         (JSC::ARMAssembler::JmpDst::used):
95         (JSC::ARMAssembler::emitInst):
96         (JSC::ARMAssembler::and_r):
97         (JSC::ARMAssembler::ands_r):
98         (JSC::ARMAssembler::eor_r):
99         (JSC::ARMAssembler::eors_r):
100         (JSC::ARMAssembler::sub_r):
101         (JSC::ARMAssembler::subs_r):
102         (JSC::ARMAssembler::rsb_r):
103         (JSC::ARMAssembler::rsbs_r):
104         (JSC::ARMAssembler::add_r):
105         (JSC::ARMAssembler::adds_r):
106         (JSC::ARMAssembler::adc_r):
107         (JSC::ARMAssembler::adcs_r):
108         (JSC::ARMAssembler::sbc_r):
109         (JSC::ARMAssembler::sbcs_r):
110         (JSC::ARMAssembler::rsc_r):
111         (JSC::ARMAssembler::rscs_r):
112         (JSC::ARMAssembler::tst_r):
113         (JSC::ARMAssembler::teq_r):
114         (JSC::ARMAssembler::cmp_r):
115         (JSC::ARMAssembler::orr_r):
116         (JSC::ARMAssembler::orrs_r):
117         (JSC::ARMAssembler::mov_r):
118         (JSC::ARMAssembler::movs_r):
119         (JSC::ARMAssembler::bic_r):
120         (JSC::ARMAssembler::bics_r):
121         (JSC::ARMAssembler::mvn_r):
122         (JSC::ARMAssembler::mvns_r):
123         (JSC::ARMAssembler::mul_r):
124         (JSC::ARMAssembler::muls_r):
125         (JSC::ARMAssembler::mull_r):
126         (JSC::ARMAssembler::ldr_imm):
127         (JSC::ARMAssembler::ldr_un_imm):
128         (JSC::ARMAssembler::dtr_u):
129         (JSC::ARMAssembler::dtr_ur):
130         (JSC::ARMAssembler::dtr_d):
131         (JSC::ARMAssembler::dtr_dr):
132         (JSC::ARMAssembler::ldrh_r):
133         (JSC::ARMAssembler::ldrh_d):
134         (JSC::ARMAssembler::ldrh_u):
135         (JSC::ARMAssembler::strh_r):
136         (JSC::ARMAssembler::push_r):
137         (JSC::ARMAssembler::pop_r):
138         (JSC::ARMAssembler::poke_r):
139         (JSC::ARMAssembler::peek_r):
140         (JSC::ARMAssembler::clz_r):
141         (JSC::ARMAssembler::bkpt):
142         (JSC::ARMAssembler::lsl):
143         (JSC::ARMAssembler::lsr):
144         (JSC::ARMAssembler::asr):
145         (JSC::ARMAssembler::lsl_r):
146         (JSC::ARMAssembler::lsr_r):
147         (JSC::ARMAssembler::asr_r):
148         (JSC::ARMAssembler::size):
149         (JSC::ARMAssembler::ensureSpace):
150         (JSC::ARMAssembler::label):
151         (JSC::ARMAssembler::align):
152         (JSC::ARMAssembler::jmp):
153         (JSC::ARMAssembler::patchPointerInternal):
154         (JSC::ARMAssembler::patchConstantPoolLoad):
155         (JSC::ARMAssembler::patchPointer):
156         (JSC::ARMAssembler::repatchInt32):
157         (JSC::ARMAssembler::repatchPointer):
158         (JSC::ARMAssembler::repatchLoadPtrToLEA):
159         (JSC::ARMAssembler::linkJump):
160         (JSC::ARMAssembler::relinkJump):
161         (JSC::ARMAssembler::linkCall):
162         (JSC::ARMAssembler::relinkCall):
163         (JSC::ARMAssembler::getRelocatedAddress):
164         (JSC::ARMAssembler::getDifferenceBetweenLabels):
165         (JSC::ARMAssembler::getCallReturnOffset):
166         (JSC::ARMAssembler::getOp2Byte):
167         (JSC::ARMAssembler::placeConstantPoolBarrier):
168         (JSC::ARMAssembler::RM):
169         (JSC::ARMAssembler::RS):
170         (JSC::ARMAssembler::RD):
171         (JSC::ARMAssembler::RN):
172         (JSC::ARMAssembler::getConditionalField):
173         * assembler/ARMv7Assembler.h:
174         (JSC::ARMv7Assembler::JmpSrc::enableLatePatch):
175         * assembler/AbstractMacroAssembler.h:
176         (JSC::AbstractMacroAssembler::Call::enableLatePatch):
177         (JSC::AbstractMacroAssembler::Jump::enableLatePatch):
178         * assembler/MacroAssembler.h:
179         * assembler/MacroAssemblerARM.h: Added.
180         (JSC::MacroAssemblerARM::):
181         (JSC::MacroAssemblerARM::add32):
182         (JSC::MacroAssemblerARM::and32):
183         (JSC::MacroAssemblerARM::lshift32):
184         (JSC::MacroAssemblerARM::mul32):
185         (JSC::MacroAssemblerARM::not32):
186         (JSC::MacroAssemblerARM::or32):
187         (JSC::MacroAssemblerARM::rshift32):
188         (JSC::MacroAssemblerARM::sub32):
189         (JSC::MacroAssemblerARM::xor32):
190         (JSC::MacroAssemblerARM::load32):
191         (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
192         (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA):
193         (JSC::MacroAssemblerARM::load16):
194         (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
195         (JSC::MacroAssemblerARM::store32):
196         (JSC::MacroAssemblerARM::pop):
197         (JSC::MacroAssemblerARM::push):
198         (JSC::MacroAssemblerARM::move):
199         (JSC::MacroAssemblerARM::swap):
200         (JSC::MacroAssemblerARM::signExtend32ToPtr):
201         (JSC::MacroAssemblerARM::zeroExtend32ToPtr):
202         (JSC::MacroAssemblerARM::branch32):
203         (JSC::MacroAssemblerARM::branch16):
204         (JSC::MacroAssemblerARM::branchTest32):
205         (JSC::MacroAssemblerARM::jump):
206         (JSC::MacroAssemblerARM::branchAdd32):
207         (JSC::MacroAssemblerARM::mull32):
208         (JSC::MacroAssemblerARM::branchMul32):
209         (JSC::MacroAssemblerARM::branchSub32):
210         (JSC::MacroAssemblerARM::breakpoint):
211         (JSC::MacroAssemblerARM::nearCall):
212         (JSC::MacroAssemblerARM::call):
213         (JSC::MacroAssemblerARM::ret):
214         (JSC::MacroAssemblerARM::set32):
215         (JSC::MacroAssemblerARM::setTest32):
216         (JSC::MacroAssemblerARM::tailRecursiveCall):
217         (JSC::MacroAssemblerARM::makeTailRecursiveCall):
218         (JSC::MacroAssemblerARM::moveWithPatch):
219         (JSC::MacroAssemblerARM::branchPtrWithPatch):
220         (JSC::MacroAssemblerARM::storePtrWithPatch):
221         (JSC::MacroAssemblerARM::supportsFloatingPoint):
222         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
223         (JSC::MacroAssemblerARM::loadDouble):
224         (JSC::MacroAssemblerARM::storeDouble):
225         (JSC::MacroAssemblerARM::addDouble):
226         (JSC::MacroAssemblerARM::subDouble):
227         (JSC::MacroAssemblerARM::mulDouble):
228         (JSC::MacroAssemblerARM::convertInt32ToDouble):
229         (JSC::MacroAssemblerARM::branchDouble):
230         (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
231         (JSC::MacroAssemblerARM::ARMCondition):
232         (JSC::MacroAssemblerARM::prepareCall):
233         (JSC::MacroAssemblerARM::call32):
234         * assembler/X86Assembler.h:
235         (JSC::X86Assembler::JmpSrc::enableLatePatch):
236         * jit/ExecutableAllocator.h:
237         (JSC::ExecutableAllocator::cacheFlush):
238         * wtf/Platform.h:
239         * yarr/RegexJIT.cpp:
240         (JSC::Yarr::RegexGenerator::generateEnter):
241         (JSC::Yarr::RegexGenerator::generateReturn):
242
243 2009-07-17  Gabor Loki  <loki@inf.u-szeged.hu>
244
245         Reviewed by Gavin Barraclough.
246
247         Extend AssemblerBuffer with constant pool handling mechanism.
248         https://bugs.webkit.org/show_bug.cgi?id=24986
249
250         Add a platform independed constant pool framework.
251         This pool can store 32 or 64 bits values which is enough to hold
252         any integer, pointer or double constant.
253
254         * assembler/AssemblerBuffer.h:
255         (JSC::AssemblerBuffer::putIntUnchecked):
256         (JSC::AssemblerBuffer::putInt64Unchecked):
257         (JSC::AssemblerBuffer::append):
258         (JSC::AssemblerBuffer::grow):
259         * assembler/AssemblerBufferWithConstantPool.h: Added.
260         (JSC::):
261
262 2009-07-17  Eric Roman  <eroman@chromium.org>
263
264         Reviewed by Darin Adler.
265
266         Build fix for non-Darwin.
267         Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h
268
269         https://bugs.webkit.org/show_bug.cgi?id=27382
270
271         * wtf/unicode/icu/CollatorICU.cpp:
272
273 2009-07-17  Alexey Proskuryakov  <ap@webkit.org>
274
275         Reviewed by John Sullivan.
276
277         Get user default collation order via a CFLocale API when available.
278
279         * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault):
280
281 2009-07-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
282
283         Reviewed by Simon Hausmann.
284
285         [Qt] Fix the include path for the Symbian port
286         https://bugs.webkit.org/show_bug.cgi?id=27358
287
288         * JavaScriptCore.pri:
289
290 2009-07-17  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
291
292         Reviewed by David Levin.
293
294         Build fix on platforms don't have MMAP.
295         https://bugs.webkit.org/show_bug.cgi?id=27365
296
297         * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP)
298
299 2009-07-16  Fumitoshi Ukai  <ukai@chromium.org>
300
301         Reviewed by David Levin.
302
303         Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
304         https://bugs.webkit.org/show_bug.cgi?id=27206
305         
306         Add ENABLE_WEB_SOCKETS
307
308         * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
309
310 2009-07-16  Maxime Simon  <simon.maxime@gmail.com>
311
312         Reviewed by Eric Seidel.
313
314         Added Haiku-specific files for JavaScriptCore.
315         https://bugs.webkit.org/show_bug.cgi?id=26620
316
317         * wtf/haiku/MainThreadHaiku.cpp: Added.
318         (WTF::initializeMainThreadPlatform):
319         (WTF::scheduleDispatchFunctionsOnMainThread):
320
321 2009-07-16  Gavin Barraclough  <barraclough@apple.com>
322
323         RS by Oliver Hunt.
324
325         Revert r45969, this fix does not appear to be valid.
326         https://bugs.webkit.org/show_bug.cgi?id=27077
327
328         * bytecode/CodeBlock.cpp:
329         (JSC::CodeBlock::~CodeBlock):
330         (JSC::CodeBlock::unlinkCallers):
331         * jit/JIT.cpp:
332         * jit/JIT.h:
333
334 2009-07-16  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
335
336         Reviewed by Oliver Hunt.
337
338         Allow custom memory allocation control in ExceptionInfo and RareData struct
339         https://bugs.webkit.org/show_bug.cgi?id=27336
340
341         Inherits ExceptionInfo and RareData struct from FastAllocBase because these
342         have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and
343         in JavaScriptCore/bytecode/CodeBlock.h:453.
344
345         Remove unnecessary WTF:: namespace from CodeBlock inheritance.
346  
347         * bytecode/CodeBlock.h:
348
349 2009-07-16  Mark Rowe  <mrowe@apple.com>
350
351         Rubber-stamped by Geoff Garen.
352
353         Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world.
354
355         * Configurations/FeatureDefines.xcconfig:
356
357 2009-07-16  Yong Li  <yong.li@torchmobile.com>
358
359          Reviewed by George Staikos.
360
361          https://bugs.webkit.org/show_bug.cgi?id=27320
362          _countof is only included in CE6; for CE5 we need to define it ourself
363
364          * wtf/Platform.h:
365
366 2009-07-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
367
368         Reviewed by Oliver Hunt.
369
370         Workers + garbage collector: weird crashes
371         https://bugs.webkit.org/show_bug.cgi?id=27077
372
373         We need to unlink cached method call sites when a function is destroyed.
374
375         * JavaScriptCore.xcodeproj/project.pbxproj:
376         * bytecode/CodeBlock.cpp:
377         (JSC::CodeBlock::~CodeBlock):
378         (JSC::CodeBlock::unlinkCallers):
379         * jit/JIT.cpp:
380         (JSC::JIT::unlinkMethodCall):
381         * jit/JIT.h:
382
383 2009-07-15  Steve Falkenburg  <sfalken@apple.com>
384
385         Windows Build fix.
386
387         Visual Studio reset our intermediate directory on us.
388         This sets it back.
389         
390         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
391         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
392
393 2009-07-15  Kwang Yul Seo  <skyul@company100.net>
394
395         Reviewed by Eric Seidel.
396
397         https://bugs.webkit.org/show_bug.cgi?id=26794
398         Make Yacc-generated parsers to use fastMalloc/fastFree.
399         
400         Define YYMALLOC and YYFREE to fastMalloc and fastFree
401         respectively.
402
403         * parser/Grammar.y:
404
405 2009-07-15  Darin Adler  <darin@apple.com>
406
407         Fix a build for a particular Apple configuration.
408
409         * wtf/FastAllocBase.h: Change include to use "" style for
410         including another wtf header. This is the style we use for
411         including other public headers in the same directory.
412
413 2009-07-15  George Staikos  <george.staikos@torchmobile.com>
414
415         Reviewed by Adam Treat.
416
417         https://bugs.webkit.org/show_bug.cgi?id=27303
418         Implement createThreadInternal for WinCE.
419         Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
420
421         * wtf/ThreadingWin.cpp:
422         (WTF::createThreadInternal):
423
424 2009-07-15  Joe Mason  <joe.mason@torchmobile.com>
425
426          Reviewed by George Staikos.
427
428          https://bugs.webkit.org/show_bug.cgi?id=27298
429          Platform defines for WINCE.
430          Contains changes by Yong Li <yong.li@torchmobile.com>,
431          George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
432
433          * wtf/Platform.h:
434
435 2009-07-15  Yong Li  <yong.li@torchmobile.com>
436
437          Reviewed by Adam Treat.
438
439          https://bugs.webkit.org/show_bug.cgi?id=27306
440          Use RegisterClass instead of RegisterClassEx on WinCE.
441
442          * wtf/win/MainThreadWin.cpp:
443          (WTF::initializeMainThreadPlatform):
444
445 2009-07-15  Yong Li  <yong.li@torchmobile.com>
446
447          Reviewed by George Staikos.
448
449          https://bugs.webkit.org/show_bug.cgi?id=27301
450          Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
451          Originally written by Yong Li <yong.li@torchmobile.com> and refactored by
452          Joe Mason <joe.mason@torchmobile.com>
453
454          * wtf/Assertions.cpp: vprintf_stderr_common
455
456 2009-07-15  Yong Li  <yong.li@torchmobile.com>
457
458          Reviewed by George Staikos.
459
460          https://bugs.webkit.org/show_bug.cgi?id=27020
461          msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false
462
463          * wtf/DateMath.cpp:
464          (WTF::gregorianDateTimeToMS):
465
466 2009-07-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
467
468         Reviewed by Simon Hausmann.
469
470         [Qt] Cleanup - Remove obsolete code from the make system
471         https://bugs.webkit.org/show_bug.cgi?id=27299
472
473         * JavaScriptCore.pro:
474         * jsc.pro:
475
476 2009-07-07  Norbert Leser  <norbert.leser@nokia.com>
477
478         Reviewed by Simon Hausmann.
479
480         https://bugs.webkit.org/show_bug.cgi?id=27056
481
482         Alternate bool operator for codewarrior compiler (WINSCW).
483         Compiler (latest b482) reports error for UnspecifiedBoolType construct:
484         "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
485
486         Same fix as in r38391.
487
488         * JavaScriptCore/wtf/OwnArrayPtr.h:
489
490 2009-07-15  Norbert Leser  <norbert.leser@nokia.com>
491
492         Reviewed by Darin Adler.
493
494         Qualify include path with wtf to fix compilation
495         on Symbian.
496         https://bugs.webkit.org/show_bug.cgi?id=27055
497
498         * interpreter/Interpreter.h:
499
500 2009-07-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
501
502         Reviewed by Dave Kilzer.
503
504         Turn off non-portable date manipulations for SYMBIAN
505         https://bugs.webkit.org/show_bug.cgi?id=27064
506
507         Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards 
508         and place the rules for controlling the guards in Platform.h.
509         Turn off these newly introduced guards for SYMBIAN.
510
511         * wtf/DateMath.cpp:
512         (WTF::calculateUTCOffset):
513         * wtf/DateMath.h:
514         (WTF::GregorianDateTime::GregorianDateTime):
515         (WTF::GregorianDateTime::operator tm):
516         * wtf/Platform.h:
517
518 2009-07-15  Norbert Leser  <norbert.leser@nokia.com>
519
520         Reviewed by Simon Hausmann.
521
522         Undef ASSERT on Symbian, to avoid excessive warnings
523         https://bugs.webkit.org/show_bug.cgi?id=27052
524
525         * wtf/Assertions.h:
526
527 2009-07-15  Oliver Hunt  <oliver@apple.com>
528
529         Reviewed by Simon Hausmann.
530
531         REGRESSION: fast/js/postfix-syntax.html fails with interpreter
532         https://bugs.webkit.org/show_bug.cgi?id=27294
533
534         When postfix operators operating on locals assign to the same local
535         the order of operations has to be to store the incremented value, then
536         store the unmodified number.  Rather than implementing this subtle
537         semantic in the interpreter I've just made the logic explicit in the
538         bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a
539         local var x).
540
541         * parser/Nodes.cpp:
542         (JSC::emitPostIncOrDec):
543
544 2009-07-15  Oliver Hunt  <oliver@apple.com>
545
546         Reviewed by Simon Hausmann.
547
548         REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter
549         https://bugs.webkit.org/show_bug.cgi?id=27259
550
551         The interpreter was incorrectly basing its need to create the arguments object
552         based on the presence of the callframe's argument reference rather than the local
553         arguments reference.  Based on this it then overrode the local variable reference.
554
555         * interpreter/Interpreter.cpp:
556         (JSC::Interpreter::privateExecute):
557
558 2009-07-14  Steve Falkenburg  <sfalken@apple.com>
559
560         Reorganize JavaScriptCore headers into:
561         API: include/JavaScriptCore/
562         Private: include/private/JavaScriptCore/
563
564         Reviewed by Darin Adler.
565
566         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
567         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
568         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
569         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
570         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
571
572 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
573
574         Reviewed by Darin Adler.
575
576         Change JSCell's superclass to NoncopyableCustomAllocated
577         https://bugs.webkit.org/show_bug.cgi?id=27248
578
579         JSCell class customizes operator new, since Noncopyable will be 
580         inherited from FastAllocBase, NoncopyableCustomAllocated has 
581         to be used.
582
583         * runtime/JSCell.h:
584
585 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
586
587         Reviewed by Darin Adler.
588
589         Change all Noncopyable inheriting visibility to public.
590         https://bugs.webkit.org/show_bug.cgi?id=27225
591
592         Change all Noncopyable inheriting visibility to public because
593         it is needed to the custom allocation framework (bug #20422).
594
595         * bytecode/SamplingTool.h:
596         * bytecompiler/RegisterID.h:
597         * interpreter/CachedCall.h:
598         * interpreter/RegisterFile.h:
599         * parser/Lexer.h:
600         * parser/Parser.h:
601         * runtime/ArgList.h:
602         * runtime/BatchedTransitionOptimizer.h:
603         * runtime/Collector.h:
604         * runtime/CommonIdentifiers.h:
605         * runtime/JSCell.h:
606         * runtime/JSGlobalObject.h:
607         * runtime/JSLock.h:
608         * runtime/JSONObject.cpp:
609         * runtime/SmallStrings.cpp:
610         * runtime/SmallStrings.h:
611         * wtf/CrossThreadRefCounted.h:
612         * wtf/GOwnPtr.h:
613         * wtf/Locker.h:
614         * wtf/MessageQueue.h:
615         * wtf/OwnArrayPtr.h:
616         * wtf/OwnFastMallocPtr.h:
617         * wtf/OwnPtr.h:
618         * wtf/RefCounted.h:
619         * wtf/ThreadSpecific.h:
620         * wtf/Threading.h:
621         * wtf/Vector.h:
622         * wtf/unicode/Collator.h:
623
624 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
625
626         Reviewed by Darin Adler.
627
628         Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
629         https://bugs.webkit.org/show_bug.cgi?id=27249
630
631         ParserArenaDeletable customizes operator new, to avoid double inheritance
632         ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
633
634         * parser/Nodes.h:
635
636 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
637
638         Reviewed by Darin Adler.
639
640         Add RefCountedCustomAllocated to RefCounted.h
641         https://bugs.webkit.org/show_bug.cgi?id=27232
642
643         Some class which are inherited from RefCounted customize
644         operator new, but RefCounted is inherited from Noncopyable
645         which will be inherited from FastAllocBase. To avoid
646         conflicts Noncopyable inheriting was moved down to RefCounted
647         and to avoid double inheritance this class has been added.
648
649         * wtf/RefCounted.h:
650         (WTF::RefCountedCustomAllocated::deref):
651         (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
652
653 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
654
655         Reviewed by Darin Adler.
656
657         Add NoncopyableCustomAllocated to Noncopyable.h.
658         https://bugs.webkit.org/show_bug.cgi?id=27228
659         
660         Some classes which inherited from Noncopyable overrides operator new
661         since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h 
662         needs to be extended with this new class to support the overriding. 
663
664         * wtf/Noncopyable.h:
665         (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
666         (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
667
668 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
669
670         Reviewed by Darin Adler.
671
672         Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
673         https://bugs.webkit.org/show_bug.cgi?id=27260
674
675         Inherits IdentifierTable class from FastAllocBase because it has been
676         instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
677
678         * runtime/Identifier.cpp:
679
680 2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
681
682         Reviewed by Darin Adler.
683
684         Allow custom memory allocation control for JavaScriptCore's Profiler class
685         https://bugs.webkit.org/show_bug.cgi?id=27253
686
687         Inherits Profiler class from FastAllocBase because it has been instantiated by
688         'new' in JavaScriptCore/profiler/Profiler.cpp:56.
689
690         * profiler/Profiler.h:
691
692 2009-07-06  George Staikos  <george.staikos@torchmobile.com>
693
694         Reviewed by Adam Treat.
695
696         Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
697
698         https://bugs.webkit.org/show_bug.cgi?id=27030
699         Implement custom RNG for WinCE using Mersenne Twister
700
701         * wtf/RandomNumber.cpp:
702         (WTF::randomNumber):
703         * wtf/RandomNumberSeed.h:
704         (WTF::initializeRandomNumberGenerator):
705         * wtf/wince/mt19937ar.c: Added.
706         (init_genrand):
707         (init_by_array):
708         (genrand_int32):
709         (genrand_int31):
710         (genrand_real1):
711         (genrand_real2):
712         (genrand_real3):
713         (genrand_res53):
714
715 2009-07-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
716
717         Unreviewed make dist build fix.
718
719         * GNUmakefile.am:
720
721 2009-07-13  Drew Wilson  <atwilson@google.com>
722
723         Reviewed by David Levin.
724
725         Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
726         https://bugs.webkit.org/show_bug.cgi?id=26932
727
728         Added ENABLE(SHARED_WORKERS) flag (off by default).
729
730         * Configurations/FeatureDefines.xcconfig:
731
732 2009-07-07  Norbert Leser  <norbert.leser@nokia.com>
733
734         Reviewed by Maciej Stachoviak.
735
736         https://bugs.webkit.org/show_bug.cgi?id=27058
737
738         Removed superfluous parenthesis around single expression.
739         Compilers on Symbian platform fail to properly parse and compile.
740
741         * JavaScriptCore/wtf/Platform.h:
742
743 2009-07-13  Norbert Leser  <norbert.leser@nokia.com>
744
745         Reviewed by Maciej Stachoviak.
746
747         https://bugs.webkit.org/show_bug.cgi?id=27054
748
749         Renamed Translator to HashTranslator
750
751         Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
752         mismatch between template declaration and definition
753         (HashTranslator / Translator)
754
755         * wtf/HashSet.h:
756
757 2009-07-13  Norbert Leser  <norbert.leser@nokia.com>
758
759         Reviewed by Eric Seidel.
760
761         https://bugs.webkit.org/show_bug.cgi?id=27053
762
763         Ambiguity in LabelScope initialization
764
765         Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
766         type of "0" unambiguously. Set expression explicitly to
767         PassRefPtr<Label>::PassRefPtr()
768
769         * bytecompiler/BytecodeGenerator.cpp
770
771 2009-07-11  Simon Fraser  <simon.fraser@apple.com>
772
773         Enable support for accelerated compositing and 3d transforms on Leopard.
774         <https://bugs.webkit.org/show_bug.cgi?id=20166>
775         <rdar://problem/6120614>
776
777         Reviewed by Oliver Hunt.
778
779         * Configurations/FeatureDefines.xcconfig:
780         * wtf/Platform.h:
781
782 2009-07-10  Mark Rowe  <mrowe@apple.com>
783
784         Second part of the "make Windows happier" dance.
785
786         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
787         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
788
789 2009-07-10  Mark Rowe  <mrowe@apple.com>
790
791         Try and make the Windows build happy.
792
793         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
794         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
795
796 2009-07-10  Kevin McCullough  <kmccullough@apple.com>
797
798         Reviewed by Geoffrey Garen.
799
800         * debugger/Debugger.h: Made this function virtual for use in WebCore's
801         WebInspector.
802
803 2009-07-10  Kwang Yul Seo  <skyul@company100.net>
804
805         Reviewed by Darin Adler.
806
807         ParserArenaDeletable should override delete
808         https://bugs.webkit.org/show_bug.cgi?id=26790
809
810         ParserArenaDeletable overrides new, but it does not override delete.
811         ParserArenaDeletable must be freed by fastFree
812         because it is allocated by fastMalloc.
813
814         * parser/NodeConstructors.h:
815         (JSC::ParserArenaDeletable::operator delete):
816         * parser/Nodes.h:
817
818 2009-07-10  Adam Roben  <aroben@apple.com>
819
820         Sort all our Xcode projects
821
822         Accomplished using sort-Xcode-project-file.
823
824         Requested by Dave Kilzer.
825
826         * JavaScriptCore.xcodeproj/project.pbxproj:
827
828 2009-07-09  Maciej Stachowiak  <mjs@apple.com>
829
830         Not reviewed, build fix.
831
832         Windows build fix for the last change.
833
834         * wtf/dtoa.cpp: Forgot to include Vector.h
835
836 2009-07-09  Maciej Stachowiak  <mjs@apple.com>
837
838         Reviewed by Darin Adler.
839
840         REGRESSION: crash in edge cases of floating point parsing.
841         https://bugs.webkit.org/show_bug.cgi?id=27110
842         <rdar://problem/7044458>
843         
844         Tests: fast/css/number-parsing-crash.html
845                fast/css/number-parsing-crash.html
846                fast/js/number-parsing-crash.html
847         
848         * wtf/dtoa.cpp:
849         (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
850         with inline capacity
851
852         (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
853         Added an assertion to verify that invariants are maintained.
854
855         All other functions are adapted fairly mechanically to the above changes.
856         (WTF::BigInt::clear):
857         (WTF::BigInt::size):
858         (WTF::BigInt::resize):
859         (WTF::BigInt::words):
860         (WTF::BigInt::append):
861         (WTF::multadd):
862         (WTF::s2b):
863         (WTF::i2b):
864         (WTF::mult):
865         (WTF::cmp):
866         (WTF::diff):
867         (WTF::b2d):
868         (WTF::d2b):
869         (WTF::ratio):
870         (WTF::strtod):
871         (WTF::quorem):
872         (WTF::dtoa):
873
874 2009-07-09  Drew Wilson  <atwilson@google.com>
875
876         Reviewed by Alexey Proskuryakov.
877
878         Turned on CHANNEL_MESSAGING by default because the MessageChannel API
879         can now be implemented for Web Workers and is reasonably stable.
880
881         * Configurations/FeatureDefines.xcconfig:
882
883 2009-07-09  Oliver Hunt  <oliver@apple.com>
884
885         Reviewed by NOBODY (Build fix).
886
887         * interpreter/Interpreter.cpp:
888         (JSC::Interpreter::privateExecute):
889
890 2009-07-09  Oliver Hunt  <oliver@apple.com>
891
892         Reviewed by Darin Adler.
893
894         Bug 27016 - Interpreter crashes due to invalid array indexes
895         <https://bugs.webkit.org/show_bug.cgi?id=27016>
896
897         Unsigned vs signed conversions results in incorrect behaviour in
898         64bit interpreter builds.
899
900         * interpreter/Interpreter.cpp:
901         (JSC::Interpreter::privateExecute):
902
903 2009-07-09  Dimitri Glazkov  <dglazkov@chromium.org>
904
905         Reviewed by Darin Fisher.
906
907         [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
908         https://bugs.webkit.org/show_bug.cgi?id=27135
909
910         * JavaScriptCore.gypi: Added.
911
912 2009-07-09  Joe Mason  <joe.mason@torchmobile.com>
913
914         Reviewed by George Staikos.
915         
916         Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
917
918         https://bugs.webkit.org/show_bug.cgi?id=27031
919         Add an override for deleteOwnedPtr(HDC) on Windows
920         
921         * wtf/OwnPtrCommon.h:
922         * wtf/OwnPtrWin.cpp:
923         (WTF::deleteOwnedPtr):
924
925 2009-07-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
926
927         Reviewed by Darin Adler.
928
929         Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
930         on SYMBIAN.
931
932         https://bugs.webkit.org/show_bug.cgi?id=27026
933
934         Based on Norbert Leser's work.
935
936         * jsc.cpp:
937         (printUsageStatement):
938         (parseArguments):
939         * wtf/Platform.h:
940
941 2009-07-07  Gavin Barraclough  <barraclough@apple.com>
942
943         Reviewed by Sam Weinig.
944
945         Stop loading constants into the register file.
946
947         Instead, use high register values (highest bit bar the sign bit set) to indicate
948         constants in the instruction stream, and when we encounter such a value load it
949         directly from the CodeBlock.
950
951         Since constants are no longer copied into the register file, this patch renders
952         the 'unexpected constant' mechanism redundant, and removes it.
953
954         2% improvement, thanks to Sam Weinig.
955
956         * bytecode/CodeBlock.cpp:
957         (JSC::CodeBlock::dump):
958         (JSC::CodeBlock::CodeBlock):
959         (JSC::CodeBlock::mark):
960         (JSC::CodeBlock::shrinkToFit):
961         * bytecode/CodeBlock.h:
962         (JSC::CodeBlock::isTemporaryRegisterIndex):
963         (JSC::CodeBlock::constantRegister):
964         (JSC::CodeBlock::isConstantRegisterIndex):
965         (JSC::CodeBlock::getConstant):
966         (JSC::ExecState::r):
967         * bytecode/Opcode.h:
968         * bytecompiler/BytecodeGenerator.cpp:
969         (JSC::BytecodeGenerator::preserveLastVar):
970         (JSC::BytecodeGenerator::BytecodeGenerator):
971         (JSC::BytecodeGenerator::addConstantValue):
972         (JSC::BytecodeGenerator::emitEqualityOp):
973         (JSC::BytecodeGenerator::emitLoad):
974         (JSC::BytecodeGenerator::emitResolveBase):
975         (JSC::BytecodeGenerator::emitResolveWithBase):
976         (JSC::BytecodeGenerator::emitNewError):
977         * bytecompiler/BytecodeGenerator.h:
978         (JSC::BytecodeGenerator::emitNode):
979         * interpreter/CallFrame.h:
980         (JSC::ExecState::noCaller):
981         (JSC::ExecState::hasHostCallFrameFlag):
982         (JSC::ExecState::addHostCallFrameFlag):
983         (JSC::ExecState::removeHostCallFrameFlag):
984         * interpreter/Interpreter.cpp:
985         (JSC::Interpreter::resolve):
986         (JSC::Interpreter::resolveSkip):
987         (JSC::Interpreter::resolveGlobal):
988         (JSC::Interpreter::resolveBase):
989         (JSC::Interpreter::resolveBaseAndProperty):
990         (JSC::Interpreter::resolveBaseAndFunc):
991         (JSC::Interpreter::dumpRegisters):
992         (JSC::Interpreter::throwException):
993         (JSC::Interpreter::createExceptionScope):
994         (JSC::Interpreter::privateExecute):
995         (JSC::Interpreter::retrieveArguments):
996         * jit/JIT.cpp:
997         (JSC::JIT::privateCompileMainPass):
998         * jit/JITInlineMethods.h:
999         (JSC::JIT::emitLoadDouble):
1000         (JSC::JIT::emitLoadInt32ToDouble):
1001         * jit/JITOpcodes.cpp:
1002         (JSC::JIT::emit_op_new_error):
1003         (JSC::JIT::emit_op_enter):
1004         (JSC::JIT::emit_op_enter_with_activation):
1005         * parser/Nodes.cpp:
1006         (JSC::DeleteResolveNode::emitBytecode):
1007         (JSC::DeleteValueNode::emitBytecode):
1008         (JSC::PrefixResolveNode::emitBytecode):
1009         * runtime/JSActivation.cpp:
1010         (JSC::JSActivation::JSActivation):
1011         * wtf/Platform.h:
1012
1013 2009-07-07  Mark Rowe  <mrowe@apple.com>
1014
1015         Reviewed by Darin Adler.
1016
1017         Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
1018         Bug 27025: Crashes and regression test failures related to regexps in 64-bit
1019
1020         For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
1021         neglects to save and restore it.  The change in handling of the output vector in r45545
1022         altered code generation so that the RegExp::match was now storing important data in rbx,
1023         which caused crashes and bogus results when it was clobbered.
1024
1025         * yarr/RegexJIT.cpp:
1026         (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
1027         (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
1028
1029 2009-07-06  Ada Chan  <adachan@apple.com>
1030
1031         Reviewed by Darin Adler and Mark Rowe.
1032
1033         Decommitted spans are added to the list of normal spans rather than 
1034         the returned spans in TCMalloc_PageHeap::Delete().
1035         https://bugs.webkit.org/show_bug.cgi?id=26998
1036         
1037         In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in 
1038         the process of merging with neighboring spans that are also decommitted.  
1039         The merged span needs to be placed in the list of returned spans (spans 
1040         whose memory has been returned to the system).  Right now it's always added 
1041         to the list of the normal spans which can theoretically cause thrashing.  
1042
1043         * wtf/FastMalloc.cpp:
1044         (WTF::TCMalloc_PageHeap::Delete):
1045
1046 2009-07-05  Lars Knoll  <lars.knoll@nokia.com>
1047
1048         Reviewed by Maciej Stachowiak.
1049
1050         https://bugs.webkit.org/show_bug.cgi?id=26843
1051
1052         Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
1053
1054         The Metrowerks compiler on the Symbian platform moves the globally
1055         defined Hashtables into read-only memory, despite one of the members
1056         being mutable. This causes crashes at run-time due to write access to
1057         read-only memory.
1058
1059         Avoid the use of const with this compiler by introducing the
1060         JSC_CONST_HASHTABLE macro.
1061
1062         Based on idea by Norbert Leser.
1063
1064         * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
1065         * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
1066         * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
1067
1068 2009-07-04  Dan Bernstein  <mitz@apple.com>
1069
1070         - debug build fix
1071
1072         * runtime/RegExpConstructor.cpp:
1073         (JSC::RegExpConstructor::getLastParen):
1074
1075 2009-07-03  Yong Li  <yong.li@torchmobile.com>
1076
1077         Reviewed by Maciej Stachowiak (and revised slightly)
1078
1079         RegExp::match to be optimized
1080         https://bugs.webkit.org/show_bug.cgi?id=26957
1081
1082         Allow regexp matching to use Vectors with inline capacity instead of
1083         allocating a new ovector buffer every time.
1084         
1085         ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
1086
1087         * runtime/RegExp.cpp:
1088         (JSC::RegExp::match):
1089         * runtime/RegExp.h:
1090         * runtime/RegExpConstructor.cpp:
1091         (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
1092         (JSC::RegExpConstructorPrivate::lastOvector):
1093         (JSC::RegExpConstructorPrivate::tempOvector):
1094         (JSC::RegExpConstructorPrivate::changeLastOvector):
1095         (JSC::RegExpConstructor::performMatch):
1096         (JSC::RegExpMatchesArray::RegExpMatchesArray):
1097         (JSC::RegExpMatchesArray::fillArrayInstance):
1098         (JSC::RegExpConstructor::getBackref):
1099         (JSC::RegExpConstructor::getLastParen):
1100         (JSC::RegExpConstructor::getLeftContext):
1101         (JSC::RegExpConstructor::getRightContext):
1102         * runtime/StringPrototype.cpp:
1103         (JSC::stringProtoFuncSplit):
1104
1105 2009-06-30  Kwang Yul Seo  <skyul@company100.net>
1106
1107         Reviewed by Eric Seidel.
1108
1109         Override operator new/delete with const std::nothrow_t& as the second
1110         argument.
1111         https://bugs.webkit.org/show_bug.cgi?id=26792
1112
1113         On Windows CE, operator new/delete, new[]/delete[] with const
1114         std::nothrow_t& must be overrided because some standard template
1115         libraries use these operators.
1116
1117         The problem occurs when memory allocated by new(size_t s, const
1118         std::nothrow_t&) is freed by delete(void* p). This causes the umatched
1119         malloc/free problem.
1120
1121         The patch overrides all new, delete, new[] and delete[] to use
1122         fastMaloc and fastFree consistently.
1123
1124         * wtf/FastMalloc.h:
1125         (throw):
1126
1127 2009-06-30  Gabor Loki  <loki@inf.u-szeged.hu>
1128
1129         Reviewed by Sam Weinig.
1130
1131         <https://bugs.webkit.org/show_bug.cgi?id=24986>
1132
1133         Remove unnecessary references to AssemblerBuffer.
1134
1135         * interpreter/Interpreter.cpp:
1136         * interpreter/Interpreter.h:
1137
1138 2009-06-29  David Levin  <levin@chromium.org>
1139
1140         Reviewed by Oliver Hunt.
1141
1142         Still seeing occasional leaks from UString::sharedBuffer code
1143         https://bugs.webkit.org/show_bug.cgi?id=26420
1144
1145         The problem is that the pointer to the memory allocation isn't visible
1146         by "leaks" due to the lower bits being used as flags.  The fix is to
1147         make the pointer visible in memory (in debug only). The downside of
1148         this fix that the memory allocated by sharedBuffer will still look like
1149         a leak in non-debug builds when any flags are set.
1150
1151         * wtf/PtrAndFlags.h:
1152         (WTF::PtrAndFlags::set):
1153
1154 2009-06-29  Sam Weinig  <sam@webkit.org>
1155
1156         Reviewed by Mark Rowe.
1157
1158         Remove more unused scons support.
1159
1160         * SConstruct: Removed.
1161
1162 2009-06-29  Oliver Hunt  <oliver@apple.com>
1163
1164         Reviewed by Gavin Barraclough.
1165
1166         <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
1167         <https://bugs.webkit.org/show_bug.cgi?id=26802>
1168
1169         In the original JSON.parse patch unicode was handled correctly, however in some last
1170         minute "clean up" I oversimplified isSafeStringCharacter.  This patch corrects this bug.
1171
1172         * runtime/LiteralParser.cpp:
1173         (JSC::isSafeStringCharacter):
1174         (JSC::LiteralParser::Lexer::lexString):
1175
1176 2009-06-26  Oliver Hunt  <oliver@apple.com>
1177
1178         Reviewed by Dan Bernstein.
1179
1180         <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
1181         <https://bugs.webkit.org/show_bug.cgi?id=26746>
1182
1183         Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id.  Clearly this
1184         is less than correct.  This patch corrects that error.
1185
1186         * interpreter/Interpreter.cpp:
1187         (JSC::Interpreter::tryCacheGetByID):
1188
1189 2009-06-26  Eric Seidel  <eric@webkit.org>
1190
1191         No review, only rolling out r45259.
1192
1193         Roll out r45259 after crash appeared on the bots:
1194         plugins/undefined-property-crash.html
1195         ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
1196         (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
1197         void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
1198
1199         * runtime/DateInstance.cpp:
1200         * runtime/Identifier.cpp:
1201         * runtime/Lookup.h:
1202         * runtime/RegExpConstructor.cpp:
1203         * runtime/RegExpObject.h:
1204         * runtime/ScopeChain.h:
1205         * runtime/UString.h:
1206
1207 2009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1208
1209         Reviewed by Simon Hausmann.
1210
1211         Add support for QDataStream operators to Vector.
1212
1213         * wtf/Vector.h:
1214         (WTF::operator<<):
1215         (WTF::operator>>):
1216
1217 2009-06-24  Sam Weinig  <sam@webkit.org>
1218
1219         Reviewed by Gavin Barraclough.
1220
1221         Make the opcode sampler work once again.
1222
1223         * jit/JIT.h:
1224         (JSC::JIT::compileGetByIdProto):
1225         (JSC::JIT::compileGetByIdSelfList):
1226         (JSC::JIT::compileGetByIdProtoList):
1227         (JSC::JIT::compileGetByIdChainList):
1228         (JSC::JIT::compileGetByIdChain):
1229         (JSC::JIT::compilePutByIdTransition):
1230         (JSC::JIT::compileCTIMachineTrampolines):
1231         (JSC::JIT::compilePatchGetArrayLength):
1232         * jit/JITStubCall.h:
1233         (JSC::JITStubCall::call):
1234
1235 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1236
1237         Reviewed by Maciej Stachowiak.
1238
1239         Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
1240         unnecessary WTF:: usings.
1241         Remove existing unnecessary WTF:: usings.
1242
1243         * interpreter/Interpreter.h:
1244         * profiler/CallIdentifier.h:
1245         * runtime/ScopeChain.h:
1246         * wtf/FastAllocBase.h:
1247
1248 2009-06-24  David Levin  <levin@chromium.org>
1249
1250         Fix all builds.
1251
1252         * bytecode/CodeBlock.h:
1253         * bytecompiler/BytecodeGenerator.h:
1254         * interpreter/Register.h:
1255
1256 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1257
1258         Reviewed by Maciej Stachowiak.
1259         
1260         https://bugs.webkit.org/show_bug.cgi?id=26677
1261
1262         Inherits CodeBlock class from FastAllocBase because it
1263         has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
1264
1265         * bytecode/CodeBlock.h:
1266
1267 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1268
1269         Reviewed by Maciej Stachowiak.
1270         
1271         https://bugs.webkit.org/show_bug.cgi?id=26676
1272
1273         Inherits BytecodeGenerator class from FastAllocBase because it has been
1274         instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
1275
1276         * bytecompiler/BytecodeGenerator.h:
1277
1278 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1279
1280         Reviewed by Maciej Stachowiak.
1281         
1282         https://bugs.webkit.org/show_bug.cgi?id=26675
1283
1284         Inherits Register class from FastAllocBase because it has been
1285         instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
1286
1287         * interpreter/Register.h:
1288
1289 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1290
1291         Reviewed by Darin Adler.
1292         
1293         https://bugs.webkit.org/show_bug.cgi?id=26674
1294
1295         Inherits HashMap class from FastAllocBase because it has been
1296         instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
1297
1298         * wtf/HashMap.h:
1299
1300 2009-06-24  Oliver Hunt  <oliver@apple.com>
1301
1302         Reviewed by Darin Adler.
1303
1304         <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
1305
1306         The problem was caused by the page returned with a function using a
1307         var declaration list containing around ~3000 variables.  The solution
1308         to this is to flatten the comma expression representation and make
1309         codegen comma expressions and initializer lists iterative rather than
1310         recursive.
1311
1312         * parser/Grammar.y:
1313         * parser/NodeConstructors.h:
1314         (JSC::CommaNode::CommaNode):
1315         * parser/Nodes.cpp:
1316         (JSC::CommaNode::emitBytecode):
1317         * parser/Nodes.h:
1318         (JSC::ExpressionNode::isCommaNode):
1319         (JSC::CommaNode::isCommaNode):
1320         (JSC::CommaNode::append):
1321
1322 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1323
1324         Reviewed by Maciej Stachowiak.
1325
1326         https://bugs.webkit.org/show_bug.cgi?id=26645
1327
1328         Inherits ScopeChainNode class from FastAllocBase because it has been
1329         instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
1330
1331         * wtf/RefPtr.h:
1332
1333 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1334
1335         Reviewed by Darin Adler.
1336
1337         https://bugs.webkit.org/show_bug.cgi?id=26648
1338
1339         Inherits Deque class from FastAllocBase because it has been
1340         instantiated by 'new' with DEFINE_STATIC_LOCAL macro in 
1341         JavaScriptCore/wtf/MainThread.cpp:62.
1342
1343         * wtf/Deque.h:
1344
1345 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1346
1347         Reviewed by Darin Adler.
1348
1349         https://bugs.webkit.org/show_bug.cgi?id=26644
1350
1351         Inherits RefPtr class from FastAllocBase because it has been
1352         instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
1353
1354         * wtf/RefPtr.h:
1355
1356 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1357
1358         Reviewed by Darin Adler.
1359
1360         Inherits HashSet class from FastAllocBase, because it has been
1361         instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
1362
1363         * wtf/HashSet.h:
1364
1365 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1366
1367         Reviewed by Darin Adler.
1368
1369         Inherits Vector class from FastAllocBase because it has been
1370         instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
1371
1372         * wtf/Vector.h:
1373
1374 2009-06-24  Norbert Leser  <norbert.leser@nokia.com>
1375
1376         Reviewed by Maciej Stachoviak.
1377
1378         The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
1379         (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
1380         Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
1381         the stack overflows immediately on Symbian hardware (max. 80 kB).
1382         Proposed change allocates generator objects on heap.
1383         Performance impact (if any) should be negligible and change is proposed as general fix,
1384         rather than ifdef'd for SYMBIAN.
1385
1386         * parser/Nodes.cpp:
1387         (JSC::ProgramNode::generateBytecode):
1388         (JSC::EvalNode::generateBytecode):
1389         (JSC::EvalNode::bytecodeForExceptionInfoReparse):
1390         (JSC::FunctionBodyNode::generateBytecode):
1391         (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
1392
1393 2009-06-23  Oliver Hunt  <oliver@apple.com>
1394
1395         Reviewed by Gavin Barraclough.
1396
1397         <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
1398         <https://bugs.webkit.org/show_bug.cgi?id=26593>
1399
1400         Do not attempt to cache structure chains if they contain a dictionary at any level.
1401
1402         * interpreter/Interpreter.cpp:
1403         (JSC::Interpreter::tryCachePutByID):
1404         (JSC::Interpreter::tryCacheGetByID):
1405         * jit/JITStubs.cpp:
1406         (JSC::JITThunks::tryCachePutByID):
1407         * runtime/Structure.cpp:
1408         (JSC::Structure::getEnumerablePropertyNames):
1409         (JSC::Structure::addPropertyTransition):
1410         * runtime/StructureChain.cpp:
1411         (JSC::StructureChain::isCacheable):
1412         * runtime/StructureChain.h:
1413
1414 2009-06-23  Yong Li  <yong.li@torchmobile.com>
1415
1416         Reviewed by George Staikos.
1417
1418         https://bugs.webkit.org/show_bug.cgi?id=26654
1419         Add the proper export define for the JavaScriptCore API when building for WINCE.
1420
1421         * API/JSBase.h:
1422
1423 2009-06-23  Joe Mason  <joe.mason@torchmobile.com>
1424
1425         Reviewed by Adam Treat.
1426
1427         Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
1428
1429         https://bugs.webkit.org/show_bug.cgi?id=26611
1430         Implement currentThreadStackBase on WINCE by adding a global,
1431         g_stackBase, which must be set to the address of a local variable
1432         by the caller before calling any WebKit function that invokes JSC.
1433
1434         * runtime/Collector.cpp:
1435         (JSC::isPageWritable):
1436         (JSC::getStackBase):
1437           Starts at the top of the stack and returns the entire range of
1438           consecutive writable pages as an estimate of the actual stack.
1439           This will be much bigger than the actual stack range, so some
1440           dead objects can't be collected, but it guarantees live objects
1441           aren't collected prematurely.
1442
1443         (JSC::currentThreadStackBase):
1444           On WinCE, returns g_stackBase if set or call getStackBase as a
1445           fallback if not.
1446
1447 2009-06-23  Oliver Hunt  <oliver@apple.com>
1448
1449         Reviewed by Alexey Proskuryakov.
1450
1451         Fix stupid performance problem in the LiteralParser
1452
1453         The LiteralParser was making a new UString in order to use
1454         toDouble, however UString's toDouble allows a much wider range
1455         of numberic strings than the LiteralParser accepts, and requires
1456         an additional heap allocation or two for the construciton of the
1457         UString.  To rectify this we just call WTF::dtoa directly using
1458         a stack allocated buffer to hold the validated numeric literal.
1459
1460         * runtime/LiteralParser.cpp:
1461         (JSC::LiteralParser::Lexer::lexNumber):
1462         (JSC::LiteralParser::parse):
1463         * runtime/LiteralParser.h:
1464
1465 2009-06-22  Oliver Hunt  <oliver@apple.com>
1466
1467         Reviewed by Alexey Proskuryakov.
1468
1469         Bug 26640: JSON.stringify needs to special case Boolean objects
1470         <https://bugs.webkit.org/show_bug.cgi?id=26640>
1471
1472         Add special case handling of the Boolean object so we match current
1473         ES5 errata.
1474
1475         * runtime/JSONObject.cpp:
1476         (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
1477         (JSC::gap):
1478         (JSC::Stringifier::appendStringifiedValue):
1479
1480 2009-06-22  Oliver Hunt  <oliver@apple.com>
1481
1482         Reviewed by Darin Adler.
1483
1484         Bug 26591: Support revivers in JSON.parse
1485         <https://bugs.webkit.org/show_bug.cgi?id=26591>
1486
1487         Add reviver support to JSON.parse.  This completes the JSON object.
1488
1489         * runtime/JSONObject.cpp:
1490         (JSC::Walker::Walker):
1491         (JSC::Walker::callReviver):
1492         (JSC::Walker::walk):
1493         (JSC::JSONProtoFuncParse):
1494
1495 2009-06-21  Oliver Hunt  <oliver@apple.com>
1496
1497         Reviewed by Darin Adler.
1498
1499         Bug 26592: Support standard toJSON functions
1500         <https://bugs.webkit.org/show_bug.cgi?id=26592>
1501
1502         Add support for the standard Date.toJSON function.
1503
1504         * runtime/DatePrototype.cpp:
1505         (JSC::dateProtoFuncToJSON):
1506
1507 2009-06-21  Oliver Hunt  <oliver@apple.com>
1508
1509         Reviewed by Sam Weinig.
1510
1511         Bug 26594: JSC needs to support Date.toISOString
1512         <https://bugs.webkit.org/show_bug.cgi?id=26594>
1513
1514         Add support for Date.toISOString.
1515
1516         * runtime/DatePrototype.cpp:
1517         (JSC::dateProtoFuncToISOString):
1518
1519 2009-06-21  Oliver Hunt  <oliver@apple.com>
1520
1521         Reviewed by NOBODY (Build fix).
1522
1523         Remove dead code.
1524
1525         * runtime/LiteralParser.cpp:
1526         (JSC::LiteralParser::parse):
1527
1528 2009-06-21  Oliver Hunt  <oliver@apple.com>
1529
1530         Reviewed by Darin Adler and Cameron Zwarich.
1531
1532         Bug 26587: Support JSON.parse
1533         <https://bugs.webkit.org/show_bug.cgi?id=26587>
1534
1535         Extend the LiteralParser to support the full strict JSON
1536         grammar, fix a few places where the grammar was incorrectly
1537         lenient.   Doesn't yet support the JSON.parse reviver function
1538         but that does not block the JSON.parse functionality itself.
1539
1540         * interpreter/Interpreter.cpp:
1541         (JSC::Interpreter::callEval):
1542         * runtime/JSGlobalObjectFunctions.cpp:
1543         (JSC::globalFuncEval):
1544         * runtime/JSONObject.cpp:
1545         (JSC::JSONProtoFuncParse):
1546         * runtime/LiteralParser.cpp:
1547         (JSC::LiteralParser::Lexer::lex):
1548         (JSC::isSafeStringCharacter):
1549         (JSC::LiteralParser::Lexer::lexString):
1550         (JSC::LiteralParser::parse):
1551         * runtime/LiteralParser.h:
1552         (JSC::LiteralParser::LiteralParser):
1553         (JSC::LiteralParser::tryJSONParse):
1554         (JSC::LiteralParser::):
1555         (JSC::LiteralParser::Lexer::Lexer):
1556
1557 2009-06-21  David Levin  <levin@chromium.org>
1558
1559         Reviewed by NOBODY (speculative build fix for windows).
1560
1561         Simply removed some whitespace form this file to make windows build wtf and
1562         hopefully copy the new MessageQueque.h so that WebCore picks it up.
1563
1564         * wtf/Assertions.cpp:
1565
1566 2009-06-21  Drew Wilson  <atwilson@google.com>
1567
1568         Reviewed by David Levin.
1569
1570         <https://bugs.webkit.org/show_bug.cgi?id=25043>
1571         Added support for multi-threaded MessagePorts.
1572
1573         * wtf/MessageQueue.h:
1574         (WTF::::appendAndCheckEmpty):
1575             Added API to test whether the queue was empty before adding an element.
1576   
1577 2009-06-20  David D. Kilzer  <ddkilzer@webkit.org>
1578
1579         Fix namespace comment in SegmentedVector.h
1580
1581         * wtf/SegmentedVector.h: Updated namespace comment to reflect
1582         new namespace after r44897.
1583
1584 2009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
1585
1586         Bug 24986: ARM JIT port
1587         <https://bugs.webkit.org/show_bug.cgi?id=24986>
1588
1589         Reviewed by Oliver Hunt.
1590
1591         An Iterator added for SegmentedVector. Currently
1592         only the pre ++ operator is supported.
1593
1594         * wtf/SegmentedVector.h:
1595         (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
1596         (WTF::SegmentedVectorIterator::operator*):
1597         (WTF::SegmentedVectorIterator::operator->):
1598         (WTF::SegmentedVectorIterator::operator++):
1599         (WTF::SegmentedVectorIterator::operator==):
1600         (WTF::SegmentedVectorIterator::operator!=):
1601         (WTF::SegmentedVectorIterator::operator=):
1602         (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
1603         (WTF::SegmentedVector::alloc):
1604         (WTF::SegmentedVector::begin):
1605         (WTF::SegmentedVector::end):
1606
1607 2009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
1608
1609         Bug 24986: ARM JIT port
1610         <https://bugs.webkit.org/show_bug.cgi?id=24986>
1611
1612         Reviewed by Oliver Hunt.
1613
1614         Move SegmentedVector to /wtf subdirectory
1615         and change "namespace JSC" to "namespace WTF"
1616
1617         Additional build file updates by David Kilzer.
1618
1619         * GNUmakefile.am: Updated path to SegmentedVector.h.
1620         * JavaScriptCore.order: Updated SegmentedVector namespace from
1621         JSC to WTF in mangled C++ method name.
1622         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1623         Removed reference to bytecompiler\SegmentedVector.h.
1624         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
1625         wtf\SegmentedVector.h.
1626         * JavaScriptCore.xcodeproj/project.pbxproj: Moved
1627         SegmentedVector.h definition from bytecompiler subdirectory to
1628         wtf subdirectory.
1629         * bytecompiler/BytecodeGenerator.h: Updated #include path to
1630         SegmentedVector.h and prepended WTF:: namespace to its use.
1631         * parser/Lexer.h: Ditto.
1632         * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
1633         (WTF::SegmentedVector::SegmentedVector):
1634         (WTF::SegmentedVector::~SegmentedVector):
1635         (WTF::SegmentedVector::size):
1636         (WTF::SegmentedVector::at):
1637         (WTF::SegmentedVector::operator[]):
1638         (WTF::SegmentedVector::last):
1639         (WTF::SegmentedVector::append):
1640         (WTF::SegmentedVector::removeLast):
1641         (WTF::SegmentedVector::grow):
1642         (WTF::SegmentedVector::clear):
1643         (WTF::SegmentedVector::deleteAllSegments):
1644         (WTF::SegmentedVector::segmentExistsFor):
1645         (WTF::SegmentedVector::segmentFor):
1646         (WTF::SegmentedVector::subscriptFor):
1647         (WTF::SegmentedVector::ensureSegmentsFor):
1648         (WTF::SegmentedVector::ensureSegment):
1649
1650 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
1651
1652         Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
1653
1654         * jit/JIT.cpp:
1655         (JSC::JIT::privateCompile):
1656         (JSC::JIT::privateCompileCTIMachineTrampolines):
1657         (JSC::JIT::emitGetVariableObjectRegister):
1658         (JSC::JIT::emitPutVariableObjectRegister):
1659         * jit/JIT.h:
1660         * jit/JITArithmetic.cpp:
1661         (JSC::JIT::emit_op_rshift):
1662         (JSC::JIT::emitSlow_op_jnless):
1663         (JSC::JIT::emitSlow_op_jnlesseq):
1664         (JSC::JIT::compileBinaryArithOp):
1665         * jit/JITCall.cpp:
1666         (JSC::JIT::compileOpCallInitializeCallFrame):
1667         (JSC::JIT::compileOpCall):
1668         * jit/JITInlineMethods.h:
1669         (JSC::JIT::restoreArgumentReference):
1670         (JSC::JIT::checkStructure):
1671         * jit/JITOpcodes.cpp:
1672         (JSC::JIT::emit_op_instanceof):
1673         (JSC::JIT::emit_op_get_scoped_var):
1674         (JSC::JIT::emit_op_put_scoped_var):
1675         (JSC::JIT::emit_op_construct_verify):
1676         (JSC::JIT::emit_op_resolve_global):
1677         (JSC::JIT::emit_op_jeq_null):
1678         (JSC::JIT::emit_op_jneq_null):
1679         (JSC::JIT::emit_op_to_jsnumber):
1680         (JSC::JIT::emit_op_catch):
1681         (JSC::JIT::emit_op_eq_null):
1682         (JSC::JIT::emit_op_neq_null):
1683         (JSC::JIT::emit_op_convert_this):
1684         (JSC::JIT::emit_op_profile_will_call):
1685         (JSC::JIT::emit_op_profile_did_call):
1686         (JSC::JIT::emitSlow_op_get_by_val):
1687         * jit/JITPropertyAccess.cpp:
1688         (JSC::JIT::emit_op_get_by_val):
1689         (JSC::JIT::emit_op_put_by_val):
1690         (JSC::JIT::emit_op_method_check):
1691         (JSC::JIT::compileGetByIdHotPath):
1692         (JSC::JIT::emit_op_put_by_id):
1693         (JSC::JIT::compilePutDirectOffset):
1694         (JSC::JIT::compileGetDirectOffset):
1695         (JSC::JIT::privateCompilePutByIdTransition):
1696         (JSC::JIT::privateCompilePatchGetArrayLength):
1697         * jit/JITStubs.cpp:
1698         (JSC::JITThunks::JITThunks):
1699
1700 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
1701
1702         Reviewed by NOBODY (Windows build fix).
1703
1704         * jit/JIT.h:
1705         * jit/JITInlineMethods.h:
1706
1707 2009-06-19  Gabor Loki  <loki@inf.u-szeged.hu>
1708
1709         Reviewed by Gavin Barraclough.
1710
1711         Reorganize ARM architecture specific macros.
1712         Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
1713
1714         Bug 24986: ARM JIT port
1715         <https://bugs.webkit.org/show_bug.cgi?id=24986>
1716
1717         * assembler/ARMv7Assembler.h:
1718         * assembler/AbstractMacroAssembler.h:
1719         (JSC::AbstractMacroAssembler::Imm32::Imm32):
1720         * assembler/MacroAssembler.h:
1721         * assembler/MacroAssemblerCodeRef.h:
1722         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
1723         * jit/ExecutableAllocator.h:
1724         (JSC::ExecutableAllocator::cacheFlush):
1725         * jit/JIT.h:
1726         * jit/JITInlineMethods.h:
1727         (JSC::JIT::restoreArgumentReferenceForTrampoline):
1728         * jit/JITStubs.cpp:
1729         * jit/JITStubs.h:
1730         * wtf/Platform.h:
1731         * yarr/RegexJIT.cpp:
1732         (JSC::Yarr::RegexGenerator::generateEnter):
1733         (JSC::Yarr::RegexGenerator::generateReturn):
1734
1735 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
1736
1737         Reviewed by Oliver Hunt.
1738
1739         Fix armv7 JIT build issues.
1740
1741         Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
1742         and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
1743
1744         * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
1745         * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
1746
1747         * jit/JIT.cpp:
1748         * jit/JIT.h:
1749         * jit/JITInlineMethods.h:
1750         (JSC::JIT::restoreArgumentReference):
1751         * jit/JITOpcodes.cpp:
1752         (JSC::JIT::emit_op_catch):
1753         * jit/JITStubs.cpp:
1754         (JSC::JITThunks::JITThunks):
1755
1756 2009-06-19  Adam Treat  <adam.treat@torchmobile.com>
1757
1758         Blind attempt at build fix.
1759
1760         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1761         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1762
1763 2009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1764
1765         Reviewed by Oliver Hunt.
1766
1767         Inherits CallIdentifier struct from FastAllocBase because it has been
1768         instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
1769
1770         * wtf/HashCountedSet.h:
1771
1772 2009-06-19  Adam Treat  <adam.treat@torchmobile.com>
1773
1774         Reviewed by Oliver Hunt.
1775
1776         https://bugs.webkit.org/show_bug.cgi?id=26540
1777         Modify the test shell to add a new function 'checkSyntax' that will
1778         only parse the source instead of executing it. In this way we can test
1779         pure parsing performance against some of the larger scripts in the wild.
1780
1781         * jsc.cpp:
1782         (GlobalObject::GlobalObject):
1783         (functionCheckSyntax):
1784
1785 2009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
1786
1787         Reviewed by Darin Adler.
1788         
1789         Inherits HashCountedSet class from FastAllocBase because it has been
1790         instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
1791
1792         * wtf/HashCountedSet.h:
1793
1794 2009-06-19  Yong Li  <yong.li@torchmobile.com>
1795
1796         Reviewed by George Staikos.
1797
1798         https://bugs.webkit.org/show_bug.cgi?id=26558
1799         Declare these symbols extern for WINCE as they are provided by libce.
1800
1801         * runtime/DateConstructor.cpp:
1802         * runtime/DatePrototype.cpp:
1803         (JSC::formatLocaleDate):
1804
1805 2009-06-19  Oliver Hunt  <oliver@apple.com>
1806
1807         Reviewed by Maciej Stachowiak.
1808
1809         <rdar://problem/6988973> ScopeChain leak in interpreter builds
1810
1811         Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
1812         path.
1813
1814         * runtime/JSFunction.cpp:
1815         (JSC::JSFunction::~JSFunction):
1816         * wtf/Platform.h:
1817
1818 2009-06-19  Yong Li  <yong.li@torchmobile.com>
1819
1820         Reviewed by George Staikos.
1821
1822         https://bugs.webkit.org/show_bug.cgi?id=26543
1823         Windows CE uses 'GetLastError' instead of 'errno.'
1824
1825         * interpreter/RegisterFile.h:
1826         (JSC::RegisterFile::RegisterFile):
1827         (JSC::RegisterFile::grow):
1828
1829 2009-06-19  David Levin  <levin@chromium.org>
1830
1831         Reviewed by NOBODY (Windows build fix).
1832
1833         Add export for Windows corresponding to OSX export done in r44844.
1834         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1835         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1836
1837 2009-06-18  Oliver Hunt  <oliver@apple.com>
1838
1839         Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
1840
1841         Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
1842         <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
1843
1844         We need to make sure that each native function instance correctly unlinks any references to it
1845         when it is collected.  Allowing this to happen required a few changes:
1846             * Every native function needs a codeblock to track the link information
1847             * To have this codeblock, every function now also needs its own functionbodynode
1848               so we no longer get to have a single shared instance.
1849             * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
1850
1851         * JavaScriptCore.exp:
1852         * bytecode/CodeBlock.cpp:
1853         (JSC::CodeBlock::CodeBlock):
1854            Constructor for NativeCode CodeBlock
1855         (JSC::CodeBlock::derefStructures):
1856         (JSC::CodeBlock::refStructures):
1857         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
1858         (JSC::CodeBlock::handlerForBytecodeOffset):
1859         (JSC::CodeBlock::lineNumberForBytecodeOffset):
1860         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
1861         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
1862         (JSC::CodeBlock::functionRegisterForBytecodeOffset):
1863         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
1864         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
1865         (JSC::CodeBlock::setJITCode):
1866            Add assertions to ensure we don't try and use NativeCode CodeBlocks as
1867            a normal codeblock.
1868
1869         * bytecode/CodeBlock.h:
1870         (JSC::):
1871         (JSC::CodeBlock::source):
1872         (JSC::CodeBlock::sourceOffset):
1873         (JSC::CodeBlock::evalCodeCache):
1874         (JSC::CodeBlock::createRareDataIfNecessary):
1875           More assertions.
1876
1877         * jit/JIT.cpp:
1878         (JSC::JIT::privateCompileCTIMachineTrampolines):
1879         (JSC::JIT::linkCall):
1880           Update logic to allow native function caching
1881
1882         * jit/JITStubs.cpp:
1883         * parser/Nodes.cpp:
1884         (JSC::FunctionBodyNode::createNativeThunk):
1885         (JSC::FunctionBodyNode::isHostFunction):
1886         * parser/Nodes.h:
1887         * runtime/JSFunction.cpp:
1888         (JSC::JSFunction::JSFunction):
1889         (JSC::JSFunction::~JSFunction):
1890         (JSC::JSFunction::mark):
1891         * runtime/JSGlobalData.cpp:
1892         (JSC::JSGlobalData::~JSGlobalData):
1893         * runtime/JSGlobalData.h:
1894
1895 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
1896
1897         Reviewed by NOBODY (Windows build fix).
1898
1899         * wtf/DateMath.cpp:
1900         (WTF::calculateUTCOffset):
1901
1902 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
1903
1904         Reviewed by Geoff Garen.
1905
1906         Timezone calculation incorrect in Venezuela.
1907
1908         https://bugs.webkit.org/show_bug.cgi?id=26531
1909         <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
1910
1911         The problem is that we're calculating the timezone relative to 01/01/2000,
1912         but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
1913         According to the spec, section 15.9.1.9 states "the time since the beginning
1914         of the year", presumably meaning the *current* year.  Change the calculation
1915         to be based on whatever the current year is, rather than a canned date.
1916
1917         No performance impact.
1918
1919         * wtf/DateMath.cpp:
1920         (WTF::calculateUTCOffset):
1921
1922 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
1923
1924         Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
1925
1926         (Reintroducing patch added in r44492, and reverted in r44796.)
1927
1928         Change the implementation of op_throw so the stub function always modifies its
1929         return address - if it doesn't find a 'catch' it will switch to a trampoline
1930         to force a return from JIT execution.  This saves memory, by avoiding the need
1931         for a unique return for every op_throw.
1932
1933         * jit/JITOpcodes.cpp:
1934         (JSC::JIT::emit_op_throw):
1935             JITStubs::cti_op_throw now always changes its return address,
1936             remove return code generated after the stub call (this is now
1937             handled by ctiOpThrowNotCaught).
1938         * jit/JITStubs.cpp:
1939         (JSC::):
1940             Add ctiOpThrowNotCaught definitions.
1941         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1942             Change cti_op_throw to always change its return address.
1943         * jit/JITStubs.h:
1944             Add ctiOpThrowNotCaught declaration.
1945
1946 2009-06-18  Kevin McCullough  <kmccullough@apple.com>
1947
1948         Reviewed by Oliver Hunt.
1949
1950         <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
1951
1952         - Exposed functions now needed by WebCore.
1953
1954         * JavaScriptCore.exp:
1955
1956 2009-06-17  Darin Adler  <darin@apple.com>
1957
1958         Reviewed by Oliver Hunt.
1959
1960         Bug 26429: Make JSON.stringify non-recursive so it can handle objects
1961         of arbitrary complexity
1962         https://bugs.webkit.org/show_bug.cgi?id=26429
1963
1964         For marking I decided not to use gcProtect, because this is inside the engine
1965         so it's easy enough to just do marking. And that darned gcProtect does locking!
1966         Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
1967         for that class says "FIXME: Remove all clients of this API, then remove this API."
1968
1969         * runtime/Collector.cpp:
1970         (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
1971
1972         * runtime/CommonIdentifiers.cpp:
1973         (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
1974         * runtime/CommonIdentifiers.h: Ditto.
1975
1976         * runtime/JSGlobalData.cpp:
1977         (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
1978         * runtime/JSGlobalData.h: Added firstStringifierToMark.
1979
1980         * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
1981         (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
1982         objects to get their number and string values.
1983         (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
1984         to wrap an identifier or integer so we don't have to do any work unless we
1985         actually call a replacer.
1986         (JSC::ReplacerPropertyName::value): Added.
1987         (JSC::gap): Added. Helper function for the Stringifier constructor.
1988         (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
1989         The class is used to wrap an identifier or integer so we don't have to
1990         allocate a number or string until we actually call toJSON or a replacer.
1991         (JSC::PropertyNameForFunctionCall::asJSValue): Added.
1992         (JSC::Stringifier::Stringifier): Updated and moved out of the class
1993         definition. Added code to hook this into a singly linked list for marking.
1994         (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
1995         (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
1996         (JSC::Stringifier::stringify): Updated.
1997         (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
1998         (JSC::Stringifier::toJSON): Renamed from toJSONValue.
1999         (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
2000         Added code to use the m_holderStack to do non-recursive stringify of
2001         objects and arrays. This code also uses the timeout checker since in
2002         pathological cases it could be slow even without calling into the
2003         JavaScript virtual machine.
2004         (JSC::Stringifier::willIndent): Added.
2005         (JSC::Stringifier::indent): Added.
2006         (JSC::Stringifier::unindent): Added.
2007         (JSC::Stringifier::startNewLine): Added.
2008         (JSC::Stringifier::Holder::Holder): Added.
2009         (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
2010         function that handles the format of arrays and objects.
2011         (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
2012         of the file so the JSONObject class is not interleaved with the
2013         Stringifier class.
2014         (JSC::JSONObject::markStringifiers): Added. Calls mark.
2015         (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
2016         to compute the gap string is now a separate function.
2017
2018         * runtime/JSONObject.h: Made everything private. Added markStringifiers.
2019
2020 2009-06-17  Oliver Hunt  <oliver@apple.com>
2021
2022         Reviewed by Gavin Barraclough.
2023
2024         <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
2025
2026         Roll out r43849 as it appears that we cannot rely on the address of
2027         an objects property storage being constant even if the structure is
2028         unchanged.
2029
2030         * jit/JIT.h:
2031         * jit/JITPropertyAccess.cpp:
2032         (JSC::JIT::compileGetDirectOffset):
2033         (JSC::JIT::privateCompileGetByIdProto):
2034         (JSC::JIT::privateCompileGetByIdProtoList):
2035         (JSC::JIT::privateCompileGetByIdChainList):
2036         (JSC::JIT::privateCompileGetByIdChain):
2037
2038 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
2039
2040         Rubber Stamped by Mark Rowe.
2041
2042         Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
2043
2044         * jit/JITOpcodes.cpp:
2045         (JSC::JIT::emit_op_throw):
2046         * jit/JITStubs.cpp:
2047         (JSC::):
2048         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
2049         * jit/JITStubs.h:
2050
2051 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
2052
2053         Reviewed by Mark Rowe.
2054
2055         <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
2056
2057         On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
2058
2059         No performance impact.
2060
2061         * jit/JITArithmetic.cpp:
2062         (JSC::JIT::emit_op_rshift):
2063
2064 2009-06-17  Adam Treat  <adam.treat@torchmobile.com>
2065
2066         Reviewed by George Staikos.
2067
2068         https://bugs.webkit.org/show_bug.cgi?id=23155
2069         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
2070
2071         * jsc.cpp:
2072         (main):
2073
2074 2009-06-17  George Staikos  <george.staikos@torchmobile.com>
2075
2076         Reviewed by Adam Treat.
2077
2078         https://bugs.webkit.org/show_bug.cgi?id=23155
2079         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
2080
2081         * config.h:
2082         * jsc.cpp:
2083         * wtf/Assertions.cpp:
2084         * wtf/Assertions.h:
2085         * wtf/CurrentTime.cpp:
2086         (WTF::lowResUTCTime):
2087         * wtf/DateMath.cpp:
2088         (WTF::getLocalTime):
2089         * wtf/MathExtras.h:
2090         * wtf/Platform.h:
2091         * wtf/StringExtras.h:
2092         * wtf/Threading.h:
2093         * wtf/win/MainThreadWin.cpp:
2094
2095 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
2096
2097         Reviewed by Oliver Hunt.
2098
2099         <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
2100
2101         Remove PropertySlot::putValue - PropertySlots should only be used for getting,
2102         not putting.  Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
2103         which is what it really was being used to ask, and remove some other getOwnPropertySlot
2104         & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
2105
2106         * runtime/JSGlobalObject.h:
2107         (JSC::JSGlobalObject::hasOwnPropertyForWrite):
2108         * runtime/JSObject.h:
2109         * runtime/JSStaticScopeObject.cpp:
2110         * runtime/JSStaticScopeObject.h:
2111         * runtime/PropertySlot.h:
2112
2113 2009-06-16  Gavin Barraclough  <barraclough@apple.com>
2114
2115         Reviewed by Oliver hunt.
2116
2117         Temporarily partially disable r44492, since this is causing some problems on internal builds.
2118
2119         * jit/JITOpcodes.cpp:
2120         (JSC::JIT::emit_op_throw):
2121         * jit/JITStubs.cpp:
2122         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
2123
2124 2009-06-16  Sam Weinig  <sam@webkit.org>
2125
2126         Fix windows build.
2127
2128         * jit/JIT.cpp:
2129         (JSC::JIT::JIT):
2130
2131 2009-06-16  Sam Weinig  <sam@webkit.org>
2132
2133         Reviewed by Oliver Hunt.
2134
2135         Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
2136         it for each type of stub using the return address to find the correct
2137         offset.
2138
2139         * jit/JIT.cpp:
2140         (JSC::JIT::JIT):
2141         * jit/JIT.h:
2142         (JSC::JIT::compileGetByIdProto):
2143         (JSC::JIT::compileGetByIdSelfList):
2144         (JSC::JIT::compileGetByIdProtoList):
2145         (JSC::JIT::compileGetByIdChainList):
2146         (JSC::JIT::compileGetByIdChain):
2147         (JSC::JIT::compilePutByIdTransition):
2148         (JSC::JIT::compileCTIMachineTrampolines):
2149         (JSC::JIT::compilePatchGetArrayLength):
2150         * jit/JITStubCall.h:
2151         (JSC::JITStubCall::call):
2152
2153 == Rolled over to ChangeLog-2009-06-16 ==