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