2009-11-13 Norbert Leser <norbert.leser&nokia.com>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2009-11-13  Norbert Leser  <norbert.leser&nokia.com>
2
3         Reviewed by Eric Seidel.
4
5         Added macros for USERINCLUDE paths within symbian blocks
6         to guarantee inclusion of respective header files from local path
7         first (to avoid clashes with same names of header files in system include path).
8
9         * JavaScriptCore.pri:
10
11 2009-11-13  Oliver Hunt  <oliver@apple.com>
12
13         Reviewed by Geoff Garen.
14
15         JSValueProtect and JSValueUnprotect don't protect API wrapper values
16         https://bugs.webkit.org/show_bug.cgi?id=31485
17
18         Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
19         does not attempt to to strip out API wrapper objects.
20
21         * API/APICast.h:
22         (toJSForGC):
23         * API/JSValueRef.cpp:
24         (JSValueProtect):
25         (JSValueUnprotect):
26         * API/tests/testapi.c:
27         (makeGlobalNumberValue):
28         (main):
29
30 2009-11-13  İsmail Dönmez  <ismail@namtrac.org>
31
32         Reviewed by Antti Koivisto.
33
34         Fix typo, ce_time.cpp should be ce_time.c
35
36         * JavaScriptCore.pri:
37
38 2009-11-12  Steve VanDeBogart  <vandebo@chromium.org>
39
40         Reviewed by Adam Barth.
41
42         Calculate the time offset only if we were able to parse
43         the date string. This saves an IPC in Chromium for
44         invalid date strings.
45         https://bugs.webkit.org/show_bug.cgi?id=31416
46
47         * wtf/DateMath.cpp:
48         (WTF::parseDateFromNullTerminatedCharacters):
49         (JSC::parseDateFromNullTerminatedCharacters):
50
51 2009-11-12  Oliver Hunt  <oliver@apple.com>
52
53         Rollout r50896 until i can work out why it causes failures.
54
55         * bytecompiler/BytecodeGenerator.cpp:
56         (JSC::BytecodeGenerator::emitReturn):
57         * interpreter/Interpreter.cpp:
58         (JSC::Interpreter::execute):
59         * parser/Nodes.cpp:
60         (JSC::EvalNode::emitBytecode):
61
62 2009-11-12  Steve Falkenburg  <sfalken@apple.com>
63
64         Reviewed by Stephanie Lewis.
65
66         Remove LIBRARY directive from def file to fix Debug_All target.
67
68         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
69
70 2009-11-12  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
71
72         Rubber-stamped by Holger Freyther.
73
74         Revert r50204, since it makes DRT crash on 32 bits release builds
75         for GTK+.
76
77         * wtf/FastMalloc.h:
78
79 2009-11-12  Oliver Hunt  <oliver@apple.com>
80
81         Reviewed by Gavin Barraclough.
82
83         Start unifying entry logic for function and eval code.
84
85         Eval now uses a ret instruction to end execution, and sets up
86         a callframe more in line with what we do for function entry.
87
88         * bytecompiler/BytecodeGenerator.cpp:
89         (JSC::BytecodeGenerator::emitReturn):
90         * interpreter/Interpreter.cpp:
91         (JSC::Interpreter::execute):
92         * parser/Nodes.cpp:
93         (JSC::EvalNode::emitBytecode):
94
95 2009-11-12  Richard Moe Gustavsen  <richard.gustavsen@nokia.com>
96
97         Reviewed by Kenneth Rohde Christiansen.
98
99         [Qt] Disable pthread_setname_np.
100
101         This allows Qt builds on Mac from 10.6 to run on earlier version
102         where this symbol is not present.
103         https://bugs.webkit.org/show_bug.cgi?id=31403
104
105         * wtf/Platform.h:
106
107 2009-11-12  Thiago Macieira <thiago.macieira@nokia.com>
108
109         Reviewed by Kenneth Rohde Christiansen.
110
111         [Qt] Fix linking on Linux 32-bit.
112
113         It was missing the ".text" directive at the top of the file,
114         indicating that code would follow. Without it, the assembler created
115         "NOTYPE" symbols, which would result in linker errors.
116         https://bugs.webkit.org/show_bug.cgi?id=30863
117
118         * jit/JITStubs.cpp:
119
120 2009-11-11  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
121
122         Reviewed by Alexey Proskuryakov.
123
124         Refactor multiple JavaScriptCore threads
125         https://bugs.webkit.org/show_bug.cgi?id=31328
126
127         Remove the id field from the PlatformThread structure 
128         as it is not used.
129
130         * runtime/Collector.cpp:
131         (JSC::getCurrentPlatformThread):
132         (JSC::suspendThread):
133         (JSC::resumeThread):
134         (JSC::getPlatformThreadRegisters):
135
136 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
137
138         Linux build fix: Added an #include for UINT_MAX.
139
140         * runtime/WeakRandom.h:
141
142 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
143
144         JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
145
146         * JavaScriptCore.xcodeproj/project.pbxproj:
147
148 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
149
150         Reviewed by Gavin "avGni arBalroguch" Barraclough.
151
152         Faster Math.random, based on GameRand.
153         
154         SunSpider says 1.4% faster.
155
156         * GNUmakefile.am:
157         * JavaScriptCore.gypi:
158         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
159         * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
160
161         * runtime/JSGlobalData.cpp:
162         (JSC::JSGlobalData::JSGlobalData):
163         * runtime/JSGlobalData.h: Use an object to track random number generation
164         state, initialized to the current time.
165
166         * runtime/MathObject.cpp:
167         (JSC::MathObject::MathObject):
168         (JSC::mathProtoFuncRandom): Use the new hotness.
169
170         * runtime/WeakRandom.h: Added.
171         (JSC::WeakRandom::WeakRandom):
172         (JSC::WeakRandom::get):
173         (JSC::WeakRandom::advance): The new hotness.
174
175 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
176
177         Reviewed by Oliver Hunt.
178
179         Imported the v8 DST cache.
180         
181         SunSpider says 1.5% faster.
182
183         * runtime/JSGlobalData.cpp:
184         (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
185         other date data.
186
187         * runtime/JSGlobalData.h:
188         (JSC::DSTOffsetCache::DSTOffsetCache):
189         (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
190
191         * wtf/DateMath.cpp:
192         (WTF::calculateDSTOffsetSimple):
193         (WTF::calculateDSTOffset):
194         (WTF::parseDateFromNullTerminatedCharacters):
195         (JSC::getDSTOffset):
196         (JSC::gregorianDateTimeToMS):
197         (JSC::msToGregorianDateTime):
198         (JSC::parseDateFromNullTerminatedCharacters):
199         * wtf/DateMath.h: The imported code for probing and updating the cache.
200
201 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
202
203         Reviewed by Oliver Hunt.
204
205         Fixed an edge case that could cause the engine not to notice a timezone
206         change.
207         
208         No test because this case would require manual intervention to change
209         the timezone during the test.
210         
211         SunSpider reports no change.
212
213         * runtime/DateInstanceCache.h:
214         (JSC::DateInstanceCache::DateInstanceCache):
215         (JSC::DateInstanceCache::reset): Added a helper function for resetting
216         this cache. Also, shrank the cache, since we'll be resetting it often.
217
218         * runtime/JSGlobalData.cpp:
219         (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
220         in resetting Date data. (Otherwise, a cache hit could bypass a necessary
221         timezone update check.)
222
223 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
224
225         Reviewed by Sam Weinig.
226
227         Some manual inlining and constant propogation in Date code.
228         
229         SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
230         says some previously evident stalls are now gone.
231
232         * runtime/DateConstructor.cpp:
233         (JSC::callDate):
234         * runtime/DateConversion.cpp:
235         (JSC::formatTime):
236         (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
237
238         * runtime/DateConversion.h:
239         * runtime/DateInstance.cpp:
240         (JSC::DateInstance::calculateGregorianDateTime):
241         (JSC::DateInstance::calculateGregorianDateTimeUTC):
242         * runtime/DateInstance.h:
243         (JSC::DateInstance::gregorianDateTime):
244         (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
245         a UTC and non-UTC variant, and split each variant into a fast inline
246         case and a slow out-of-line case.
247
248         * runtime/DatePrototype.cpp:
249         (JSC::formatLocaleDate):
250         (JSC::dateProtoFuncToString):
251         (JSC::dateProtoFuncToUTCString):
252         (JSC::dateProtoFuncToISOString):
253         (JSC::dateProtoFuncToDateString):
254         (JSC::dateProtoFuncToTimeString):
255         (JSC::dateProtoFuncGetFullYear):
256         (JSC::dateProtoFuncGetUTCFullYear):
257         (JSC::dateProtoFuncToGMTString):
258         (JSC::dateProtoFuncGetMonth):
259         (JSC::dateProtoFuncGetUTCMonth):
260         (JSC::dateProtoFuncGetDate):
261         (JSC::dateProtoFuncGetUTCDate):
262         (JSC::dateProtoFuncGetDay):
263         (JSC::dateProtoFuncGetUTCDay):
264         (JSC::dateProtoFuncGetHours):
265         (JSC::dateProtoFuncGetUTCHours):
266         (JSC::dateProtoFuncGetMinutes):
267         (JSC::dateProtoFuncGetUTCMinutes):
268         (JSC::dateProtoFuncGetSeconds):
269         (JSC::dateProtoFuncGetUTCSeconds):
270         (JSC::dateProtoFuncGetTimezoneOffset):
271         (JSC::setNewValueFromTimeArgs):
272         (JSC::setNewValueFromDateArgs):
273         (JSC::dateProtoFuncSetYear):
274         (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
275
276 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
277
278         Build fix: export a new symbol.
279
280         * JavaScriptCore.exp:
281         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
282
283 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
284
285         Reviewed by Sam "Home Wrecker" Weinig.
286
287         Added a tiny cache for Date parsing.
288         
289         SunSpider says 1.2% faster.
290
291         * runtime/DateConversion.cpp:
292         (JSC::parseDate): Try to reuse the last parsed Date, if present.
293
294         * runtime/JSGlobalData.cpp:
295         (JSC::JSGlobalData::resetDateCache):
296         * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
297         this code to make resetting the date cache easier.
298
299         * runtime/JSGlobalObject.h:
300         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
301         refactoring.
302
303         * wtf/DateMath.cpp:
304         (JSC::parseDateFromNullTerminatedCharacters):
305         * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
306
307 2009-11-09  Oliver Hunt  <oliver@apple.com>
308
309         Reviewed by Gavin Barraclough.
310
311         Can cache prototype lookups on uncacheable dictionaries.
312         https://bugs.webkit.org/show_bug.cgi?id=31198
313
314         Replace fromDictionaryTransition with flattenDictionaryObject and
315         flattenDictionaryStructure.  This change is necessary as we need to
316         guarantee that our attempt to convert away from a dictionary structure
317         will definitely succeed, and in some cases this requires mutating the
318         object storage itself.
319
320         * interpreter/Interpreter.cpp:
321         (JSC::Interpreter::tryCacheGetByID):
322         * jit/JITStubs.cpp:
323         (JSC::JITThunks::tryCacheGetByID):
324         (JSC::DEFINE_STUB_FUNCTION):
325         * runtime/BatchedTransitionOptimizer.h:
326         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
327         * runtime/JSObject.h:
328         (JSC::JSObject::flattenDictionaryObject):
329         * runtime/Operations.h:
330         (JSC::normalizePrototypeChain):
331         * runtime/Structure.cpp:
332         (JSC::Structure::flattenDictionaryStructure):
333         (JSC::comparePropertyMapEntryIndices):
334         * runtime/Structure.h:
335
336 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
337
338         Not reviewed, build fix.
339
340         Remove extra character from r50701.
341
342         * JavaScriptCore.pri:
343
344 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
345
346         Not reviewed, build fix.
347
348         Revert r50695 because it broke QtWebKit (clean builds).
349
350         * JavaScriptCore.pri:
351
352 2009-11-09  Norbert Leser  <norbert.leser@nokia.com>
353
354         Reviewed by Kenneth Rohde Christiansen.
355
356         Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
357         Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
358         and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
359
360         * JavaScriptCore.pri:
361
362 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
363
364         Reviewed by Kenneth Rohde Christiansen.
365
366         Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
367         https://bugs.webkit.org/show_bug.cgi?id=31040
368
369         * interpreter/Interpreter.cpp:
370         (JSC::Interpreter::privateExecute):
371
372 2009-11-08  David Levin  <levin@chromium.org>
373
374         Reviewed by NOBODY (speculative snow leopard and windows build fixes).
375
376         * wtf/DateMath.cpp:
377         (WTF::parseDateFromNullTerminatedCharacters):
378         (JSC::gregorianDateTimeToMS):
379         (JSC::msToGregorianDateTime):
380         (JSC::parseDateFromNullTerminatedCharacters):
381         * wtf/DateMath.h:
382         (JSC::GregorianDateTime::GregorianDateTime):
383
384 2009-11-08  David Levin  <levin@chromium.org>
385
386         Reviewed by NOBODY (chromium build fix).
387         
388         Hopefully, the last build fix.
389
390         Create better separation in DateMath about the JSC
391         and non-JSC portions. Also, only expose the non-JSC
392         version in the exports.
393
394         * JavaScriptCore.exp:
395         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
396         * wtf/DateMath.cpp:
397         (WTF::parseDateFromNullTerminatedCharacters):
398         (JSC::getUTCOffset):
399         (JSC::gregorianDateTimeToMS):
400         (JSC::msToGregorianDateTime):
401         (JSC::parseDateFromNullTerminatedCharacters):
402         * wtf/DateMath.h:
403         (JSC::gmtoffset):
404
405 2009-11-08  David Levin  <levin@chromium.org>
406
407         Reviewed by NOBODY (chromium build fix).
408
409         For the change in DateMath.
410
411         * config.h:
412         * wtf/DateMath.cpp:
413
414 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
415
416         Windows build fix: export some symbols.
417
418         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
419
420 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
421
422         Build fix: updated export file.
423
424         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
425
426 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
427
428         Build fix: added some #includes.
429
430         * wtf/CurrentTime.h:
431         * wtf/DateMath.h:
432
433 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
434
435         Reviewed by Oliver Hunt.
436         
437         https://bugs.webkit.org/show_bug.cgi?id=31197
438         Implemented a timezone cache not based on Mac OS X's notify_check API.
439         
440         If the VM calculates the local timezone offset from UTC, it caches the
441         result until the end of the current VM invocation. (We don't want to cache
442         forever, because the user's timezone may change over time.)
443         
444         This removes notify_* overhead on Mac, and, more significantly, removes
445         OS time and date call overhead on non-Mac platforms.
446
447         ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
448         speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
449
450         * JavaScriptCore.exp:
451
452         * interpreter/CachedCall.h:
453         (JSC::CachedCall::CachedCall):
454         * interpreter/Interpreter.cpp:
455         (JSC::Interpreter::execute):
456         * runtime/JSGlobalObject.h:
457         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the 
458         DynamicGlobalObjectScope constructor responsible for checking whether a
459         dynamicGlobalObject has already been set. This eliminated some duplicate
460         client code, and allowed me to avoid adding even more duplicate client
461         code. Made DynamicGlobalObjectScope responsible for resetting the
462         local timezone cache upon first entry to the VM.
463
464         * runtime/DateConstructor.cpp:
465         (JSC::constructDate):
466         (JSC::callDate):
467         (JSC::dateParse):
468         (JSC::dateUTC):
469         * runtime/DateConversion.cpp:
470         (JSC::parseDate):
471         * runtime/DateConversion.h:
472         * runtime/DateInstance.cpp:
473         (JSC::DateInstance::gregorianDateTime):
474         * runtime/DateInstance.h:
475         * runtime/DateInstanceCache.h:
476         * runtime/DatePrototype.cpp:
477         (JSC::setNewValueFromTimeArgs):
478         (JSC::setNewValueFromDateArgs):
479         (JSC::dateProtoFuncSetYear):
480         * runtime/InitializeThreading.cpp:
481         (JSC::initializeThreadingOnce):
482         * runtime/JSGlobalData.cpp:
483         (JSC::JSGlobalData::JSGlobalData):
484         * runtime/JSGlobalData.h:
485         * wtf/DateMath.cpp:
486         (WTF::getCurrentUTCTime):
487         (WTF::getCurrentUTCTimeWithMicroseconds):
488         (WTF::getLocalTime):
489         (JSC::getUTCOffset): Use the new cache. Also, see below.
490         (JSC::gregorianDateTimeToMS):
491         (JSC::msToGregorianDateTime):
492         (JSC::initializeDates):
493         (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
494         accounts for the local timezone offset, to accomodate our new caching API,
495         and a (possibly misguided) caller in WebCore. Also, see below.
496         * wtf/DateMath.h:
497         (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
498         DateMath.* into the JSC namespace. The code needed to move so it could
499         naturally interact with ExecState and JSGlobalData to support caching.
500         Logically, it seemed right to move it, too, since this code is not really
501         as low-level as the WTF namespace might imply -- it implements a set of
502         date parsing and conversion quirks that are finely tuned to the JavaScript
503         language. Also removed the Mac OS X notify_* infrastructure.
504         
505         * wtf/CurrentTime.h:
506         (WTF::currentTimeMS):
507         (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
508         it to make it consistent with WTF's currentTime function.
509
510 2009-11-06  Gabor Loki  <loki@inf.u-szeged.hu>
511
512         Unreviewed trivial buildfix after r50595.
513
514         Rename the remaining rshiftPtr calls to rshift32
515
516         * jit/JITArithmetic.cpp:
517         (JSC::JIT::emit_op_rshift):
518         * jit/JITInlineMethods.h:
519         (JSC::JIT::emitFastArithImmToInt):
520
521 2009-11-06  Gavin Barraclough  <barraclough@apple.com>
522
523         Reviewed by Oliver Hunt.
524
525         Tidy up the shift methods on the macro-assembler interface.
526
527         Currently behaviour of shifts of a magnitude > 0x1f is undefined.
528         Instead defined that all shifts are masked to this range.  This makes a lot of
529         practical sense, both since having undefined behaviour is not particularly
530         desirable, and because this behaviour is commonly required (particularly since
531         it is required bt ECMA-262 for shifts).
532
533         Update the ARM assemblers to provide this behaviour.  Remove (now) redundant
534         masks from JITArithmetic, and remove rshiftPtr (this was used in case that
535         could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
536         on x86-64, which uses JSVALUE64!)
537
538         * assembler/MacroAssembler.h:
539         * assembler/MacroAssemblerARM.h:
540         (JSC::MacroAssemblerARM::lshift32):
541         (JSC::MacroAssemblerARM::rshift32):
542         * assembler/MacroAssemblerARMv7.h:
543         (JSC::MacroAssemblerARMv7::lshift32):
544         (JSC::MacroAssemblerARMv7::rshift32):
545         * assembler/MacroAssemblerX86_64.h:
546         * jit/JITArithmetic.cpp:
547         (JSC::JIT::emit_op_lshift):
548         (JSC::JIT::emit_op_rshift):
549
550 2009-11-05  Gavin Barraclough  <barraclough@apple.com>
551
552         Rubber Stamped by Oliver Hunt.
553
554         Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
555
556         * jit/JITInlineMethods.h:
557         (JSC::JIT::emitPutJITStubArg):
558         (JSC::JIT::emitPutJITStubArgConstant):
559         (JSC::JIT::emitGetJITStubArg):
560         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
561         * jit/JITStubCall.h:
562         (JSC::JITStubCall::JITStubCall):
563         (JSC::JITStubCall::getArgument):
564         * jit/JITStubs.h:
565
566 2009-11-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
567
568         Reviewed by Gavin Barraclough.
569
570         https://bugs.webkit.org/show_bug.cgi?id=31159
571         Fix branchDouble behaviour on ARM THUMB2 JIT.
572
573         The x86 branchDouble behaviour is reworked, and all JIT
574         ports should follow the x86 port. See bug 31104 and 31151
575
576         This patch contains a fix for the traditional ARM port
577
578         * assembler/ARMAssembler.h:
579         (JSC::ARMAssembler::):
580         (JSC::ARMAssembler::fmrs_r):
581         (JSC::ARMAssembler::ftosid_r):
582         * assembler/MacroAssemblerARM.h:
583         (JSC::MacroAssemblerARM::):
584         (JSC::MacroAssemblerARM::branchDouble):
585         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
586
587 2009-11-05  Chris Jerdonek  <chris.jerdonek@gmail.com>
588
589         Reviewed by Eric Seidel.
590
591         Removed the "this is part of the KDE project" comments from 
592         all *.h, *.cpp, *.idl, and *.pm files.
593         
594         https://bugs.webkit.org/show_bug.cgi?id=31167
595         
596         The maintenance and architecture page in the project wiki lists
597         this as a task.
598         
599         This change includes no changes or additions to test cases 
600         since the change affects only comments.
601         
602         * wtf/wince/FastMallocWince.h:
603
604 2009-11-05  Gabor Loki  <loki@inf.u-szeged.hu>
605
606         Reviewed by Gavin Barraclough.
607
608         Use ARMv7 specific encoding for immediate constants on ARMv7 target
609         https://bugs.webkit.org/show_bug.cgi?id=31060
610
611         * assembler/ARMAssembler.cpp:
612         (JSC::ARMAssembler::getOp2): Use INVALID_IMM
613         (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
614         (JSC::ARMAssembler::moveImm): Ditto.
615         (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
616         instructions or a PC relative load.
617         * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
618         encoded as an immediate constant.
619         (JSC::ARMAssembler::):
620         (JSC::ARMAssembler::movw_r): 16-bit immediate load
621         (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
622         (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
623         movw_r and mowt_r
624
625 2009-11-04  Mark Mentovai  <mark@chromium.org>
626
627         Reviewed by Mark Rowe.
628
629         Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
630         BUILDING_ON_TIGER and BUILDING_ON_LEOPARD.  The TARGETING_ macros
631         consider the deployment target; the BUILDING_ON_ macros consider the
632         headers being built against.
633
634         * wtf/Platform.h:
635
636 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
637
638         Reviewed by Oliver Hunt.
639
640         https://bugs.webkit.org/show_bug.cgi?id=31151
641         Fix branchDouble behaviour on ARM THUMB2 JIT.
642
643         The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
644         for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
645         branch on unordered operands.  Similarly, DoubleLessThanOrUnordered &
646         DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
647         ARMv7Assembler::ConditionLS, whereas they should be using
648         ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
649
650         Fix these, and fill out the missing DoubleConditions.
651
652         * assembler/MacroAssemblerARMv7.h:
653         (JSC::MacroAssemblerARMv7::):
654         (JSC::MacroAssemblerARMv7::branchDouble):
655
656 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
657
658         Rubber Stamped by Oliver Hunt.
659
660         Enable native call optimizations on ARMv7.  (Existing ARM_TRADITIONAL
661         implementation was generic, worked perfectly, just needed turning on).
662
663         * jit/JITOpcodes.cpp:
664         * wtf/Platform.h:
665
666 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
667
668         Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
669
670         Add a missing assert to the ARMv7 JIT.
671
672         * assembler/ARMv7Assembler.h:
673         (JSC::ARMThumbImmediate::ARMThumbImmediate):
674
675 2009-11-04  Mark Rowe  <mrowe@apple.com>
676
677         Rubber-stamped by Oliver Hunt.
678
679         Remove bogus op_ prefix on dumped version of three opcodes.
680
681         * bytecode/CodeBlock.cpp:
682         (JSC::CodeBlock::dump):
683
684 2009-11-04  Mark Rowe  <mrowe@apple.com>
685
686         Reviewed by Sam Weinig.
687
688         Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
689
690         We do this by having the registerName function return information about the constant if the register
691         number corresponds to a constant.  This requires that registerName, and several functions that call it,
692         be converted to member functions of CodeBlock so that the constant value can be retrieved.  The
693         ExecState also needs to be threaded down through these functions so that it can be passed on to
694         constantName when needed.
695
696         * bytecode/CodeBlock.cpp:
697         (JSC::constantName):
698         (JSC::CodeBlock::registerName):
699         (JSC::CodeBlock::printUnaryOp):
700         (JSC::CodeBlock::printBinaryOp):
701         (JSC::CodeBlock::printConditionalJump):
702         (JSC::CodeBlock::printGetByIdOp):
703         (JSC::CodeBlock::printPutByIdOp):
704         (JSC::CodeBlock::dump):
705         * bytecode/CodeBlock.h:
706         (JSC::CodeBlock::isConstantRegisterIndex):
707
708 2009-11-04  Pavel Heimlich  <tropikhajma@gmail.com>
709
710         Reviewed by Alexey Proskuryakov.
711
712         https://bugs.webkit.org/show_bug.cgi?id=30647
713         Solaris build failure due to strnstr.
714
715         * wtf/StringExtras.h: Enable strnstr on Solaris, too.
716
717 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
718
719         Reviewed by Oliver Hunt.
720
721         https://bugs.webkit.org/show_bug.cgi?id=31104
722         Refactor x86-specific behaviour out of the JIT.
723
724         - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
725         - Refactor double to int conversion out into the MacroAssembler.
726         - Remove broken double to int conversion for !JSVALUE32_64 builds - this code was broken and slowing us down, fixing it showed it not to be an improvement.
727         - Remove exclusion of double to int conversion from (1 % X) cases in JSVALUE32_64 builds - if this was of benefit this is no longer the case; simplify.
728
729         * assembler/MacroAssemblerARM.h:
730         (JSC::MacroAssemblerARM::):
731         * assembler/MacroAssemblerARMv7.h:
732         (JSC::MacroAssemblerARMv7::):
733         * assembler/MacroAssemblerX86Common.h:
734         (JSC::MacroAssemblerX86Common::):
735         (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
736         (JSC::MacroAssemblerX86Common::branchDouble):
737         (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
738         * jit/JITArithmetic.cpp:
739         (JSC::JIT::emitBinaryDoubleOp):
740         (JSC::JIT::emit_op_div):
741         (JSC::JIT::emitSlow_op_jnless):
742         (JSC::JIT::emitSlow_op_jnlesseq):
743         * jit/JITOpcodes.cpp:
744         (JSC::JIT::emit_op_jfalse):
745
746 2009-11-04  Mark Mentovai  <mark@chromium.org>
747
748         Reviewed by Eric Seidel.
749
750         Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp.  This is supposed
751         to be set as needed only in wtf/Platform.h.
752
753         * JavaScriptCore.gyp/JavaScriptCore.gyp:
754
755 2009-11-02  Oliver Hunt  <oliver@apple.com>
756
757         Reviewed by Gavin Barraclough.
758
759         REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
760         https://bugs.webkit.org/show_bug.cgi?id=31045
761
762         Add guards to prevent caching of prototype chain lookups with dictionaries at the
763         head of the chain.  Also add a few tighter assertions to cached prototype lookups
764         to catch this in future.
765
766         * interpreter/Interpreter.cpp:
767         (JSC::Interpreter::tryCacheGetByID):
768         (JSC::Interpreter::privateExecute):
769         * jit/JITStubs.cpp:
770         (JSC::JITThunks::tryCacheGetByID):
771
772 2009-11-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
773
774         Reviewed by Darin Adler.
775
776         PLATFORM(CF) should be set when building for Qt on Darwin
777         https://bugs.webkit.org/show_bug.cgi?id=23671
778
779         * wtf/Platform.h: Turn on CF support if both QT and DARWIN
780         platforms are defined.
781
782 2009-11-02  Dmitry Titov  <dimich@chromium.org>
783
784         Reviewed by David Levin.
785
786         Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
787         https://bugs.webkit.org/show_bug.cgi?id=30612
788
789         * wtf/MessageQueue.h:
790         (WTF::MessageQueue::alwaysTruePredicate):
791         (WTF::MessageQueue::~MessageQueue):
792         (WTF::MessageQueue::append):
793         (WTF::MessageQueue::appendAndCheckEmpty):
794         (WTF::MessageQueue::prepend):
795         (WTF::MessageQueue::waitForMessage):
796         (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
797         (WTF::MessageQueue::tryGetMessage):
798         (WTF::MessageQueue::removeIf):
799         The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
800         of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
801         All methods have arguments of type PassOwnPtr<DataType> and return the same type.
802
803         * wtf/Threading.cpp:
804         (WTF::createThread):
805         Superficial change to trigger rebuild of JSC project on Windows,
806         workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
807
808 2009-10-30  Geoffrey Garen  <ggaren@apple.com>
809
810         Reviewed by Oliver Hunt.
811
812         Fixed failing layout test: restore a special case I accidentally deleted.
813
814         * runtime/DatePrototype.cpp:
815         (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
816         that is NaN, reset the date to 0 *and* then apply the change; don't just
817         reset the date to 0.
818
819 2009-10-30  Geoffrey Garen  <ggaren@apple.com>
820
821         Windows build fix: update for object-to-pointer change.
822
823         * runtime/DatePrototype.cpp:
824         (JSC::formatLocaleDate):
825
826 2009-10-29  Geoffrey Garen  <ggaren@apple.com>
827
828         Reviewed by Darin Adler.
829
830         https://bugs.webkit.org/show_bug.cgi?id=30942
831         Use pointers instead of copies to pass GregorianDateTime objects around.
832         
833         SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
834         speedup on date-format-tofte.
835
836         * runtime/DateInstance.cpp:
837         (JSC::DateInstance::gregorianDateTime):
838         * runtime/DateInstance.h:
839         * runtime/DatePrototype.cpp:
840         (JSC::formatLocaleDate):
841         (JSC::dateProtoFuncToString):
842         (JSC::dateProtoFuncToUTCString):
843         (JSC::dateProtoFuncToISOString):
844         (JSC::dateProtoFuncToDateString):
845         (JSC::dateProtoFuncToTimeString):
846         (JSC::dateProtoFuncGetFullYear):
847         (JSC::dateProtoFuncGetUTCFullYear):
848         (JSC::dateProtoFuncToGMTString):
849         (JSC::dateProtoFuncGetMonth):
850         (JSC::dateProtoFuncGetUTCMonth):
851         (JSC::dateProtoFuncGetDate):
852         (JSC::dateProtoFuncGetUTCDate):
853         (JSC::dateProtoFuncGetDay):
854         (JSC::dateProtoFuncGetUTCDay):
855         (JSC::dateProtoFuncGetHours):
856         (JSC::dateProtoFuncGetUTCHours):
857         (JSC::dateProtoFuncGetMinutes):
858         (JSC::dateProtoFuncGetUTCMinutes):
859         (JSC::dateProtoFuncGetSeconds):
860         (JSC::dateProtoFuncGetUTCSeconds):
861         (JSC::dateProtoFuncGetTimezoneOffset):
862         (JSC::setNewValueFromTimeArgs):
863         (JSC::setNewValueFromDateArgs):
864         (JSC::dateProtoFuncSetYear):
865         (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
866         since it no longer has an out parameter. Uses 0 to indicate invalid dates.
867
868 2009-10-30  Zoltan Horvath  <zoltan@webkit.org>
869
870         Reviewed by Darin Adler.
871
872         Allow custom memory allocation control for JavaScriptCore's ListHashSet
873         https://bugs.webkit.org/show_bug.cgi?id=30853
874
875         Inherits ListHashSet class from FastAllocBase because it is
876         instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
877
878         * wtf/ListHashSet.h:
879
880 2009-10-30  Oliver Hunt  <oliver@apple.com>
881
882         Reviewed by Gavin Barraclough.
883
884         Regression: crash enumerating properties of an object with getters or setters
885         https://bugs.webkit.org/show_bug.cgi?id=30948
886
887         Add a guard to prevent us trying to cache property enumeration on
888         objects with getters or setters.
889
890         * runtime/JSPropertyNameIterator.cpp:
891         (JSC::JSPropertyNameIterator::create):
892
893 2009-10-30  Roland Steiner  <rolandsteiner@chromium.org>
894
895         Reviewed by Eric Seidel.
896
897         Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
898
899         Bug 28420 -  Implement HTML5 <ruby> rendering
900         (https://bugs.webkit.org/show_bug.cgi?id=28420)
901  
902         No new tests (no functional change).
903
904         * Configurations/FeatureDefines.xcconfig:
905
906 2009-10-29  Oliver Hunt  <oliver@apple.com>
907
908         Reviewed by Maciej Stachowiak.
909
910         REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
911         https://bugs.webkit.org/show_bug.cgi?id=30947
912         <rdar://problem/7348833>
913
914         The logic for flagging that a structure has non-enumerable properties
915         was in addPropertyWithoutTransition, rather than in the core Structure::put
916         method.  Despite this I was unable to produce a testcase that caused
917         the failure that etrade was experiencing, but the new assertion in
918         getEnumerablePropertyNames triggers on numerous layout tests without
919         the fix, so in effecti all for..in enumeration in any test ends up
920         doing the required consistency check.
921
922         * runtime/Structure.cpp:
923         (JSC::Structure::addPropertyWithoutTransition):
924         (JSC::Structure::put):
925         (JSC::Structure::getEnumerablePropertyNames):
926         (JSC::Structure::checkConsistency):
927
928 2009-10-29  Gabor Loki  <loki@inf.u-szeged.hu>
929
930         Reviewed by Gavin Barraclough.
931
932         Add cacheFlush support for Thumb-2 on Linux
933         https://bugs.webkit.org/show_bug.cgi?id=30865
934
935         * jit/ExecutableAllocator.h:
936         (JSC::ExecutableAllocator::cacheFlush):
937
938 2009-10-28  Gavin Barraclough  <barraclough@apple.com>
939
940         Reviewed by Oliver Hunt.
941
942         JSC JIT on ARMv7 cannot link jumps >16Mb range
943         https://bugs.webkit.org/show_bug.cgi?id=30891
944
945         Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
946         In the cases where the jump would fall within a relative jump range, use a relative jump.
947
948         * JavaScriptCore.xcodeproj/project.pbxproj:
949         * assembler/ARMv7Assembler.h:
950         (JSC::ARMv7Assembler::~ARMv7Assembler):
951         (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
952         (JSC::ARMv7Assembler::):
953         (JSC::ARMv7Assembler::executableCopy):
954         (JSC::ARMv7Assembler::linkJump):
955         (JSC::ARMv7Assembler::relinkJump):
956         (JSC::ARMv7Assembler::setInt32):
957         (JSC::ARMv7Assembler::isB):
958         (JSC::ARMv7Assembler::isBX):
959         (JSC::ARMv7Assembler::isMOV_imm_T3):
960         (JSC::ARMv7Assembler::isMOVT):
961         (JSC::ARMv7Assembler::isNOP_T1):
962         (JSC::ARMv7Assembler::isNOP_T2):
963         (JSC::ARMv7Assembler::linkJumpAbsolute):
964         (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
965         (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
966         (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
967         * assembler/MacroAssemblerARMv7.h:
968         (JSC::MacroAssemblerARMv7::makeJump):
969         (JSC::MacroAssemblerARMv7::makeBranch):
970         * jit/JIT.h:
971         * wtf/Platform.h:
972
973 2009-10-28  Oliver Hunt  <oliver@apple.com>
974
975         Reviewed by Geoff Garen.
976
977         Improve for..in enumeration performance
978         https://bugs.webkit.org/show_bug.cgi?id=30887
979
980         Improve indexing of an object with a for..in iterator by
981         identifying cases where get_by_val is being used with a iterator
982         as the subscript and replace it with a new get_by_pname
983         bytecode.  get_by_pname then optimizes lookups that directly access
984         the base object.
985
986         * bytecode/CodeBlock.cpp:
987         (JSC::CodeBlock::dump):
988         * bytecode/Opcode.h:
989         * bytecompiler/BytecodeGenerator.cpp:
990         (JSC::BytecodeGenerator::emitGetByVal):
991         * bytecompiler/BytecodeGenerator.h:
992         (JSC::BytecodeGenerator::pushOptimisedForIn):
993         (JSC::BytecodeGenerator::popOptimisedForIn):
994         * interpreter/Interpreter.cpp:
995         (JSC::Interpreter::privateExecute):
996         * jit/JIT.cpp:
997         (JSC::JIT::privateCompileMainPass):
998         (JSC::JIT::privateCompileSlowCases):
999         * jit/JIT.h:
1000         * jit/JITPropertyAccess.cpp:
1001         (JSC::JIT::compileGetDirectOffset):
1002         (JSC::JIT::emit_op_get_by_pname):
1003         (JSC::JIT::emitSlow_op_get_by_pname):
1004         * parser/Nodes.cpp:
1005         (JSC::ForInNode::emitBytecode):
1006         * runtime/JSObject.h:
1007         * runtime/JSPropertyNameIterator.cpp:
1008         (JSC::JSPropertyNameIterator::create):
1009         * runtime/JSPropertyNameIterator.h:
1010         (JSC::JSPropertyNameIterator::getOffset):
1011         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1012         * runtime/JSValue.h:
1013         (JSC::JSValue::):
1014         * runtime/Structure.cpp:
1015         (JSC::Structure::addPropertyTransition):
1016         (JSC::Structure::changePrototypeTransition):
1017         (JSC::Structure::despecifyFunctionTransition):
1018         (JSC::Structure::addAnonymousSlotsTransition):
1019         (JSC::Structure::getterSetterTransition):
1020         (JSC::Structure::toDictionaryTransition):
1021         (JSC::Structure::addPropertyWithoutTransition):
1022           Track the existence (or not) of non-enumerable properties.
1023         * runtime/Structure.h:
1024         (JSC::Structure::propertyStorageCapacity):
1025         (JSC::Structure::propertyStorageSize):
1026         (JSC::Structure::hasNonEnumerableProperties):
1027         (JSC::Structure::hasAnonymousSlots):
1028
1029 2009-10-28  Dmitry Titov  <dimich@chromium.org>
1030
1031         Not reviewed, attemp to fix Windows build.
1032
1033         Touch the cpp file to cause recompile.
1034
1035         * wtf/Threading.cpp:
1036         (WTF::threadEntryPoint):
1037
1038 2009-10-28  Dmitry Titov  <dimich@chromium.org>
1039
1040         Reviewed by David Levin.
1041
1042         https://bugs.webkit.org/show_bug.cgi?id=30805
1043         Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
1044         Existing Database tests cover this since Database removes tasks when it is stopped.
1045
1046         * wtf/MessageQueue.h:
1047         (WTF::::removeIf):
1048
1049 2009-10-28  Afonso R. Costa Jr.  <afonso.costa@openbossa.org>
1050
1051         Reviewed by Oliver Hunt.
1052
1053         [Qt] Enable YARR when YARR_JIT is enabled
1054         https://bugs.webkit.org/show_bug.cgi?id=30730
1055
1056         When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
1057         be toggled also.
1058
1059         * JavaScriptCore.pri:
1060
1061 2009-10-24  Martin Robinson  <martin.james.robinson@gmail.com>
1062
1063         Reviewed by Oliver Hunt.
1064
1065         Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
1066
1067         strict-aliasing warnings in JSFunction.h
1068         https://bugs.webkit.org/show_bug.cgi?id=27869
1069
1070         * runtime/JSFunction.h:
1071         (JSC::JSFunction::nativeFunction):
1072         (JSC::JSFunction::scopeChain):
1073         (JSC::JSFunction::setScopeChain):
1074         (JSC::JSFunction::setNativeFunction):
1075
1076 2009-10-28  Jan-Arve Sæther <jan-arve.saether@nokia.com>
1077
1078         Reviewed by Tor Arne Vestbø.
1079
1080         Build-fix for 64-bit Windows
1081
1082         * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
1083
1084 2009-10-28  Gavin Barraclough  <barraclough@apple.com>
1085
1086         Reviewed by NOBODY (build fix!).
1087
1088         * jit/JIT.h:
1089
1090 2009-10-26  Holger Hans Peter Freyther  <zecke@selfish.org>
1091
1092         Rubber-stamped by Darin Adler.
1093
1094         Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
1095         https://bugs.webkit.org/show_bug.cgi?id=30769
1096
1097         When using -fvisibility=hidden to hide all internal symbols by default
1098         the malloc symbols will be hidden as well. For memory instrumentation
1099         it is needed to provide an instrumented version of these symbols and
1100         override the normal routines and by changing the visibility back to
1101         default this becomes possible.
1102
1103         The only other solution would be to use system malloc instead of the
1104         TCmalloc implementation but this will not allow to analyze memory
1105         behavior with the default allocator.
1106
1107         * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
1108
1109 2009-10-27  Gavin Barraclough  <barraclough@apple.com>
1110
1111         Rubber Stamped by Samuel Q. Weinig.
1112
1113         Make the asserts protecting the offsets in the JIT more descriptive.
1114
1115         * jit/JIT.h:
1116         * jit/JITCall.cpp:
1117         (JSC::JIT::compileOpCall):
1118         * jit/JITPropertyAccess.cpp:
1119         (JSC::JIT::emit_op_method_check):
1120         (JSC::JIT::compileGetByIdHotPath):
1121         (JSC::JIT::compileGetByIdSlowCase):
1122         (JSC::JIT::emit_op_put_by_id):
1123
1124 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1125
1126         Reviewed by Sam Weinig.
1127
1128         A little bit of refactoring in the date code.
1129
1130         * JavaScriptCore.exp: Don't export this unused symbol.
1131
1132         * runtime/DateConstructor.cpp:
1133         (JSC::constructDate):
1134
1135         * runtime/DateInstance.cpp:
1136         (JSC::DateInstance::DateInstance):
1137         * runtime/DateInstance.h: Removed some unused functions. Changed the default
1138         constructor to ensure that a DateInstance is always initialized.
1139
1140         * runtime/DatePrototype.cpp:
1141         (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
1142         since it now requires one.
1143
1144         * wtf/DateMath.cpp:
1145         (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
1146         output will require it. Otherwise, our offset is 0.
1147
1148 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1149
1150         Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
1151
1152         * JavaScriptCore.xcodeproj/project.pbxproj:
1153
1154 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1155
1156         Build fix: re-readded this file.
1157
1158         * runtime/DateInstanceCache.h: Added.
1159         (JSC::DateInstanceData::create):
1160         (JSC::DateInstanceData::DateInstanceData):
1161         (JSC::DateInstanceCache::DateInstanceCache):
1162         (JSC::DateInstanceCache::add):
1163         (JSC::DateInstanceCache::lookup):
1164
1165 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1166
1167         Reviewed by Darin Adler and Oliver Hunt.
1168
1169         https://bugs.webkit.org/show_bug.cgi?id=30800
1170         Cache recently computed date data.
1171         
1172         SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
1173
1174         * GNUmakefile.am:
1175         * JavaScriptCore.gypi:
1176         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1177         * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
1178
1179         * runtime/DateInstance.cpp:
1180         (JSC::DateInstance::DateInstance):
1181         (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
1182
1183         * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
1184         of a "cache cache".
1185
1186         * runtime/DatePrototype.cpp:
1187         (JSC::formatLocaleDate):
1188         (JSC::dateProtoFuncToString):
1189         (JSC::dateProtoFuncToUTCString):
1190         (JSC::dateProtoFuncToISOString):
1191         (JSC::dateProtoFuncToDateString):
1192         (JSC::dateProtoFuncToTimeString):
1193         (JSC::dateProtoFuncGetFullYear):
1194         (JSC::dateProtoFuncGetUTCFullYear):
1195         (JSC::dateProtoFuncToGMTString):
1196         (JSC::dateProtoFuncGetMonth):
1197         (JSC::dateProtoFuncGetUTCMonth):
1198         (JSC::dateProtoFuncGetDate):
1199         (JSC::dateProtoFuncGetUTCDate):
1200         (JSC::dateProtoFuncGetDay):
1201         (JSC::dateProtoFuncGetUTCDay):
1202         (JSC::dateProtoFuncGetHours):
1203         (JSC::dateProtoFuncGetUTCHours):
1204         (JSC::dateProtoFuncGetMinutes):
1205         (JSC::dateProtoFuncGetUTCMinutes):
1206         (JSC::dateProtoFuncGetSeconds):
1207         (JSC::dateProtoFuncGetUTCSeconds):
1208         (JSC::dateProtoFuncGetTimezoneOffset):
1209         (JSC::setNewValueFromTimeArgs):
1210         (JSC::setNewValueFromDateArgs):
1211         (JSC::dateProtoFuncSetYear):
1212         (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
1213         can access the DateInstanceCache.
1214
1215         * runtime/JSGlobalData.h: Keep a DateInstanceCache.
1216
1217 2009-10-27  James Robinson  <jamesr@chromium.org>
1218
1219         Reviewed by Darin Fisher.
1220
1221         Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
1222
1223         Chromium uses a different method to calculate the current time than is used in
1224         JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
1225         function are mixed.  In particular, timers can get scheduled in the past which leads to 100% CPU use.
1226         See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
1227
1228         https://bugs.webkit.org/show_bug.cgi?id=30833
1229
1230         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1231         * wtf/CurrentTime.cpp:
1232
1233 2009-10-27  Peter Varga  <pvarga@inf.u-szeged.hu>
1234
1235         Rubber-stamped by Tor Arne Vestbø.
1236
1237         Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
1238         alternative.
1239
1240         * yarr/RegexInterpreter.cpp:
1241         (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1242         (JSC::Yarr::ByteCompiler::alternativeDisjunction):
1243         (JSC::Yarr::ByteCompiler::emitDisjunction):
1244         * yarr/RegexJIT.cpp:
1245         (JSC::Yarr::RegexGenerator::generateDisjunction):
1246
1247 2009-10-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1248
1249         Reviewed by Darin Adler.
1250
1251         Make .rc files compile on Windows without depending on MFC headers
1252         https://bugs.webkit.org/show_bug.cgi?id=30750
1253
1254         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
1255         winresrc.h because it exists even when MFC is not installed, and is
1256         all that's needed here.
1257
1258 2009-10-26  Gabor Loki  <loki@inf.u-szeged.hu>
1259
1260         Reviewed by Gavin Barraclough.
1261
1262         The thunkReturnAddress is on JITStackFrame on ARM JIT as well
1263         https://bugs.webkit.org/show_bug.cgi?id=30782
1264
1265         Move the thunkReturnAddress from top of the stack into the JITStackFrame
1266         structure. This is a requirement for JSValue32_64 support on ARM.
1267
1268         * assembler/MacroAssemblerARM.h:
1269         (JSC::MacroAssemblerARM::ret): Return with link register
1270         (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
1271         * jit/JIT.h: Remove unused ctiReturnRegister
1272         * jit/JITInlineMethods.h: Same as ARMv7
1273         (JSC::JIT::restoreArgumentReference): Ditto.
1274         (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
1275         * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
1276         * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
1277         small trampoline functions which handle return addresses for each
1278         CTI_STUB_FUNCTION.
1279         * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
1280         (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
1281         * yarr/RegexJIT.cpp:
1282         (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
1283
1284 2009-10-26  Steve Block  <steveblock@google.com>
1285
1286         Reviewed by Darin Adler.
1287
1288         Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
1289         https://bugs.webkit.org/show_bug.cgi?id=30713
1290
1291         * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
1292         * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
1293         * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
1294
1295 2009-10-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1296
1297         Reviewed by Holger Freyther.
1298
1299         [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
1300         https://bugs.webkit.org/show_bug.cgi?id=30476
1301
1302         Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
1303         to jsc.exe.
1304
1305         * jsc.pro:
1306
1307 2009-10-23  Steve Block  <steveblock@google.com>
1308
1309         Reviewed by Dmitry Titov.
1310
1311         Fixes a leak in createThreadInternal on Android.
1312         https://bugs.webkit.org/show_bug.cgi?id=30698
1313
1314         * wtf/ThreadingPthreads.cpp: Modified.
1315         (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
1316
1317 2009-10-22  Geoffrey Garen  <ggaren@apple.com>
1318
1319         Reviewed by Alexey Proskuryakov.
1320
1321         Fixed ASSERT when opening Safari's Caches window while the Web Inspector
1322         is open.
1323
1324         * runtime/Collector.cpp:
1325         (JSC::typeName): Added two new types to the type name list in the Collector.
1326         These types have been around for a while, but nobody remembered to consider them here.
1327
1328         * runtime/JSCell.h:
1329         (JSC::JSCell::isPropertyNameIterator):
1330         * runtime/JSPropertyNameIterator.h:
1331         (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
1332         a way to tell if a cell is a JSPropertyNameIterator.
1333
1334 2009-10-22  Steve Falkenburg  <sfalken@apple.com>
1335
1336         Reviewed by Jon Honeycutt.
1337
1338         https://bugs.webkit.org/show_bug.cgi?id=30686
1339         Remove debug-specific def file.
1340         Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
1341         that target is only used internally, maintaining two files just to
1342         suppress a single link warning isn't worthwhile.
1343
1344         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1345         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
1346
1347 2009-10-21  Jon Honeycutt  <jhoneycutt@apple.com>
1348
1349         <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
1350         <rdar://problem/7270314> After halting a transparent PluginView on
1351         Windows, the transparency is applied twice
1352
1353         Reviewed by Dan Bernstein.
1354
1355         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1356         Export WTF::deleteOwnedPtr(HDC).
1357
1358         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1359         Ditto.
1360
1361 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1362
1363         Windows build fix: updated variable name.
1364
1365         * runtime/DatePrototype.cpp:
1366         (JSC::formatLocaleDate):
1367
1368 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1369
1370         Reviewed by Mark Rowe.
1371
1372         * jit/JITOpcodes.cpp:
1373         (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
1374         size of a JSValue because m_jsStrings is an array of JSValues.
1375
1376 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1377
1378         Reviewed by Mark Rowe.
1379
1380         Fixed a 64-bit regression caused by the fix for
1381         https://bugs.webkit.org/show_bug.cgi?id=30570.
1382
1383         * jit/JITOpcodes.cpp:
1384         (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
1385         64-bit pointers are eight bytes long.
1386
1387 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1388
1389         Reviewed by Sam Weinig.
1390
1391         Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
1392         caller doesn't need to supply the DateInstance's own internal value to
1393         the DateInstance.
1394
1395         * runtime/DateInstance.cpp:
1396         (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
1397
1398         * runtime/DateInstance.h:
1399         * runtime/DatePrototype.cpp:
1400         (JSC::formatLocaleDate):
1401         (JSC::dateProtoFuncToString):
1402         (JSC::dateProtoFuncToUTCString):
1403         (JSC::dateProtoFuncToISOString):
1404         (JSC::dateProtoFuncToDateString):
1405         (JSC::dateProtoFuncToTimeString):
1406         (JSC::dateProtoFuncToLocaleString):
1407         (JSC::dateProtoFuncToLocaleDateString):
1408         (JSC::dateProtoFuncToLocaleTimeString):
1409         (JSC::dateProtoFuncGetTime):
1410         (JSC::dateProtoFuncGetFullYear):
1411         (JSC::dateProtoFuncGetUTCFullYear):
1412         (JSC::dateProtoFuncToGMTString):
1413         (JSC::dateProtoFuncGetMonth):
1414         (JSC::dateProtoFuncGetUTCMonth):
1415         (JSC::dateProtoFuncGetDate):
1416         (JSC::dateProtoFuncGetUTCDate):
1417         (JSC::dateProtoFuncGetDay):
1418         (JSC::dateProtoFuncGetUTCDay):
1419         (JSC::dateProtoFuncGetHours):
1420         (JSC::dateProtoFuncGetUTCHours):
1421         (JSC::dateProtoFuncGetMinutes):
1422         (JSC::dateProtoFuncGetUTCMinutes):
1423         (JSC::dateProtoFuncGetSeconds):
1424         (JSC::dateProtoFuncGetUTCSeconds):
1425         (JSC::dateProtoFuncGetTimezoneOffset):
1426         (JSC::setNewValueFromTimeArgs):
1427         (JSC::setNewValueFromDateArgs):
1428         (JSC::dateProtoFuncSetYear):
1429         (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
1430
1431 2009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
1432
1433         Reviewed by Geoffrey Garen.
1434
1435         The op_next_pname should use 4 bytes addressing mode in case of JSValue32
1436         https://bugs.webkit.org/show_bug.cgi?id=30570
1437
1438         * jit/JITOpcodes.cpp:
1439         (JSC::JIT::emit_op_next_pname):
1440
1441 2009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
1442
1443         Reviewed by Oliver Hunt.
1444
1445         Move OverridesMarkChildren flag from DatePrototype to its parent class
1446         https://bugs.webkit.org/show_bug.cgi?id=30372
1447
1448         * runtime/DateInstance.h:
1449         (JSC::DateInstance::createStructure):
1450         * runtime/DatePrototype.h:
1451
1452 2009-10-19  Geoffrey Garen  <ggaren@apple.com>
1453
1454         Reviewed by Oliver Hunt.
1455
1456         Tightened up some put_by_id_transition code generation.
1457         https://bugs.webkit.org/show_bug.cgi?id=30539
1458
1459         * jit/JIT.h:
1460         * jit/JITPropertyAccess.cpp:
1461         (JSC::JIT::testPrototype):
1462         (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
1463         checks or read Structures and prototypes from objects: they're all known
1464         constants at compile time.
1465
1466 2009-10-19  Geoffrey Garen  <ggaren@apple.com>
1467
1468         Reviewed by Sam Weinig.
1469
1470         Added a private API for getting a global context from a context, for
1471         clients who want to preserve a context for a later callback.
1472
1473         * API/APICast.h:
1474         (toGlobalRef): Added an ASSERT, since this function is used more often
1475         than before.
1476
1477         * API/JSContextRef.cpp:
1478         * API/JSContextRefPrivate.h: Added. The new API.
1479
1480         * API/tests/testapi.c:
1481         (print_callAsFunction):
1482         (main): Test the new API.
1483
1484         * JavaScriptCore.exp:
1485         * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
1486
1487 2009-10-17  Geoffrey Garen  <ggaren@apple.com>
1488
1489         Reviewed by Oliver Hunt.
1490         
1491         Tightened up some instanceof code generation.
1492         https://bugs.webkit.org/show_bug.cgi?id=30488
1493
1494         * jit/JITOpcodes.cpp:
1495         (JSC::JIT::emit_op_instanceof):
1496         (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks - 
1497         cell type checks and ImplementsDefaultHasIntance checks implicitly
1498         supersede object type checks.
1499
1500 2009-10-18  Kwang Yul Seo  <skyul@company100.net>
1501
1502         Reviewed by Darin Adler.
1503
1504         Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
1505         https://bugs.webkit.org/show_bug.cgi?id=30474
1506
1507         stricmp and strnicmp are deprecated beginning in Visual
1508         C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
1509
1510         * wtf/StringExtras.h:
1511         (strncasecmp):
1512         (strcasecmp):
1513
1514 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
1515
1516         Build fix: apparently we shouldn't export those symbols?
1517
1518         * JavaScriptCore.exp:
1519
1520 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
1521
1522         Build fix: export some symbols.
1523
1524         * JavaScriptCore.exp:
1525
1526 2009-10-16  Oliver Hunt  <oliver@apple.com>
1527
1528         Reviewed by Gavin Barraclough.
1529
1530         structure typeinfo flags should be inherited.
1531         https://bugs.webkit.org/show_bug.cgi?id=30468
1532
1533         Add StructureFlag constant to the various JSC classes and use
1534         it for the TypeInfo construction.  This allows us to simply
1535         accumulate flags by basing each classes StructureInfo on its parents.
1536
1537         * API/JSCallbackConstructor.h:
1538         (JSC::JSCallbackConstructor::createStructure):
1539         * API/JSCallbackFunction.h:
1540         (JSC::JSCallbackFunction::createStructure):
1541         * API/JSCallbackObject.h:
1542         (JSC::JSCallbackObject::createStructure):
1543         * debugger/DebuggerActivation.h:
1544         (JSC::DebuggerActivation::createStructure):
1545         * runtime/Arguments.h:
1546         (JSC::Arguments::createStructure):
1547         * runtime/BooleanObject.h:
1548         (JSC::BooleanObject::createStructure):
1549         * runtime/DatePrototype.h:
1550         (JSC::DatePrototype::createStructure):
1551         * runtime/FunctionPrototype.h:
1552         (JSC::FunctionPrototype::createStructure):
1553         * runtime/GlobalEvalFunction.h:
1554         (JSC::GlobalEvalFunction::createStructure):
1555         * runtime/InternalFunction.h:
1556         (JSC::InternalFunction::createStructure):
1557         * runtime/JSActivation.h:
1558         (JSC::JSActivation::createStructure):
1559         * runtime/JSArray.h:
1560         (JSC::JSArray::createStructure):
1561         * runtime/JSByteArray.cpp:
1562         (JSC::JSByteArray::createStructure):
1563         * runtime/JSByteArray.h:
1564         * runtime/JSFunction.h:
1565         (JSC::JSFunction::createStructure):
1566         * runtime/JSGlobalObject.h:
1567         (JSC::JSGlobalObject::createStructure):
1568         * runtime/JSNotAnObject.h:
1569         (JSC::JSNotAnObject::createStructure):
1570         * runtime/JSONObject.h:
1571         (JSC::JSONObject::createStructure):
1572         * runtime/JSObject.h:
1573         (JSC::JSObject::createStructure):
1574         * runtime/JSStaticScopeObject.h:
1575         (JSC::JSStaticScopeObject::createStructure):
1576         * runtime/JSVariableObject.h:
1577         (JSC::JSVariableObject::createStructure):
1578         * runtime/JSWrapperObject.h:
1579         (JSC::JSWrapperObject::createStructure):
1580         * runtime/MathObject.h:
1581         (JSC::MathObject::createStructure):
1582         * runtime/NumberConstructor.h:
1583         (JSC::NumberConstructor::createStructure):
1584         * runtime/NumberObject.h:
1585         (JSC::NumberObject::createStructure):
1586         * runtime/RegExpConstructor.h:
1587         (JSC::RegExpConstructor::createStructure):
1588         * runtime/RegExpObject.h:
1589         (JSC::RegExpObject::createStructure):
1590         * runtime/StringObject.h:
1591         (JSC::StringObject::createStructure):
1592         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1593         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1594
1595 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
1596
1597         Reviewed by Oliver Hunt.
1598         
1599         Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
1600         in JSPropertyNameIterator; inline more code.
1601
1602         1.024x as fast on SunSpider (fasta: 1.43x as fast).
1603
1604         * bytecode/CodeBlock.cpp:
1605         (JSC::CodeBlock::dump):
1606         * bytecode/Opcode.h:
1607         * bytecompiler/BytecodeGenerator.cpp:
1608         (JSC::BytecodeGenerator::emitGetPropertyNames):
1609         (JSC::BytecodeGenerator::emitNextPropertyName):
1610         * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
1611         op_get_pnames and op_next_pname so that we can track iteration state
1612         in the register file instead of in the JSPropertyNameIterator. (To be
1613         cacheable, the JSPropertyNameIterator must be stateless.)
1614
1615         * interpreter/Interpreter.cpp:
1616         (JSC::Interpreter::tryCachePutByID):
1617         (JSC::Interpreter::tryCacheGetByID): Updated for rename to
1618         "normalizePrototypeChain" and removal of "isCacheable". 
1619
1620         (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
1621         iteration state tracking.
1622
1623         * jit/JIT.cpp:
1624         (JSC::JIT::privateCompileMainPass):
1625         * jit/JIT.h:
1626         * jit/JITOpcodes.cpp:
1627         (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
1628         iteration state tracking.
1629
1630         (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
1631
1632         * jit/JITStubs.cpp:
1633         (JSC::JITThunks::tryCachePutByID):
1634         (JSC::JITThunks::tryCacheGetByID): Updated for rename to
1635         "normalizePrototypeChain" and removal of "isCacheable". 
1636
1637         (JSC::DEFINE_STUB_FUNCTION):
1638         * jit/JITStubs.h:
1639         (JSC::): Added has_property and to_object stubs. Removed op_next_pname
1640         stub, since has_property is all we need anymore.
1641
1642         * parser/Nodes.cpp:
1643         (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
1644         iteration state tracking.
1645
1646         * runtime/JSCell.h:
1647         * runtime/JSObject.cpp:
1648         (JSC::JSObject::getPropertyNames): Don't do caching at this layer
1649         anymore, since we don't create a JSPropertyNameIterator at this layer.
1650
1651         * runtime/JSPropertyNameIterator.cpp:
1652         (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
1653         (JSC::JSPropertyNameIterator::get):  Updated for in-RegisterFile
1654         iteration state tracking.
1655         (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
1656
1657         * runtime/JSPropertyNameIterator.h:
1658         (JSC::JSPropertyNameIterator::size):
1659         (JSC::JSPropertyNameIterator::setCachedStructure):
1660         (JSC::JSPropertyNameIterator::cachedStructure):
1661         (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
1662         (JSC::JSPropertyNameIterator::cachedPrototypeChain):
1663         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1664         (JSC::Structure::setEnumerationCache): Don't store iteration state in
1665         a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
1666         Structure.
1667
1668         * runtime/JSValue.h:
1669         (JSC::asCell):
1670         * runtime/MarkStack.h: Make those mischievous #include gods happy.
1671
1672         * runtime/ObjectConstructor.cpp:
1673
1674         * runtime/Operations.h:
1675         (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
1676         to normalizePrototypeChain, since it changes dictionary prototypes to
1677         non-dictionary objects.
1678
1679         * runtime/PropertyNameArray.cpp:
1680         (JSC::PropertyNameArray::add):
1681         * runtime/PropertyNameArray.h:
1682         (JSC::PropertyNameArrayData::PropertyNameArrayData):
1683         (JSC::PropertyNameArray::data):
1684         (JSC::PropertyNameArray::size):
1685         (JSC::PropertyNameArray::begin):
1686         (JSC::PropertyNameArray::end): Simplified some code here to help with
1687         current and future refactoring.
1688
1689         * runtime/Protect.h:
1690         * runtime/Structure.cpp:
1691         (JSC::Structure::~Structure):
1692         (JSC::Structure::addPropertyWithoutTransition):
1693         (JSC::Structure::removePropertyWithoutTransition): No need to clear
1694         the enumeration cache with adding / removing properties without
1695         transition. It is an error to add / remove properties without transition
1696         once an object has been observed, and we can ASSERT to catch that.
1697
1698         * runtime/Structure.h:
1699         (JSC::Structure::enumerationCache): Changed the enumeration cache to
1700         hold a JSPropertyNameIterator.
1701
1702         * runtime/StructureChain.cpp:
1703         * runtime/StructureChain.h:
1704         (JSC::StructureChain::head): Removed StructureChain::isCacheable because
1705         it was wrong-headed in two ways: (1) It gave up when a prototype was a
1706         dictionary, but instead we want un-dictionary heavily accessed
1707         prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
1708         a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
1709         is only releavant to for-in caching.
1710
1711 2009-10-16  Steve Falkenburg  <sfalken@apple.com>
1712
1713         Reviewed by Adam Roben.
1714
1715         Add a Debug_All configuration to build entire stack as debug.
1716         Change Debug_Internal to:
1717         - stop using _debug suffix for all WebKit/Safari binaries
1718         - not use _debug as a DLL naming suffix
1719         - use non-debug C runtime lib.
1720
1721         * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
1722         * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
1723         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
1724         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
1725         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
1726         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
1727         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
1728         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
1729
1730 2009-10-16  Oliver Hunt  <oliver@apple.com>
1731
1732         Reviewed by Gavin Barraclough.
1733
1734         Make typeinfo flags default to false
1735         https://bugs.webkit.org/show_bug.cgi?id=30372
1736
1737         Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
1738         flag.
1739
1740         * API/JSCallbackConstructor.h:
1741         (JSC::JSCallbackConstructor::createStructure):
1742         * API/JSCallbackObject.h:
1743         (JSC::JSCallbackObject::createStructure):
1744         * debugger/DebuggerActivation.h:
1745         (JSC::DebuggerActivation::createStructure):
1746         * runtime/Arguments.h:
1747         (JSC::Arguments::createStructure):
1748         * runtime/BooleanObject.h:
1749         (JSC::BooleanObject::createStructure):
1750         * runtime/DatePrototype.h:
1751         (JSC::DatePrototype::createStructure):
1752         * runtime/FunctionPrototype.h:
1753         (JSC::FunctionPrototype::createStructure):
1754         * runtime/GlobalEvalFunction.h:
1755         (JSC::GlobalEvalFunction::createStructure):
1756         * runtime/JSAPIValueWrapper.h:
1757         (JSC::JSAPIValueWrapper::createStructure):
1758         * runtime/JSActivation.h:
1759         (JSC::JSActivation::createStructure):
1760         * runtime/JSArray.h:
1761         (JSC::JSArray::createStructure):
1762         * runtime/JSByteArray.cpp:
1763         (JSC::JSByteArray::createStructure):
1764         * runtime/JSFunction.h:
1765         (JSC::JSFunction::createStructure):
1766         * runtime/JSGlobalObject.h:
1767         (JSC::JSGlobalObject::createStructure):
1768         * runtime/JSNotAnObject.h:
1769         (JSC::JSNotAnObject::createStructure):
1770         * runtime/JSONObject.h:
1771         (JSC::JSONObject::createStructure):
1772         * runtime/JSObject.cpp:
1773         (JSC::JSObject::getPropertyNames):
1774         * runtime/JSObject.h:
1775         (JSC::JSObject::createStructure):
1776         * runtime/JSStaticScopeObject.h:
1777         (JSC::JSStaticScopeObject::createStructure):
1778         * runtime/JSTypeInfo.h:
1779         (JSC::TypeInfo::overridesGetPropertyNames):
1780         * runtime/JSVariableObject.h:
1781         (JSC::JSVariableObject::createStructure):
1782         * runtime/JSWrapperObject.h:
1783         (JSC::JSWrapperObject::createStructure):
1784         * runtime/MathObject.h:
1785         (JSC::MathObject::createStructure):
1786         * runtime/NumberConstructor.h:
1787         (JSC::NumberConstructor::createStructure):
1788         * runtime/NumberObject.h:
1789         (JSC::NumberObject::createStructure):
1790         * runtime/RegExpConstructor.h:
1791         (JSC::RegExpConstructor::createStructure):
1792         * runtime/RegExpObject.h:
1793         (JSC::RegExpObject::createStructure):
1794         * runtime/StringObject.h:
1795         (JSC::StringObject::createStructure):
1796         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1797         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1798         * runtime/StructureChain.cpp:
1799         (JSC::StructureChain::isCacheable):
1800
1801 2009-10-16  Kevin Ollivier  <kevino@theolliviers.com>
1802
1803         wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion 
1804         structure differs.
1805
1806         * wtf/Platform.h:
1807
1808 2009-10-16  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1809
1810         Reviewed by Simon Hausmann.
1811
1812         [Qt] Implement ExecutableAllocator for Symbian
1813         https://bugs.webkit.org/show_bug.cgi?id=29946
1814
1815         Tested with YARR JIT enabled for Symbian; 
1816         This patch does not (yet) enable YARR JIT by default.
1817
1818         * JavaScriptCore.pri:
1819         * jit/ExecutableAllocator.h:
1820         * jit/ExecutableAllocatorSymbian.cpp: Added.
1821         (JSC::ExecutableAllocator::intializePageSize):
1822         (JSC::ExecutablePool::systemAlloc):
1823         (JSC::ExecutablePool::systemRelease):
1824
1825 2009-10-15  Oliver Hunt  <oliver@apple.com>
1826
1827         Reviewed by Darin Adler.
1828
1829         Make typeinfo flags default to false
1830         https://bugs.webkit.org/show_bug.cgi?id=30372
1831
1832         Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
1833
1834         * API/JSCallbackConstructor.h:
1835         (JSC::JSCallbackConstructor::createStructure):
1836         * API/JSCallbackFunction.h:
1837         (JSC::JSCallbackFunction::createStructure):
1838         * API/JSCallbackObject.h:
1839         (JSC::JSCallbackObject::createStructure):
1840         * debugger/DebuggerActivation.h:
1841         (JSC::DebuggerActivation::createStructure):
1842         * runtime/Arguments.h:
1843         (JSC::Arguments::createStructure):
1844         * runtime/BooleanObject.h:
1845         (JSC::BooleanObject::createStructure):
1846         * runtime/DatePrototype.h:
1847         (JSC::DatePrototype::createStructure):
1848         * runtime/FunctionPrototype.h:
1849         (JSC::FunctionPrototype::createStructure):
1850         * runtime/GetterSetter.h:
1851         (JSC::GetterSetter::createStructure):
1852         * runtime/GlobalEvalFunction.h:
1853         (JSC::GlobalEvalFunction::createStructure):
1854         * runtime/InternalFunction.h:
1855         (JSC::InternalFunction::createStructure):
1856         * runtime/JSAPIValueWrapper.h:
1857         (JSC::JSAPIValueWrapper::createStructure):
1858         * runtime/JSActivation.h:
1859         (JSC::JSActivation::createStructure):
1860         * runtime/JSArray.h:
1861         (JSC::JSArray::createStructure):
1862         (JSC::MarkStack::markChildren):
1863         * runtime/JSByteArray.cpp:
1864         (JSC::JSByteArray::createStructure):
1865         * runtime/JSFunction.h:
1866         (JSC::JSFunction::createStructure):
1867         * runtime/JSGlobalObject.h:
1868         (JSC::JSGlobalObject::createStructure):
1869         * runtime/JSNotAnObject.h:
1870         (JSC::JSNotAnObject::createStructure):
1871         * runtime/JSNumberCell.h:
1872         (JSC::JSNumberCell::createStructure):
1873         * runtime/JSONObject.h:
1874         (JSC::JSONObject::createStructure):
1875         * runtime/JSObject.h:
1876         (JSC::JSObject::createStructure):
1877         * runtime/JSPropertyNameIterator.h:
1878         (JSC::JSPropertyNameIterator::createStructure):
1879         * runtime/JSStaticScopeObject.h:
1880         (JSC::JSStaticScopeObject::createStructure):
1881         * runtime/JSString.h:
1882         (JSC::JSString::createStructure):
1883         * runtime/JSTypeInfo.h:
1884         (JSC::TypeInfo::overridesMarkChildren):
1885         * runtime/JSVariableObject.h:
1886         (JSC::JSVariableObject::createStructure):
1887         * runtime/JSWrapperObject.h:
1888         (JSC::JSWrapperObject::createStructure):
1889         * runtime/MathObject.h:
1890         (JSC::MathObject::createStructure):
1891         * runtime/NumberConstructor.h:
1892         (JSC::NumberConstructor::createStructure):
1893         * runtime/NumberObject.h:
1894         (JSC::NumberObject::createStructure):
1895         * runtime/RegExpConstructor.h:
1896         (JSC::RegExpConstructor::createStructure):
1897         * runtime/RegExpObject.h:
1898         (JSC::RegExpObject::createStructure):
1899         * runtime/StringObject.h:
1900         (JSC::StringObject::createStructure):
1901         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1902         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1903
1904 2009-10-14  Oliver Hunt  <oliver@apple.com>
1905
1906         Reviewed by Geoff Garen.
1907
1908         Make typeinfo flags default to false
1909         https://bugs.webkit.org/show_bug.cgi?id=30372
1910         
1911         Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
1912
1913         * API/JSCallbackConstructor.h:
1914         (JSC::JSCallbackConstructor::createStructure):
1915         * API/JSCallbackFunction.h:
1916         (JSC::JSCallbackFunction::createStructure):
1917         * API/JSCallbackObject.h:
1918         (JSC::JSCallbackObject::createStructure):
1919         * debugger/DebuggerActivation.h:
1920         (JSC::DebuggerActivation::createStructure):
1921         * jit/JITStubs.cpp:
1922         (JSC::DEFINE_STUB_FUNCTION):
1923         * runtime/Arguments.h:
1924         (JSC::Arguments::createStructure):
1925         * runtime/BooleanObject.h:
1926         (JSC::BooleanObject::createStructure):
1927         * runtime/DatePrototype.h:
1928         (JSC::DatePrototype::createStructure):
1929         * runtime/FunctionPrototype.h:
1930         (JSC::FunctionPrototype::createStructure):
1931         * runtime/GlobalEvalFunction.h:
1932         (JSC::GlobalEvalFunction::createStructure):
1933         * runtime/InternalFunction.h:
1934         (JSC::InternalFunction::createStructure):
1935         * runtime/JSActivation.h:
1936         (JSC::JSActivation::createStructure):
1937         * runtime/JSArray.h:
1938         (JSC::JSArray::createStructure):
1939         * runtime/JSByteArray.cpp:
1940         (JSC::JSByteArray::createStructure):
1941         * runtime/JSFunction.h:
1942         (JSC::JSFunction::createStructure):
1943         * runtime/JSGlobalObject.h:
1944         (JSC::JSGlobalObject::createStructure):
1945         * runtime/JSNumberCell.h:
1946         (JSC::JSNumberCell::createStructure):
1947         * runtime/JSONObject.h:
1948         (JSC::JSONObject::createStructure):
1949         * runtime/JSObject.h:
1950         (JSC::JSObject::createStructure):
1951         (JSC::JSCell::fastGetOwnPropertySlot):
1952         * runtime/JSStaticScopeObject.h:
1953         (JSC::JSStaticScopeObject::createStructure):
1954         * runtime/JSString.h:
1955         (JSC::JSString::createStructure):
1956         * runtime/JSTypeInfo.h:
1957         (JSC::TypeInfo::overridesGetOwnPropertySlot):
1958         * runtime/JSVariableObject.h:
1959         (JSC::JSVariableObject::createStructure):
1960         * runtime/JSWrapperObject.h:
1961         (JSC::JSWrapperObject::createStructure):
1962         * runtime/MathObject.h:
1963         (JSC::MathObject::createStructure):
1964         * runtime/NumberConstructor.h:
1965         (JSC::NumberConstructor::createStructure):
1966         * runtime/NumberObject.h:
1967         (JSC::NumberObject::createStructure):
1968         * runtime/RegExpConstructor.h:
1969         (JSC::RegExpConstructor::createStructure):
1970         * runtime/RegExpObject.h:
1971         (JSC::RegExpObject::createStructure):
1972         * runtime/StringObject.h:
1973         (JSC::StringObject::createStructure):
1974         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1975         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1976
1977 2009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
1978 2009-10-14  Darin Adler  <darin@apple.com>
1979
1980         Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
1981         can build on Windows.
1982
1983         * wtf/MathExtras.h: Added llround and llroundf for Windows.
1984
1985 2009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
1986
1987         wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
1988
1989         * wtf/Platform.h:
1990
1991 2009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1992
1993         Reviewed by Simon Hausmann.
1994
1995         Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
1996         https://bugs.webkit.org/show_bug.cgi?id=30278
1997
1998         Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
1999         from the make system into common code.
2000
2001         * wtf/Platform.h:
2002
2003 2009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2004
2005         Reviewed by Darin Adler.
2006
2007         ARM compiler does not understand reinterpret_cast<void*>
2008         https://bugs.webkit.org/show_bug.cgi?id=29034
2009
2010         Change reinterpret_cast<void*> to regular C style (void*) cast 
2011         for the ARM RVCT compiler.
2012
2013         * assembler/MacroAssemblerCodeRef.h:
2014         (JSC::FunctionPtr::FunctionPtr): 
2015         * jit/JITOpcodes.cpp: Cast to FunctionPtr first 
2016            instead of directly casting to reinterpret_cast
2017         * jit/JITStubCall.h: Ditto + change the type of m_stub
2018           from void* to FunctionPtr.
2019         (JSC::JITStubCall::JITStubCall): 
2020         (JSC::JITStubCall::call):
2021         * jit/JITStubs.cpp: Ditto.
2022         (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
2023
2024 2009-10-11  Oliver Hunt  <oliver@apple.com>
2025
2026         Re-enable the JIT.
2027
2028         * wtf/Platform.h:
2029
2030 2009-10-10  Oliver Hunt  <oliver@apple.com>
2031
2032         Reviewed by Maciej Stachowiak.
2033
2034         Support for String.trim(), String.trimLeft() and String.trimRight() methods
2035         https://bugs.webkit.org/show_bug.cgi?id=26590
2036
2037         Implement trim, trimLeft, and trimRight
2038
2039         * runtime/StringPrototype.cpp:
2040         (JSC::isTrimWhitespace):
2041            Our normal string whitespace function does not include U+200B which
2042            is needed for compatibility with mozilla's implementation of trim.
2043            U+200B does not appear to be expected according to spec, however I am
2044            choosing to be lax, and match mozilla behavior so have added this
2045            exception.
2046         (JSC::trimString):
2047
2048 2009-10-09  Geoffrey Garen  <ggaren@apple.com>
2049
2050         Reviewed by Oliver Hunt.
2051
2052         Eliminated some legacy bytecode weirdness.
2053         
2054         Use vPC[x] subscripting instead of ++vPC to access instruction operands.
2055         This is simpler, and often more efficient.
2056
2057         To support this, and to remove use of hard-coded offsets in bytecode and
2058         JIT code generation and dumping, calculate jump offsets from the beginning
2059         of an instruction, rather than the middle or end.
2060         
2061         Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
2062         opcodes.
2063         
2064         SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
2065         mode.
2066
2067         * bytecode/CodeBlock.cpp:
2068         (JSC::printConditionalJump):
2069         (JSC::CodeBlock::dump):
2070         * bytecompiler/BytecodeGenerator.cpp:
2071         (JSC::BytecodeGenerator::emitJump):
2072         (JSC::BytecodeGenerator::emitJumpIfTrue):
2073         (JSC::BytecodeGenerator::emitJumpIfFalse):
2074         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2075         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2076         (JSC::BytecodeGenerator::emitComplexJumpScopes):
2077         (JSC::BytecodeGenerator::emitJumpScopes):
2078         (JSC::BytecodeGenerator::emitNextPropertyName):
2079         (JSC::BytecodeGenerator::emitCatch):
2080         (JSC::BytecodeGenerator::emitJumpSubroutine):
2081         (JSC::prepareJumpTableForImmediateSwitch):
2082         (JSC::prepareJumpTableForCharacterSwitch):
2083         (JSC::prepareJumpTableForStringSwitch):
2084         (JSC::BytecodeGenerator::endSwitch):
2085         * bytecompiler/Label.h:
2086         (JSC::Label::setLocation):
2087         (JSC::Label::bind):
2088         * interpreter/Interpreter.cpp:
2089         (JSC::Interpreter::resolve):
2090         (JSC::Interpreter::resolveSkip):
2091         (JSC::Interpreter::resolveGlobal):
2092         (JSC::Interpreter::resolveBase):
2093         (JSC::Interpreter::resolveBaseAndProperty):
2094         (JSC::Interpreter::createExceptionScope):
2095         (JSC::Interpreter::privateExecute):
2096         * interpreter/Interpreter.h:
2097         * jit/JIT.cpp:
2098         (JSC::JIT::privateCompile):
2099         * jit/JITArithmetic.cpp:
2100         (JSC::JIT::emit_op_jnless):
2101         (JSC::JIT::emitSlow_op_jnless):
2102         (JSC::JIT::emit_op_jnlesseq):
2103         (JSC::JIT::emitSlow_op_jnlesseq):
2104         (JSC::JIT::emitBinaryDoubleOp):
2105         * jit/JITOpcodes.cpp:
2106         (JSC::JIT::emit_op_jmp):
2107         (JSC::JIT::emit_op_loop):
2108         (JSC::JIT::emit_op_loop_if_less):
2109         (JSC::JIT::emitSlow_op_loop_if_less):
2110         (JSC::JIT::emit_op_loop_if_lesseq):
2111         (JSC::JIT::emitSlow_op_loop_if_lesseq):
2112         (JSC::JIT::emit_op_loop_if_true):
2113         (JSC::JIT::emitSlow_op_loop_if_true):
2114         (JSC::JIT::emit_op_jfalse):
2115         (JSC::JIT::emitSlow_op_jfalse):
2116         (JSC::JIT::emit_op_jtrue):
2117         (JSC::JIT::emitSlow_op_jtrue):
2118         (JSC::JIT::emit_op_jeq_null):
2119         (JSC::JIT::emit_op_jneq_null):
2120         (JSC::JIT::emit_op_jneq_ptr):
2121         (JSC::JIT::emit_op_jsr):
2122         (JSC::JIT::emit_op_next_pname):
2123         (JSC::JIT::emit_op_jmp_scopes):
2124
2125 2009-10-09  Geoffrey Garen  <ggaren@apple.com>
2126
2127         Reviewed by Sam Weinig.
2128
2129         Migrated some code that didn't belong out of Structure.
2130         
2131         SunSpider says maybe 1.03x faster.
2132
2133         * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
2134         a Structure's prototype the direct responsility of the object using it.
2135         (Giving Structure a mark function was misleading because it implied that
2136         all live structures get marked during GC, when they don't.)
2137         
2138         * runtime/JSGlobalObject.cpp:
2139         (JSC::markIfNeeded):
2140         (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
2141         on the global object. Maybe this wasn't necessary, but now we don't have
2142         to wonder.
2143
2144         * runtime/JSObject.cpp:
2145         (JSC::JSObject::getPropertyNames):
2146         (JSC::JSObject::getOwnPropertyNames):
2147         (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
2148         * runtime/JSObject.h:
2149         (JSC::JSObject::markChildrenDirect):
2150         * runtime/PropertyNameArray.h:
2151         * runtime/Structure.cpp:
2152         * runtime/Structure.h:
2153         (JSC::Structure::setEnumerationCache):
2154         (JSC::Structure::enumerationCache): Moved property name gathering code
2155         from Structure to JSObject because having a Structure iterate its JSObject
2156         was a layering violation. A JSObject is implemented using a Structure; not
2157         the other way around.
2158
2159 2009-10-09  Mark Rowe  <mrowe@apple.com>
2160
2161         Attempt to fix the GTK release build.
2162
2163         * GNUmakefile.am: Include Grammar.cpp in release builds now that
2164         AllInOneFile.cpp is gone.
2165
2166 2009-10-09  Gabor Loki  <loki@inf.u-szeged.hu>
2167
2168         Rubber-stamped by Eric Seidel.
2169
2170         Add ARM JIT support for Gtk port (disabled by default)
2171         https://bugs.webkit.org/show_bug.cgi?id=30228
2172
2173         * GNUmakefile.am:
2174
2175 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2176
2177         Tiger build fix: added a few more variable initializations.
2178
2179         * runtime/StringPrototype.cpp:
2180         (JSC::stringProtoFuncReplace):
2181         (JSC::stringProtoFuncSearch):
2182
2183 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2184
2185         Qt build fix: added missing #include.
2186
2187         * jsc.cpp:
2188
2189 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2190
2191         Tiger build fix: initialize variable whose initialization the compiler
2192         can't otherwise figure out.
2193
2194         * runtime/RegExpObject.cpp:
2195         (JSC::RegExpObject::match):
2196
2197 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2198
2199         Windows build fix: updated exports.
2200
2201         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2202         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2203
2204 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2205
2206         Tiger build fix: fixed file name case.
2207
2208         * JavaScriptCore.xcodeproj/project.pbxproj:
2209
2210 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2211
2212         Reviewed by Maciej Stachowiak.
2213
2214         At long last, I pronounce the death of AllInOneFile.cpp.
2215         
2216         SunSpider reports a 1.01x speedup.
2217
2218         * AllInOneFile.cpp: Removed.
2219         * GNUmakefile.am:
2220         * JavaScriptCore.exp:
2221         * JavaScriptCore.gypi:
2222         * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
2223         to compilation stages.
2224
2225         * parser/Grammar.y:
2226         * parser/Lexer.cpp:
2227         * parser/Lexer.h:
2228         (JSC::jscyylex):
2229         * runtime/ArrayConstructor.cpp:
2230         (JSC::constructArrayWithSizeQuirk):
2231         * runtime/Collector.h:
2232         * runtime/JSCell.cpp:
2233         (JSC::JSCell::operator new):
2234         * runtime/JSCell.h:
2235         (JSC::JSCell::operator new):
2236         * runtime/JSGlobalObject.cpp:
2237         (JSC::JSGlobalObject::operator new):
2238         * runtime/JSNumberCell.h:
2239         (JSC::JSNumberCell::operator new):
2240         * runtime/JSString.cpp:
2241         * runtime/JSString.h:
2242         (JSC::jsString):
2243         (JSC::jsSubstring):
2244         (JSC::jsOwnedString):
2245         * runtime/RegExpConstructor.cpp:
2246         * runtime/RegExpConstructor.h:
2247         (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
2248         (JSC::RegExpConstructorPrivate::lastOvector):
2249         (JSC::RegExpConstructorPrivate::tempOvector):
2250         (JSC::RegExpConstructorPrivate::changeLastOvector):
2251         (JSC::RegExpConstructor::performMatch):
2252         * runtime/StringPrototype.cpp:
2253         (JSC::stringProtoFuncMatch):
2254         * yarr/RegexJIT.cpp:
2255         * yarr/RegexJIT.h:
2256         (JSC::Yarr::executeRegex): Inlined a few things that Shark said
2257         were hot, on the presumption that AllInOneFile.cpp used to inline them
2258         automatically.
2259
2260 2009-10-08  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
2261
2262         Reviewed by Gavin Barraclough.
2263
2264         Fix for JIT'ed op_call instructions (evals, constructs, etc.)
2265         when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
2266
2267         https://bugs.webkit.org/show_bug.cgi?id=30201
2268
2269         * jit/JITCall.cpp:
2270         (JSC::JIT::compileOpCall):
2271
2272 2009-10-07  Geoffrey Garen  <ggaren@apple.com>
2273
2274         Windows build fix: removed no longer exported symbol.
2275
2276         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2277         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2278
2279 2009-10-07  Geoffrey Garen  <ggaren@apple.com>
2280
2281         Reviewed by Oliver Hunt.
2282
2283         Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
2284         thread, permanently slowing down JavaScript
2285         
2286         Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
2287         since WebCore no longer uses it.
2288
2289         * JavaScriptCore.exp:
2290         * runtime/Collector.cpp:
2291         (JSC::Heap::protect):
2292         (JSC::Heap::unprotect):
2293         (JSC::Heap::markProtectedObjects):
2294         (JSC::Heap::protectedGlobalObjectCount):
2295         (JSC::Heap::protectedObjectCount):
2296         (JSC::Heap::protectedObjectTypeCounts):
2297         * runtime/Collector.h:
2298
2299 2009-10-07  Zoltan Horvath  <zoltan@webkit.org>
2300
2301         Reviewed by Darin Adler.
2302
2303         Allow custom memory allocation control for JavaScriptCore's IdentifierArena
2304         https://bugs.webkit.org/show_bug.cgi?id=30158
2305
2306         Inherits IdentifierArena class from FastAllocBase because it has been
2307         instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
2308
2309         * parser/ParserArena.h:
2310
2311 2009-10-07  Adam Roben  <aroben@apple.com>
2312
2313         Export DateInstance::info in a way that works on Windows
2314
2315         Fixes <http://webkit.org/b/30171>
2316         fast/dom/Window/window-postmessage-clone.html fails on Windows
2317
2318         Reviewed by Anders Carlsson.
2319
2320         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2321         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2322         Removed the export of DateInstance::info from here.
2323
2324         * runtime/DateInstance.h: Use JS_EXPORTDATA to export
2325         DateInstance::info, which is the required way of exporting data on
2326         Windows.
2327
2328 2009-10-07  Jørgen Lind  <jorgen.lind@nokia.com>
2329
2330         Reviewed by Simon Hausmann.
2331
2332         When enabling or disabling the JIT through .qmake.cache, make sure
2333         to also toggle ENABLE_YARR_JIT.
2334
2335         * JavaScriptCore.pri:
2336
2337 2009-10-06  Priit Laes  <plaes@plaes.org>
2338
2339         Reviewed by Gavin Barraclough.
2340
2341         Linking fails with "relocation R_X86_64_PC32 against symbol
2342         `cti_vm_throw'"
2343         https://bugs.webkit.org/show_bug.cgi?id=28422
2344
2345         * jit/JITStubs.cpp:
2346         Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
2347         in text segment causing relocation errors on amd64 architecture.
2348         Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
2349
2350 2009-10-06  Oliver Hunt  <oliver@apple.com>
2351
2352         Windows linking fix
2353
2354         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2355         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2356
2357 2009-10-06  Oliver Hunt  <oliver@apple.com>
2358
2359         Reviewed by NOBODY (build fix).
2360
2361         Windows build fix.
2362
2363         * runtime/DateInstance.cpp:
2364
2365 2009-10-05  Oliver Hunt  <oliver@apple.com>
2366
2367         Reviewed by Gavin Barraclough.
2368
2369         It should be possible to post (clone) built-in JS objects to Workers
2370         https://bugs.webkit.org/show_bug.cgi?id=22878
2371
2372         Expose helpers to throw correct exceptions during object graph walk
2373         used for cloning and add a helper function to create Date instances
2374         without going through the JS Date constructor function.
2375
2376         * JavaScriptCore.exp:
2377         * JavaScriptCore.xcodeproj/project.pbxproj:
2378         * runtime/DateInstance.cpp:
2379         (JSC::DateInstance::DateInstance):
2380         * runtime/DateInstance.h:
2381         * runtime/ExceptionHelpers.cpp:
2382         (JSC::createTypeError):
2383         * runtime/ExceptionHelpers.h:
2384
2385 2009-10-06  David Levin  <levin@chromium.org>
2386
2387         Reviewed by Oliver Hunt.
2388
2389         StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
2390         https://bugs.webkit.org/show_bug.cgi?id=30095
2391
2392         * wtf/CrossThreadRefCounted.h:
2393         Removed an unused function and assert improvement.
2394         (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
2395         (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
2396         (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
2397         (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
2398         non-threadsafe operation, add an assert that the class is owned by the current thread.
2399
2400 2009-10-05  Kevin Ollivier  <kevino@theolliviers.com>
2401
2402         wx build fix. Add Symbian files to the list of excludes.
2403
2404         * wscript:
2405
2406 2009-10-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2407
2408         Reviewed by Simon Hausmann.
2409
2410         [Qt] Remove precompiled header from JavaScriptCore compilation to
2411         prevent qmake warning during autonomous compilation.
2412         https://bugs.webkit.org/show_bug.cgi?id=30069
2413
2414         * JavaScriptCore.pro:
2415
2416 2009-10-02  Geoffrey Garen  <ggaren@apple.com>
2417
2418         Reviewed by Sam Weinig.
2419
2420         Removed the concept of a "fast access cutoff" in arrays, because it
2421         punished some patterns of array access too much, and made things too
2422         complex for inlining in some cases.
2423         
2424         1.3% speedup on SunSpider.
2425
2426         * jit/JITOpcodes.cpp:
2427         (JSC::JIT::emitSlow_op_get_by_val):
2428         (JSC::JIT::emitSlow_op_put_by_val):
2429         * jit/JITPropertyAccess.cpp:
2430         (JSC::JIT::emit_op_get_by_val):
2431         (JSC::JIT::emitSlow_op_get_by_val):
2432         (JSC::JIT::emit_op_put_by_val):
2433         (JSC::JIT::emitSlow_op_put_by_val):
2434         * jit/JITStubs.cpp:
2435         * jit/JITStubs.h:
2436         (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
2437         getting / putting from / to an array. Inline putting past the end of
2438         the array.
2439
2440         * runtime/JSArray.cpp:
2441         (JSC::JSArray::JSArray):
2442         (JSC::JSArray::getOwnPropertySlot):
2443         (JSC::JSArray::getOwnPropertyDescriptor):
2444         (JSC::JSArray::put):
2445         (JSC::JSArray::putSlowCase):
2446         (JSC::JSArray::deleteProperty):
2447         (JSC::JSArray::getOwnPropertyNames):
2448         (JSC::JSArray::increaseVectorLength):
2449         (JSC::JSArray::setLength):
2450         (JSC::JSArray::pop):
2451         (JSC::JSArray::push):
2452         (JSC::JSArray::sort):
2453         (JSC::JSArray::fillArgList):
2454         (JSC::JSArray::copyToRegisters):
2455         (JSC::JSArray::compactForSorting):
2456         (JSC::JSArray::checkConsistency):
2457         * runtime/JSArray.h:
2458         (JSC::JSArray::canGetIndex):
2459         (JSC::JSArray::canSetIndex):
2460         (JSC::JSArray::setIndex):
2461         (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
2462         replaced with checks for JSValue() to detect reads and writes from / to
2463         uninitialized parts of the array.
2464
2465 2009-10-02  Jonni Rainisto  <jonni.rainisto@nokia.com>
2466
2467         Reviewed by Darin Adler.
2468
2469         Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
2470         https://bugs.webkit.org/show_bug.cgi?id=29956
2471
2472         * wtf/RandomNumber.cpp:
2473         (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
2474
2475 2009-10-02  Geoffrey Garen  <ggaren@apple.com>
2476
2477         Reviewed by Sam Weinig.
2478
2479         Take one branch instead of two to test for JSValue().
2480         
2481         1.1% SunSpider speedup.
2482
2483         * jit/JITCall.cpp:
2484         (JSC::JIT::compileOpCall):
2485         * jit/JITOpcodes.cpp:
2486         (JSC::JIT::emit_op_to_jsnumber):
2487         (JSC::JIT::emit_op_create_arguments):
2488         * jit/JITPropertyAccess.cpp:
2489         (JSC::JIT::emitSlow_op_get_by_val):
2490         (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
2491         of testing for the cell tag with a 0 payload.
2492
2493         * runtime/JSValue.cpp:
2494         (JSC::JSValue::description): Added support for dumping the new empty value,
2495         and deleted values, in debug builds.
2496
2497         * runtime/JSValue.h:
2498         (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
2499
2500         (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
2501         tag, to avoid having two different c++ versions of null / empty.
2502
2503         (JSC::JSValue::operator bool): Test for the empty value tag, instead
2504         of testing for the cell tag with a 0 payload.
2505
2506 2009-10-02  Steve Falkenburg  <sfalken@apple.com>
2507
2508         Reviewed by Mark Rowe.
2509
2510         <https://bugs.webkit.org/show_bug.cgi?id=29989>
2511         Safari version number shouldn't be exposed in WebKit code
2512         
2513         For a WebKit version of 532.3.4:
2514         Product version is: 5.32.3.4 (was 4.0.3.0)
2515         File version is: 5.32.3.4 (was 4.532.3.4)
2516
2517         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
2518
2519 2009-10-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2520
2521         Rubber-stamped by Simon Hausmann.
2522
2523         Fix the Qt on Mac OS X build.
2524
2525         * wtf/FastMalloc.cpp:
2526
2527 2009-10-02  Jørgen Lind  <jorgen.lind@nokia.com>
2528
2529         Reviewed by Simon Hausmann.
2530
2531         Allow enabling and disabling of the JIT through a qmake variable.
2532
2533         Qt's configure may set this variable through .qmake.cache if a
2534         commandline option is given and/or the compile test for hwcap.h
2535         failed/succeeded.
2536
2537         * JavaScriptCore.pri:
2538
2539 2009-10-01  Mark Rowe  <mrowe@apple.com>
2540
2541         Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
2542
2543         * Configurations/FeatureDefines.xcconfig:
2544
2545 2009-10-01  Yongjun Zhang  <yongjun.zhang@nokia.com>
2546
2547         Reviewed by Darin Adler.
2548
2549         https://bugs.webkit.org/show_bug.cgi?id=29187
2550
2551         Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
2552         bug regarding templated classes.
2553
2554         The compiler bug is reported at:
2555         https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
2556
2557         The change will be reverted when the above bug is fixed in winscw compiler.
2558
2559         * wtf/ListRefPtr.h:
2560         (WTF::::~ListRefPtr):
2561
2562 2009-10-01  Zoltan Horvath  <zoltan@webkit.org>
2563
2564         Reviewed by Simon Hausmann.
2565
2566         [Qt] Allow custom memory allocation control for the whole JavaScriptCore
2567         https://bugs.webkit.org/show_bug.cgi?id=27029
2568
2569         Since in JavaScriptCore almost every class which has been instantiated by operator new is
2570         inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
2571         when USE_SYSTEM_MALLOC=0.
2572
2573         Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
2574         (It's needed for the functionality of TCmalloc.)
2575
2576         Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
2577
2578         * JavaScriptCore.pri:
2579         * wtf/FastMalloc.cpp:
2580         (WTF::sleep):
2581         * wtf/FastMalloc.h:
2582
2583 2009-09-30  Gabor Loki  <loki@inf.u-szeged.hu>
2584
2585         Reviewed by George Staikos.
2586
2587         Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
2588         https://bugs.webkit.org/show_bug.cgi?id=29122
2589
2590         Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
2591         macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
2592         when Thumb-2 instruction set is the required target. The
2593         PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
2594         case where the code is common the PLATFORM(ARM) have to be used.
2595
2596         Modified by George Wright  <gwright@rim.com> to correctly work
2597         with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
2598         compiler macros, as well as adding readability changes.
2599
2600         * wtf/Platform.h:
2601
2602 2009-09-30  Oliver Hunt  <oliver@apple.com>
2603
2604         Reviewed by Geoff Garen.
2605
2606         Devirtualise array toString conversion
2607
2608         Tweak the implementation of Array.prototype.toString to have a fast path
2609         when acting on a true JSArray.
2610
2611         * runtime/ArrayPrototype.cpp:
2612         (JSC::arrayProtoFuncToString):
2613
2614 2009-09-30  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
2615
2616         Reviewed by Geoffrey Garen.
2617
2618         Buildfix for platforms using JSVALUE32.
2619         https://bugs.webkit.org/show_bug.cgi?id=29915
2620
2621         After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
2622         Also removed unreachable code.
2623
2624         * jit/JITArithmetic.cpp:
2625         (JSC::JIT::emit_op_add):
2626          - Declaration of "OperandTypes types" moved before first use.
2627          - Typos fixed: dst modified to result, regT2 added.
2628          - Unreachable code removed.
2629         (JSC::JIT::emitSlow_op_add):
2630          - Missing declaration of "OperandTypes types" added.
2631
2632 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
2633
2634         Reviewed by Simon Hausmann.
2635
2636         Reduce heap size on Symbian from 64MB to 8MB.
2637
2638         This is not a perfect fix, it requires more fine tuning.
2639         But this makes it possible again to debug in the emulator,
2640         which is more important in order to be able to fix other
2641         run-time issues.
2642
2643         * runtime/Collector.h:
2644
2645 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
2646
2647         Reviewed by Simon Hausmann.
2648
2649         Fix CRASH() macro for Symbian build.
2650
2651         * wtf/Assertions.h: Added missing }
2652
2653 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
2654
2655         Reviewed by Gavin Barraclough.
2656
2657         Inlined a few math operations.
2658         
2659         ~1% SunSpider speedup.
2660
2661         * jit/JIT.h:
2662         * jit/JITArithmetic.cpp:
2663         (JSC::JIT::compileBinaryArithOpSlowCase):
2664         (JSC::JIT::emitSlow_op_add):
2665         (JSC::JIT::emitSlow_op_mul):
2666         (JSC::JIT::emit_op_sub):
2667         (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
2668         a constant int and a double.
2669
2670 2009-09-28  Oliver Hunt  <oliver@apple.com>
2671
2672         Reviewed by Gavin Barraclough.
2673
2674         Tidy up codeblock sampler
2675         https://bugs.webkit.org/show_bug.cgi?id=29836
2676
2677         Some rather simple refactoring of codeblock sampler so that
2678         it's easier for us to use it to find problems in non-jsc
2679         environments
2680
2681         * JavaScriptCore.exp:
2682         * bytecode/SamplingTool.h:
2683         * debugger/Debugger.cpp:
2684         (JSC::evaluateInGlobalCallFrame):
2685         * debugger/DebuggerCallFrame.cpp:
2686         (JSC::DebuggerCallFrame::evaluate):
2687         * interpreter/Interpreter.cpp:
2688         (JSC::Interpreter::Interpreter):
2689         (JSC::Interpreter::execute):
2690         (JSC::Interpreter::privateExecute):
2691         (JSC::Interpreter::enableSampler):
2692         (JSC::Interpreter::dumpSampleData):
2693         (JSC::Interpreter::startSampling):
2694         (JSC::Interpreter::stopSampling):
2695         * interpreter/Interpreter.h:
2696         (JSC::Interpreter::sampler):
2697         * jit/JIT.h:
2698         * jsc.cpp:
2699         (runWithScripts):
2700         * runtime/Completion.cpp:
2701         (JSC::checkSyntax):
2702         (JSC::evaluate):
2703         * runtime/Executable.h:
2704         (JSC::EvalExecutable::EvalExecutable):
2705         (JSC::ProgramExecutable::create):
2706         (JSC::ProgramExecutable::ProgramExecutable):
2707         * runtime/JSGlobalData.cpp:
2708         (JSC::JSGlobalData::startSampling):
2709         (JSC::JSGlobalData::stopSampling):
2710         (JSC::JSGlobalData::dumpSampleData):
2711         * runtime/JSGlobalData.h:
2712         * runtime/JSGlobalObjectFunctions.cpp:
2713         (JSC::globalFuncEval):
2714
2715 2009-09-29  Jeremy Orlow  <jorlow@chromium.org>
2716
2717         Reviewed by Dimitri Glazkov.
2718
2719         Add GYP generated files to svn:ignore
2720         https://bugs.webkit.org/show_bug.cgi?id=29895
2721
2722         The following files are generated by JavaScriptCore's GYP file and should be ignored:
2723
2724         pcre.mk
2725         wtf.scons
2726         wtf.mk
2727         SConstruct
2728         wtf_config.scons
2729         wtf_config.mk
2730         pcre.scons
2731
2732         * JavaScriptCore.gyp: Changed property svn:ignore.
2733
2734 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
2735
2736         Reviewed by Sam Weinig.
2737
2738         Standardized an optimization for adding non-numbers.
2739         
2740         SunSpider says maybe a tiny speedup.
2741
2742         * jit/JITArithmetic.cpp:
2743         (JSC::JIT::emit_op_add):
2744         (JSC::JIT::emitSlow_op_add):
2745
2746 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
2747
2748         Windows build fix: export a new symbol.
2749
2750         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2751         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2752
2753 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
2754
2755         Reviewed by Sam Weinig.
2756
2757         Removed virtual destructor from JSGlobalObjectData to eliminate pointer
2758         fix-ups when accessing JSGlobalObject::d.
2759         
2760         Replaced with an explicit destructor function pointer.
2761         
2762         6% speedup on bench-alloc-nonretained.js.
2763
2764         * JavaScriptCore.exp:
2765         * runtime/JSGlobalObject.cpp:
2766         (JSC::JSGlobalObject::~JSGlobalObject):
2767         (JSC::JSGlobalObject::destroyJSGlobalObjectData):
2768         * runtime/JSGlobalObject.h:
2769         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
2770         (JSC::JSGlobalObject::JSGlobalObject):
2771
2772 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
2773
2774         Reviewed by David Kilzer.
2775
2776         [Qt] Assert messages prints visible in Symbian
2777         https://bugs.webkit.org/show_bug.cgi?id=29808
2778
2779         Asserts use vprintf to print the messages to stderr.
2780         In Symbian Open C it is not possible to see stderr so
2781         I routed the messages to stdout instead.
2782
2783         * wtf/Assertions.cpp:
2784
2785 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
2786
2787         Reviewed by Darin Adler.
2788
2789         [Qt] Symbian CRASH macro implementation
2790
2791         Added Symbian specific crash macro that
2792         stops to crash line if JIT debugging is used.
2793         Additional differentiation of access violation
2794         (KERN-EXEC 3) and CRASH panic.
2795
2796         * wtf/Assertions.h:
2797
2798 2009-09-28  Mark Rowe  <mrowe@apple.com>
2799
2800         Fix the PowerPC build.
2801
2802         * JavaScriptCore.exp:
2803
2804 2009-09-28  Mark Rowe  <mrowe@apple.com>
2805
2806         Reviewed by Gavin Barraclough.
2807
2808         <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
2809
2810         * runtime/Collector.cpp:
2811         (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
2812         to ensure that we correctly interpret the contents of registers during marking.
2813
2814 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
2815
2816         Windows build fix: added new exports.
2817
2818         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2819         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2820
2821 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
2822
2823         Windows build fix: removed exports that no longer exist.
2824
2825         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2826         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2827
2828 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
2829
2830         Reviewed by Darin Adler.
2831
2832         NotNullPassRefPtr: smart pointer optimized for passing references that are not null
2833         https://bugs.webkit.org/show_bug.cgi?id=29822
2834         
2835         Added NotNullPassRefPtr, and deployed it in all places that initialize
2836         JavaScript objects.
2837         
2838         2.2% speedup on bench-allocate-nonretained.js.
2839
2840         * API/JSCallbackConstructor.cpp:
2841         (JSC::JSCallbackConstructor::JSCallbackConstructor):
2842         * API/JSCallbackConstructor.h:
2843         * API/JSCallbackObject.h:
2844         * API/JSCallbackObjectFunctions.h:
2845         (JSC::JSCallbackObject::JSCallbackObject):
2846         * JavaScriptCore.exp:
2847         * bytecode/CodeBlock.h:
2848         (JSC::CodeBlock::addFunctionDecl):
2849         (JSC::CodeBlock::addFunctionExpr):
2850         * runtime/ArrayConstructor.cpp:
2851         (JSC::ArrayConstructor::ArrayConstructor):
2852         * runtime/ArrayConstructor.h:
2853         * runtime/ArrayPrototype.cpp:
2854         (JSC::ArrayPrototype::ArrayPrototype):
2855         * runtime/ArrayPrototype.h:
2856         * runtime/BooleanConstructor.cpp:
2857         (JSC::BooleanConstructor::BooleanConstructor):
2858         * runtime/BooleanConstructor.h:
2859         * runtime/BooleanObject.cpp:
2860         (JSC::BooleanObject::BooleanObject):
2861         * runtime/BooleanObject.h:
2862         * runtime/BooleanPrototype.cpp:
2863         (JSC::BooleanPrototype::BooleanPrototype):
2864         * runtime/BooleanPrototype.h:
2865         * runtime/DateConstructor.cpp:
2866         (JSC::DateConstructor::DateConstructor):
2867         * runtime/DateConstructor.h:
2868         * runtime/DateInstance.cpp:
2869         (JSC::DateInstance::DateInstance):
2870         * runtime/DateInstance.h:
2871         * runtime/DatePrototype.cpp:
2872         (JSC::DatePrototype::DatePrototype):
2873         * runtime/DatePrototype.h:
2874         * runtime/ErrorConstructor.cpp:
2875         (JSC::ErrorConstructor::ErrorConstructor):
2876         * runtime/ErrorConstructor.h:
2877         * runtime/ErrorInstance.cpp:
2878         (JSC::ErrorInstance::ErrorInstance):
2879         * runtime/ErrorInstance.h:
2880         * runtime/ErrorPrototype.cpp:
2881         (JSC::ErrorPrototype::ErrorPrototype):
2882         * runtime/ErrorPrototype.h:
2883         * runtime/FunctionConstructor.cpp:
2884         (JSC::FunctionConstructor::FunctionConstructor):
2885         * runtime/FunctionConstructor.h:
2886         * runtime/FunctionPrototype.cpp:
2887         (JSC::FunctionPrototype::FunctionPrototype):
2888         * runtime/FunctionPrototype.h:
2889         * runtime/GlobalEvalFunction.cpp:
2890         (JSC::GlobalEvalFunction::GlobalEvalFunction):
2891         * runtime/GlobalEvalFunction.h:
2892         * runtime/InternalFunction.cpp:
2893         (JSC::InternalFunction::InternalFunction):
2894         * runtime/InternalFunction.h:
2895         (JSC::InternalFunction::InternalFunction):
2896         * runtime/JSActivation.cpp:
2897         (JSC::JSActivation::JSActivation):
2898         * runtime/JSActivation.h:
2899         (JSC::JSActivation::JSActivationData::JSActivationData):
2900         * runtime/JSArray.cpp:
2901         (JSC::JSArray::JSArray):
2902         * runtime/JSArray.h:
2903         * runtime/JSByteArray.cpp:
2904         (JSC::JSByteArray::JSByteArray):
2905         * runtime/JSByteArray.h:
2906         * runtime/JSFunction.cpp:
2907         (JSC::JSFunction::JSFunction):
2908         * runtime/JSFunction.h:
2909         * runtime/JSGlobalObject.h:
2910         (JSC::JSGlobalObject::JSGlobalObject):
2911         * runtime/JSONObject.h:
2912         (JSC::JSONObject::JSONObject):
2913         * runtime/JSObject.h:
2914         (JSC::JSObject::JSObject):
2915         (JSC::JSObject::setStructure):
2916         * runtime/JSVariableObject.h:
2917         (JSC::JSVariableObject::JSVariableObject):
2918         * runtime/JSWrapperObject.h:
2919         (JSC::JSWrapperObject::JSWrapperObject):
2920         * runtime/MathObject.cpp:
2921         (JSC::MathObject::MathObject):
2922         * runtime/MathObject.h:
2923         * runtime/NativeErrorConstructor.cpp:
2924         (JSC::NativeErrorConstructor::NativeErrorConstructor):
2925         * runtime/NativeErrorConstructor.h:
2926         * runtime/NativeErrorPrototype.cpp:
2927         (JSC::NativeErrorPrototype::NativeErrorPrototype):
2928         * runtime/NativeErrorPrototype.h:
2929         * runtime/NumberConstructor.cpp:
2930         (JSC::NumberConstructor::NumberConstructor):
2931         * runtime/NumberConstructor.h:
2932         * runtime/NumberObject.cpp:
2933         (JSC::NumberObject::NumberObject):
2934         * runtime/NumberObject.h:
2935         * runtime/NumberPrototype.cpp:
2936         (JSC::NumberPrototype::NumberPrototype):
2937         * runtime/NumberPrototype.h:
2938         * runtime/ObjectConstructor.cpp:
2939         (JSC::ObjectConstructor::ObjectConstructor):
2940         * runtime/ObjectConstructor.h:
2941         * runtime/ObjectPrototype.cpp:
2942         (JSC::ObjectPrototype::ObjectPrototype):
2943         * runtime/ObjectPrototype.h:
2944         * runtime/PropertyNameArray.h:
2945         (JSC::PropertyNameArrayData::setCachedPrototypeChain):
2946         * runtime/PrototypeFunction.cpp:
2947         (JSC::PrototypeFunction::PrototypeFunction):
2948         * runtime/PrototypeFunction.h:
2949         * runtime/RegExpConstructor.cpp:
2950         (JSC::RegExpConstructor::RegExpConstructor):
2951         * runtime/RegExpConstructor.h:
2952         * runtime/RegExpObject.cpp:
2953         (JSC::RegExpObject::RegExpObject):
2954         * runtime/RegExpObject.h:
2955         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
2956         * runtime/RegExpPrototype.cpp:
2957         (JSC::RegExpPrototype::RegExpPrototype):
2958         * runtime/RegExpPrototype.h:
2959         * runtime/StringConstructor.cpp:
2960         (JSC::StringConstructor::StringConstructor):
2961         * runtime/StringConstructor.h:
2962         * runtime/StringObject.cpp:
2963         (JSC::StringObject::StringObject):
2964         * runtime/StringObject.h:
2965         * runtime/StringObjectThatMasqueradesAsUndefined.h:
2966         (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
2967         * runtime/StringPrototype.cpp:
2968         (JSC::StringPrototype::StringPrototype):
2969         * runtime/StringPrototype.h:
2970         * wtf/PassRefPtr.h:
2971         (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
2972         (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
2973         (WTF::NotNullPassRefPtr::get):
2974         (WTF::NotNullPassRefPtr::clear):
2975         (WTF::NotNullPassRefPtr::releaseRef):
2976         (WTF::NotNullPassRefPtr::operator*):
2977         (WTF::NotNullPassRefPtr::operator->):
2978         (WTF::NotNullPassRefPtr::operator!):
2979         (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
2980         * wtf/RefPtr.h:
2981         (WTF::RefPtr::RefPtr):
2982         (WTF::operator==):
2983
2984 2009-09-28  Oliver Hunt  <oliver@apple.com>
2985
2986         Reviewed by Geoff Garen.
2987
2988         Hard dependency on SSE2 instruction set with JIT
2989         https://bugs.webkit.org/show_bug.cgi?id=29779
2990
2991         Add floating point support checks to op_jfalse and op_jtrue, and
2992         fix the logic for the slow case of op_add
2993
2994         * jit/JITArithmetic.cpp:
2995         (JSC::JIT::emitSlow_op_add):
2996         * jit/JITOpcodes.cpp:
2997         (JSC::JIT::emit_op_jfalse):
2998         (JSC::JIT::emit_op_jtrue):
2999
3000 2009-09-28  Yaar Schnitman  <yaar@chromium.org>
3001
3002         Reviewed by Dimitri Glazkov.
3003
3004         Chromium port - recognize we are being built independently
3005         of chromium and look for dependencies under webkit/chromium rather
3006         than chromium/src.
3007
3008         https://bugs.webkit.org/show_bug.cgi?id=29722
3009
3010         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3011
3012 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
3013
3014         Reviewed by Simon Hausmann.
3015
3016         [Qt] Implement XSLT support with QtXmlPatterns.
3017         https://bugs.webkit.org/show_bug.cgi?id=28303
3018
3019         * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
3020
3021 2009-09-28  Gabor Loki  <loki@inf.u-szeged.hu>
3022
3023         Reviewed by Simon Hausmann.
3024
3025         Remove __clear_cache which is an internal function of GCC
3026         https://bugs.webkit.org/show_bug.cgi?id=28886
3027
3028         Although __clear_cache is exported from GCC, this is an internal
3029         function. GCC makes no promises about it.
3030
3031         * jit/ExecutableAllocator.h:
3032         (JSC::ExecutableAllocator::cacheFlush):
3033
3034 2009-09-28  Sam Weinig  <sam@webkit.org>
3035
3036         Reviewed by Oliver Hunt.
3037
3038         Fix an absolute path to somewhere in Oliver's machine to a relative path
3039         for derived JSONObject.lut.h.
3040
3041         * JavaScriptCore.xcodeproj/project.pbxproj:
3042
3043 2009-09-28  Joerg Bornemann  <joerg.bornemann@nokia.com>
3044
3045         Reviewed by Simon Hausmann.
3046
3047         Add ARM version detection for Windows CE.
3048
3049         * wtf/Platform.h:
3050
3051 2009-09-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
3052
3053         Reviewed by Simon Hausmann.
3054
3055         Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
3056
3057         Re-use Windows shrinkAllocation implementation because Symbian doesn't
3058         support releasing part of memory region.
3059         
3060         Use fastMalloc and fastFree to implement allocateStack and releaseStack
3061         for Symbian port.
3062
3063         * JavaScriptCore.pri:
3064         * runtime/MarkStack.h:
3065         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
3066         * runtime/MarkStackSymbian.cpp: Added.
3067         (JSC::MarkStack::initializePagesize):
3068         (JSC::MarkStack::allocateStack):
3069         (JSC::MarkStack::releaseStack):
3070
3071 2009-09-25  Gabor Loki  <loki@inf.u-szeged.hu>
3072
3073         Reviewed by Gavin Barraclough.
3074
3075         Fix unaligned data access in YARR_JIT on ARMv5 and below.
3076         https://bugs.webkit.org/show_bug.cgi?id=29695
3077
3078         On ARMv5 and below all data access should be naturally aligned.
3079         In the YARR_JIT there is a case when character pairs are
3080         loaded from the input string, but this data access is not
3081         naturally aligned. This fix introduces load32WithUnalignedHalfWords
3082         and branch32WithUnalignedHalfWords functions which contain
3083         naturally aligned memory loads - half word loads - on ARMv5 and below.
3084
3085         * assembler/MacroAssemblerARM.cpp:
3086         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3087         * assembler/MacroAssemblerARM.h:
3088         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3089         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
3090         * assembler/MacroAssemblerARMv7.h:
3091         (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
3092         (JSC::MacroAssemblerARMv7::branch32):
3093         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
3094         * assembler/MacroAssemblerX86Common.h:
3095         (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
3096         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
3097         * wtf/Platform.h:
3098         * yarr/RegexJIT.cpp:
3099         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
3100
3101 2009-09-25  Jeremy Orlow  <jorlow@chromium.org>
3102
3103         This is breaking Chromium try bots, so I'm counting this as a build fix.
3104
3105         Add more svn:ignore exceptions.  On different platforms, these files are
3106         generated with different case for JavaScriptCore.  Also there are some
3107         wtf project files that get built apparently.
3108
3109         * JavaScriptCore.gyp: Changed property svn:ignore.
3110
3111 2009-09-25  Ada Chan  <adachan@apple.com>
3112
3113         Build fix.
3114
3115         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3116         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3117
3118 2009-09-25  Geoffrey Garen  <ggaren@apple.com>
3119
3120         Reviewed by Darin Adler.
3121
3122         Inlined some object creation code, including lexicalGlobalObject access
3123         https://bugs.webkit.org/show_bug.cgi?id=29750
3124         
3125         SunSpider says 0.5% faster.
3126         
3127         0.8% speedup on bench-alloc-nonretained.js.
3128         2.5% speedup on v8-splay.js.
3129
3130         * interpreter/CachedCall.h:
3131         (JSC::CachedCall::CachedCall):
3132         * interpreter/CallFrame.h:
3133         (JSC::ExecState::lexicalGlobalObject):
3134         (JSC::ExecState::globalThisValue):
3135         * interpreter/Interpreter.cpp:
3136         (JSC::Interpreter::dumpRegisters):
3137         (JSC::Interpreter::execute):
3138         (JSC::Interpreter::privateExecute):
3139         * jit/JITStubs.cpp:
3140         (JSC::DEFINE_STUB_FUNCTION):
3141         * runtime/FunctionConstructor.cpp:
3142         (JSC::constructFunction):
3143         * runtime/ScopeChain.cpp:
3144         (JSC::ScopeChainNode::print):
3145         * runtime/ScopeChain.h:
3146         (JSC::ScopeChainNode::ScopeChainNode):
3147         (JSC::ScopeChainNode::~ScopeChainNode):
3148         (JSC::ScopeChainNode::push):
3149         (JSC::ScopeChain::ScopeChain):
3150         (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
3151         Replaced accessor function for globalObject() with data member. Replaced
3152         globalThisObject() accessor with direct access to globalThis, to match.
3153
3154         * runtime/JSGlobalObject.cpp:
3155         (JSC::JSGlobalObject::init):
3156         * runtime/JSGlobalObject.h: Inlined array and object construction.
3157
3158 2009-09-25  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3159
3160         Reviewed by Gavin Barraclough.
3161
3162         Add ARM version detection rules for Symbian
3163         https://bugs.webkit.org/show_bug.cgi?id=29715
3164
3165         * wtf/Platform.h:
3166
3167 2009-09-24  Xan Lopez  <xlopez@igalia.com>
3168
3169         Reviewed by Mark "Do It!" Rowe.
3170
3171         Some GCC versions don't like C++-style comments in preprocessor
3172         directives, change to C-style to shut them up.
3173
3174         * wtf/Platform.h:
3175
3176 2009-09-24  Oliver Hunt  <oliver@apple.com>
3177
3178         Reviewed by Gavin Barraclough.
3179
3180         Division is needlessly slow in 64-bit
3181         https://bugs.webkit.org/show_bug.cgi?id=29723
3182
3183         Add codegen for op_div on x86-64
3184
3185         * jit/JIT.cpp:
3186         (JSC::JIT::privateCompileMainPass):
3187         (JSC::JIT::privateCompileSlowCases):
3188         * jit/JIT.h:
3189         * jit/JITArithmetic.cpp:
3190         (JSC::JIT::compileBinaryArithOpSlowCase):
3191         (JSC::JIT::emit_op_div):
3192         (JSC::JIT::emitSlow_op_div):
3193         * jit/JITInlineMethods.h:
3194         (JSC::JIT::isOperandConstantImmediateDouble):
3195         (JSC::JIT::addressFor):
3196         (JSC::JIT::emitLoadDouble):
3197         (JSC::JIT::emitLoadInt32ToDouble):
3198         (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
3199
3200 2009-09-24  Jeremy Orlow  <jorlow@chromium.org>
3201
3202         Reviewed by Dimitri Glazkov.
3203
3204         Add GYP generated files to svn:ignore
3205         https://bugs.webkit.org/show_bug.cgi?id=29724
3206
3207         Adding the following files to the svn:ignore list (all in the
3208         JavaScriptCore/JavaScriptCore.gyp directory)
3209
3210         JavaScriptCore.xcodeproj
3211         JavaScriptCore.sln
3212         JavaScriptCore.vcproj
3213         JavaScriptCore_Debug.rules
3214         JavaScriptCore_Release.rules
3215         JavaScriptCore_Release - no tcmalloc.rules
3216         JavaScriptCore_Purify.rules
3217         JavaScriptCore.mk
3218         JavaScriptCore_Debug_rules.mk
3219         JavaScriptCore_Release_rules.mk
3220         JavaScriptCore_Release - no tcmalloc_rules.mk
3221         JavaScriptCore_Purify_rules.mk
3222         JavaScriptCore.scons
3223         JavaScriptCore_main.scons
3224
3225         * JavaScriptCore.gyp: Changed property svn:ignore.
3226
3227 2009-09-24  Yong Li  <yong.li@torchmobile.com>
3228
3229         Reviewed by Adam Barth.
3230
3231         Replace platform-dependent code with WTF::currentTime()
3232         https://bugs.webkit.org/show_bug.cgi?id=29148
3233
3234         * jsc.cpp:
3235         (StopWatch::start):
3236         (StopWatch::stop):
3237         (StopWatch::getElapsedMS):
3238         * runtime/TimeoutChecker.cpp:
3239         (JSC::getCPUTime):
3240
3241 2009-09-24  Mark Rowe  <mrowe@apple.com>
3242
3243         Reviewed by Sam Weinig.
3244
3245         <rdar://problem/7215058> FastMalloc scavenging thread should be named
3246
3247         * wtf/FastMalloc.cpp:
3248         (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
3249         * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
3250         * wtf/ThreadingPthreads.cpp:
3251         (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
3252
3253 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
3254
3255         Reviewed by Sam Weinig.
3256
3257         Renamed clear to removeAll, as suggested by Darin Adler.
3258
3259         * wtf/HashCountedSet.h:
3260         (WTF::::removeAll):
3261
3262 2009-09-24  Mark Rowe  <mrowe@apple.com>
3263
3264         Reviewed by Gavin Barraclough.
3265
3266         Fix FastMalloc to build with assertions enabled.
3267
3268         * wtf/FastMalloc.cpp:
3269         (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
3270         * wtf/TCSpinLock.h:
3271         (TCMalloc_SpinLock::IsHeld):
3272
3273 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
3274
3275         Suggested by Darin Adler.
3276
3277         Removed some unnecessary parameter names.
3278
3279         * wtf/HashCountedSet.h:
3280
3281 2009-09-24  Janne Koskinen  <janne.p.koskinen@digia.com>
3282
3283         Reviewed by Simon Hausmann.
3284
3285         On Windows JSChar is typedef'ed to wchar_t.
3286
3287         When building with WINSCW for Symbian we need to do the
3288         same typedef.
3289
3290         * API/JSStringRef.h:
3291
3292 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
3293
3294         A piece of my last patch that I forgot.
3295
3296         * wtf/HashCountedSet.h:
3297         (WTF::::clear): Added HashCountedSet::clear.
3298
3299 2009-09-24  Gabor Loki  <loki@inf.u-szeged.hu>
3300
3301         Reviewed by Gavin Barraclough.
3302
3303         Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set
3304         https://bugs.webkit.org/show_bug.cgi?id=28886
3305
3306         There are some GCC packages (for example GCC-2006q3 from CodeSourcery)
3307         which contain __clear_cache built-in function only for C while the C++
3308         version of __clear_cache is missing on ARM architectures.
3309
3310         Fixed a small bug in the inline assembly of cacheFlush function on
3311         ARM_TRADITIONAL.
3312
3313         * jit/ExecutableAllocator.h:
3314         (JSC::ExecutableAllocator::cacheFlush):
3315
3316 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
3317
3318         Reviewed by Sam Weinig.
3319
3320         Added the ability to swap vectors with inline capacities, so you can
3321         store a vector with inline capacity in a hash table.
3322
3323         * wtf/Vector.h:
3324         (WTF::swap):
3325         (WTF::VectorBuffer::swap):
3326
3327 2009-09-23  David Kilzer  <ddkilzer@apple.com>
3328
3329         Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
3330
3331         Reviewed by Mark Rowe.
3332
3333         * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when
3334         building on 64-bit SnowLeopard.  Define to 0 elsewhere.
3335
3336 2009-09-22  Oliver Hunt  <oliver@apple.com>
3337
3338         Reviewed by Geoff Garen.
3339
3340         Code sampling builds are broken.
3341         https://bugs.webkit.org/show_bug.cgi?id=29662
3342
3343         Fix build.
3344
3345         * bytecode/EvalCodeCache.h:
3346         (JSC::EvalCodeCache::get):
3347         * bytecode/SamplingTool.cpp:
3348         (JSC::ScriptSampleRecord::sample):
3349         (JSC::SamplingTool::doRun):
3350         (JSC::SamplingTool::notifyOfScope):
3351         (JSC::compareScriptSampleRecords):
3352         (JSC::SamplingTool::dump):
3353         * bytecode/SamplingTool.h:
3354         (JSC::ScriptSampleRecord::ScriptSampleRecord):
3355         (JSC::ScriptSampleRecord::~ScriptSampleRecord):
3356         (JSC::SamplingTool::SamplingTool):
3357         * bytecompiler/BytecodeGenerator.cpp:
3358         (JSC::BytecodeGenerator::BytecodeGenerator):
3359         (JSC::BytecodeGenerator::emitNewFunction):
3360         (JSC::BytecodeGenerator::emitNewFunctionExpression):
3361         * bytecompiler/BytecodeGenerator.h:
3362         (JSC::BytecodeGenerator::makeFunction):
3363         * debugger/Debugger.cpp:
3364         (JSC::evaluateInGlobalCallFrame):
3365         * debugger/DebuggerCallFrame.cpp:
3366         (JSC::DebuggerCallFrame::evaluate):
3367         * parser/Nodes.cpp:
3368         (JSC::ScopeNode::ScopeNode):
3369         * runtime/Completion.cpp:
3370         (JSC::checkSyntax):
3371         (JSC::evaluate):
3372         * runtime/Executable.cpp:
3373         (JSC::FunctionExecutable::fromGlobalCode):
3374         * runtime/Executable.h:
3375         (JSC::ScriptExecutable::ScriptExecutable):
3376         (JSC::EvalExecutable::EvalExecutable):
3377         (JSC::EvalExecutable::create):
3378         (JSC::ProgramExecutable::ProgramExecutable):
3379         (JSC::FunctionExecutable::create):
3380         (JSC::FunctionExecutable::FunctionExecutable):
3381         * runtime/JSGlobalObjectFunctions.cpp:
3382         (JSC::globalFuncEval):
3383
3384 2009-09-22  Darin Adler  <darin@apple.com>
3385
3386         Reviewed by Sam Weinig.
3387
3388         * wtf/Forward.h: Added PassOwnPtr.
3389
3390 2009-09-22  Yaar Schnitman  <yaar@chromium.org>
3391
3392         Reviewed by David Levin.
3393
3394         Ported chromium.org's javascriptcore.gyp for the webkit chromium port.
3395
3396         https://bugs.webkit.org/show_bug.cgi?id=29617
3397
3398         * JavaScriptCore.gyp/JavaScriptCore.gyp: Added.
3399
3400 2009-09-22  Thiago Macieira  <thiago.macieira@nokia.com>
3401
3402         Reviewed by Simon Hausmann.
3403
3404         Fix compilation with WINSCW: no varargs macros
3405
3406         Disable variadic arguments for WINSCW just like we do
3407         for MSVC7.
3408
3409         * wtf/Assertions.h:
3410
3411 2009-09-22  Kent Hansen  <khansen@trolltech.com>
3412
3413         Reviewed by Simon Hausmann.
3414
3415         Disable variadic macros on MSVC7.
3416
3417         This was originally added in r26589 but not extended
3418         when LOG_DISABLED/ASSERT_DISABLED was introduced.
3419
3420         * wtf/Assertions.h:
3421
3422 2009-09-22  Simon Hausmann  <simon.hausmann@nokia.com>
3423
3424         Unreviewed build fix for Windows CE < 5
3425
3426         Define WINCEBASIC to disable the IsDebuggerPresent() code in
3427         wtf/Assertions.cpp.
3428
3429         * JavaScriptCore.pri:
3430
3431 2009-09-22  Joerg Bornemann  <joerg.bornemann@nokia.com>
3432
3433         Reviewed by Simon Hausmann.
3434
3435         Fix major memory leak in JavaScriptCore RegisterFile on Windows CE
3436
3437         https://bugs.webkit.org/show_bug.cgi?id=29367
3438
3439         On Widows CE we must decommit all committed pages before we release
3440         them. See VirtualFree documentation.
3441         Desktop Windows behaves much smoother in this situation.
3442
3443         * interpreter/RegisterFile.cpp:
3444         (JSC::RegisterFile::~RegisterFile):
3445
3446 2009-09-21  Greg Bolsinga  <bolsinga@apple.com>
3447
3448         Reviewed by Simon Fraser & Sam Weinig.
3449
3450         Add ENABLE(ORIENTATION_EVENTS)
3451         https://bugs.webkit.org/show_bug.cgi?id=29508
3452
3453         * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines.
3454
3455 2009-09-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3456
3457         Reviewed by Eric Seidel.
3458
3459         [Fix] SourceCode's uninitialized member
3460         
3461         Potential source of crashes and bugs was fixed. Default constructor
3462         didn't initialized m_provider member.
3463
3464         https://bugs.webkit.org/show_bug.cgi?id=29364
3465
3466         * parser/SourceCode.h:
3467         (JSC::SourceCode::SourceCode):
3468
3469 2009-09-21  Oliver Hunt  <oliver@apple.com>
3470
3471         Reviewed by Geoff Garen.
3472
3473         REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org
3474         https://bugs.webkit.org/show_bug.cgi?id=29599
3475
3476         It is unsafe to attempt to cache new property transitions on
3477         dictionaries of any type.
3478
3479         * interpreter/Interpreter.cpp:
3480         (JSC::Interpreter::tryCachePutByID):
3481         * jit/JITStubs.cpp:
3482         (JSC::JITThunks::tryCachePutByID):
3483
3484 2009-09-21  Oliver Hunt  <oliver@apple.com>
3485
3486         RS=Maciej Stachowiak.
3487
3488         Re-land SNES fix with corrected assertion.
3489
3490         * interpreter/Interpreter.cpp:
3491         (JSC::Interpreter::resolveGlobal):
3492         (JSC::Interpreter::tryCachePutByID):
3493         (JSC::Interpreter::tryCacheGetByID):
3494         * jit/JITStubs.cpp:
3495         (JSC::JITThunks::tryCachePutByID):
3496         (JSC::JITThunks::tryCacheGetByID):
3497         (JSC::DEFINE_STUB_FUNCTION):
3498         * runtime/BatchedTransitionOptimizer.h:
3499         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3500         * runtime/JSObject.cpp:
3501         (JSC::JSObject::removeDirect):
3502         * runtime/Structure.cpp:
3503         (JSC::Structure::Structure):
3504         (JSC::Structure::getEnumerablePropertyNames):
3505         (JSC::Structure::despecifyDictionaryFunction):
3506         (JSC::Structure::addPropertyTransitionToExistingStructure):
3507         (JSC::Structure::addPropertyTransition):
3508         (JSC::Structure::removePropertyTransition):
3509         (JSC::Structure::toDictionaryTransition):
3510         (JSC::Structure::toCacheableDictionaryTransition):
3511         (JSC::Structure::toUncacheableDictionaryTransition):
3512         (JSC::Structure::fromDictionaryTransition):
3513         (JSC::Structure::removePropertyWithoutTransition):
3514         * runtime/Structure.h:
3515         (JSC::Structure::isDictionary):
3516         (JSC::Structure::isUncacheableDictionary):
3517         (JSC::Structure::):
3518         * runtime/StructureChain.cpp:
3519         (JSC::StructureChain::isCacheable):
3520
3521 2009-09-21  Adam Roben  <aroben@apple.com>
3522
3523         Revert r48573, as it caused many assertion failures
3524
3525         * interpreter/Interpreter.cpp:
3526         * jit/JITStubs.cpp:
3527         * runtime/BatchedTransitionOptimizer.h:
3528         * runtime/JSObject.cpp:
3529         * runtime/Structure.cpp:
3530         * runtime/Structure.h:
3531         * runtime/StructureChain.cpp:
3532
3533 2009-09-21  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3534
3535         Unreviewed make dist build fix. Missing files.
3536
3537         * GNUmakefile.am:
3538
3539 2009-09-19  Gavin Barraclough  <barraclough@apple.com>
3540
3541         Reviewed by Sam 'Cabin Boy' Weinig.
3542
3543         Fix stack alignment with ARM THUMB2 JIT.
3544         https://bugs.webkit.org/show_bug.cgi?id=29526
3545         
3546         Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a
3547         multiple of 16 bytes.
3548
3549         * jit/JITStubs.cpp:
3550         (JSC::JITThunks::JITThunks):
3551         * jit/JITStubs.h:
3552
3553 2009-09-20  Oliver Hunt  <oliver@apple.com>
3554
3555         Reviewed by Maciej Stachowiak.
3556
3557         SNES is too slow
3558         https://bugs.webkit.org/show_bug.cgi?id=29534
3559
3560         The problem was that the emulator used multiple classes with
3561         more properties than our dictionary cutoff allowed, this resulted
3562         in more or less all critical logic inside the emulator requiring
3563         uncached property access.
3564
3565         Rather than simply bumping the dictionary cutoff, this patch
3566         recognises that there are two ways to create a "dictionary"
3567         structure.  Either by adding a large number of properties, or
3568         by removing a property.  In the case of adding properties we
3569         know all the existing properties will maintain their existing
3570         offsets, so we could cache access to those properties, if we
3571         know they won't be removed.
3572
3573         To make this possible, this patch adds the logic required to
3574         distinguish a dictionary created by addition from one created
3575         by removal.  With this logic in place we can now cache access
3576         to objects with large numbers of properties.
3577
3578         SNES performance improved by more than 6x.
3579
3580         * interpreter/Interpreter.cpp:
3581         (JSC::Interpreter::resolveGlobal):
3582         (JSC::Interpreter::tryCachePutByID):
3583         (JSC::Interpreter::tryCacheGetByID):
3584         * jit/JITStubs.cpp:
3585         (JSC::JITThunks::tryCachePutByID):
3586         (JSC::JITThunks::tryCacheGetByID):
3587         (JSC::DEFINE_STUB_FUNCTION):
3588         * runtime/BatchedTransitionOptimizer.h:
3589         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3590         * runtime/JSObject.cpp:
3591         (JSC::JSObject::removeDirect):
3592         * runtime/Structure.cpp:
3593         (JSC::Structure::Structure):
3594         (JSC::Structure::getEnumerablePropertyNames):
3595         (JSC::Structure::despecifyDictionaryFunction):
3596         (JSC::Structure::addPropertyTransitionToExi