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