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