<https://bugs.webkit.org/show_bug.cgi?id=29989>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2009-10-02  Steve Falkenburg  <sfalken@apple.com>
2
3         Reviewed by Mark Rowe.
4
5         <https://bugs.webkit.org/show_bug.cgi?id=29989>
6         Safari version number shouldn't be exposed in WebKit code
7         
8         For a WebKit version of 532.3.4:
9         Product version is: 5.32.3.4 (was 4.0.3.0)
10         File version is: 5.32.3.4 (was 4.532.3.4)
11
12         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
13
14 2009-10-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
15
16         Rubber-stamped by Simon Hausmann.
17
18         Fix the Qt on Mac OS X build.
19
20         * wtf/FastMalloc.cpp:
21
22 2009-10-02  Jørgen Lind  <jorgen.lind@nokia.com>
23
24         Reviewed by Simon Hausmann.
25
26         Allow enabling and disabling of the JIT through a qmake variable.
27
28         Qt's configure may set this variable through .qmake.cache if a
29         commandline option is given and/or the compile test for hwcap.h
30         failed/succeeded.
31
32         * JavaScriptCore.pri:
33
34 2009-10-01  Mark Rowe  <mrowe@apple.com>
35
36         Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
37
38         * Configurations/FeatureDefines.xcconfig:
39
40 2009-10-01  Yongjun Zhang  <yongjun.zhang@nokia.com>
41
42         Reviewed by Darin Adler.
43
44         https://bugs.webkit.org/show_bug.cgi?id=29187
45
46         Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
47         bug regarding templated classes.
48
49         The compiler bug is reported at:
50         https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
51
52         The change will be reverted when the above bug is fixed in winscw compiler.
53
54         * wtf/ListRefPtr.h:
55         (WTF::::~ListRefPtr):
56
57 2009-10-01  Zoltan Horvath  <zoltan@webkit.org>
58
59         Reviewed by Simon Hausmann.
60
61         [Qt] Allow custom memory allocation control for the whole JavaScriptCore
62         https://bugs.webkit.org/show_bug.cgi?id=27029
63
64         Since in JavaScriptCore almost every class which has been instantiated by operator new is
65         inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
66         when USE_SYSTEM_MALLOC=0.
67
68         Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
69         (It's needed for the functionality of TCmalloc.)
70
71         Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
72
73         * JavaScriptCore.pri:
74         * wtf/FastMalloc.cpp:
75         (WTF::sleep):
76         * wtf/FastMalloc.h:
77
78 2009-09-30  Gabor Loki  <loki@inf.u-szeged.hu>
79
80         Reviewed by George Staikos.
81
82         Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
83         https://bugs.webkit.org/show_bug.cgi?id=29122
84
85         Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
86         macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
87         when Thumb-2 instruction set is the required target. The
88         PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
89         case where the code is common the PLATFORM(ARM) have to be used.
90
91         Modified by George Wright  <gwright@rim.com> to correctly work
92         with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
93         compiler macros, as well as adding readability changes.
94
95         * wtf/Platform.h:
96
97 2009-09-30  Oliver Hunt  <oliver@apple.com>
98
99         Reviewed by Geoff Garen.
100
101         Devirtualise array toString conversion
102
103         Tweak the implementation of Array.prototype.toString to have a fast path
104         when acting on a true JSArray.
105
106         * runtime/ArrayPrototype.cpp:
107         (JSC::arrayProtoFuncToString):
108
109 2009-09-30  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
110
111         Reviewed by Geoffrey Garen.
112
113         Buildfix for platforms using JSVALUE32.
114         https://bugs.webkit.org/show_bug.cgi?id=29915
115
116         After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
117         Also removed unreachable code.
118
119         * jit/JITArithmetic.cpp:
120         (JSC::JIT::emit_op_add):
121          - Declaration of "OperandTypes types" moved before first use.
122          - Typos fixed: dst modified to result, regT2 added.
123          - Unreachable code removed.
124         (JSC::JIT::emitSlow_op_add):
125          - Missing declaration of "OperandTypes types" added.
126
127 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
128
129         Reviewed by Simon Hausmann.
130
131         Reduce heap size on Symbian from 64MB to 8MB.
132
133         This is not a perfect fix, it requires more fine tuning.
134         But this makes it possible again to debug in the emulator,
135         which is more important in order to be able to fix other
136         run-time issues.
137
138         * runtime/Collector.h:
139
140 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
141
142         Reviewed by Simon Hausmann.
143
144         Fix CRASH() macro for Symbian build.
145
146         * wtf/Assertions.h: Added missing }
147
148 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
149
150         Reviewed by Gavin Barraclough.
151
152         Inlined a few math operations.
153         
154         ~1% SunSpider speedup.
155
156         * jit/JIT.h:
157         * jit/JITArithmetic.cpp:
158         (JSC::JIT::compileBinaryArithOpSlowCase):
159         (JSC::JIT::emitSlow_op_add):
160         (JSC::JIT::emitSlow_op_mul):
161         (JSC::JIT::emit_op_sub):
162         (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
163         a constant int and a double.
164
165 2009-09-28  Oliver Hunt  <oliver@apple.com>
166
167         Reviewed by Gavin Barraclough.
168
169         Tidy up codeblock sampler
170         https://bugs.webkit.org/show_bug.cgi?id=29836
171
172         Some rather simple refactoring of codeblock sampler so that
173         it's easier for us to use it to find problems in non-jsc
174         environments
175
176         * JavaScriptCore.exp:
177         * bytecode/SamplingTool.h:
178         * debugger/Debugger.cpp:
179         (JSC::evaluateInGlobalCallFrame):
180         * debugger/DebuggerCallFrame.cpp:
181         (JSC::DebuggerCallFrame::evaluate):
182         * interpreter/Interpreter.cpp:
183         (JSC::Interpreter::Interpreter):
184         (JSC::Interpreter::execute):
185         (JSC::Interpreter::privateExecute):
186         (JSC::Interpreter::enableSampler):
187         (JSC::Interpreter::dumpSampleData):
188         (JSC::Interpreter::startSampling):
189         (JSC::Interpreter::stopSampling):
190         * interpreter/Interpreter.h:
191         (JSC::Interpreter::sampler):
192         * jit/JIT.h:
193         * jsc.cpp:
194         (runWithScripts):
195         * runtime/Completion.cpp:
196         (JSC::checkSyntax):
197         (JSC::evaluate):
198         * runtime/Executable.h:
199         (JSC::EvalExecutable::EvalExecutable):
200         (JSC::ProgramExecutable::create):
201         (JSC::ProgramExecutable::ProgramExecutable):
202         * runtime/JSGlobalData.cpp:
203         (JSC::JSGlobalData::startSampling):
204         (JSC::JSGlobalData::stopSampling):
205         (JSC::JSGlobalData::dumpSampleData):
206         * runtime/JSGlobalData.h:
207         * runtime/JSGlobalObjectFunctions.cpp:
208         (JSC::globalFuncEval):
209
210 2009-09-29  Jeremy Orlow  <jorlow@chromium.org>
211
212         Reviewed by Dimitri Glazkov.
213
214         Add GYP generated files to svn:ignore
215         https://bugs.webkit.org/show_bug.cgi?id=29895
216
217         The following files are generated by JavaScriptCore's GYP file and should be ignored:
218
219         pcre.mk
220         wtf.scons
221         wtf.mk
222         SConstruct
223         wtf_config.scons
224         wtf_config.mk
225         pcre.scons
226
227         * JavaScriptCore.gyp: Changed property svn:ignore.
228
229 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
230
231         Reviewed by Sam Weinig.
232
233         Standardized an optimization for adding non-numbers.
234         
235         SunSpider says maybe a tiny speedup.
236
237         * jit/JITArithmetic.cpp:
238         (JSC::JIT::emit_op_add):
239         (JSC::JIT::emitSlow_op_add):
240
241 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
242
243         Windows build fix: export a new symbol.
244
245         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
246         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
247
248 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
249
250         Reviewed by Sam Weinig.
251
252         Removed virtual destructor from JSGlobalObjectData to eliminate pointer
253         fix-ups when accessing JSGlobalObject::d.
254         
255         Replaced with an explicit destructor function pointer.
256         
257         6% speedup on bench-alloc-nonretained.js.
258
259         * JavaScriptCore.exp:
260         * runtime/JSGlobalObject.cpp:
261         (JSC::JSGlobalObject::~JSGlobalObject):
262         (JSC::JSGlobalObject::destroyJSGlobalObjectData):
263         * runtime/JSGlobalObject.h:
264         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
265         (JSC::JSGlobalObject::JSGlobalObject):
266
267 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
268
269         Reviewed by David Kilzer.
270
271         [Qt] Assert messages prints visible in Symbian
272         https://bugs.webkit.org/show_bug.cgi?id=29808
273
274         Asserts use vprintf to print the messages to stderr.
275         In Symbian Open C it is not possible to see stderr so
276         I routed the messages to stdout instead.
277
278         * wtf/Assertions.cpp:
279
280 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
281
282         Reviewed by Darin Adler.
283
284         [Qt] Symbian CRASH macro implementation
285
286         Added Symbian specific crash macro that
287         stops to crash line if JIT debugging is used.
288         Additional differentiation of access violation
289         (KERN-EXEC 3) and CRASH panic.
290
291         * wtf/Assertions.h:
292
293 2009-09-28  Mark Rowe  <mrowe@apple.com>
294
295         Fix the PowerPC build.
296
297         * JavaScriptCore.exp:
298
299 2009-09-28  Mark Rowe  <mrowe@apple.com>
300
301         Reviewed by Gavin Barraclough.
302
303         <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
304
305         * runtime/Collector.cpp:
306         (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
307         to ensure that we correctly interpret the contents of registers during marking.
308
309 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
310
311         Windows build fix: added new exports.
312
313         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
314         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
315
316 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
317
318         Windows build fix: removed exports that no longer exist.
319
320         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
321         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
322
323 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
324
325         Reviewed by Darin Adler.
326
327         NotNullPassRefPtr: smart pointer optimized for passing references that are not null
328         https://bugs.webkit.org/show_bug.cgi?id=29822
329         
330         Added NotNullPassRefPtr, and deployed it in all places that initialize
331         JavaScript objects.
332         
333         2.2% speedup on bench-allocate-nonretained.js.
334
335         * API/JSCallbackConstructor.cpp:
336         (JSC::JSCallbackConstructor::JSCallbackConstructor):
337         * API/JSCallbackConstructor.h:
338         * API/JSCallbackObject.h:
339         * API/JSCallbackObjectFunctions.h:
340         (JSC::JSCallbackObject::JSCallbackObject):
341         * JavaScriptCore.exp:
342         * bytecode/CodeBlock.h:
343         (JSC::CodeBlock::addFunctionDecl):
344         (JSC::CodeBlock::addFunctionExpr):
345         * runtime/ArrayConstructor.cpp:
346         (JSC::ArrayConstructor::ArrayConstructor):
347         * runtime/ArrayConstructor.h:
348         * runtime/ArrayPrototype.cpp:
349         (JSC::ArrayPrototype::ArrayPrototype):
350         * runtime/ArrayPrototype.h:
351         * runtime/BooleanConstructor.cpp:
352         (JSC::BooleanConstructor::BooleanConstructor):
353         * runtime/BooleanConstructor.h:
354         * runtime/BooleanObject.cpp:
355         (JSC::BooleanObject::BooleanObject):
356         * runtime/BooleanObject.h:
357         * runtime/BooleanPrototype.cpp:
358         (JSC::BooleanPrototype::BooleanPrototype):
359         * runtime/BooleanPrototype.h:
360         * runtime/DateConstructor.cpp:
361         (JSC::DateConstructor::DateConstructor):
362         * runtime/DateConstructor.h:
363         * runtime/DateInstance.cpp:
364         (JSC::DateInstance::DateInstance):
365         * runtime/DateInstance.h:
366         * runtime/DatePrototype.cpp:
367         (JSC::DatePrototype::DatePrototype):
368         * runtime/DatePrototype.h:
369         * runtime/ErrorConstructor.cpp:
370         (JSC::ErrorConstructor::ErrorConstructor):
371         * runtime/ErrorConstructor.h:
372         * runtime/ErrorInstance.cpp:
373         (JSC::ErrorInstance::ErrorInstance):
374         * runtime/ErrorInstance.h:
375         * runtime/ErrorPrototype.cpp:
376         (JSC::ErrorPrototype::ErrorPrototype):
377         * runtime/ErrorPrototype.h:
378         * runtime/FunctionConstructor.cpp:
379         (JSC::FunctionConstructor::FunctionConstructor):
380         * runtime/FunctionConstructor.h:
381         * runtime/FunctionPrototype.cpp:
382         (JSC::FunctionPrototype::FunctionPrototype):
383         * runtime/FunctionPrototype.h:
384         * runtime/GlobalEvalFunction.cpp:
385         (JSC::GlobalEvalFunction::GlobalEvalFunction):
386         * runtime/GlobalEvalFunction.h:
387         * runtime/InternalFunction.cpp:
388         (JSC::InternalFunction::InternalFunction):
389         * runtime/InternalFunction.h:
390         (JSC::InternalFunction::InternalFunction):
391         * runtime/JSActivation.cpp:
392         (JSC::JSActivation::JSActivation):
393         * runtime/JSActivation.h:
394         (JSC::JSActivation::JSActivationData::JSActivationData):
395         * runtime/JSArray.cpp:
396         (JSC::JSArray::JSArray):
397         * runtime/JSArray.h:
398         * runtime/JSByteArray.cpp:
399         (JSC::JSByteArray::JSByteArray):
400         * runtime/JSByteArray.h:
401         * runtime/JSFunction.cpp:
402         (JSC::JSFunction::JSFunction):
403         * runtime/JSFunction.h:
404         * runtime/JSGlobalObject.h:
405         (JSC::JSGlobalObject::JSGlobalObject):
406         * runtime/JSONObject.h:
407         (JSC::JSONObject::JSONObject):
408         * runtime/JSObject.h:
409         (JSC::JSObject::JSObject):
410         (JSC::JSObject::setStructure):
411         * runtime/JSVariableObject.h:
412         (JSC::JSVariableObject::JSVariableObject):
413         * runtime/JSWrapperObject.h:
414         (JSC::JSWrapperObject::JSWrapperObject):
415         * runtime/MathObject.cpp:
416         (JSC::MathObject::MathObject):
417         * runtime/MathObject.h:
418         * runtime/NativeErrorConstructor.cpp:
419         (JSC::NativeErrorConstructor::NativeErrorConstructor):
420         * runtime/NativeErrorConstructor.h:
421         * runtime/NativeErrorPrototype.cpp:
422         (JSC::NativeErrorPrototype::NativeErrorPrototype):
423         * runtime/NativeErrorPrototype.h:
424         * runtime/NumberConstructor.cpp:
425         (JSC::NumberConstructor::NumberConstructor):
426         * runtime/NumberConstructor.h:
427         * runtime/NumberObject.cpp:
428         (JSC::NumberObject::NumberObject):
429         * runtime/NumberObject.h:
430         * runtime/NumberPrototype.cpp:
431         (JSC::NumberPrototype::NumberPrototype):
432         * runtime/NumberPrototype.h:
433         * runtime/ObjectConstructor.cpp:
434         (JSC::ObjectConstructor::ObjectConstructor):
435         * runtime/ObjectConstructor.h:
436         * runtime/ObjectPrototype.cpp:
437         (JSC::ObjectPrototype::ObjectPrototype):
438         * runtime/ObjectPrototype.h:
439         * runtime/PropertyNameArray.h:
440         (JSC::PropertyNameArrayData::setCachedPrototypeChain):
441         * runtime/PrototypeFunction.cpp:
442         (JSC::PrototypeFunction::PrototypeFunction):
443         * runtime/PrototypeFunction.h:
444         * runtime/RegExpConstructor.cpp:
445         (JSC::RegExpConstructor::RegExpConstructor):
446         * runtime/RegExpConstructor.h:
447         * runtime/RegExpObject.cpp:
448         (JSC::RegExpObject::RegExpObject):
449         * runtime/RegExpObject.h:
450         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
451         * runtime/RegExpPrototype.cpp:
452         (JSC::RegExpPrototype::RegExpPrototype):
453         * runtime/RegExpPrototype.h:
454         * runtime/StringConstructor.cpp:
455         (JSC::StringConstructor::StringConstructor):
456         * runtime/StringConstructor.h:
457         * runtime/StringObject.cpp:
458         (JSC::StringObject::StringObject):
459         * runtime/StringObject.h:
460         * runtime/StringObjectThatMasqueradesAsUndefined.h:
461         (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
462         * runtime/StringPrototype.cpp:
463         (JSC::StringPrototype::StringPrototype):
464         * runtime/StringPrototype.h:
465         * wtf/PassRefPtr.h:
466         (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
467         (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
468         (WTF::NotNullPassRefPtr::get):
469         (WTF::NotNullPassRefPtr::clear):
470         (WTF::NotNullPassRefPtr::releaseRef):
471         (WTF::NotNullPassRefPtr::operator*):
472         (WTF::NotNullPassRefPtr::operator->):
473         (WTF::NotNullPassRefPtr::operator!):
474         (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
475         * wtf/RefPtr.h:
476         (WTF::RefPtr::RefPtr):
477         (WTF::operator==):
478
479 2009-09-28  Oliver Hunt  <oliver@apple.com>
480
481         Reviewed by Geoff Garen.
482
483         Hard dependency on SSE2 instruction set with JIT
484         https://bugs.webkit.org/show_bug.cgi?id=29779
485
486         Add floating point support checks to op_jfalse and op_jtrue, and
487         fix the logic for the slow case of op_add
488
489         * jit/JITArithmetic.cpp:
490         (JSC::JIT::emitSlow_op_add):
491         * jit/JITOpcodes.cpp:
492         (JSC::JIT::emit_op_jfalse):
493         (JSC::JIT::emit_op_jtrue):
494
495 2009-09-28  Yaar Schnitman  <yaar@chromium.org>
496
497         Reviewed by Dimitri Glazkov.
498
499         Chromium port - recognize we are being built independently
500         of chromium and look for dependencies under webkit/chromium rather
501         than chromium/src.
502
503         https://bugs.webkit.org/show_bug.cgi?id=29722
504
505         * JavaScriptCore.gyp/JavaScriptCore.gyp:
506
507 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
508
509         Reviewed by Simon Hausmann.
510
511         [Qt] Implement XSLT support with QtXmlPatterns.
512         https://bugs.webkit.org/show_bug.cgi?id=28303
513
514         * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
515
516 2009-09-28  Gabor Loki  <loki@inf.u-szeged.hu>
517
518         Reviewed by Simon Hausmann.
519
520         Remove __clear_cache which is an internal function of GCC
521         https://bugs.webkit.org/show_bug.cgi?id=28886
522
523         Although __clear_cache is exported from GCC, this is an internal
524         function. GCC makes no promises about it.
525
526         * jit/ExecutableAllocator.h:
527         (JSC::ExecutableAllocator::cacheFlush):
528
529 2009-09-28  Sam Weinig  <sam@webkit.org>
530
531         Reviewed by Oliver Hunt.
532
533         Fix an absolute path to somewhere in Oliver's machine to a relative path
534         for derived JSONObject.lut.h.
535
536         * JavaScriptCore.xcodeproj/project.pbxproj:
537
538 2009-09-28  Joerg Bornemann  <joerg.bornemann@nokia.com>
539
540         Reviewed by Simon Hausmann.
541
542         Add ARM version detection for Windows CE.
543
544         * wtf/Platform.h:
545
546 2009-09-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
547
548         Reviewed by Simon Hausmann.
549
550         Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
551
552         Re-use Windows shrinkAllocation implementation because Symbian doesn't
553         support releasing part of memory region.
554         
555         Use fastMalloc and fastFree to implement allocateStack and releaseStack
556         for Symbian port.
557
558         * JavaScriptCore.pri:
559         * runtime/MarkStack.h:
560         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
561         * runtime/MarkStackSymbian.cpp: Added.
562         (JSC::MarkStack::initializePagesize):
563         (JSC::MarkStack::allocateStack):
564         (JSC::MarkStack::releaseStack):
565
566 2009-09-25  Gabor Loki  <loki@inf.u-szeged.hu>
567
568         Reviewed by Gavin Barraclough.
569
570         Fix unaligned data access in YARR_JIT on ARMv5 and below.
571         https://bugs.webkit.org/show_bug.cgi?id=29695
572
573         On ARMv5 and below all data access should be naturally aligned.
574         In the YARR_JIT there is a case when character pairs are
575         loaded from the input string, but this data access is not
576         naturally aligned. This fix introduces load32WithUnalignedHalfWords
577         and branch32WithUnalignedHalfWords functions which contain
578         naturally aligned memory loads - half word loads - on ARMv5 and below.
579
580         * assembler/MacroAssemblerARM.cpp:
581         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
582         * assembler/MacroAssemblerARM.h:
583         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
584         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
585         * assembler/MacroAssemblerARMv7.h:
586         (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
587         (JSC::MacroAssemblerARMv7::branch32):
588         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
589         * assembler/MacroAssemblerX86Common.h:
590         (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
591         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
592         * wtf/Platform.h:
593         * yarr/RegexJIT.cpp:
594         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
595
596 2009-09-25  Jeremy Orlow  <jorlow@chromium.org>
597
598         This is breaking Chromium try bots, so I'm counting this as a build fix.
599
600         Add more svn:ignore exceptions.  On different platforms, these files are
601         generated with different case for JavaScriptCore.  Also there are some
602         wtf project files that get built apparently.
603
604         * JavaScriptCore.gyp: Changed property svn:ignore.
605
606 2009-09-25  Ada Chan  <adachan@apple.com>
607
608         Build fix.
609
610         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
611         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
612
613 2009-09-25  Geoffrey Garen  <ggaren@apple.com>
614
615         Reviewed by Darin Adler.
616
617         Inlined some object creation code, including lexicalGlobalObject access
618         https://bugs.webkit.org/show_bug.cgi?id=29750
619         
620         SunSpider says 0.5% faster.
621         
622         0.8% speedup on bench-alloc-nonretained.js.
623         2.5% speedup on v8-splay.js.
624
625         * interpreter/CachedCall.h:
626         (JSC::CachedCall::CachedCall):
627         * interpreter/CallFrame.h:
628         (JSC::ExecState::lexicalGlobalObject):
629         (JSC::ExecState::globalThisValue):
630         * interpreter/Interpreter.cpp:
631         (JSC::Interpreter::dumpRegisters):
632         (JSC::Interpreter::execute):
633         (JSC::Interpreter::privateExecute):
634         * jit/JITStubs.cpp:
635         (JSC::DEFINE_STUB_FUNCTION):
636         * runtime/FunctionConstructor.cpp:
637         (JSC::constructFunction):
638         * runtime/ScopeChain.cpp:
639         (JSC::ScopeChainNode::print):
640         * runtime/ScopeChain.h:
641         (JSC::ScopeChainNode::ScopeChainNode):
642         (JSC::ScopeChainNode::~ScopeChainNode):
643         (JSC::ScopeChainNode::push):
644         (JSC::ScopeChain::ScopeChain):
645         (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
646         Replaced accessor function for globalObject() with data member. Replaced
647         globalThisObject() accessor with direct access to globalThis, to match.
648
649         * runtime/JSGlobalObject.cpp:
650         (JSC::JSGlobalObject::init):
651         * runtime/JSGlobalObject.h: Inlined array and object construction.
652
653 2009-09-25  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
654
655         Reviewed by Gavin Barraclough.
656
657         Add ARM version detection rules for Symbian
658         https://bugs.webkit.org/show_bug.cgi?id=29715
659
660         * wtf/Platform.h:
661
662 2009-09-24  Xan Lopez  <xlopez@igalia.com>
663
664         Reviewed by Mark "Do It!" Rowe.
665
666         Some GCC versions don't like C++-style comments in preprocessor
667         directives, change to C-style to shut them up.
668
669         * wtf/Platform.h:
670
671 2009-09-24  Oliver Hunt  <oliver@apple.com>
672
673         Reviewed by Gavin Barraclough.
674
675         Division is needlessly slow in 64-bit
676         https://bugs.webkit.org/show_bug.cgi?id=29723
677
678         Add codegen for op_div on x86-64
679
680         * jit/JIT.cpp:
681         (JSC::JIT::privateCompileMainPass):
682         (JSC::JIT::privateCompileSlowCases):
683         * jit/JIT.h:
684         * jit/JITArithmetic.cpp:
685         (JSC::JIT::compileBinaryArithOpSlowCase):
686         (JSC::JIT::emit_op_div):
687         (JSC::JIT::emitSlow_op_div):
688         * jit/JITInlineMethods.h:
689         (JSC::JIT::isOperandConstantImmediateDouble):
690         (JSC::JIT::addressFor):
691         (JSC::JIT::emitLoadDouble):
692         (JSC::JIT::emitLoadInt32ToDouble):
693         (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
694
695 2009-09-24  Jeremy Orlow  <jorlow@chromium.org>
696
697         Reviewed by Dimitri Glazkov.
698
699         Add GYP generated files to svn:ignore
700         https://bugs.webkit.org/show_bug.cgi?id=29724
701
702         Adding the following files to the svn:ignore list (all in the
703         JavaScriptCore/JavaScriptCore.gyp directory)
704
705         JavaScriptCore.xcodeproj
706         JavaScriptCore.sln
707         JavaScriptCore.vcproj
708         JavaScriptCore_Debug.rules
709         JavaScriptCore_Release.rules
710         JavaScriptCore_Release - no tcmalloc.rules
711         JavaScriptCore_Purify.rules
712         JavaScriptCore.mk
713         JavaScriptCore_Debug_rules.mk
714         JavaScriptCore_Release_rules.mk
715         JavaScriptCore_Release - no tcmalloc_rules.mk
716         JavaScriptCore_Purify_rules.mk
717         JavaScriptCore.scons
718         JavaScriptCore_main.scons
719
720         * JavaScriptCore.gyp: Changed property svn:ignore.
721
722 2009-09-24  Yong Li  <yong.li@torchmobile.com>
723
724         Reviewed by Adam Barth.
725
726         Replace platform-dependent code with WTF::currentTime()
727         https://bugs.webkit.org/show_bug.cgi?id=29148
728
729         * jsc.cpp:
730         (StopWatch::start):
731         (StopWatch::stop):
732         (StopWatch::getElapsedMS):
733         * runtime/TimeoutChecker.cpp:
734         (JSC::getCPUTime):
735
736 2009-09-24  Mark Rowe  <mrowe@apple.com>
737
738         Reviewed by Sam Weinig.
739
740         <rdar://problem/7215058> FastMalloc scavenging thread should be named
741
742         * wtf/FastMalloc.cpp:
743         (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
744         * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
745         * wtf/ThreadingPthreads.cpp:
746         (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
747
748 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
749
750         Reviewed by Sam Weinig.
751
752         Renamed clear to removeAll, as suggested by Darin Adler.
753
754         * wtf/HashCountedSet.h:
755         (WTF::::removeAll):
756
757 2009-09-24  Mark Rowe  <mrowe@apple.com>
758
759         Reviewed by Gavin Barraclough.
760
761         Fix FastMalloc to build with assertions enabled.
762
763         * wtf/FastMalloc.cpp:
764         (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
765         * wtf/TCSpinLock.h:
766         (TCMalloc_SpinLock::IsHeld):
767
768 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
769
770         Suggested by Darin Adler.
771
772         Removed some unnecessary parameter names.
773
774         * wtf/HashCountedSet.h:
775
776 2009-09-24  Janne Koskinen  <janne.p.koskinen@digia.com>
777
778         Reviewed by Simon Hausmann.
779
780         On Windows JSChar is typedef'ed to wchar_t.
781
782         When building with WINSCW for Symbian we need to do the
783         same typedef.
784
785         * API/JSStringRef.h:
786
787 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
788
789         A piece of my last patch that I forgot.
790
791         * wtf/HashCountedSet.h:
792         (WTF::::clear): Added HashCountedSet::clear.
793
794 2009-09-24  Gabor Loki  <loki@inf.u-szeged.hu>
795
796         Reviewed by Gavin Barraclough.
797
798         Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set
799         https://bugs.webkit.org/show_bug.cgi?id=28886
800
801         There are some GCC packages (for example GCC-2006q3 from CodeSourcery)
802         which contain __clear_cache built-in function only for C while the C++
803         version of __clear_cache is missing on ARM architectures.
804
805         Fixed a small bug in the inline assembly of cacheFlush function on
806         ARM_TRADITIONAL.
807
808         * jit/ExecutableAllocator.h:
809         (JSC::ExecutableAllocator::cacheFlush):
810
811 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
812
813         Reviewed by Sam Weinig.
814
815         Added the ability to swap vectors with inline capacities, so you can
816         store a vector with inline capacity in a hash table.
817
818         * wtf/Vector.h:
819         (WTF::swap):
820         (WTF::VectorBuffer::swap):
821
822 2009-09-23  David Kilzer  <ddkilzer@apple.com>
823
824         Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
825
826         Reviewed by Mark Rowe.
827
828         * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when
829         building on 64-bit SnowLeopard.  Define to 0 elsewhere.
830
831 2009-09-22  Oliver Hunt  <oliver@apple.com>
832
833         Reviewed by Geoff Garen.
834
835         Code sampling builds are broken.
836         https://bugs.webkit.org/show_bug.cgi?id=29662
837
838         Fix build.
839
840         * bytecode/EvalCodeCache.h:
841         (JSC::EvalCodeCache::get):
842         * bytecode/SamplingTool.cpp:
843         (JSC::ScriptSampleRecord::sample):
844         (JSC::SamplingTool::doRun):
845         (JSC::SamplingTool::notifyOfScope):
846         (JSC::compareScriptSampleRecords):
847         (JSC::SamplingTool::dump):
848         * bytecode/SamplingTool.h:
849         (JSC::ScriptSampleRecord::ScriptSampleRecord):
850         (JSC::ScriptSampleRecord::~ScriptSampleRecord):
851         (JSC::SamplingTool::SamplingTool):
852         * bytecompiler/BytecodeGenerator.cpp:
853         (JSC::BytecodeGenerator::BytecodeGenerator):
854         (JSC::BytecodeGenerator::emitNewFunction):
855         (JSC::BytecodeGenerator::emitNewFunctionExpression):
856         * bytecompiler/BytecodeGenerator.h:
857         (JSC::BytecodeGenerator::makeFunction):
858         * debugger/Debugger.cpp:
859         (JSC::evaluateInGlobalCallFrame):
860         * debugger/DebuggerCallFrame.cpp:
861         (JSC::DebuggerCallFrame::evaluate):
862         * parser/Nodes.cpp:
863         (JSC::ScopeNode::ScopeNode):
864         * runtime/Completion.cpp:
865         (JSC::checkSyntax):
866         (JSC::evaluate):
867         * runtime/Executable.cpp:
868         (JSC::FunctionExecutable::fromGlobalCode):
869         * runtime/Executable.h:
870         (JSC::ScriptExecutable::ScriptExecutable):
871         (JSC::EvalExecutable::EvalExecutable):
872         (JSC::EvalExecutable::create):
873         (JSC::ProgramExecutable::ProgramExecutable):
874         (JSC::FunctionExecutable::create):
875         (JSC::FunctionExecutable::FunctionExecutable):
876         * runtime/JSGlobalObjectFunctions.cpp:
877         (JSC::globalFuncEval):
878
879 2009-09-22  Darin Adler  <darin@apple.com>
880
881         Reviewed by Sam Weinig.
882
883         * wtf/Forward.h: Added PassOwnPtr.
884
885 2009-09-22  Yaar Schnitman  <yaar@chromium.org>
886
887         Reviewed by David Levin.
888
889         Ported chromium.org's javascriptcore.gyp for the webkit chromium port.
890
891         https://bugs.webkit.org/show_bug.cgi?id=29617
892
893         * JavaScriptCore.gyp/JavaScriptCore.gyp: Added.
894
895 2009-09-22  Thiago Macieira  <thiago.macieira@nokia.com>
896
897         Reviewed by Simon Hausmann.
898
899         Fix compilation with WINSCW: no varargs macros
900
901         Disable variadic arguments for WINSCW just like we do
902         for MSVC7.
903
904         * wtf/Assertions.h:
905
906 2009-09-22  Kent Hansen  <khansen@trolltech.com>
907
908         Reviewed by Simon Hausmann.
909
910         Disable variadic macros on MSVC7.
911
912         This was originally added in r26589 but not extended
913         when LOG_DISABLED/ASSERT_DISABLED was introduced.
914
915         * wtf/Assertions.h:
916
917 2009-09-22  Simon Hausmann  <simon.hausmann@nokia.com>
918
919         Unreviewed build fix for Windows CE < 5
920
921         Define WINCEBASIC to disable the IsDebuggerPresent() code in
922         wtf/Assertions.cpp.
923
924         * JavaScriptCore.pri:
925
926 2009-09-22  Joerg Bornemann  <joerg.bornemann@nokia.com>
927
928         Reviewed by Simon Hausmann.
929
930         Fix major memory leak in JavaScriptCore RegisterFile on Windows CE
931
932         https://bugs.webkit.org/show_bug.cgi?id=29367
933
934         On Widows CE we must decommit all committed pages before we release
935         them. See VirtualFree documentation.
936         Desktop Windows behaves much smoother in this situation.
937
938         * interpreter/RegisterFile.cpp:
939         (JSC::RegisterFile::~RegisterFile):
940
941 2009-09-21  Greg Bolsinga  <bolsinga@apple.com>
942
943         Reviewed by Simon Fraser & Sam Weinig.
944
945         Add ENABLE(ORIENTATION_EVENTS)
946         https://bugs.webkit.org/show_bug.cgi?id=29508
947
948         * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines.
949
950 2009-09-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
951
952         Reviewed by Eric Seidel.
953
954         [Fix] SourceCode's uninitialized member
955         
956         Potential source of crashes and bugs was fixed. Default constructor
957         didn't initialized m_provider member.
958
959         https://bugs.webkit.org/show_bug.cgi?id=29364
960
961         * parser/SourceCode.h:
962         (JSC::SourceCode::SourceCode):
963
964 2009-09-21  Oliver Hunt  <oliver@apple.com>
965
966         Reviewed by Geoff Garen.
967
968         REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org
969         https://bugs.webkit.org/show_bug.cgi?id=29599
970
971         It is unsafe to attempt to cache new property transitions on
972         dictionaries of any type.
973
974         * interpreter/Interpreter.cpp:
975         (JSC::Interpreter::tryCachePutByID):
976         * jit/JITStubs.cpp:
977         (JSC::JITThunks::tryCachePutByID):
978
979 2009-09-21  Oliver Hunt  <oliver@apple.com>
980
981         RS=Maciej Stachowiak.
982
983         Re-land SNES fix with corrected assertion.
984
985         * interpreter/Interpreter.cpp:
986         (JSC::Interpreter::resolveGlobal):
987         (JSC::Interpreter::tryCachePutByID):
988         (JSC::Interpreter::tryCacheGetByID):
989         * jit/JITStubs.cpp:
990         (JSC::JITThunks::tryCachePutByID):
991         (JSC::JITThunks::tryCacheGetByID):
992         (JSC::DEFINE_STUB_FUNCTION):
993         * runtime/BatchedTransitionOptimizer.h:
994         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
995         * runtime/JSObject.cpp:
996         (JSC::JSObject::removeDirect):
997         * runtime/Structure.cpp:
998         (JSC::Structure::Structure):
999         (JSC::Structure::getEnumerablePropertyNames):
1000         (JSC::Structure::despecifyDictionaryFunction):
1001         (JSC::Structure::addPropertyTransitionToExistingStructure):
1002         (JSC::Structure::addPropertyTransition):
1003         (JSC::Structure::removePropertyTransition):
1004         (JSC::Structure::toDictionaryTransition):
1005         (JSC::Structure::toCacheableDictionaryTransition):
1006         (JSC::Structure::toUncacheableDictionaryTransition):
1007         (JSC::Structure::fromDictionaryTransition):
1008         (JSC::Structure::removePropertyWithoutTransition):
1009         * runtime/Structure.h:
1010         (JSC::Structure::isDictionary):
1011         (JSC::Structure::isUncacheableDictionary):
1012         (JSC::Structure::):
1013         * runtime/StructureChain.cpp:
1014         (JSC::StructureChain::isCacheable):
1015
1016 2009-09-21  Adam Roben  <aroben@apple.com>
1017
1018         Revert r48573, as it caused many assertion failures
1019
1020         * interpreter/Interpreter.cpp:
1021         * jit/JITStubs.cpp:
1022         * runtime/BatchedTransitionOptimizer.h:
1023         * runtime/JSObject.cpp:
1024         * runtime/Structure.cpp:
1025         * runtime/Structure.h:
1026         * runtime/StructureChain.cpp:
1027
1028 2009-09-21  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1029
1030         Unreviewed make dist build fix. Missing files.
1031
1032         * GNUmakefile.am:
1033
1034 2009-09-19  Gavin Barraclough  <barraclough@apple.com>
1035
1036         Reviewed by Sam 'Cabin Boy' Weinig.
1037
1038         Fix stack alignment with ARM THUMB2 JIT.
1039         https://bugs.webkit.org/show_bug.cgi?id=29526
1040         
1041         Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a
1042         multiple of 16 bytes.
1043
1044         * jit/JITStubs.cpp:
1045         (JSC::JITThunks::JITThunks):
1046         * jit/JITStubs.h:
1047
1048 2009-09-20  Oliver Hunt  <oliver@apple.com>
1049
1050         Reviewed by Maciej Stachowiak.
1051
1052         SNES is too slow
1053         https://bugs.webkit.org/show_bug.cgi?id=29534
1054
1055         The problem was that the emulator used multiple classes with
1056         more properties than our dictionary cutoff allowed, this resulted
1057         in more or less all critical logic inside the emulator requiring
1058         uncached property access.
1059
1060         Rather than simply bumping the dictionary cutoff, this patch
1061         recognises that there are two ways to create a "dictionary"
1062         structure.  Either by adding a large number of properties, or
1063         by removing a property.  In the case of adding properties we
1064         know all the existing properties will maintain their existing
1065         offsets, so we could cache access to those properties, if we
1066         know they won't be removed.
1067
1068         To make this possible, this patch adds the logic required to
1069         distinguish a dictionary created by addition from one created
1070         by removal.  With this logic in place we can now cache access
1071         to objects with large numbers of properties.
1072
1073         SNES performance improved by more than 6x.
1074
1075         * interpreter/Interpreter.cpp:
1076         (JSC::Interpreter::resolveGlobal):
1077         (JSC::Interpreter::tryCachePutByID):
1078         (JSC::Interpreter::tryCacheGetByID):
1079         * jit/JITStubs.cpp:
1080         (JSC::JITThunks::tryCachePutByID):
1081         (JSC::JITThunks::tryCacheGetByID):
1082         (JSC::DEFINE_STUB_FUNCTION):
1083         * runtime/BatchedTransitionOptimizer.h:
1084         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
1085         * runtime/JSObject.cpp:
1086         (JSC::JSObject::removeDirect):
1087         * runtime/Structure.cpp:
1088         (JSC::Structure::Structure):
1089         (JSC::Structure::getEnumerablePropertyNames):
1090         (JSC::Structure::despecifyDictionaryFunction):
1091         (JSC::Structure::addPropertyTransitionToExistingStructure):
1092         (JSC::Structure::addPropertyTransition):
1093         (JSC::Structure::removePropertyTransition):
1094         (JSC::Structure::toDictionaryTransition):
1095         (JSC::Structure::toCacheableDictionaryTransition):
1096         (JSC::Structure::toUncacheableDictionaryTransition):
1097         (JSC::Structure::fromDictionaryTransition):
1098         (JSC::Structure::removePropertyWithoutTransition):
1099         * runtime/Structure.h:
1100         (JSC::Structure::isDictionary):
1101         (JSC::Structure::isUncacheableDictionary):
1102         (JSC::Structure::):
1103         * runtime/StructureChain.cpp:
1104         (JSC::StructureChain::isCacheable):
1105
1106 2009-09-19  Oliver Hunt  <oliver@apple.com>
1107
1108         Reviewed by Maciej Stachowiak.
1109
1110         Implement ES5 Object.create function
1111         https://bugs.webkit.org/show_bug.cgi?id=29524
1112
1113         Implement Object.create.  Very simple patch, effectively Object.defineProperties
1114         only creating the target object itself.
1115
1116         * runtime/CommonIdentifiers.h:
1117         * runtime/ObjectConstructor.cpp:
1118         (JSC::ObjectConstructor::ObjectConstructor):
1119         (JSC::objectConstructorCreate):
1120
1121 2009-09-19  Dan Bernstein  <mitz@apple.com>
1122
1123         Fix clean debug builds.
1124
1125         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1126
1127 2009-09-19  Joerg Bornemann  <joerg.bornemann@nokia.com>
1128
1129         Reviewed by George Staikos.
1130
1131         QtWebKit Windows CE compile fix
1132
1133         https://bugs.webkit.org/show_bug.cgi?id=29379
1134
1135         There is no _aligned_alloc or _aligned_free on Windows CE.
1136         We just use the Windows code that was there before and use VirtualAlloc.
1137         But that also means that the BLOCK_SIZE must be 64K as this function
1138         allocates on 64K boundaries.
1139
1140         * runtime/Collector.cpp:
1141         (JSC::Heap::allocateBlock):
1142         (JSC::Heap::freeBlock):
1143         * runtime/Collector.h:
1144
1145 2009-09-19  Oliver Hunt  <oliver@apple.com>
1146
1147         Reviewed by Sam Weinig.
1148
1149         Implement ES5 Object.defineProperties function
1150         https://bugs.webkit.org/show_bug.cgi?id=29522
1151
1152         Implement Object.defineProperties.  Fairly simple patch, simply makes use of
1153         existing functionality used for defineProperty.
1154
1155         * runtime/CommonIdentifiers.h:
1156         * runtime/ObjectConstructor.cpp:
1157         (JSC::ObjectConstructor::ObjectConstructor):
1158         (JSC::defineProperties):
1159         (JSC::objectConstructorDefineProperties):
1160
1161 2009-09-19  Oliver Hunt  <oliver@apple.com>
1162
1163         Reviewed by NOBODY (Build fix).
1164
1165         Windows build fix part2
1166
1167         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1168         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1169
1170 2009-09-19  Oliver Hunt  <oliver@apple.com>
1171
1172         Reviewed by NOBODY (Buildfix).
1173
1174         Windows build fix part 1.
1175
1176         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1177         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1178
1179 2009-09-18  Oliver Hunt  <oliver@apple.com>
1180
1181         Reviewed by Geoff Garen.
1182
1183         Implement ES5 Object.defineProperty function
1184         https://bugs.webkit.org/show_bug.cgi?id=29503
1185
1186         Implement Object.defineProperty.  This requires adding the API to
1187         ObjectConstructor, along with a helper function that implements the
1188         ES5 internal [[ToPropertyDescriptor]] function.  It then adds
1189         JSObject::defineOwnProperty that implements the appropriate ES5 semantics.
1190         Currently defineOwnProperty uses a delete followed by a put to redefine
1191         attributes of a property, clearly this is less efficient than it could be
1192         but we can improve this if it needs to be possible in future.
1193
1194         * JavaScriptCore.exp:
1195         * debugger/DebuggerActivation.cpp:
1196         (JSC::DebuggerActivation::defineGetter):
1197         (JSC::DebuggerActivation::defineSetter):
1198         * debugger/DebuggerActivation.h:
1199         * interpreter/Interpreter.cpp:
1200         (JSC::Interpreter::privateExecute):
1201         * jit/JITStubs.cpp:
1202           Update defineGetter/Setter calls
1203         * runtime/CommonIdentifiers.h:
1204         * runtime/JSArray.cpp:
1205         (JSC::JSArray::getOwnPropertySlot):
1206         * runtime/JSGlobalObject.cpp:
1207         (JSC::JSGlobalObject::defineGetter):
1208         (JSC::JSGlobalObject::defineSetter):
1209         * runtime/JSGlobalObject.h:
1210         * runtime/JSObject.cpp:
1211         (JSC::JSObject::defineGetter):
1212         (JSC::JSObject::defineSetter):
1213         (JSC::putDescriptor):
1214         (JSC::JSObject::defineOwnProperty):
1215         * runtime/JSObject.h:
1216         * runtime/ObjectConstructor.cpp:
1217         (JSC::ObjectConstructor::ObjectConstructor):
1218         (JSC::objectConstructorGetOwnPropertyDescriptor):
1219         (JSC::toPropertyDescriptor):
1220         (JSC::objectConstructorDefineProperty):
1221         * runtime/ObjectPrototype.cpp:
1222         (JSC::objectProtoFuncDefineGetter):
1223         (JSC::objectProtoFuncDefineSetter):
1224         * runtime/PropertyDescriptor.cpp:
1225         (JSC::PropertyDescriptor::writable):
1226         (JSC::PropertyDescriptor::enumerable):
1227         (JSC::PropertyDescriptor::configurable):
1228         (JSC::PropertyDescriptor::isDataDescriptor):
1229         (JSC::PropertyDescriptor::isGenericDescriptor):
1230         (JSC::PropertyDescriptor::isAccessorDescriptor):
1231         (JSC::PropertyDescriptor::getter):
1232         (JSC::PropertyDescriptor::setter):
1233         (JSC::PropertyDescriptor::setDescriptor):
1234         (JSC::PropertyDescriptor::setAccessorDescriptor):
1235         (JSC::PropertyDescriptor::setWritable):
1236         (JSC::PropertyDescriptor::setEnumerable):
1237         (JSC::PropertyDescriptor::setConfigurable):
1238         (JSC::PropertyDescriptor::setSetter):
1239         (JSC::PropertyDescriptor::setGetter):
1240         (JSC::PropertyDescriptor::equalTo):
1241         (JSC::PropertyDescriptor::attributesEqual):
1242         (JSC::PropertyDescriptor::attributesWithOverride):
1243         * runtime/PropertyDescriptor.h:
1244         (JSC::PropertyDescriptor::PropertyDescriptor):
1245         (JSC::PropertyDescriptor::value):
1246         (JSC::PropertyDescriptor::setValue):
1247         (JSC::PropertyDescriptor::isEmpty):
1248         (JSC::PropertyDescriptor::writablePresent):
1249         (JSC::PropertyDescriptor::enumerablePresent):
1250         (JSC::PropertyDescriptor::configurablePresent):
1251         (JSC::PropertyDescriptor::setterPresent):
1252         (JSC::PropertyDescriptor::getterPresent):
1253         (JSC::PropertyDescriptor::operator==):
1254         (JSC::PropertyDescriptor::):
1255
1256 2009-09-18  Gabor Loki  <loki@inf.u-szeged.hu>
1257
1258         Reviewed by Gavin Barraclough.
1259
1260         Build fix to enable ARM_THUMB2 on Linux
1261         https://bugs.webkit.org/show_bug.cgi?id=
1262
1263         * jit/ExecutableAllocator.h:
1264         (JSC::ExecutableAllocator::cacheFlush):
1265         * jit/JITStubs.cpp:
1266         * wtf/Platform.h:
1267
1268 2009-09-18  Gabor Loki  <loki@inf.u-szeged.hu>
1269
1270         Reviewed by Gavin Barraclough.
1271
1272         Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
1273         https://bugs.webkit.org/show_bug.cgi?id=29122
1274
1275         Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
1276         macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
1277         when Thumb-2 instruction set is the required target. The
1278         PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
1279         case where the code is common the PLATFORM(ARM) have to be used.
1280
1281         * assembler/ARMAssembler.cpp:
1282         * assembler/ARMAssembler.h:
1283         * assembler/ARMv7Assembler.h:
1284         * assembler/MacroAssembler.h:
1285         * assembler/MacroAssemblerARM.cpp:
1286         * assembler/MacroAssemblerARM.h:
1287         * assembler/MacroAssemblerCodeRef.h:
1288         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
1289         * jit/ExecutableAllocator.h:
1290         * jit/JIT.h:
1291         * jit/JITInlineMethods.h:
1292         (JSC::JIT::beginUninterruptedSequence):
1293         (JSC::JIT::preserveReturnAddressAfterCall):
1294         (JSC::JIT::restoreReturnAddressBeforeReturn):
1295         (JSC::JIT::restoreArgumentReference):
1296         (JSC::JIT::restoreArgumentReferenceForTrampoline):
1297         * jit/JITOpcodes.cpp:
1298         * jit/JITStubs.cpp:
1299         (JSC::JITThunks::JITThunks):
1300         * jit/JITStubs.h:
1301         * wtf/Platform.h:
1302         * yarr/RegexJIT.cpp:
1303         (JSC::Yarr::RegexGenerator::generateEnter):
1304
1305 2009-09-18  Joerg Bornemann  <joerg.bornemann@nokia.com>
1306
1307         Reviewed by Simon Hausmann.
1308
1309         Fix the Qt/Windows CE build.
1310
1311         * JavaScriptCore.pri: Build the ce_time.cpp functions from
1312         within Qt externally.
1313         * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the
1314         Qt build these functions are no external, too.
1315
1316 2009-09-17  Janne Koskinen  <janne.p.koskinen@digia.com>
1317
1318         Reviewed by Simon Hausmann.
1319
1320         Symbian/WINSCW build fox.
1321
1322         Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to
1323         revision 24774.
1324
1325         WINSCW defines wchar_t, thus UChar has to be wchar_t
1326
1327         * wtf/unicode/qt4/UnicodeQt4.h:
1328
1329 2009-09-17  Janne Koskinen  <janne.p.koskinen@digia.com>
1330
1331         Reviewed by Simon Hausmann.
1332
1333         Symbian/WINSCW build fix.
1334
1335         https://bugs.webkit.org/show_bug.cgi?id=29186
1336
1337         WINSCW Template specialisation name in declaration must the be the same as in implementation.
1338
1339         * runtime/LiteralParser.h:
1340
1341 2009-09-15  Norbert Leser  <norbert.leser@nokia.com>
1342
1343         Reviewed by Darin Adler.
1344
1345         https://bugs.webkit.org/show_bug.cgi?id=27060
1346
1347         Symbian compiler for emulator target (WINSCW) fails with
1348         "illegal operand" for m_attributesInPrevious in structure.ccp
1349         (when calling make_pair functions).
1350         This error is apparently due to the compiler not properly
1351         resolving the unsigned type of the declared bitfield.
1352
1353         Initial patch explicitly casted m_attributesInPrevious
1354         to unsigned, but since bitfield optimization is not critical for
1355         the emulator target, this conditional change in header file
1356         appears to be least intrusive.
1357
1358         * runtime/Structure.h:
1359
1360 2009-09-16  Gabor Loki  <loki@inf.u-szeged.hu>
1361
1362         Reviewed by Darin Adler.
1363
1364         Fix GCC warnings on ARM_THUMB2 platform
1365
1366         * assembler/ARMv7Assembler.h:
1367         (JSC::ARMThumbImmediate::countLeadingZerosPartial):
1368         * assembler/MacroAssemblerARMv7.h:
1369         (JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32):
1370         (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
1371
1372 2009-09-16  Greg Bolsinga  <bolsinga@apple.com>
1373
1374         Add ENABLE(INSPECTOR)
1375         https://bugs.webkit.org/show_bug.cgi?id=29260
1376
1377         Reviewed by David Kilzer.
1378
1379         * wtf/Platform.h:
1380
1381 2009-09-16  Greg Bolsinga  <bolsinga@apple.com>
1382
1383         Add ENABLE(CONTEXT_MENUS)
1384         https://bugs.webkit.org/show_bug.cgi?id=29225
1385
1386         Reviewed by David Kilzer.
1387
1388         * wtf/Platform.h:
1389
1390 2009-09-16  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
1391
1392         Reviewed by Eric Seidel.
1393
1394         The webkit stdint and stdbool headers exists because
1395         the compiler MSVC doesn't include them.  The check
1396         should not check for PLATFORM(WIN_OS) but for MSVC.
1397
1398         * os-win32/stdbool.h:
1399         * os-win32/stdint.h:
1400
1401 2009-09-16  Greg Bolsinga  <bolsinga@apple.com>
1402
1403         Add ENABLE(DRAG_SUPPORT)
1404         https://bugs.webkit.org/show_bug.cgi?id=29233
1405
1406         Reviewed by David Kilzer.
1407
1408         * wtf/Platform.h:
1409
1410 2009-09-16  Kevin Ollivier  <kevino@theolliviers.com>
1411
1412         waf build fix after flag was moved to correct place.
1413
1414         * wscript:
1415
1416 2009-09-16  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1417
1418         Reviewed by Simon Hausmann.
1419
1420         [Qt] Build fix for 64-bit Qt on Mac OS X
1421
1422         * wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC
1423
1424 2009-09-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
1425
1426         Reviewed by Simon Hausmann.
1427
1428         [Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects.
1429         https://bugs.webkit.org/show_bug.cgi?id=29295
1430
1431         This is an important fix when JavaScript workers are in use, since
1432         unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each).
1433         QThreadStorage calls the destructor of a given object, which is the
1434         ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does
1435         not support the calling of a static utility function when the thread
1436         is about to close. In this patch we call the ThreadSpecific::destroy()
1437         utility function from the destructor of ThreadSpecific::Data. Moreover,
1438         since Qt resets all thread local values to 0 before the calling of the
1439         appropriate destructors, we set back the pointer to its original value.
1440         This is necessary because the get() method of the ThreadSpecific
1441         object may be called during the exuction of the destructor.
1442
1443         * wtf/ThreadSpecific.h:
1444         (WTF::ThreadSpecific::Data::~Data):
1445         (WTF::::~ThreadSpecific):
1446         (WTF::::set):
1447         (WTF::::destroy):
1448
1449 2009-09-10  Oliver Hunt  <oliver@apple.com>
1450
1451         Reviewed by Geoff Garen.
1452
1453         Allow anonymous storage inside JSObject
1454         https://bugs.webkit.org/show_bug.cgi?id=29168
1455
1456         Add the concept of anonymous slots to Structures so that it is
1457         possible to store references to values that need marking in the
1458         standard JSObject storage buffer.  This allows us to reduce the
1459         malloc overhead of some objects (by allowing them to store JS
1460         values in the inline storage of the object) and reduce the 
1461         dependence of custom mark functions (if all an objects children
1462         are in the standard object property storage there's no need to
1463         mark them manually).
1464
1465         * JavaScriptCore.exp:
1466         * runtime/JSObject.h:
1467         (JSC::JSObject::putAnonymousValue):
1468         (JSC::JSObject::getAnonymousValue):
1469         (JSC::JSObject::addAnonymousSlots):
1470         * runtime/JSWrapperObject.h:
1471         (JSC::JSWrapperObject::createStructure):
1472         (JSC::JSWrapperObject::JSWrapperObject):
1473         (JSC::JSWrapperObject::setInternalValue):
1474         * runtime/PropertyMapHashTable.h:
1475         * runtime/Structure.cpp:
1476         (JSC::Structure::~Structure):
1477         (JSC::Structure::materializePropertyMap):
1478         (JSC::Structure::addAnonymousSlotsTransition):
1479         (JSC::Structure::copyPropertyTable):
1480         (JSC::Structure::put):
1481         (JSC::Structure::rehashPropertyMapHashTable):
1482         * runtime/Structure.h:
1483         (JSC::Structure::propertyStorageSize):
1484         (JSC::StructureTransitionTable::reifySingleTransition):
1485         * runtime/StructureTransitionTable.h:
1486         (JSC::StructureTransitionTable::TransitionTable::addSlotTransition):
1487         (JSC::StructureTransitionTable::TransitionTable::removeSlotTransition):
1488         (JSC::StructureTransitionTable::TransitionTable::getSlotTransition):
1489         (JSC::StructureTransitionTable::getAnonymousSlotTransition):
1490         (JSC::StructureTransitionTable::addAnonymousSlotTransition):
1491         (JSC::StructureTransitionTable::removeAnonymousSlotTransition):
1492
1493 2009-09-15  Alex Milowski  <alex@milowski.com>
1494
1495         Reviewed by Tor Arne Vestbø.
1496
1497         Added the ENABLE_MATHML define to the features
1498
1499         * Configurations/FeatureDefines.xcconfig:
1500
1501 2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
1502
1503         Reviewed by Tor Arne Vestbø.
1504
1505         [Qt] Build fix for windows.
1506
1507         After http://trac.webkit.org/changeset/47795 the MinGW build broke,
1508         because MinGW has __mingw_aligned_malloc instead of _aligned_malloc.
1509
1510         * runtime/Collector.cpp:
1511         (JSC::Heap::allocateBlock): MinGW case added.
1512         (JSC::Heap::freeBlock): MinGW case added.
1513
1514 2009-09-15  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
1515
1516         Reviewed by Tor Arne Vestbø.
1517
1518         [Qt] Build fix for Windows/MinGW
1519
1520         https://bugs.webkit.org/show_bug.cgi?id=29268
1521
1522         * wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW)
1523
1524 2009-09-14  Gabor Loki  <loki@inf.u-szeged.hu>
1525
1526         Reviewed by Gavin Barraclough.
1527
1528         Detect VFP at runtime in generic ARM port on Linux platform.
1529         https://bugs.webkit.org/show_bug.cgi?id=29076
1530
1531         * JavaScriptCore.pri:
1532         * assembler/MacroAssemblerARM.cpp: Added.
1533         (JSC::isVFPPresent):
1534         * assembler/MacroAssemblerARM.h:
1535         (JSC::MacroAssemblerARM::supportsFloatingPoint):
1536
1537 2009-09-14  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
1538
1539         Reviewed by Tor Arne Vestbø.
1540
1541         [Qt] Build fix for windows build.
1542
1543         * JavaScriptCore.pri: Correct a logic error.
1544         * pcre/dftables: Add missing paranthesis for tmpdir function.
1545
1546 2009-09-12  Oliver Hunt  <oliver@apple.com>
1547
1548         Reviewed by NOBODY (Build fix).
1549
1550         Build fix for windows exports (again).
1551
1552         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1553         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1554
1555 2009-09-12  Oliver Hunt  <oliver@apple.com>
1556
1557         Reviewed by NOBODY (Build fix).
1558
1559         Build fix for windows exports.
1560
1561         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1562         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1563
1564 2009-09-12  Oliver Hunt  <oliver@apple.com>
1565
1566         Reviewed by NOBODY (Build fix).
1567
1568         Correct fix for non-allinonefile builds
1569
1570         * runtime/ObjectConstructor.cpp:
1571
1572 2009-09-12  Oliver Hunt  <oliver@apple.com>
1573
1574         Reviewed by NOBODY (Build fix).
1575
1576         Fix non-allinonefile builds
1577
1578         * runtime/ObjectConstructor.cpp:
1579
1580 2009-09-12  Oliver Hunt  <oliver@apple.com>
1581
1582         Reviewed by Maciej Stachowiak.
1583
1584         [ES5] Implement Object.keys
1585         https://bugs.webkit.org/show_bug.cgi?id=29170
1586
1587         This patch basically requires two separate steps, the first is to split getPropertyNames
1588         into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave
1589         in the same way as getOwnPropertySlot and getPropertySlot.  In essence getOwnPropertyNames
1590         produces the list of properties on an object excluding its prototype chain and getPropertyNames
1591         just iterates the the object and its prototype chain calling getOwnPropertyNames at each level.
1592
1593         * API/JSCallbackObject.h:
1594         * API/JSCallbackObjectFunctions.h:
1595         (JSC::::getOwnPropertyNames):
1596         * JavaScriptCore.exp:
1597         * debugger/DebuggerActivation.cpp:
1598         (JSC::DebuggerActivation::getOwnPropertyNames):
1599         * debugger/DebuggerActivation.h:
1600         * runtime/CommonIdentifiers.h:
1601         * runtime/JSArray.cpp:
1602         (JSC::JSArray::getOwnPropertyNames):
1603         * runtime/JSArray.h:
1604         * runtime/JSByteArray.cpp:
1605         (JSC::JSByteArray::getOwnPropertyNames):
1606         * runtime/JSByteArray.h:
1607         * runtime/JSNotAnObject.cpp:
1608         (JSC::JSNotAnObject::getOwnPropertyNames):
1609         * runtime/JSNotAnObject.h:
1610         * runtime/JSObject.cpp:
1611         (JSC::JSObject::getOwnPropertyNames):
1612         * runtime/JSObject.h:
1613         * runtime/JSVariableObject.cpp:
1614         (JSC::JSVariableObject::getOwnPropertyNames):
1615         * runtime/JSVariableObject.h:
1616         * runtime/ObjectConstructor.cpp:
1617         (JSC::ObjectConstructor::ObjectConstructor):
1618         (JSC::objectConstructorKeys):
1619         * runtime/RegExpMatchesArray.h:
1620         (JSC::RegExpMatchesArray::getOwnPropertyNames):
1621         * runtime/StringObject.cpp:
1622         (JSC::StringObject::getOwnPropertyNames):
1623         * runtime/StringObject.h:
1624         * runtime/Structure.cpp:
1625         (JSC::Structure::getOwnEnumerablePropertyNames):
1626         (JSC::Structure::getEnumerablePropertyNames):
1627         * runtime/Structure.h:
1628
1629 2009-09-11  Oliver Hunt  <oliver@apple.com>
1630
1631         Reviewed by Sam Weinig.
1632
1633         getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames
1634         https://bugs.webkit.org/show_bug.cgi?id=29214
1635
1636         Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames.
1637         This flag is used to make sure that caching of the property name data is safe.
1638
1639         * API/JSCallbackConstructor.h:
1640         (JSC::JSCallbackConstructor::createStructure):
1641         * debugger/DebuggerActivation.h:
1642         (JSC::DebuggerActivation::createStructure):
1643         * runtime/BooleanObject.h:
1644         (JSC::BooleanObject::createStructure):
1645         * runtime/DatePrototype.h:
1646         (JSC::DatePrototype::createStructure):
1647         * runtime/FunctionPrototype.h:
1648         (JSC::FunctionPrototype::createStructure):
1649         * runtime/JSONObject.h:
1650         (JSC::JSONObject::createStructure):
1651         * runtime/JSObject.h:
1652         (JSC::JSObject::createStructure):
1653         * runtime/JSTypeInfo.h:
1654         (JSC::TypeInfo::hasDefaultGetPropertyNames):
1655         * runtime/JSVariableObject.h:
1656         (JSC::JSVariableObject::createStructure):
1657         * runtime/JSWrapperObject.h:
1658         (JSC::JSWrapperObject::createStructure):
1659         * runtime/MathObject.h:
1660         (JSC::MathObject::createStructure):
1661         * runtime/NumberConstructor.h:
1662         (JSC::NumberConstructor::createStructure):
1663         * runtime/NumberObject.h:
1664         (JSC::NumberObject::createStructure):
1665         * runtime/RegExpConstructor.h:
1666         (JSC::RegExpConstructor::createStructure):
1667         * runtime/RegExpObject.h:
1668         (JSC::RegExpObject::createStructure):
1669         * runtime/StructureChain.cpp:
1670         (JSC::StructureChain::isCacheable):
1671
1672 2009-09-11  Alexey Proskuryakov  <ap@webkit.org>
1673
1674         Reviewed by Geoff Garen.
1675
1676         https://bugs.webkit.org/show_bug.cgi?id=29207
1677         Add checks for using WebCore JS context on secondary threads
1678
1679         * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
1680         * runtime/JSGlobalData.h:
1681         Added a new mainThreadOnly flag that WebCore would set.
1682
1683         * runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this,
1684         so this is a good place to check that the API isn't used form a wrong thread.
1685
1686 2009-09-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1687
1688         Reviewed by Simon Hausmann.
1689
1690         Compiling JavaScriptCore on sparc 64 with gcc fails.
1691
1692         ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int,
1693         however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes).
1694
1695         The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use
1696         a mutex instead when compiling for sparc 64 with gcc.
1697
1698         https://bugs.webkit.org/show_bug.cgi?id=29175
1699
1700         * wtf/Platform.h:
1701         __sparc64__ is not defined on all OS.
1702         Uses instead: __sparc__ && __arch64__ || __sparcv9
1703         * wtf/Threading.h:
1704
1705 2009-09-11  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
1706
1707         Reviewed by Simon Hausmann.
1708
1709         Fix compile error on Windows7(64Bit) with latest SDK.
1710
1711         Added the missing include file.
1712
1713         * runtime/UString.cpp:
1714
1715 2009-09-11  Joerg Bornemann  <joerg.bornemann@trolltech.com>
1716
1717         Reviewed by Simon Hausmann.
1718
1719         Qt/Windows CE compile fix, include the executable allocator and
1720         markstack implementation in the windows build.
1721
1722         * JavaScriptCore.pri:
1723
1724 2009-09-08  John Abd-El-Malek  <jam@chromium.org>
1725
1726         Reviewed by Dimitri Glazkov.
1727
1728         Remove unneeded define for ActiveX.
1729         https://bugs.webkit.org/show_bug.cgi?id=29054
1730
1731         * wtf/Platform.h:
1732
1733 2009-09-10  Mark Rowe  <mrowe@apple.com>
1734
1735         Rubber-stamped by Sam Weinig.
1736
1737         Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
1738
1739         * Configurations/FeatureDefines.xcconfig:
1740
1741 2009-09-10  Fumitoshi Ukai  <ukai@chromium.org>
1742
1743         Reviewed by Alexey Proskuryakov.
1744
1745         Export WTF::tryFastMalloc used in WebSocketChannel.
1746         https://bugs.webkit.org/show_bug.cgi?id=28038
1747
1748         * JavaScriptCore.exp:
1749         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1750         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1751
1752 2009-09-10  Oliver Hunt  <oliver@apple.com>
1753
1754         Reviewed by NOBODY (Build fix).
1755
1756         Make StructureTransitionTable use an enum for the PtrAndFlags member
1757         used for the single transition slot optimisation.
1758
1759         * runtime/StructureTransitionTable.h:
1760         (JSC::StructureTransitionTable::StructureTransitionTable):
1761         (JSC::StructureTransitionTable::usingSingleTransitionSlot):
1762         (JSC::StructureTransitionTable::):
1763
1764 2009-09-10  Oliver Hunt  <oliver@apple.com>
1765
1766         Reviewed by Geoff Garen.
1767
1768         Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization
1769         https://bugs.webkit.org/show_bug.cgi?id=29141
1770
1771         Make StructureTransitionTable encapsulate the single transition slot optimization.
1772
1773         * runtime/Structure.cpp:
1774         (JSC::Structure::Structure):
1775         (JSC::Structure::~Structure):
1776         (JSC::Structure::addPropertyTransitionToExistingStructure):
1777         (JSC::Structure::addPropertyTransition):
1778         (JSC::Structure::addPropertyWithoutTransition):
1779         (JSC::Structure::removePropertyWithoutTransition):
1780         (JSC::Structure::hasTransition):
1781         * runtime/Structure.h:
1782         (JSC::StructureTransitionTable::contains):
1783         (JSC::StructureTransitionTable::get):
1784         (JSC::StructureTransitionTable::hasTransition):
1785         (JSC::StructureTransitionTable::reifySingleTransition):
1786         * runtime/StructureTransitionTable.h:
1787         (JSC::StructureTransitionTable::StructureTransitionTable):
1788         (JSC::StructureTransitionTable::~StructureTransitionTable):
1789         (JSC::StructureTransitionTable::remove):
1790         (JSC::StructureTransitionTable::add):
1791         (JSC::StructureTransitionTable::table):
1792         (JSC::StructureTransitionTable::singleTransition):
1793         (JSC::StructureTransitionTable::usingSingleTransitionSlot):
1794         (JSC::StructureTransitionTable::setSingleTransition):
1795         (JSC::StructureTransitionTable::setTransitionTable):
1796         (JSC::StructureTransitionTable::):
1797         * wtf/PtrAndFlags.h:
1798         (WTF::PtrAndFlags::PtrAndFlags):
1799
1800 2009-09-10  Zoltan Horvath  <zoltan@webkit.org>
1801
1802         Reviewed by Darin Adler.
1803
1804         Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet
1805         https://bugs.webkit.org/show_bug.cgi?id=25930
1806
1807         FastAllocBase has been extended with fastDeleteSkippingDestructor function which
1808         releases memory without destructor call. fastDeleteAllValues has been implemented 
1809         similar as deleteAllValues but it uses fastDelete function to release memory.
1810
1811         * wtf/FastAllocBase.h:
1812         (WTF::fastDeleteSkippingDestructor):
1813         * wtf/HashSet.h:
1814         (WTF::fastDeleteAllValues):
1815
1816 2009-09-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1817
1818         Reviewed by Darin Adler.
1819
1820         ARM compiler does not understand GCC visibility attribute
1821         https://bugs.webkit.org/show_bug.cgi?id=29079
1822
1823         * API/JSBase.h: Make the test more specific to hit only
1824         the GCC compiler
1825
1826 2009-09-10  Adam Barth  <abarth@webkit.org>
1827
1828         Unreviewed revert of the previous change.  It broke the tests.
1829
1830         * wtf/dtoa.cpp:
1831         (WTF::dtoa):
1832
1833 2009-09-10  Ben Laurie  <benl@google.com>
1834
1835         Reviewed by Adam Barth.
1836
1837         <https://bugs.webkit.org/show_bug.cgi?id=26836>
1838
1839         If dtoa was given a small buffer and the number was either infinite or
1840         NaN, then the buffer would be overflowed.
1841
1842         * wtf/dtoa.cpp:
1843
1844 2009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1845
1846         Reviewed by Darin Adler.
1847
1848         Change reinterpret_cast to static_cast in r48212.
1849
1850         * jit/ExecutableAllocator.h:
1851         (JSC::ExecutableAllocator::cacheFlush):
1852
1853 2009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1854
1855         Reviewed by Darin Adler.
1856
1857         Remove WTF_PLATFORM_FORCE_PACK as it is no longer used
1858         https://bugs.webkit.org/show_bug.cgi?id=29066
1859
1860         * wtf/Platform.h:
1861
1862 2009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1863
1864         Reviewed by Ariya Hidayat.
1865
1866         Implement flushing the instruction cache for Symbian
1867         https://bugs.webkit.org/show_bug.cgi?id=29075
1868
1869         * jit/ExecutableAllocator.h:
1870         (JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush
1871         the instruction cache on Symbian
1872
1873 2009-09-09  Kent Hansen  <khansen@trolltech.com>
1874
1875         Reviewed by Darin Adler.
1876
1877         https://bugs.webkit.org/show_bug.cgi?id=29024
1878         Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL
1879
1880         These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler.
1881
1882         * JavaScriptCore.gypi:
1883         * JavaScriptCore.xcodeproj/project.pbxproj:
1884         * runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h.
1885         * runtime/Structure.h:
1886         * runtime/TypeInfo.h: Removed.
1887
1888 2009-09-08  Oliver Hunt  <oliver@apple.com>
1889
1890         Reviewed by Maciej Stachowiak.
1891
1892         JSON.stringify(Date) loses the milliseconds information
1893         https://bugs.webkit.org/show_bug.cgi?id=29063
1894
1895         Make sure we include milliseconds in the output of toISOString.
1896
1897         * runtime/DatePrototype.cpp:
1898         (JSC::dateProtoFuncToISOString):
1899
1900 2009-09-08  Kevin Ollivier  <kevino@theolliviers.com>
1901
1902         wx build fix, generate derived sources earlier in order to make sure
1903         they're found by the build system when generating the list of sources to build.
1904
1905         * wscript:
1906
1907 2009-09-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1908
1909         Reviewed by Simon Hausmann.
1910
1911         Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined
1912         https://bugs.webkit.org/show_bug.cgi?id=29011
1913
1914         * wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for 
1915         atomicIncrement and atomicDecrement
1916
1917 2009-09-07  Zoltan Horvath  <zoltan@webkit.org>
1918
1919         Reviewed by Darin Adler.
1920
1921         Allow custom memory allocation control in Yarr's RegexInterpreter
1922         https://bugs.webkit.org/show_bug.cgi?id=29025
1923
1924         Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has
1925         been instantiated by 'new':
1926
1927         class ByteDisjunction
1928         -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462
1929
1930         struct BytecodePattern
1931         -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279
1932
1933         * yarr/RegexInterpreter.h:
1934
1935 2009-09-07  Drew Wilson  <atwilson@google.com>
1936
1937         Reverting r48121 to fix Windows build errors.
1938
1939         * JavaScriptCore.exp:
1940
1941 2009-09-07  Drew Wilson  <atwilson@google.com>
1942
1943         Reviewed by David Levin.
1944
1945         Enable SHARED_WORKERS by default
1946         https://bugs.webkit.org/show_bug.cgi?id=28959
1947
1948         * Configurations/FeatureDefines.xcconfig:
1949
1950 2009-09-07  Fumitoshi Ukai  <ukai@chromium.org>
1951
1952         Reviewed by Alexey Proskuryakov.
1953
1954         Export WTF::tryFastMalloc used in WebSocketChannel.
1955         https://bugs.webkit.org/show_bug.cgi?id=28038
1956
1957         * JavaScriptCore.exp:
1958
1959 2009-09-04  Oliver Hunt  <oliver@apple.com>
1960
1961         Reviewed by NOBODY (Build fix).
1962
1963         Fix windows export files
1964
1965         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1966         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1967
1968 2009-09-04  Oliver Hunt  <oliver@apple.com>
1969
1970         Reviewed by Gavin Barraclough.
1971
1972         [[ToString]] conversion should use the actual toString function for String objects.
1973
1974         Remove incorrect specialisations of toString conversions on StringObject.
1975
1976         * JavaScriptCore.exp:
1977         * runtime/StringObject.cpp:
1978         * runtime/StringObject.h:
1979
1980 2009-09-04  Steve Falkenburg  <sfalken@apple.com>
1981
1982         Windows build fix.
1983
1984         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export.
1985         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export.
1986
1987 2009-09-04  Steve Falkenburg  <sfalken@apple.com>
1988
1989         Windows build fix.
1990
1991         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export.
1992         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export.
1993
1994 2009-09-04  Darin Adler  <darin@apple.com>
1995
1996         Reviewed by Geoff Garen.
1997
1998         DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
1999         https://bugs.webkit.org/show_bug.cgi?id=28909
2000
2001         Part two.
2002
2003         Make some improvements to garbage collection code:
2004
2005             1) Create a runtime assertion that catches any classes that
2006                override markChildren but have the HasDefaultMark bit set.
2007             2) Remove checks of the mark bit outside the MarkStack::append
2008                function; they are redundant.
2009             3) Improve the efficiency of the asObject and asArray functions
2010                when called on JSCell* to avoid a round trip to JSValue.
2011             4) Make more callers use the checked asCell and asObject
2012                casting functions rather than unchecked casts.
2013             5) Removed the JSCell::marked function and other GC-related
2014                functions because these operations are no longer things that
2015                code other than the core GC code needs to do directly. Fixed
2016                callers that were calling them.
2017
2018         * runtime/Collector.cpp:
2019         (JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain.
2020         (JSC::Heap::markProtectedObjects): Removed unneeded check of the mark
2021         bit and call to MarkStack::drain.
2022         (JSC::Heap::collect): Removed unneeded checks of the mark bit and also
2023         changed call to SmallStrings::mark to call markChildren instead to match
2024         the rest of the objects.
2025         (JSC::typeName): Removed unneeded cast to JSObject*.
2026
2027         * runtime/JSArray.h:
2028         (JSC::asArray): Added an overload for JSCell* and changed the JSValue
2029         version to call it. Removed some unneeded casts.
2030         (JSC::JSArray::markChildrenDirect): Marked this function inline. It's in
2031         a header, and if not marked inline this could lead to linking problems.
2032         (JSC::MarkStack::markChildren): Added. This helper function is used by
2033         the drain function to avoid repating code. Also added the code here to
2034         check fro default mark violations in debug code. If a markChildren
2035         function adds something to the mark stack, but the type info claimed
2036         hasDefaultMark was true, then we will get an assertion now. Also fixed
2037         the assertion about the mark bit to use the Heap function directly
2038         because we don't have a JSCell::marked function any more.
2039         (JSC::MarkStack::drain): Changed a local variable from "v" to "value",
2040         and from "currentCell" to "cell". Changed to call markChildren in two
2041         places instead of repeating a chain of if statements twice. Changed
2042         code that reads and writes the mark bit to use Heap::isCellMarked and
2043         Heap::markCell so we can eliminate the JSCell::marked and
2044         JSCell::markCellDirect functions.
2045
2046         * runtime/JSCell.h: Removed JSCell's markCellDirect and marked member
2047         functions. Added a comment explaining that asCell should be deprecated
2048         in favor of the JSValue asCell member function.
2049         (JSC::MarkStack::append): Added the assertion that catches callers
2050         that have set the HasDefaultMark bit incorrectly. Changed
2051         code that reads and writes the mark bit to use Heap::isCellMarked and
2052         Heap::markCell so we can eliminate the JSCell::marked and
2053         JSCell::markCellDirect functions. Moved the overload of
2054         MarkStack::append for JSValue here so it can call through to the cell
2055         version. The old version had a copy of all the code instead, but that
2056         repeated the conversion from JSValue to JSCell* and the check for
2057         whether a value is a cell multiple times.
2058         (JSC::Structure::markAggregate): Moved this function here to avoid
2059         dependencies for Structure.h, since this calls MarkStack::append.
2060
2061         * runtime/JSObject.cpp:
2062         (JSC::JSObject::markChildren): Added code to clear
2063         m_isCheckingForDefaultMarkViolation so the marking done by JSObject
2064         doesn't trigger the assertion.
2065
2066         * runtime/JSValue.h: Moved some stray includes that were outside the
2067         header guard inside it. Not sure how that happened! Removed the
2068         GC-related member functions markChildren, hasChildren, marked, and
2069         markDirect.
2070
2071         * runtime/JSWrapperObject.h: Made markChildren private.
2072         (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
2073         HasDefaultMark bit was set.
2074
2075         * runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and
2076         initialized it to false. Moved the append function body from here to
2077         JSCell.h. Added a declaration of a private markChildren function used
2078         inside the drain function.
2079
2080         * runtime/SmallStrings.cpp:
2081         (JSC::SmallStrings::markChildren): Changed the name and style of this
2082         function to match other functions. This allows us to share the normal
2083         mark stack code path.
2084
2085         * runtime/SmallStrings.h: Changed the name and interface of mark to
2086         the more-normal markChildren style.
2087
2088         * runtime/Structure.h: Moved the body of markAggregate into the
2089         JSCell.h to avoid a circular dependency with JSCell.h.
2090
2091 2009-09-04  Darin Adler  <darin@apple.com>
2092
2093         Reviewed by Geoff Garen.
2094
2095         DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
2096         https://bugs.webkit.org/show_bug.cgi?id=28909
2097
2098         Part one.
2099
2100         Make some improvements to garbage collection code:
2101
2102             1) Fix the two classes that had the default mark bit set but
2103                should not.
2104             2) Remove checks of the mark bit outside the MarkStack::append
2105                function; they are redundant.
2106             3) Make more callers use the checked asCell and asObject
2107                casting functions rather than unchecked casts.
2108             4) Removed some GC-related functions because these operations are
2109                no longer things that code other than the core GC code needs
2110                to do directly. Fixed callers that were calling them.
2111
2112         * bytecode/CodeBlock.cpp:
2113         (JSC::CodeBlock::markAggregate): Removed unneeded check of the mark
2114         bit before calling MarkStack::append.
2115
2116         * interpreter/Register.h: Removed unneeded marked and markChildren
2117         functions.
2118
2119         * jit/JITStubs.cpp:
2120         (op_eq): Removed unneeded assertions, instead using checked casting
2121         functions such as asObject.
2122
2123         * runtime/ArgList.h: Added now-needed forward declaration of MarkStack.
2124
2125         * runtime/GetterSetter.cpp:
2126         (JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit.
2127
2128         * runtime/GlobalEvalFunction.h:
2129         (JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the
2130         HasDefaultMark bit was set.
2131
2132         * runtime/JSCell.cpp:
2133         (JSC::JSCell::getObject): Use asObject to avoid a direct static_cast.
2134
2135         * runtime/JSObject.h:
2136         (JSC::asObject): Added an overload for JSCell* and changed the JSValue
2137         version to call it.
2138         (JSC::JSValue::get): Use asObject to avoid a direct static_cast.
2139
2140         * runtime/JSWrapperObject.h: Made markChildren private.
2141         (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
2142         HasDefaultMark bit was set. Later we may want to optimize this for
2143         wrapper types that never have cells in their internal values, but there
2144         is no measured performance regression in SunSpider or V8 doing this
2145         all the time.
2146
2147         * runtime/MarkStack.cpp: Tweaked formatting.
2148
2149 2009-09-04  Kevin Ollivier  <kevino@theolliviers.com>
2150
2151         wx build fix. Switch USE_ defines over to the compiler so that they can be
2152         checked by files not including config.h (like WebCorePrefix.h).
2153
2154         * wtf/Platform.h:
2155
2156 2009-09-03  Yong Li  <yong.li@torchmobile.com>
2157
2158         Reviewed by David Levin.
2159
2160         Remove unnecessary dependency on unistd.h
2161         https://bugs.webkit.org/show_bug.cgi?id=28962
2162
2163         * runtime/Completion.cpp:
2164
2165 2009-09-03  Fumitoshi Ukai  <ukai@chromium.org>
2166
2167         Reviewed by Eric Seidel.
2168
2169         Add strnstr for Linux and Windows in StringExtras.h
2170         https://bugs.webkit.org/show_bug.cgi?id=28901
2171
2172         * wtf/StringExtras.h:
2173         (strnstr):
2174
2175 2009-09-03  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
2176
2177         Reviewed by Darin Adler.
2178
2179         Allow custom memory allocation control for JavaScriptCore's HashEntry class
2180         https://bugs.webkit.org/show_bug.cgi?id=27830
2181
2182         Inherits HashEntry class from FastAllocBase because it has been
2183         instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32.
2184
2185         * runtime/Lookup.h:
2186
2187 2009-09-02  Gavin Barraclough  <barraclough@apple.com>
2188
2189         Should crash if JIT code buffer allocation fails.
2190
2191         https://bugs.webkit.org/show_bug.cgi?id=28926
2192         <rdar://problem/7031922>
2193
2194         * jit/ExecutableAllocatorPosix.cpp:
2195         (JSC::ExecutablePool::systemAlloc):
2196         * jit/ExecutableAllocatorWin.cpp:
2197         (JSC::ExecutablePool::systemAlloc):
2198
2199 2009-09-02  Kevin Ollivier  <kevino@theolliviers.com>
2200
2201         waf build fixes for Windows/MSVC.
2202
2203         * wscript:
2204
2205 2009-09-02  Kevin Ollivier  <kevino@theolliviers.com>
2206
2207         Build fix for building on Windows.
2208
2209         * wtf/ThreadingPthreads.cpp:
2210
2211 2009-09-02  Norbert Leser  <norbert.leser@nokia.com>
2212
2213         Reviewed by Eric Seidel.
2214
2215         Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled
2216         
2217         RegisterFile constructor currently throws #error when both
2218         MMAP and VIRTUALALLOC conditions fail.
2219         On any platform that does not provide these features
2220         (for instance, Symbian),
2221         the fallback should be regular malloc (or fastMalloc).
2222         It is functionally equivalent in this case, even though it may
2223         have certain drawbacks such as lack of dynamic pre-allocation.
2224
2225         * interpreter/RegisterFile.cpp:
2226         (JSC::RegisterFile::~RegisterFile):
2227         * interpreter/RegisterFile.h:
2228         (JSC::RegisterFile::RegisterFile):
2229
2230 2009-08-31  Robert Agoston  <Agoston.Robert@stud.u-szeged.hu>
2231
2232         Reviewed by Gavin Barraclough.
2233
2234         Fixed typo.
2235         https://bugs.webkit.org/show_bug.cgi?id=28691
2236
2237         * parser/Parser.h:
2238         (JSC::Parser::parse):
2239
2240 2009-08-27  Oliver Hunt  <oliver@apple.com>
2241
2242         Reviewed by Maciej Stachowiak.
2243
2244         JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects
2245         https://bugs.webkit.org/show_bug.cgi?id=28797
2246
2247         Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception
2248         checks, and corrected the logic in gap to correctly convert Number and String objects.
2249
2250         * runtime/JSONObject.cpp:
2251         (JSC::unwrapBoxedPrimitive):
2252         (JSC::gap):
2253         (JSC::Stringifier::Stringifier):
2254         (JSC::Stringifier::appendStringifiedValue):
2255
2256 2009-08-27  Oliver Hunt  <oliver@apple.com>
2257
2258         Reviewed by Adam Roben.
2259
2260         JSON.stringify replacer array does not accept values that are not string primitives.
2261         https://bugs.webkit.org/show_bug.cgi?id=28788
2262
2263         Update the JSON stringifier to initialise its replacer array according to the most
2264         recent version of the spec.
2265
2266         * runtime/Identifier.h:
2267         (JSC::Identifier::from):
2268         * runtime/JSONObject.cpp:
2269         (JSC::Stringifier::Stringifier):
2270
2271 2009-08-27  Alexey Proskuryakov  <ap@apple.com>
2272
2273         Reviewed by Oliver Hunt.
2274
2275         https://bugs.webkit.org/show_bug.cgi?id=28753
2276         <rdar://problem/7173448> Excessive number of threads (and a crash)
2277
2278         * wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement
2279         and return the new value. Also added using directives for these functions, to match
2280         te rest of WTF.
2281
2282 2009-08-27  Brent Fulgham  <bfulgham@webkit.org>
2283
2284         Reviewed by Adam Roben.
2285
2286         Link the testapi against CFLite when building the WinCairo port.
2287
2288         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite
2289           target.  Update all targets to inherit from either the
2290           JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops
2291           file (WinCairo target).
2292         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove
2293           input file CoreFoundation.lib. This is provided by either the
2294           JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file.
2295
2296 2009-08-27  Steve Falkenburg  <sfalken@apple.com>
2297
2298         Reviewed by Geoff Garen.
2299         
2300         Fix Windows-specific crash due to missing memory clearing call.
2301         
2302         * runtime/Collector.cpp:
2303         (JSC::Heap::allocateBlock):
2304
2305 2009-08-27  Brent Fulgham  <bfulgham@webkit.org>
2306
2307         Build fix: JavaScriptCore_debug.def missing some exports.  Apple
2308         Windows build does not use this file, so it was not noticed previously.
2309
2310         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2311
2312 2009-08-27  Gavin Barraclough  <barraclough@apple.com>
2313
2314         Reviewed by Oliver Hunt.
2315
2316         x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
2317         https://bugs.webkit.org/show_bug.cgi?id=28317
2318
2319         Missed one, fix part II.
2320
2321         * assembler/MacroAssemblerX86Common.h:
2322         (JSC::MacroAssemblerX86Common::move):
2323         * assembler/X86Assembler.h:
2324         (JSC::CAN_SIGN_EXTEND_8_32):
2325
2326 2009-08-27  Oliver Hunt  <oliver@apple.com>
2327
2328         Reviewed by Adam Roben.
2329
2330         JSON.stringify replacer array does not accept values that are not string primitives.
2331         https://bugs.webkit.org/show_bug.cgi?id=28788
2332
2333         Update the JSON stringifier to initialise its replacer array according to the most
2334         recent version of the spec.
2335
2336         * runtime/Identifier.h:
2337         (JSC::Identifier::from):
2338         * runtime/JSONObject.cpp:
2339         (JSC::Stringifier::Stringifier):
2340
2341 2009-08-27  Oliver Hunt  <oliver@apple.com>
2342
2343         Reviewed by Alexey Proskuryakov.
2344
2345         JSON parser accepts trailing comma in array literals
2346         https://bugs.webkit.org/show_bug.cgi?id=28779
2347
2348         Update parser to correctly fail if there's a trailing comma.
2349
2350         * runtime/LiteralParser.cpp:
2351         (JSC::LiteralParser::parse):
2352
2353 2009-08-26  Oliver Hunt  <oliver@apple.com>
2354
2355         Reviewed by Gavin Barraclough.
2356
2357         'this' in JSON.parse reviver is the global object
2358         https://bugs.webkit.org/show_bug.cgi?id=28752
2359
2360         This is a technically simple change, we merely update the code for calling
2361         the reviver function to pass the correct this object.  Doing so however
2362         exposes the holder to arbitrary mutation by the reviver function so it is
2363         necessary for us to now guard all property accesses against the possibility
2364         of failure.
2365
2366         * runtime/JSArray.h:
2367           JSON needs to delete a property from the array, so we friend its 
2368           Walker class so that we can make a non-virtual call to the arrays
2369           delete and getOwnPropertySlot methods.
2370         * runtime/JSONObject.cpp:
2371         (JSC::Walker::callReviver):
2372           We need to pass the correct this object
2373         (JSC::Walker::walk):
2374           Update calls to callReviver, and update property logic logic
2375           to correctly handle the holder being mutated by the reviver
2376           function.
2377
2378 2009-08-26  Alice Liu  <alice.liu@apple.com>
2379
2380         Windows build fix: added some exported symbols
2381
2382         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2383         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2384
2385 2009-08-26  Geoffrey Garen  <ggaren@apple.com>
2386
2387         Windows build fix: Removed some exported symbols that no longer exist.
2388
2389         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2390         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2391
2392 2009-08-26  Gavin Barraclough  <barraclough@apple.com>
2393
2394         Reviewed by Olliejver Hunt.
2395
2396         x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
2397         https://bugs.webkit.org/show_bug.cgi?id=28317
2398
2399         We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page,
2400         so pointers are never representable as a 32-bit integer, and always have to be represented by
2401         a separate immediate load instruction, rather than within the immediate field of an arithmetic
2402         or memory operation.
2403
2404         We explicitly check for a couple of cases where a value might be representable in 32-bit, but
2405         these probably never kick in on Mac OS, and only kick in to hose GTK.  Deleting these does not
2406         show a performance degradation on SunSpider.  Remove.
2407
2408         * assembler/MacroAssemblerX86_64.h:
2409         (JSC::MacroAssemblerX86_64::storePtr):
2410         (JSC::MacroAssemblerX86_64::branchPtr):
2411
2412 2009-08-26  Geoffrey Garen  <ggaren@apple.com>
2413
2414         Reviewed by Oliver Hunt.
2415
2416         A bit of Collector refatoring.
2417         
2418         SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay).
2419
2420         * JavaScriptCore.exp:
2421
2422         * runtime/JSCell.cpp:
2423         (JSC::JSCell::toPrimitive):
2424         (JSC::JSCell::getPrimitiveNumber):
2425         (JSC::JSCell::toBoolean):
2426         (JSC::JSCell::toNumber):
2427         (JSC::JSCell::toString):
2428         (JSC::JSCell::toObject): Removed pure virtual functions from
2429         JSCell, so the collector can construct one. This allowed
2430         me to remove a bunch of ASSERT_NOT_REACHED throughout the
2431         code, too.
2432
2433         * runtime/JSCell.h:
2434         (JSC::JSCell::JSCell): ditto
2435         (JSC::Heap::heap): Inlined this function because it's trivial.
2436
2437         * JavaScriptCore.exp:
2438
2439         * runtime/Collector.cpp:
2440         (JSC::Heap::destroy):
2441         (JSC::Heap::allocateBlock):
2442         (JSC::Heap::freeBlock):
2443         (JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since
2444         it doesn't actually free the Heap object.
2445         (JSC::Heap::heapAllocate):
2446         (JSC::Heap::sweep):
2447         * runtime/Collector.h: Refactored block allocation and destruction
2448         into helper functions.
2449         
2450         * runtime/GetterSetter.cpp:
2451         * runtime/JSAPIValueWrapper.cpp:
2452         * runtime/JSPropertyNameIterator.cpp: Removed dummy implementations
2453         of pure virtual functions. (See above.)
2454
2455 === End re-roll-in of r47738:47740 with Windows crash fixed ===
2456
2457 2009-08-26  Geoffrey Garen  <ggaren@apple.com>
2458
2459         Build fix: start out with a 32-bit value to avoid a shortening warning.
2460
2461         * runtime/Collector.cpp:
2462         (JSC::Heap::sweep):
2463
2464 2009-08-24  Geoffrey Garen  <ggaren@apple.com>
2465
2466         Reviewed by Oliver Hunt.
2467
2468         Substantially reduced VM thrash in the GC heap.
2469         
2470         1.08x faster on v8 (1.60x faster on v8-splay).
2471         
2472         1.40x faster on bench-alloc-nonretained.
2473         
2474         1.90x faster on bench-alloc-retained.
2475         
2476         SunSpider says no change.
2477         
2478         * runtime/Collector.cpp:
2479         (JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local
2480         variables unconditionally after calling collect(), since they may be used
2481         even if we don't "goto scan". (In the bug I saw, usedBlocks got out of
2482         sync with heap.usedBlocks).
2483         (JSC::Heap::sweep): Keep enough free heap space to accomodate 
2484         the number of objects we'll allocate before the next GC, plus 25%, for
2485         good measure.
2486         * runtime/Collector.h: Bumped the block size to 256k. This seems to give
2487         the best cache performance, and it prevents us from initiating lots of
2488         VM traffic to recover very small chunks of memory.
2489
2490 === Begin re-roll-in of r47738:47740 with Windows crash fixed ===
2491
2492 2009-08-25  Drew Wilson  <atwilson@google.com>
2493
2494         Reviewed by David Levin.
2495
2496         postMessage() spec now supports sending arrays of ports
2497         https://bugs.webkit.org/show_bug.cgi?id=26902
2498
2499         Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors.
2500
2501         * wtf/VectorTraits.h:
2502
2503 2009-08-26  Xan Lopez  <xlopez@igalia.com>
2504
2505         Rubber-stamped by Gustavo Noronha.
2506
2507         Remove duplicated files from file list.
2508
2509         * GNUmakefile.am:
2510
2511 2009-08-26  Oliver Hunt  <oliver@apple.com>
2512
2513         Reviewed by NOBODY (Build fix).
2514
2515         More export fixes.
2516
2517         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2518         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2519
2520 2009-08-26  Oliver Hunt  <oliver@apple.com>
2521
2522         Reviewed by NOBODY (Build fix).
2523
2524         Hopefully fix all the exports from JSC on windows
2525
2526         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2527         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2528
2529 2009-08-26  Oliver Hunt  <oliver@apple.com>
2530
2531         Reviewed by NOBODY (Build fixes).
2532
2533         Forgot I added files to JavaScriptCore. 
2534
2535         * GNUmakefile.am:
2536         * JavaScriptCore.gypi:
2537         * JavaScriptCore.pri:
2538         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2539         * JavaScriptCoreSources.bkl:
2540
2541 2009-08-25  Oliver Hunt  <oliver@apple.com>
2542
2543         Reviewed by Gavin Barraclough.
2544
2545         [ES5] Implement getOwnPropertyDescriptor
2546         https://bugs.webkit.org/show_bug.cgi?id=28724
2547
2548         Implement the core runtime support for getOwnPropertyDescriptor.
2549         This adds a virtual getOwnPropertyDescriptor method to every class
2550         that implements getOwnPropertySlot that shadows the behaviour of
2551         getOwnPropertySlot.  The alternative would be to make getOwnPropertySlot
2552         (or PropertySlots in general) provide property attribute information,
2553         but quick testing showed this to be a regression.
2554
2555         * JavaScriptCore.exp:
2556         * JavaScriptCore.xcodeproj/project.pbxproj:
2557         * runtime/Arguments.cpp:
2558         (JSC::Arguments::getOwnPropertyDescriptor):
2559         * runtime/Arguments.h:
2560         * runtime/ArrayPrototype.cpp:
2561         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2562         * runtime/ArrayPrototype.h:
2563         * runtime/CommonIdentifiers.h:
2564         * runtime/DatePrototype.cpp:
2565         (JSC::DatePrototype::getOwnPropertyDescriptor):
2566         * runtime/DatePrototype.h:
2567         * runtime/JSArray.cpp:
2568         (JSC::JSArray::getOwnPropertyDescriptor):
2569         * runtime/JSArray.h:
2570         * runtime/JSByteArray.cpp:
2571         (JSC::JSByteArray::getOwnPropertyDescriptor):
2572         * runtime/JSByteArray.h:
2573         * runtime/JSFunction.cpp:
2574         (JSC::JSFunction::getOwnPropertyDescriptor):
2575         * runtime/JSFunction.h:
2576         * runtime/JSGlobalObject.h:
2577         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2578         * runtime/JSNotAnObject.cpp:
2579         (JSC::JSNotAnObject::getOwnPropertyDescriptor):
2580         * runtime/JSNotAnObject.h:
2581         * runtime/JSONObject.cpp:
2582         (JSC::JSONObject::getOwnPropertySlot):
2583         (JSC::JSONObject::getOwnPropertyDescriptor):
2584         * runtime/JSONObject.h:
2585         * runtime/JSObject.cpp:
2586         (JSC::JSObject::getOwnPropertyDescriptor):
2587         (JSC::JSObject::getPropertyDescriptor):
2588         * runtime/JSObject.h:
2589         * runtime/JSString.cpp:
2590         (JSC::JSString::getStringPropertyDescriptor):
2591         (JSC::JSString::getOwnPropertyDescriptor):
2592         * runtime/JSString.h:
2593         * runtime/JSVariableObject.cpp:
2594         (JSC::JSVariableObject::symbolTableGet):
2595         * runtime/JSVariableObject.h:
2596         * runtime/Lookup.h:
2597         (JSC::getStaticPropertyDescriptor):
2598         (JSC::getStaticFunctionDescriptor):
2599         (JSC::getStaticValueDescriptor):
2600           Add property descriptor equivalents of the lookup
2601           table access functions
2602
2603         * runtime/MathObject.cpp:
2604         (JSC::MathObject::getOwnPropertySlot):
2605         (JSC::MathObject::getOwnPropertyDescriptor):
2606         * runtime/MathObject.h:
2607         * runtime/NumberConstructor.cpp:
2608         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2609         * runtime/NumberConstructor.h:
2610         * runtime/ObjectConstructor.cpp:
2611         (JSC::ObjectConstructor::ObjectConstructor):
2612         (JSC::objectConstructorGetOwnPropertyDescriptor):
2613         * runtime/PropertyDescriptor.cpp: Added.
2614         (JSC::PropertyDescriptor::writable):
2615         (JSC::PropertyDescriptor::enumerable):
2616         (JSC::PropertyDescriptor::configurable):
2617         (JSC::PropertyDescriptor::hasAccessors):
2618         (JSC::PropertyDescriptor::setUndefined):
2619         (JSC::PropertyDescriptor::getter):
2620         (JSC::PropertyDescriptor::setter):
2621         (JSC::PropertyDescriptor::setDescriptor):
2622         (JSC::PropertyDescriptor::setAccessorDescriptor):
2623         * runtime/PropertyDescriptor.h: Added.
2624         (JSC::PropertyDescriptor::PropertyDescriptor):
2625         (JSC::PropertyDescriptor::attributes):
2626         (JSC::PropertyDescriptor::isValid):
2627         (JSC::PropertyDescriptor::value):
2628         * runtime/RegExpConstructor.cpp:
2629         (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2630         * runtime/RegExpConstructor.h:
2631         * runtime/RegExpMatchesArray.h:
2632         (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2633         * runtime/RegExpObject.cpp:
2634         (JSC::RegExpObject::getOwnPropertyDescriptor):
2635         * runtime/RegExpObject.h:
2636         * runtime/StringObject.cpp:
2637         (JSC::StringObject::getOwnPropertyDescriptor):
2638         * runtime/StringObject.h:
2639         * runtime/StringPrototype.cpp:
2640         (JSC::StringPrototype::getOwnPropertyDescriptor):
2641         * runtime/StringPrototype.h:
2642
2643 2009-08-24  Gavin Barraclough  <barraclough@apple.com>
2644
2645         Reviewed by Darin Adler.
2646
2647         How many copies of the parameters do you need?
2648         https://bugs.webkit.org/show_bug.cgi?id=28701
2649
2650         The function parameters in JSC get copied a lot - and unnecessarily so.
2651
2652         Originally this happened due to duplicating FunctionBodyNodes on recompilation,
2653         though the problem has been exacerbated by copying the parameters from the
2654         original function body onto the executable, then back onto the real body that
2655         will be generated (this happens on every function).  And this is all made worse
2656         since the data structures in question are a little ugly - C style arrays of C++
2657         objects containing ref counts, so they need a full copy-construct (rather than
2658         a simple memcpy).
2659
2660         This can all be greatly simplified by just punting the parameters off into
2661         their own ref-counted object, and forgoing all the copying.
2662
2663         ~no performance change, possible slight progression.
2664
2665         * bytecompiler/BytecodeGenerator.cpp:
2666         (JSC::BytecodeGenerator::BytecodeGenerator):
2667         * bytecompiler/BytecodeGenerator.h:
2668         (JSC::BytecodeGenerator::makeFunction):
2669         * parser/Nodes.cpp:
2670         (JSC::FunctionParameters::FunctionParameters):
2671         (JSC::FunctionBodyNode::FunctionBodyNode):
2672         (JSC::FunctionBodyNode::finishParsing):
2673         * parser/Nodes.h:
2674         (JSC::FunctionBodyNode::parameters):
2675         (JSC::FunctionBodyNode::parameterCount):
2676         * runtime/Executable.cpp:
2677         (JSC::FunctionExecutable::~FunctionExecutable):
2678         (JSC::FunctionExecutable::compile):
2679         (JSC::FunctionExecutable::reparseExceptionInfo):
2680         (JSC::FunctionExecutable::fromGlobalCode):
2681         (JSC::FunctionExecutable::paramString):
2682         * runtime/Executable.h:
2683         (JSC::FunctionExecutable::FunctionExecutable):
2684         (JSC::FunctionExecutable::parameterCount):
2685
2686 2009-08-25  Brent Fulgham  <bfulgham@webkit.org>
2687
2688         Reviewed by NOBODY (Buildfix).
2689
2690         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target
2691           that inherits from the debug_wincairo property sheet and therefore
2692           links to the proper debug library.
2693         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target
2694           that inherits from the debug_wincairo property sheet and therefore
2695           links to the proper debug library.
2696
2697 2009-08-25  Chris Marrin  <cmarrin@apple.com>
2698
2699         Reviewed by Simon Fraser.
2700
2701         Export tryFastMalloc for Canvas3D work
2702         https://bugs.webkit.org/show_bug.cgi?id=28018
2703
2704         * JavaScriptCore.exp:
2705
2706 2009-08-25  David Levin  <levin@chromium.org>
2707
2708         Reviewed by Adam Roben.
2709
2710         PLATFORM(CFNETWORK) should be USE(CFNETWORK).
2711         https://bugs.webkit.org/show_bug.cgi?id=28713
2712
2713         * wtf/Platform.h: Added a #define to catch this issue in the
2714         future. The define would generate an error on gcc without the
2715         space in the expansion, but Visual C++ needs the space to cause an error.
2716
2717 2009-08-24  Brent Fulgham  <bfulgham@webkit.org>
2718
2719         Reviewed by Steve Falkenburg.
2720
2721         Revise CFLite Debug build to emit DLL's with _debug label.
2722         https://bugs.webkit.org/show_bug.cgi?id=28695.
2723
2724         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify
2725           Cairo debug build to inherit from new debug_cairo property sheet.
2726         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops:
2727           Modify to look for debug CFLite when in debug build.
2728
2729 2009-08-24  Gavin Barraclough  <barraclough@apple.com>
2730
2731         Reviewed by Oliver Adler & Darin Hunt.
2732
2733         https://bugs.webkit.org/show_bug.cgi?id=28691
2734         Do not retain ScopeNodes outside of parsing
2735         
2736         There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types.
2737
2738         * bytecode/EvalCodeCache.h:
2739         (JSC::EvalCodeCache::get):
2740         * bytecompiler/BytecodeGenerator.cpp:
2741         (JSC::BytecodeGenerator::BytecodeGenerator):
2742         (JSC::BytecodeGenerator::emitNewFunction):
2743         (JSC::BytecodeGenerator::emitNewFunctionExpression):
2744         * bytecompiler/BytecodeGenerator.h:
2745         (JSC::BytecodeGenerator::makeFunction):
2746         * debugger/Debugger.cpp:
2747         (JSC::Debugger::recompileAllJSFunctions):
2748         (JSC::evaluateInGlobalCallFrame):
2749         * debugger/DebuggerCallFrame.cpp:
2750         (JSC::DebuggerCallFrame::evaluate):
2751         * interpreter/Interpreter.cpp:
2752         (JSC::Interpreter::execute):
2753         (JSC::Interpreter::prepareForRepeatCall):
2754         (JSC::Interpreter::privateExecute):
2755         * jit/JITStubs.cpp:
2756         (JSC::DEFINE_STUB_FUNCTION):
2757         * parser/Nodes.cpp:
2758         (JSC::ScopeNodeData::ScopeNodeData):
2759         (JSC::ProgramNode::create):
2760         (JSC::EvalNode::create):
2761         (JSC::FunctionBodyNode::create):
2762         * parser/Nodes.h:
2763         (JSC::ScopeNode::adoptData):
2764         (JSC::FunctionBodyNode::parameterCount):
2765         * parser/Parser.cpp:
2766         * parser/Parser.h:
2767         (JSC::Parser::arena):
2768         (JSC::Parser::Parser):
2769         (JSC::Parser::parse):
2770         * runtime/ArrayPrototype.cpp:
2771         (JSC::isNumericCompareFunction):
2772         (JSC::arrayProtoFuncSort):
2773         * runtime/Completion.cpp:
2774         (JSC::checkSyntax):
2775         (JSC::evaluate):
2776         * runtime/Executable.cpp:
2777         (JSC::FunctionExecutable::~FunctionExecutable):
2778         (JSC::EvalExecutable::compile):
2779         (JSC::ProgramExecutable::checkSyntax):
2780         (JSC::ProgramExecutable::compile):
2781         (JSC::FunctionExecutable::compile):
2782         (JSC::EvalExecutable::generateJITCode):
2783         (JSC::ProgramExecutable::generateJITCode):
2784         (JSC::FunctionExecutable::generateJITCode):
2785         (JSC::FunctionExecutable::reparseExceptionInfo):
2786         (JSC::EvalExecutable::reparseExceptionInfo):
2787         (JSC::FunctionExecutable::recompile):
2788         (JSC::FunctionExecutable::fromGlobalCode):
2789         (JSC::FunctionExecutable::copyParameters):
2790         (JSC::FunctionExecutable::paramString):
2791         * runtime/Executable.h:
2792         (JSC::ScriptExecutable::ScriptExecutable):
2793         (JSC::ScriptExecutable::sourceID):
2794         (JSC::ScriptExecutable::sourceURL):
2795         (JSC::ScriptExecutable::lineNo):
2796         (JSC::ScriptExecutable::lastLine):
2797         (JSC::ScriptExecutable::usesEval):
2798         (JSC::ScriptExecutable::usesArguments):
2799         (JSC::ScriptExecutable::needsActivation):
2800         (JSC::ScriptExecutable::recordParse):
2801         (JSC::EvalExecutable::bytecode):
2802         (JSC::EvalExecutable::jitCode):
2803         (JSC::ProgramExecutable::bytecode):
2804         (JSC::ProgramExecutable::reparseExceptionInfo):
2805         (JSC::ProgramExecutable::jitCode):
2806         (JSC::FunctionExecutable::FunctionExecutable):
2807         (JSC::FunctionExecutable::make):
2808         (JSC::FunctionExecutable::bytecode):
2809         (JSC::FunctionExecutable::isGenerated):
2810         (JSC::FunctionExecutable::name):
2811         (JSC::FunctionExecutable::parameterCount):
2812         (JSC::FunctionExecutable::jitCode):
2813         * runtime/FunctionConstructor.cpp:
2814         (JSC::constructFunction):
2815         * runtime/JSGlobalData.cpp:
2816         (JSC::JSGlobalData::numericCompareFunction):
2817         * runtime/JSGlobalObjectFunctions.cpp:
2818         (JSC::globalFuncEval):
2819
2820 2009-08-24  Darin Adler  <darin@apple.com>
2821
2822         * runtime/ObjectPrototype.cpp:
2823         (JSC::ObjectPrototype::put): Landed revised version I had tested but forgot
2824         to land. Leave out the branch, since we don't need one.
2825
2826 2009-08-24  Darin Adler  <darin@apple.com>
2827
2828         Reviewed by Geoff Garen.
2829
2830         Array index miss case creates a string every time
2831         https://bugs.webkit.org/show_bug.cgi?id=28664
2832
2833         SunSpider test results I saw:
2834
2835             0.5% faster overall
2836             1% faster on crypto-aes
2837             20% faster on crypto-md5
2838             13% faster on crypto-sha1
2839
2840         * runtime/ObjectPrototype.cpp:
2841         (JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names
2842         to true.
2843         (JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new
2844         property has a name that is the string form of a UInt32.
2845         (JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot
2846         if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true.
2847
2848         * runtime/ObjectPrototype.h: Added declarations for the above.
2849
2850 2009-08-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2851
2852         Unreviewed. Fix a typo in my distcheck build fix.
2853
2854         * GNUmakefile.am:
2855
2856 2009-08-23  Gustavo Noronha Silva  <gns@gnome.org>
2857
2858         Unreviewed build fix for make distcheck.
2859
2860         * GNUmakefile.am: Added files required for the build.
2861
2862 2009-08-22  Maciej Stachowiak  <mjs@apple.com>
2863
2864         Reviewed by Mark Rowe.
2865
2866         REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC
2867         https://bugs.webkit.org/show_bug.cgi?id=28655
2868
2869         * runtime/JSFunction.cpp:
2870         (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable.
2871         * wtf/Platform.h:
2872
2873 2009-08-22  Darin Adler  <darin@apple.com>
2874
2875         Fix storage leak from syntax tree arena allocation patch.
2876
2877         * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable
2878         because it has a vector.
2879
2880 2009-08-21  Darin Adler  <darin@apple.com>
2881
2882         Fix Qt build.
2883
2884         * parser/Nodes.cpp:
2885         (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again.
2886         This is used outside Nodes.cpp so can't be inline unless
2887         it is in the header.
2888
2889 2009-08-21  Darin Adler  <darin@apple.com>
2890
2891         Two loose ends from the last commit.
2892
2893         * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h
2894         and create_hash_table project-internal instead of "private".
2895         * runtime/Executable.h: Removed accidentally-added constructor.
2896
2897 2009-08-21  Darin Adler  <darin@apple.com>
2898
2899         Reviewed by Gavin Barraclough.
2900
2901         Syntax tree nodes should use arena allocation
2902         https://bugs.webkit.org/show_bug.cgi?id=25674
2903
2904         Use an actual arena now. 0.6% speedup on SunSpider.
2905
2906         New and improved with 100% less leaking of the universe.
2907
2908         * JavaScriptCore.exp:
2909         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2910         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2911         Removed all exports involving the class FunctionBodyNode, which no
2912         longer needs to be used outside JavaScriptCore.
2913
2914         * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and
2915         Executable.h project-internal instead of "private".
2916
2917         * bytecompiler/BytecodeGenerator.cpp:
2918         (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack
2919         contains const Identifier* now.
2920
2921         * parser/Grammar.y: Made identifiers from the lexer be const
2922         Identifier* and updated since VarStack contains const Identifier* now.
2923
2924         * parser/Lexer.cpp:
2925         (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers.
2926         (JSC::Lexer::makeIdentifier): Changed return type to const Identifier*
2927         and changed to call ParserArena.
2928         (JSC::Lexer::clear): Removed the code to manage m_identifiers and
2929         added code to set m_arena to 0.
2930         * parser/Lexer.h: Updated for changes above.
2931
2932         * parser/NodeConstructors.h:
2933         (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable
2934         on the arena.
2935         (JSC::ParserArenaDeletable::operator new): Changed to call the
2936         allocateDeletable function on the arena instead of deleteWithArena.
2937         (JSC::PropertyNode::PropertyNode): Added new constructor that makes
2938         numeric identifiers. Some day we might want to optimize this for
2939         integers so it doesn't create a string for each one.
2940         (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier
2941         since it's now a const Identifier& so it can't be left uninitialized.
2942         (JSC::BreakNode::BreakNode): Ditto.
2943         (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements*
2944         to keep track of the statements rather than a separate statement vector.
2945         (JSC::BlockNode::BlockNode): Ditto.
2946         (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier.
2947
2948         * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here.
2949         It seemed strangely out of place in the header.
2950         (JSC::ThrowableExpressionData::emitThrowError): Added an overload for
2951         UString as well as Identifier.
2952         (JSC::SourceElements::singleStatement): Added.
2953         (JSC::SourceElements::lastStatement): Added.
2954         (JSC::RegExpNode::emitBytecode): Changed the throwError code to use
2955         the substitution mechanism instead of doing a string append.
2956         (JSC::SourceElements::emitBytecode): Added. Replaces the old
2957         statementListEmitCode function, since we now keep the SourceElements
2958         objects around.
2959         (JSC::BlockNode::lastStatement): Added.
2960         (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of
2961         statementListEmitCode.
2962         (JSC::CaseClauseNode::emitBytecode): Added.
2963         (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode
2964         instead of statementListEmitCode.
2965         (JSC::ScopeNodeData::ScopeNodeData): Changed to store the
2966         SourceElements* instead of using releaseContentsIntoVector.
2967         (JSC::ScopeNode::emitStatementsBytecode): Added.
2968         (JSC::ScopeNode::singleStatement): Added.
2969         (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead
2970         of statementListEmitCode.
2971         (JSC::EvalNode::emitBytecode): Ditto.
2972         (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode
2973         insetad of statementListEmitCode and check for the return node using
2974         the new functions.
2975
2976         * parser/Nodes.h: Changed VarStack to store const Identifier* instead
2977         of Identifier and rely on the arena to control lifetime. Added a new
2978         ParserArenaFreeable class. Made ParserArenaDeletable inherit from
2979         FastAllocBase instead of having its own operator new. Base the Node
2980         class on ParserArenaFreeable. Changed the various Node classes
2981         to use const Identifier& instead of Identifier to avoid the need to
2982         call their destructors and allow them to function as "freeable" in the
2983         arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions.
2984         Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode,
2985         CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable
2986         as a base class since they do not descend from Node. Eliminated the
2987         StatementVector type and instead have various classes use SourceElements*
2988         instead of StatementVector. This prevents those classes from having to
2989         use ParserArenaDeletable to make sure the vector destructor is called.
2990
2991         * parser/Parser.cpp:
2992         (JSC::Parser::parse): Pass the arena to the lexer.
2993
2994         * parser/Parser.h: Added an include of ParserArena.h, which is no longer
2995         included by Nodes.h.
2996         (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the
2997         singleStatement function, since there is no longer any children function.
2998         Removed some unneeded use of RefPtr.
2999
3000         * parser/ParserArena.cpp:
3001         (JSC::ParserArena::ParserArena): Added. Initializes the new members,
3002         m_freeableMemory, m_freeablePoolEnd, and m_identifiers.
3003         (JSC::ParserArena::freeablePool): Added. Computes the pool pointer,
3004         since we store only the current pointer and the end of pool pointer.
3005         (JSC::ParserArena::deallocateObjects): Added. Contains the common
3006         memory-deallocation logic used by both the destructor and the
3007         reset function.
3008         (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects.
3009         (JSC::ParserArena::reset): Ditto. Also added code to zero out the
3010         new structures, and switched to use clear() instead of shrink(0) since
3011         we don't really reuse arenas.
3012         (JSC::ParserArena::makeNumericIdentifier): Added.
3013         (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool
3014         is empty.
3015         (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine
3016         since this is used only for assertions at the moment.
3017         (JSC::ParserArena::derefWithArena): Make non-inline.
3018
3019         * parser/ParserArena.h: Added an actual arena of "freeable" objects,
3020         ones that don't need destructors to be called. Also added a separate
3021         IdentifierArena object, a segmented vector of identifiers that used
3022         to be in the Lexer.
3023
3024         * runtime/Executable.h: Moved the definition of the
3025         FunctionExecutable::make function here. It can't go in JSFunction.h
3026         since that header has to be used outside JavaScriptCore and so can't
3027         include this, which includes Nodes.h. The function could be moved
3028         elswhere if we don't want to include JSFunction.h in this header, but
3029         for now this seems to be the best place.
3030
3031         * runtime/JSFunction.h: Removed the include of Executable.h and
3032         definition of the FunctionExecutable::make function.
3033
3034         * wtf/FastMalloc.cpp: Fixed an incorrect comment.
3035
3036 2009-08-21  Mark Rowe  <mrowe@apple.com>
3037
3038         Fix the non-JIT build.
3039
3040         * runtime/Executable.cpp:
3041         * runtime/Executable.h:
3042
3043 2009-08-21  Gavin Barraclough  <barraclough@apple.com>
3044
3045         Speculative QuickTime build fix.
3046
3047         * runtime/JSArray.cpp:
3048
3049 2009-08-21  Gavin Barraclough  <barraclough@apple.com>
3050
3051         Speculative QT build fix.
3052
3053         * runtime/StringPrototype.cpp:
3054
3055 2009-08-21  Gavin Barraclough  <barraclough@apple.com>
3056
3057         Reviewed by Oliver Hunt.
3058
3059         Restructure Executable types so that host functions do not hold a FunctionExecutable.
3060         https://bugs.webkit.org/show_bug.cgi?id=28621
3061
3062         All JSFunction objects have a pointer to an Executable*.  This is currently always a
3063         FunctionExecutable, however this has a couple of drawbacks.  Host functions do not
3064         store a range of information that the FunctionExecutable provides (source, name,
3065         CodeBlock & information presently held on the FunctionBodyNode). 
3066
3067         [ * nearly all... see below! ]
3068
3069         Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific
3070         to JS sourced executable types (source, node) into a new subclass (ScriptExecutable),
3071         and create a new NativeExecutable type.  We now provide a new method in JSFunction
3072         to access & downcast to FunctionExecutable, but in doing so we can make an early
3073         check (with an ASSERT) to ensure that the Executable read from a function will only
3074         be treated as a FunctionExecutable (and thus the JS sepcific fields will only be
3075         accessed) if the JSFunction is not a host function.
3076
3077         There is one JSFunction that currently does not have an Executable, which is the
3078         object created to allow us to read out the vtable pointer.  By making this change
3079         we can also add a new Executable type fror this object (VPtrHackExecutable).
3080         Since this means that really all JSFunctions have an Executable we no longer have
3081         to null-check m_executable before us it - particularly in isHostFunction().
3082
3083         This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase
3084         can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase
3085         that might be a FunctionExecutable or a NativeExecutable.  This does now mean that all
3086         ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be
3087         ref-counted, however this seems less-bad than host functions unnecessarily providing
3088         interface to access non-host specific information.
3089
3090         The class hierarcy has changed from this:
3091         
3092         - ExecutableBase
3093             - ProgramExecutable
3094             - EvalExecutable
3095                 - CacheableEvalExecutable (also RefCounted by multiple-inheritance)
3096             - FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions)
3097
3098         To this:
3099         
3100         - RefCounted
3101             - ExecutableBase
3102                 - NativeExecutable
3103                 - VPtrHackExecutable
3104                 - ScriptExecutable
3105                     - ProgramExecutable
3106                     - EvalExecutable
3107                     - FunctionExecutable
3108
3109         This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()).
3110
3111         * bytecode/CodeBlock.cpp:
3112         (JSC::CodeBlock::CodeBlock):
3113         * bytecode/CodeBlock.h:
3114         (JSC::CodeBlock::ownerExecutable):
3115         (JSC::GlobalCodeBlock::GlobalCodeBlock):
3116         * bytecode/EvalCodeCache.h:
3117         (JSC::EvalCodeCache::get):
3118         * debugger/Debugger.cpp:
3119         (JSC::Debugger::recompileAllJSFunctions):
3120         * interpreter/CachedCall.h:
3121         (JSC::CachedCall::CachedCall):
3122         * interpreter/Interpreter.cpp:
3123         (JSC::Interpreter::callEval):
3124         (JSC::Interpreter::privateExecute):
3125         * jit/JITStubs.cpp:
3126         (JSC::DEFINE_STUB_FUNCTION):
3127         * profiler/Profiler.cpp:
3128         (JSC::createCallIdentifierFromFunctionImp):
3129         * runtime/Arguments.h:
3130         (JSC::Arguments::getArgumentsData):
3131         (JSC::Arguments::Arguments):
3132         * runtime/Executable.cpp:
3133         (JSC::NativeExecutable::~NativeExecutable):
3134         (JSC::VPtrHackExecutable::~VPtrHackExecutable):
3135         * runtime/Executable.h:
3136         (JSC::ExecutableBase::ExecutableBase):
3137         (JSC::ExecutableBase::~ExecutableBase):
3138         (JSC::ExecutableBase::isHostFunction):
3139         (JSC::NativeExecutable::NativeExecutable):
3140         (JSC::VPtrHackExecutable::VPtrHackExecutable):
3141         (JSC::ScriptExecutable::ScriptExecutable):
3142         (JSC::ScriptExecutable::source):
3143         (JSC::ScriptExecutable::sourceID):
3144         (JSC::ScriptExecutable::sourceURL):
3145         (JSC::ScriptExecutable::lineNo):
3146         (JSC::ScriptExecutable::lastLine):
3147         (JSC::ScriptExecutable::usesEval):
3148         (JSC::ScriptExecutable::usesArguments):
3149         (JSC::ScriptExecutable::needsActivation):
3150         (JSC::EvalExecutable::EvalExecutable):
3151         (JSC::EvalExecutable::create):
3152         (JSC::ProgramExecutable::ProgramExecutable):
3153         (JSC::FunctionExecutable::FunctionExecutable):
3154         * runtime/FunctionPrototype.cpp:
3155         (JSC::functionProtoFuncToString):
3156         * runtime/JSFunction.cpp:
3157         (JSC::JSFunction::JSFunction):
3158         (JSC::JSFunction::~JSFunction):
3159         (JSC::JSFunction::markChildren):
3160         (JSC::JSFunction::getCallData):
3161         (JSC::JSFunction::call):
3162         (JSC::JSFunction::lengthGetter):
3163         (JSC::JSFunction::getConstructData):
3164         (JSC::JSFunction::construct):
3165         * runtime/JSFunction.h:
3166         (JSC::JSFunction::executable):
3167         (JSC::JSFunction::jsExecutable):
3168         (JSC::JSFunction::isHostFunction):
3169
3170 2009-08-20  Oliver Hunt  <oliver@apple.com>
3171
3172         Reviewed by Maciej Stachowiak.
3173
3174         Browser hangs on opening Web Inspector.
3175         https://bugs.webkit.org/show_bug.cgi?id=28438
3176
3177         Code generation needs to be able to walk the entire scopechain in some
3178         cases, however the symbol table used by activations was a member of the
3179         codeblock.  Following recompilation this may no longer exist, leading
3180         to a crash or hang on lookup.
3181
3182         We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable,
3183         for the CodeBlocks used by function code.  This allows activations to
3184         maintain ownership of a copy of the symbol table even after recompilation so
3185         they can continue to work.
3186
3187         * bytecode/CodeBlock.cpp:
3188         (JSC::CodeBlock::CodeBlock):
3189         * bytecode/CodeBlock.h:
3190         (JSC::CodeBlock::symbolTable):
3191         (JSC::CodeBlock::sharedSymbolTable):
3192         (JSC::GlobalCodeBlock::GlobalCodeBlock):
3193         (JSC::FunctionCodeBlock::FunctionCodeBlock):
3194         (JSC::FunctionCodeBlock::~FunctionCodeBlock):
3195         * interpreter/Interpreter.cpp:
3196         (JSC::Interpreter::retrieveArguments):
3197         * runtime/Executable.cpp:
3198         (JSC::EvalExecutable::generateBytecode):
3199         (JSC::FunctionExecutable::generateBytecode):
3200         (JSC::FunctionExecutable::reparseExceptionInfo):
3201         (JSC::EvalExecutable::reparseExceptionInfo):
3202         * runtime/JSActivation.h:
3203         (JSC::JSActivation::JSActivationData::JSActivationData):
3204         (JSC::JSActivation::JSActivationData::~JSActivationData):
3205         * runtime/SymbolTable.h:
3206
3207 2009-08-20  Xan Lopez  <xlopez@igalia.com>
3208
3209         Add new file to GTK+ build.
3210
3211         * GNUmakefile.am:
3212
3213 2009-08-20  Geoffrey Garen  <ggaren@apple.com>
3214
3215         Reviewed by Maciej Stachowiak.
3216
3217         Added a number => string cache.
3218         
3219         1.07x faster on v8 (1.7x faster on v8-splay).
3220         1.004x faster on SunSpider.
3221
3222         * runtime/JSCell.h: Moved JSValue::toString to JSString.h.
3223         * runtime/JSGlobalData.h: Holds the cache.
3224         * runtime/JSNumberCell.cpp:
3225         (JSC::JSNumberCell::toString):
3226         (JSC::JSNumberCell::toThisString): Removed -0 special case.
3227         UString handles this now, since too many clients were
3228         special-casing it.
3229
3230         * runtime/JSString.h:
3231         (JSC::JSValue::toString): Use the cache when converting
3232         an int or double to string.
3233
3234         * runtime/Operations.h:
3235         (JSC::concatenateStrings): Call toString to take advantage
3236         of the cache.
3237
3238         * runtime/SmallStrings.h:
3239         (JSC::NumericStrings::add):
3240         (JSC::NumericStrings::lookup): The cache.
3241
3242         * runtime/UString.cpp:
3243         (JSC::UString::from): Added -0 special case mentioned above.
3244         Removed appendNumeric because it's mutually exclusive with the
3245         cache.
3246
3247 2009-08-20  Oliver Hunt  <oliver@apple.com>
3248
3249         Reviewed by Gavin Barraclough.
3250
3251         REGRESSION: fast/profiler/call.html is crashing occasionally
3252         https://bugs.webkit.org/show_bug.cgi?id=28476
3253
3254         Using the codeblock for information about how many parameters and
3255         locals a function has is unsafe in certain circumstances.  The
3256         basic scenario is all function code being cleared in response to
3257         the debugger or profiler being enabled, and then an activation is
3258         marked before its associated function is re-executed.
3259
3260         To deal with this scenario we store the variable count of a function
3261         directly in the FunctionExecutable, and then use that information.
3262
3263         * runtime/Arguments.h:
3264         (JSC::Arguments::getArgumentsData):
3265         * runtime/Executable.cpp:
3266         (JSC::FunctionExecutable::generateBytecode):
3267         * runtime/Executable.h:
3268         (JSC::FunctionExecutable::FunctionExecutable):
3269         (JSC::FunctionExecutable::variableCount):
3270         * runtime/JSActivation.cpp:
3271         (JSC::JSActivation::markChildren):
3272
3273 2009-08-20  Gavin Barraclough  <barraclough@apple.com>
3274
3275         Reviewed by Oliver Hunt.
3276
3277         Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect
3278         <bug lost in the great bug disasteroony of 08/20/09!>
3279
3280         The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match
3281         the argument number used within the stub functions in JITStubs.cpp, but it doesn't.
3282
3283         Firstly, all the numbers changed when we added a void* 'reserved' as the first slot
3284         (rather than leaving argument 0 unused), and secondly in 32_64 builds the index to
3285         peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number
3286         of machine words, and on 32_64 build the argument slots to stub functions are two
3287         words wide).
3288
3289         * jit/JIT.h:
3290         * jit/JITCall.cpp:
3291         (JSC::JIT::compileOpCallSetupArgs):
3292         (JSC::JIT::compileOpConstructSetupArgs):
3293         (JSC::JIT::compileOpCallVarargsSetupArgs):
3294         (JSC::JIT::compileOpCall):
3295         * jit/JITInlineMethods.h:
3296         (JSC::JIT::emitPutJITStubArg):
3297         (JSC::JIT::emitPutJITStubArgConstant):
3298         (JSC::JIT::emitGetJITStubArg):
3299         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
3300         * jit/JITOpcodes.cpp:
3301         (JSC::JIT::privateCompileCTIMachineTrampolines):
3302         * jit/JITPropertyAccess.cpp:
3303         (JSC::JIT::privateCompilePutByIdTransition):
3304
3305 2009-08-20  Oliver Hunt  <oliver@apple.com>
3306
3307         Reviewed by Geoff Garen.
3308
3309         REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
3310         https://bugs.webkit.org/show_bug.cgi?id=28332
3311
3312         Follow up style fixes that were missed in review.
3313
3314         * runtime/Structure.cpp:
3315         (JSC::Structure::hasTransition):
3316         * runtime/Structure.h:
3317         (JSC::Structure::get):
3318         (JSC::StructureTransitionTable::contains):
3319         * runtime/StructureTransitionTable.h:
3320         (JSC::StructureTransitionTable::add):
3321
3322 2009-08-20  Oliver Hunt  <oliver@apple.com>
3323
3324         Add new exports to windows jsc build
3325
3326         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3327         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3328
3329 2009-08-20  Oliver Hunt  <oliver@apple.com>
3330
3331         Reviewed by Gavin Barraclough.
3332
3333         REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
3334         https://bugs.webkit.org/show_bug.cgi?id=28332
3335
3336         The method check optimisation made transitions aware of the value being
3337         assigned when a transition was assigning a function.  This had the side
3338         effect of making every assignment of a function expression result in a
3339         new transition, and thus a new Structure.  The net result of this is that
3340         the common JS idiom of
3341
3342             function MyObject() {
3343                 this.myFunction = function(...){...};
3344             }
3345             new MyObject();
3346
3347         Will produce a unique structure on every iteration, meaning that all
3348         caching is defeated and there is a significant amount of structure churn.
3349
3350         The fix is to return the transition to its original form where it is
3351         keyed off a property name + attributes tuple, but have each transition
3352         support an optional transition on a specific value.
3353
3354         * JavaScriptCore.exp:
3355         * runtime/JSObject.h:
3356         (JSC::JSObject::putDirectInternal):
3357         * runtime/Structure.cpp:
3358         (JSC::Structure::~Structure):
3359         (JSC::Structure::addPropertyTransitionToExistingStructure):
3360         (JSC::Structure::addPropertyTransition):
3361         (JSC::Structure::hasTransition):
3362         * runtime/Structure.h:
3363         (JSC::Structure::transitionedFor):
3364         (JSC::Structure::hasTransition):
3365         (JSC::Structure::):
3366         (JSC::StructureTransitionTable::contains):
3367         (JSC::StructureTransitionTable::get):
3368         * runtime/StructureTransitionTable.h:
3369         (JSC::StructureTransitionTableHashTraits::emptyValue):
3370         (JSC::StructureTransitionTable::hasTransition):
3371         (JSC::StructureTransitionTable::remove):
3372         (JSC::StructureTransitionTable::add):
3373
3374 2009-08-20  Gavin Barraclough  <barraclough@apple.com>
3375
3376         Reviewed by Oliver Hunt.
3377
3378         Remove FunctionCodeBlock.
3379         https://bugs.webkit.org/show_bug.cgi?id=28502
3380
3381         These only exist to allow JIT code to dereference properties off the
3382         CodeBlock for any callee, regardless of whether it is a host function.
3383
3384         Instead just use the FunctionExecutable.  Copy the m_parameters field
3385         from the CodeBlock into the Executable, and use this to distinguish
3386         between host functions, functions that have been bytecompiled, and
3387         functions that have not.
3388
3389         m_parameters is moved to ExecutableBase rather than FunctionExecutable
3390         so that (as a separate change) we can move make a separate class of
3391         executable for host code, which is not devived from FunctionExecutable
3392         (host code does not feature any of the properties that normal executable
3393         do and will provide, such as source, attributes, and a parsed name).
3394
3395         1% win on v8 tests, 0.5% on sunspider.
3396
3397         * bytecode/CodeBlock.cpp:
3398         (JSC::CodeBlock::derefStructures):
3399         (JSC::CodeBlock::refStructures):
3400         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
3401         (JSC::CodeBlock::handlerForBytecodeOffset):
3402         (JSC::CodeBlock::lineNumberForBytecodeOffset):
3403         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
3404         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
3405         (JSC::CodeBlock::functionRegisterForBytecodeOffset):
3406         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
3407         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
3408         * bytecode/CodeBlock.h:
3409         (JSC::):
3410         (JSC::CodeBlock::source):
3411         (JSC::CodeBlock::sourceOffset):
3412         (JSC::CodeBlock::evalCodeCache):
3413         (JSC::CodeBlock::createRareDataIfNecessary):
3414         
3415             remove NativeCodeBlocks and the NativeCode code type.
3416         
3417         * jit/JIT.cpp:
3418         (JSC::JIT::linkCall):
3419
3420             Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock.
3421
3422         * jit/JITCall.cpp:
3423         (JSC::JIT::compileOpCallInitializeCallFrame):
3424         (JSC::JIT::compileOpCallSetupArgs):
3425         (JSC::JIT::compileOpCallVarargsSetupArgs):
3426         (JSC::JIT::compileOpConstructSetupArgs):
3427         (JSC::JIT::compileOpCallVarargs):
3428         (JSC::JIT::compileOpCall):
3429         (JSC::JIT::compileOpCallSlowCase):
3430
3431             Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0.
3432
3433         * jit/JITOpcodes.cpp:
3434         (JSC::JIT::privateCompileCTIMachineTrampolines):
3435
3436             Rewrite call trampolines to not use the CodeBlock.
3437
3438         * jit/JITStubs.cpp:
3439         (JSC::DEFINE_STUB_FUNCTION):
3440
3441             Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock.
3442
3443         * runtime/Executable.cpp:
3444         (JSC::FunctionExecutable::generateBytecode):
3445         (JSC::FunctionExecutable::recompile):
3446         (JSC::FunctionExecutable::FunctionExecutable):
3447         * runtime/Executable.h:
3448         (JSC::ExecutableBase::):
3449         (JSC::ExecutableBase::ExecutableBase):
3450         (JSC::FunctionExecutable::isHostFunction):
3451
3452             Add m_numParameters.
3453
3454         * runtime/JSFunction.cpp:
3455         (JSC::JSFunction::~JSFunction):
3456
3457             Only call generatedBytecode() on JSFunctions non-host FunctionExecutables.
3458
3459 2009-08-20  Yongjun Zhang  <yongjun.zhang@nokia.com>
3460
3461         Reviewed by Eric Seidel.
3462
3463         https://bugs.webkit.org/show_bug.cgi?id=28054
3464        
3465         Use a helper function to work around winscw compiler forward declaration bug
3466         regarding templated classes.
3467
3468         Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler
3469         work with the default UnSpecifiedBoolType() operator, which removes the winscw
3470         specific bool cast hack.
3471
3472         * wtf/PassRefPtr.h:
3473         (WTF::derefIfNotNull):
3474         (WTF::PassRefPtr::~PassRefPtr):
3475
3476 2009-08-19  Yong Li  <yong.li@torchmobile.com>
3477
3478         Reviewed by Gavin Barraclough.
3479
3480         Change namespace ARM to ARMRegisters
3481         X86 to X86Registers to avoid conflict with macros
3482         https://bugs.webkit.org/show_bug.cgi?id=28428
3483
3484         * assembler/ARMAssembler.cpp:
3485         * assembler/ARMAssembler.h:
3486         * assembler/ARMv7Assembler.h:
3487         * assembler/MacroAssemblerARM.h:
3488         * assembler/MacroAssemblerARMv7.h:
3489         * assembler/MacroAssemblerX86Common.h:
3490         * assembler/MacroAssemblerX86_64.h:
3491         * assembler/X86Assembler.h:
3492         * jit/JIT.h:
3493         * jit/JITArithmetic.cpp:
3494         * jit/JITInlineMethods.h:
3495         * jit/JITOpcodes.cpp:
3496         * wrec/WRECGenerator.cpp:
3497         * wrec/WRECGenerator.h:
3498         * yarr/RegexJIT.cpp:
3499
3500 2009-08-19  Oliver Hunt  <oliver@apple.com>
3501
3502         Reviewed by Gavin Barraclough.
3503
3504         Devirtualise marking
3505         https://bugs.webkit.org/show_bug.cgi?id=28294
3506
3507         We actually need to mark the value in a number object if we're using the
3508         32bit number representation.
3509
3510         * runtime/NumberObject.h:
3511         (JSC::NumberObject::createStructure):
3512
3513 2009-08-19  Gavin Barraclough  <barraclough@apple.com>
3514
3515         Reviewed by Darin Adler.
3516
3517          We probably shouldn't be keeping the AST for eval nodes around forevar.
3518         https://bugs.webkit.org/show_bug.cgi?id=28469
3519
3520         EvalNodes don't destroyData() (delete their parser data) since they need to hold onto
3521         their varStack.  Copy a list of variable onto EvalCodeBlock, and this can go away.
3522
3523         * bytecode/CodeBlock.h:
3524         (JSC::EvalCodeBlock::variable):
3525         (JSC::EvalCodeBlock::numVariables):
3526         (JSC::EvalCodeBlock::adoptVariables):
3527         * bytecompiler/BytecodeGenerator.cpp:
3528         (JSC::BytecodeGenerator::BytecodeGenerator):
3529         * interpreter/Interpreter.cpp:
3530         (JSC::Interpreter::execute):
3531         * parser/Nodes.h:
3532         * runtime/Executable.cpp:
3533         (JSC::EvalExecutable::generateBytecode):
3534         * runtime/Executable.h:
3535
3536 2009-08-19  Jungshik Shin  <jshin@chromium.org>
3537
3538         Reviewed by Darin Adler.
3539
3540         http://bugs.webkit.org/show_bug.cgi?id=28441
3541
3542         Fix a build issue with ICU 4.2 or later on Windows with Visual C++. 
3543         Instead of defining all isXXX and toupper/tolower as 
3544           WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h,
3545         #define them to be different by prepending 'WTF_...ASCIIType_h' with
3546         the originial names like 'toupper_WTF_...ASCIIType_h'. 
3547
3548         * wtf/DisallowCType.h:
3549
3550 2009-08-18  Oliver Hunt  <oliver@apple.com>
3551
3552         Reviewed by Gavin Barraclough.
3553
3554         Assigning a function to an object should always use the existing transition, even if the transition is not specialized
3555         https://bugs.webkit.org/show_bug.cgi?id=28442
3556
3557         Check for an unspecialized transition as an alternative to always failing if specialisation does not match.
3558
3559         * runtime/Structure.cpp:
3560         (JSC::Structure::addPropertyTransitionToExistingStructure):
3561
3562 2009-08-18  Dirk Schulze  <krit@webkit.org>
3563
3564         Reviewed by Oliver Hunt.