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