1 2009-11-23 Steve Block <steveblock@google.com>
3 Reviewed by Dmitry Titov.
5 Adds MainThreadAndroid.cpp with Android-specific WTF threading functions.
6 https://bugs.webkit.org/show_bug.cgi?id=31807
9 * wtf/android/MainThreadAndroid.cpp: Added.
11 (WTF::initializeMainThreadPlatform):
12 (WTF::scheduleDispatchFunctionsOnMainThread):
14 2009-11-23 Alexey Proskuryakov <ap@apple.com>
16 Reviewed by Brady Eidson.
18 https://bugs.webkit.org/show_bug.cgi?id=31748
19 Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
21 * JavaScriptCore.exp: Export callOnMainThreadAndWait.
23 2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
25 Reviewed by Kenneth Rohde Christiansen.
27 [Symbian] Fix lastIndexOf() for Symbian
28 https://bugs.webkit.org/show_bug.cgi?id=31773
30 Symbian soft floating point library has problems with operators
31 comparing NaN to numbers. Without a workaround lastIndexOf()
32 function does not work.
34 Patch developed by David Leong.
36 * runtime/StringPrototype.cpp:
37 (JSC::stringProtoFuncLastIndexOf):Add an extra test
38 to check for NaN for Symbian.
40 2009-11-23 Steve Block <steveblock@google.com>
42 Reviewed by Eric Seidel.
44 Android port lacks implementation of atomicIncrement and atomicDecrement.
45 https://bugs.webkit.org/show_bug.cgi?id=31715
47 * wtf/Threading.h: Modified.
48 (WTF::atomicIncrement): Added Android implementation.
49 (WTF::atomicDecrement): Added Android implementation.
51 2009-11-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
55 [Qt] Sort source lists and remove obsolete comments
56 from the build system.
60 2009-11-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
62 Reviewed by Eric Seidel.
64 [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac
65 https://bugs.webkit.org/show_bug.cgi?id=31753
69 2009-11-19 Steve Block <steveblock@google.com>
71 Android port lacks configuration in Platform.h and config.h.
72 https://bugs.webkit.org/show_bug.cgi?id=31671
74 * wtf/Platform.h: Modified. Added Android-specific configuration.
76 2009-11-19 Alexey Proskuryakov <ap@apple.com>
78 Reviewed by Darin Adler.
80 https://bugs.webkit.org/show_bug.cgi?id=31690
81 Make SocketStreamHandleCFNet work on Windows
83 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
85 (WTF::FunctionWithContext::FunctionWithContext):
86 (WTF::dispatchFunctionsFromMainThread):
87 (WTF::callOnMainThreadAndWait):
89 Re-add callOnMainThreadAndWait(), which was removed in bug 23926.
91 2009-11-19 Dmitry Titov <dimich@chromium.org>
93 Reviewed by David Levin.
95 isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests..
96 https://bugs.webkit.org/show_bug.cgi?id=31693
98 * wtf/ThreadingPthreads.cpp:
99 (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier.
100 (WTF::isMainThread): Ditto.
102 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
104 Reviewed by Darin Adler.
106 Remove HAVE(STRING_H) guard from JavaScriptCore
107 https://bugs.webkit.org/show_bug.cgi?id=31668
110 * runtime/UString.cpp:
112 2009-11-19 Dumitru Daniliuc <dumi@chromium.org>
114 Reviewed by Dmitry Titov.
116 Fixing a bug in MessageQueue::removeIf() that leads to an
119 https://bugs.webkit.org/show_bug.cgi?id=31657
121 * wtf/MessageQueue.h:
122 (WTF::MessageQueue::removeIf):
124 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
126 Reviewed by Darin Adler.
128 Remove HAVE(FLOAT_H) guard
129 https://bugs.webkit.org/show_bug.cgi?id=31661
131 JavaScriptCore has a dependency on float.h, there is
132 no need to guard float.h.
134 * runtime/DatePrototype.cpp: Remove include directive
135 for float.h as it is included in MathExtras.h already.
136 * runtime/Operations.cpp: Ditto.
137 * runtime/UString.cpp: Ditto.
138 * wtf/dtoa.cpp: Ditto.
139 * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard.
140 * wtf/Platform.h: Ditto.
142 2009-11-19 Thiago Macieira <thiago.macieira@nokia.com>
144 Reviewed by Simon Hausmann.
146 Build fix for 32-bit Sparc machines: these machines are big-endian.
150 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
152 Reviewed by Kenneth Rohde Christiansen.
154 [Qt] Remove support for Qt v4.3 or older versions
155 https://bugs.webkit.org/show_bug.cgi?id=29469
157 * JavaScriptCore.pro:
159 * wtf/unicode/qt4/UnicodeQt4.h:
161 2009-11-18 Kent Tamura <tkent@chromium.org>
163 Reviewed by Darin Adler.
165 Move UString::from(double) implementation to new
166 WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore
168 https://bugs.webkit.org/show_bug.cgi?id=31330
170 - Introduce new function createRep(const char*, unsigned) and
171 UString::UString(const char*, unsigned) to reduce 2 calls to strlen().
172 - Fix a bug that dtoa() doesn't update *rve if the input value is NaN
175 No new tests because this doesn't change the behavior.
177 * JavaScriptCore.exp:
178 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
179 * runtime/UString.cpp:
181 (JSC::UString::UString):
182 (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat().
185 (WTF::dtoa): Fix a bug about rve.
186 (WTF::append): A helper for doubleToStringInJavaScriptFormat().
187 (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double).
190 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
192 Reviewed by Kenneth Rohde Christiansen.
194 [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
195 https://bugs.webkit.org/show_bug.cgi?id=31643
197 * JavaScriptCore.pro:
199 2009-11-18 Nate Chapin <japhet@chromium.org>
201 Reviewed by Darin Fisher.
203 Remove Chromium's unnecessary dependency on wtf's tcmalloc files.
205 https://bugs.webkit.org/show_bug.cgi?id=31648
207 * JavaScriptCore.gyp/JavaScriptCore.gyp:
209 2009-11-18 Thiago Macieira <thiago.macieira@nokia.com>
211 Reviewed by Gavin Barraclough.
213 [Qt] Implement symbol hiding for JSC's JIT functions.
215 These functions are implemented directly in assembly, so they need the
216 proper directives to enable/disable visibility. On ELF systems, it's
217 .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On
218 Windows, it's not necessary since you have to explicitly export. I
219 also implemented the AIX idiom, though it's unlikely anyone will
220 implement AIX/POWER JIT.
221 https://bugs.webkit.org/show_bug.cgi?id=30864
225 2009-11-18 Oliver Hunt <oliver@apple.com>
227 Reviewed by Alexey Proskuryakov.
229 Interpreter may do an out of range access when throwing an exception in the profiler.
230 https://bugs.webkit.org/show_bug.cgi?id=31635
234 * interpreter/Interpreter.cpp:
235 (JSC::Interpreter::throwException):
237 2009-11-18 Gabor Loki <loki@inf.u-szeged.hu>
239 Reviewed by Darin Adler.
241 Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux
242 https://bugs.webkit.org/show_bug.cgi?id=31631
244 * jit/ExecutableAllocator.h:
245 (JSC::ExecutableAllocator::cacheFlush):
247 2009-11-18 Harald Fernengel <harald.fernengel@nokia.com>
249 Reviewed by Simon Hausmann.
251 [Qt] Fix detection of linux-g++
253 Never use "linux-g++*" to check for linux-g++, since this will break embedded
254 builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
257 * JavaScriptCore.pri:
259 2009-11-17 Jon Honeycutt <jhoneycutt@apple.com>
261 Add JSContextRefPrivate.h to list of copied files.
263 Reviewed by Mark Rowe.
265 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
267 2009-11-17 Martin Robinson <martin.james.robinson@gmail.com>
269 Reviewed by Adam Barth.
271 [GTK] Style cleanup for GOwnPtr
272 https://bugs.webkit.org/show_bug.cgi?id=31506
274 Remove forward declaration in GOwnPtr and do some style cleanup.
278 (WTF::GOwnPtr::GOwnPtr):
279 (WTF::GOwnPtr::~GOwnPtr):
281 (WTF::GOwnPtr::release):
282 (WTF::GOwnPtr::outPtr):
284 (WTF::GOwnPtr::clear):
285 (WTF::GOwnPtr::operator*):
286 (WTF::GOwnPtr::operator->):
287 (WTF::GOwnPtr::operator!):
288 (WTF::GOwnPtr::operator UnspecifiedBoolType):
289 (WTF::GOwnPtr::swap):
294 (WTF::freeOwnedGPtr):
296 2009-11-17 Oliver Hunt <oliver@apple.com>
298 Reviewed by Maciej Stachowiak.
300 Incorrect use of JavaScriptCore API in DumpRenderTree
301 https://bugs.webkit.org/show_bug.cgi?id=31577
303 Add assertions to the 'toJS' functions to catch mistakes like
304 this early. Restructure existing code which blindly passed potentially
305 null values to toJS when forwarding exceptions so that a null check is
311 * API/JSCallbackObjectFunctions.h:
312 (JSC::::getOwnPropertySlot):
314 (JSC::::deleteProperty):
316 (JSC::::hasInstance):
320 (JSC::::staticValueGetter):
321 (JSC::::callbackGetter):
322 * API/tests/testapi.c: Fix errors in the API tester.
323 (MyObject_getProperty):
324 (MyObject_convertToType):
325 (EvilExceptionObject_convertToType):
327 2009-11-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
329 Reviewed by Gavin Barraclough.
331 https://bugs.webkit.org/show_bug.cgi?id=31050
333 Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32
334 failed on a CortexA8 CPU, but not on a simulator; and
335 JITCall.cpp modifications was somehow not committed to mainline.
337 * assembler/ARMAssembler.h:
338 (JSC::ARMAssembler::fmrs_r):
339 * assembler/MacroAssemblerARM.h:
340 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
342 (JSC::JIT::compileOpCall):
344 2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com>
346 Reviewed by Simon Hausmann.
348 Fix Qt build on Windows CE 6.
350 * JavaScriptCore.pri: Add missing include path.
351 * wtf/Platform.h: Include ce_time.h for Windows CE 6.
353 2009-11-13 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
355 Reviewed by Gavin Barraclough.
357 https://bugs.webkit.org/show_bug.cgi?id=31050
359 Adding optimization support for mode JSVALUE32_64
364 (JSC::JIT::compileOpCall):
365 * jit/JITPropertyAccess.cpp:
366 (JSC::JIT::emit_op_method_check):
367 (JSC::JIT::compileGetByIdHotPath):
368 (JSC::JIT::compileGetByIdSlowCase):
369 (JSC::JIT::emit_op_put_by_id):
371 2009-11-14 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
373 Reviewed by Gavin Barraclough.
375 https://bugs.webkit.org/show_bug.cgi?id=31050
377 Adding JSVALUE32_64 support for ARM (but not turning it
378 on by default). All optimizations must be disabled, since
379 this patch is only the first of a series of patches.
381 During the work, a lot of x86 specific code revealed and
382 made platform independent.
383 See revisions: 50531 50541 50593 50594 50595
385 * assembler/ARMAssembler.h:
386 (JSC::ARMAssembler::):
387 (JSC::ARMAssembler::fdivd_r):
388 * assembler/MacroAssemblerARM.h:
389 (JSC::MacroAssemblerARM::lshift32):
390 (JSC::MacroAssemblerARM::neg32):
391 (JSC::MacroAssemblerARM::rshift32):
392 (JSC::MacroAssemblerARM::branchOr32):
393 (JSC::MacroAssemblerARM::set8):
394 (JSC::MacroAssemblerARM::setTest8):
395 (JSC::MacroAssemblerARM::loadDouble):
396 (JSC::MacroAssemblerARM::divDouble):
397 (JSC::MacroAssemblerARM::convertInt32ToDouble):
398 (JSC::MacroAssemblerARM::zeroDouble):
401 * jit/JITOpcodes.cpp:
402 (JSC::JIT::privateCompileCTIMachineTrampolines):
404 * wtf/StdLibExtras.h:
406 2009-11-13 Dominik Röttsches <dominik.roettsches@access-company.com>
408 Reviewed by Eric Seidel.
410 Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
411 https://bugs.webkit.org/show_bug.cgi?id=31468
413 Adding isAlphanumeric abstraction, required
414 by TextBoundaries.cpp.
416 * wtf/unicode/glib/UnicodeGLib.h:
417 (WTF::Unicode::isAlphanumeric):
418 * wtf/unicode/icu/UnicodeIcu.h:
419 (WTF::Unicode::isAlphanumeric):
421 2009-11-13 Norbert Leser <norbert.leser&nokia.com>
423 Reviewed by Eric Seidel.
425 Added macros for USERINCLUDE paths within symbian blocks
426 to guarantee inclusion of respective header files from local path
427 first (to avoid clashes with same names of header files in system include path).
429 * JavaScriptCore.pri:
431 2009-11-13 Oliver Hunt <oliver@apple.com>
433 Reviewed by Geoff Garen.
435 JSValueProtect and JSValueUnprotect don't protect API wrapper values
436 https://bugs.webkit.org/show_bug.cgi?id=31485
438 Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
439 does not attempt to to strip out API wrapper objects.
443 * API/JSValueRef.cpp:
446 * API/tests/testapi.c:
447 (makeGlobalNumberValue):
450 2009-11-13 İsmail Dönmez <ismail@namtrac.org>
452 Reviewed by Antti Koivisto.
454 Fix typo, ce_time.cpp should be ce_time.c
456 * JavaScriptCore.pri:
458 2009-11-12 Steve VanDeBogart <vandebo@chromium.org>
460 Reviewed by Adam Barth.
462 Calculate the time offset only if we were able to parse
463 the date string. This saves an IPC in Chromium for
464 invalid date strings.
465 https://bugs.webkit.org/show_bug.cgi?id=31416
468 (WTF::parseDateFromNullTerminatedCharacters):
469 (JSC::parseDateFromNullTerminatedCharacters):
471 2009-11-12 Oliver Hunt <oliver@apple.com>
473 Rollout r50896 until i can work out why it causes failures.
475 * bytecompiler/BytecodeGenerator.cpp:
476 (JSC::BytecodeGenerator::emitReturn):
477 * interpreter/Interpreter.cpp:
478 (JSC::Interpreter::execute):
480 (JSC::EvalNode::emitBytecode):
482 2009-11-12 Steve Falkenburg <sfalken@apple.com>
484 Reviewed by Stephanie Lewis.
486 Remove LIBRARY directive from def file to fix Debug_All target.
488 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
490 2009-11-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
492 Rubber-stamped by Holger Freyther.
494 Revert r50204, since it makes DRT crash on 32 bits release builds
499 2009-11-12 Oliver Hunt <oliver@apple.com>
501 Reviewed by Gavin Barraclough.
503 Start unifying entry logic for function and eval code.
505 Eval now uses a ret instruction to end execution, and sets up
506 a callframe more in line with what we do for function entry.
508 * bytecompiler/BytecodeGenerator.cpp:
509 (JSC::BytecodeGenerator::emitReturn):
510 * interpreter/Interpreter.cpp:
511 (JSC::Interpreter::execute):
513 (JSC::EvalNode::emitBytecode):
515 2009-11-12 Richard Moe Gustavsen <richard.gustavsen@nokia.com>
517 Reviewed by Kenneth Rohde Christiansen.
519 [Qt] Disable pthread_setname_np.
521 This allows Qt builds on Mac from 10.6 to run on earlier version
522 where this symbol is not present.
523 https://bugs.webkit.org/show_bug.cgi?id=31403
527 2009-11-12 Thiago Macieira <thiago.macieira@nokia.com>
529 Reviewed by Kenneth Rohde Christiansen.
531 [Qt] Fix linking on Linux 32-bit.
533 It was missing the ".text" directive at the top of the file,
534 indicating that code would follow. Without it, the assembler created
535 "NOTYPE" symbols, which would result in linker errors.
536 https://bugs.webkit.org/show_bug.cgi?id=30863
540 2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
542 Reviewed by Alexey Proskuryakov.
544 Refactor multiple JavaScriptCore threads
545 https://bugs.webkit.org/show_bug.cgi?id=31328
547 Remove the id field from the PlatformThread structure
550 * runtime/Collector.cpp:
551 (JSC::getCurrentPlatformThread):
552 (JSC::suspendThread):
554 (JSC::getPlatformThreadRegisters):
556 2009-11-10 Geoffrey Garen <ggaren@apple.com>
558 Linux build fix: Added an #include for UINT_MAX.
560 * runtime/WeakRandom.h:
562 2009-11-10 Geoffrey Garen <ggaren@apple.com>
564 JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
566 * JavaScriptCore.xcodeproj/project.pbxproj:
568 2009-11-10 Geoffrey Garen <ggaren@apple.com>
570 Reviewed by Gavin "avGni arBalroguch" Barraclough.
572 Faster Math.random, based on GameRand.
574 SunSpider says 1.4% faster.
577 * JavaScriptCore.gypi:
578 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
579 * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
581 * runtime/JSGlobalData.cpp:
582 (JSC::JSGlobalData::JSGlobalData):
583 * runtime/JSGlobalData.h: Use an object to track random number generation
584 state, initialized to the current time.
586 * runtime/MathObject.cpp:
587 (JSC::MathObject::MathObject):
588 (JSC::mathProtoFuncRandom): Use the new hotness.
590 * runtime/WeakRandom.h: Added.
591 (JSC::WeakRandom::WeakRandom):
592 (JSC::WeakRandom::get):
593 (JSC::WeakRandom::advance): The new hotness.
595 2009-11-09 Geoffrey Garen <ggaren@apple.com>
597 Reviewed by Oliver Hunt.
599 Imported the v8 DST cache.
601 SunSpider says 1.5% faster.
603 * runtime/JSGlobalData.cpp:
604 (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
607 * runtime/JSGlobalData.h:
608 (JSC::DSTOffsetCache::DSTOffsetCache):
609 (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
612 (WTF::calculateDSTOffsetSimple):
613 (WTF::calculateDSTOffset):
614 (WTF::parseDateFromNullTerminatedCharacters):
616 (JSC::gregorianDateTimeToMS):
617 (JSC::msToGregorianDateTime):
618 (JSC::parseDateFromNullTerminatedCharacters):
619 * wtf/DateMath.h: The imported code for probing and updating the cache.
621 2009-11-09 Geoffrey Garen <ggaren@apple.com>
623 Reviewed by Oliver Hunt.
625 Fixed an edge case that could cause the engine not to notice a timezone
628 No test because this case would require manual intervention to change
629 the timezone during the test.
631 SunSpider reports no change.
633 * runtime/DateInstanceCache.h:
634 (JSC::DateInstanceCache::DateInstanceCache):
635 (JSC::DateInstanceCache::reset): Added a helper function for resetting
636 this cache. Also, shrank the cache, since we'll be resetting it often.
638 * runtime/JSGlobalData.cpp:
639 (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
640 in resetting Date data. (Otherwise, a cache hit could bypass a necessary
641 timezone update check.)
643 2009-11-09 Geoffrey Garen <ggaren@apple.com>
645 Reviewed by Sam Weinig.
647 Some manual inlining and constant propogation in Date code.
649 SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
650 says some previously evident stalls are now gone.
652 * runtime/DateConstructor.cpp:
654 * runtime/DateConversion.cpp:
656 (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
658 * runtime/DateConversion.h:
659 * runtime/DateInstance.cpp:
660 (JSC::DateInstance::calculateGregorianDateTime):
661 (JSC::DateInstance::calculateGregorianDateTimeUTC):
662 * runtime/DateInstance.h:
663 (JSC::DateInstance::gregorianDateTime):
664 (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
665 a UTC and non-UTC variant, and split each variant into a fast inline
666 case and a slow out-of-line case.
668 * runtime/DatePrototype.cpp:
669 (JSC::formatLocaleDate):
670 (JSC::dateProtoFuncToString):
671 (JSC::dateProtoFuncToUTCString):
672 (JSC::dateProtoFuncToISOString):
673 (JSC::dateProtoFuncToDateString):
674 (JSC::dateProtoFuncToTimeString):
675 (JSC::dateProtoFuncGetFullYear):
676 (JSC::dateProtoFuncGetUTCFullYear):
677 (JSC::dateProtoFuncToGMTString):
678 (JSC::dateProtoFuncGetMonth):
679 (JSC::dateProtoFuncGetUTCMonth):
680 (JSC::dateProtoFuncGetDate):
681 (JSC::dateProtoFuncGetUTCDate):
682 (JSC::dateProtoFuncGetDay):
683 (JSC::dateProtoFuncGetUTCDay):
684 (JSC::dateProtoFuncGetHours):
685 (JSC::dateProtoFuncGetUTCHours):
686 (JSC::dateProtoFuncGetMinutes):
687 (JSC::dateProtoFuncGetUTCMinutes):
688 (JSC::dateProtoFuncGetSeconds):
689 (JSC::dateProtoFuncGetUTCSeconds):
690 (JSC::dateProtoFuncGetTimezoneOffset):
691 (JSC::setNewValueFromTimeArgs):
692 (JSC::setNewValueFromDateArgs):
693 (JSC::dateProtoFuncSetYear):
694 (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
696 2009-11-09 Geoffrey Garen <ggaren@apple.com>
698 Build fix: export a new symbol.
700 * JavaScriptCore.exp:
701 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
703 2009-11-09 Geoffrey Garen <ggaren@apple.com>
705 Reviewed by Sam "Home Wrecker" Weinig.
707 Added a tiny cache for Date parsing.
709 SunSpider says 1.2% faster.
711 * runtime/DateConversion.cpp:
712 (JSC::parseDate): Try to reuse the last parsed Date, if present.
714 * runtime/JSGlobalData.cpp:
715 (JSC::JSGlobalData::resetDateCache):
716 * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
717 this code to make resetting the date cache easier.
719 * runtime/JSGlobalObject.h:
720 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
724 (JSC::parseDateFromNullTerminatedCharacters):
725 * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
727 2009-11-09 Oliver Hunt <oliver@apple.com>
729 Reviewed by Gavin Barraclough.
731 Can cache prototype lookups on uncacheable dictionaries.
732 https://bugs.webkit.org/show_bug.cgi?id=31198
734 Replace fromDictionaryTransition with flattenDictionaryObject and
735 flattenDictionaryStructure. This change is necessary as we need to
736 guarantee that our attempt to convert away from a dictionary structure
737 will definitely succeed, and in some cases this requires mutating the
738 object storage itself.
740 * interpreter/Interpreter.cpp:
741 (JSC::Interpreter::tryCacheGetByID):
743 (JSC::JITThunks::tryCacheGetByID):
744 (JSC::DEFINE_STUB_FUNCTION):
745 * runtime/BatchedTransitionOptimizer.h:
746 (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
747 * runtime/JSObject.h:
748 (JSC::JSObject::flattenDictionaryObject):
749 * runtime/Operations.h:
750 (JSC::normalizePrototypeChain):
751 * runtime/Structure.cpp:
752 (JSC::Structure::flattenDictionaryStructure):
753 (JSC::comparePropertyMapEntryIndices):
754 * runtime/Structure.h:
756 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
758 Not reviewed, build fix.
760 Remove extra character from r50701.
762 * JavaScriptCore.pri:
764 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
766 Not reviewed, build fix.
768 Revert r50695 because it broke QtWebKit (clean builds).
770 * JavaScriptCore.pri:
772 2009-11-09 Norbert Leser <norbert.leser@nokia.com>
774 Reviewed by Kenneth Rohde Christiansen.
776 Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
777 Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
778 and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
780 * JavaScriptCore.pri:
782 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
784 Reviewed by Kenneth Rohde Christiansen.
786 Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
787 https://bugs.webkit.org/show_bug.cgi?id=31040
789 * interpreter/Interpreter.cpp:
790 (JSC::Interpreter::privateExecute):
792 2009-11-08 David Levin <levin@chromium.org>
794 Reviewed by NOBODY (speculative snow leopard and windows build fixes).
797 (WTF::parseDateFromNullTerminatedCharacters):
798 (JSC::gregorianDateTimeToMS):
799 (JSC::msToGregorianDateTime):
800 (JSC::parseDateFromNullTerminatedCharacters):
802 (JSC::GregorianDateTime::GregorianDateTime):
804 2009-11-08 David Levin <levin@chromium.org>
806 Reviewed by NOBODY (chromium build fix).
808 Hopefully, the last build fix.
810 Create better separation in DateMath about the JSC
811 and non-JSC portions. Also, only expose the non-JSC
812 version in the exports.
814 * JavaScriptCore.exp:
815 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
817 (WTF::parseDateFromNullTerminatedCharacters):
819 (JSC::gregorianDateTimeToMS):
820 (JSC::msToGregorianDateTime):
821 (JSC::parseDateFromNullTerminatedCharacters):
825 2009-11-08 David Levin <levin@chromium.org>
827 Reviewed by NOBODY (chromium build fix).
829 For the change in DateMath.
834 2009-11-06 Geoffrey Garen <ggaren@apple.com>
836 Windows build fix: export some symbols.
838 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
840 2009-11-06 Geoffrey Garen <ggaren@apple.com>
842 Build fix: updated export file.
844 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
846 2009-11-06 Geoffrey Garen <ggaren@apple.com>
848 Build fix: added some #includes.
853 2009-11-06 Geoffrey Garen <ggaren@apple.com>
855 Reviewed by Oliver Hunt.
857 https://bugs.webkit.org/show_bug.cgi?id=31197
858 Implemented a timezone cache not based on Mac OS X's notify_check API.
860 If the VM calculates the local timezone offset from UTC, it caches the
861 result until the end of the current VM invocation. (We don't want to cache
862 forever, because the user's timezone may change over time.)
864 This removes notify_* overhead on Mac, and, more significantly, removes
865 OS time and date call overhead on non-Mac platforms.
867 ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
868 speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
870 * JavaScriptCore.exp:
872 * interpreter/CachedCall.h:
873 (JSC::CachedCall::CachedCall):
874 * interpreter/Interpreter.cpp:
875 (JSC::Interpreter::execute):
876 * runtime/JSGlobalObject.h:
877 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the
878 DynamicGlobalObjectScope constructor responsible for checking whether a
879 dynamicGlobalObject has already been set. This eliminated some duplicate
880 client code, and allowed me to avoid adding even more duplicate client
881 code. Made DynamicGlobalObjectScope responsible for resetting the
882 local timezone cache upon first entry to the VM.
884 * runtime/DateConstructor.cpp:
885 (JSC::constructDate):
889 * runtime/DateConversion.cpp:
891 * runtime/DateConversion.h:
892 * runtime/DateInstance.cpp:
893 (JSC::DateInstance::gregorianDateTime):
894 * runtime/DateInstance.h:
895 * runtime/DateInstanceCache.h:
896 * runtime/DatePrototype.cpp:
897 (JSC::setNewValueFromTimeArgs):
898 (JSC::setNewValueFromDateArgs):
899 (JSC::dateProtoFuncSetYear):
900 * runtime/InitializeThreading.cpp:
901 (JSC::initializeThreadingOnce):
902 * runtime/JSGlobalData.cpp:
903 (JSC::JSGlobalData::JSGlobalData):
904 * runtime/JSGlobalData.h:
906 (WTF::getCurrentUTCTime):
907 (WTF::getCurrentUTCTimeWithMicroseconds):
909 (JSC::getUTCOffset): Use the new cache. Also, see below.
910 (JSC::gregorianDateTimeToMS):
911 (JSC::msToGregorianDateTime):
912 (JSC::initializeDates):
913 (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
914 accounts for the local timezone offset, to accomodate our new caching API,
915 and a (possibly misguided) caller in WebCore. Also, see below.
917 (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
918 DateMath.* into the JSC namespace. The code needed to move so it could
919 naturally interact with ExecState and JSGlobalData to support caching.
920 Logically, it seemed right to move it, too, since this code is not really
921 as low-level as the WTF namespace might imply -- it implements a set of
922 date parsing and conversion quirks that are finely tuned to the JavaScript
923 language. Also removed the Mac OS X notify_* infrastructure.
926 (WTF::currentTimeMS):
927 (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
928 it to make it consistent with WTF's currentTime function.
930 2009-11-06 Gabor Loki <loki@inf.u-szeged.hu>
932 Unreviewed trivial buildfix after r50595.
934 Rename the remaining rshiftPtr calls to rshift32
936 * jit/JITArithmetic.cpp:
937 (JSC::JIT::emit_op_rshift):
938 * jit/JITInlineMethods.h:
939 (JSC::JIT::emitFastArithImmToInt):
941 2009-11-06 Gavin Barraclough <barraclough@apple.com>
943 Reviewed by Oliver Hunt.
945 Tidy up the shift methods on the macro-assembler interface.
947 Currently behaviour of shifts of a magnitude > 0x1f is undefined.
948 Instead defined that all shifts are masked to this range. This makes a lot of
949 practical sense, both since having undefined behaviour is not particularly
950 desirable, and because this behaviour is commonly required (particularly since
951 it is required bt ECMA-262 for shifts).
953 Update the ARM assemblers to provide this behaviour. Remove (now) redundant
954 masks from JITArithmetic, and remove rshiftPtr (this was used in case that
955 could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
956 on x86-64, which uses JSVALUE64!)
958 * assembler/MacroAssembler.h:
959 * assembler/MacroAssemblerARM.h:
960 (JSC::MacroAssemblerARM::lshift32):
961 (JSC::MacroAssemblerARM::rshift32):
962 * assembler/MacroAssemblerARMv7.h:
963 (JSC::MacroAssemblerARMv7::lshift32):
964 (JSC::MacroAssemblerARMv7::rshift32):
965 * assembler/MacroAssemblerX86_64.h:
966 * jit/JITArithmetic.cpp:
967 (JSC::JIT::emit_op_lshift):
968 (JSC::JIT::emit_op_rshift):
970 2009-11-05 Gavin Barraclough <barraclough@apple.com>
972 Rubber Stamped by Oliver Hunt.
974 Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
976 * jit/JITInlineMethods.h:
977 (JSC::JIT::emitPutJITStubArg):
978 (JSC::JIT::emitPutJITStubArgConstant):
979 (JSC::JIT::emitGetJITStubArg):
980 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
982 (JSC::JITStubCall::JITStubCall):
983 (JSC::JITStubCall::getArgument):
986 2009-11-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
988 Reviewed by Gavin Barraclough.
990 https://bugs.webkit.org/show_bug.cgi?id=31159
991 Fix branchDouble behaviour on ARM THUMB2 JIT.
993 The x86 branchDouble behaviour is reworked, and all JIT
994 ports should follow the x86 port. See bug 31104 and 31151
996 This patch contains a fix for the traditional ARM port
998 * assembler/ARMAssembler.h:
999 (JSC::ARMAssembler::):
1000 (JSC::ARMAssembler::fmrs_r):
1001 (JSC::ARMAssembler::ftosid_r):
1002 * assembler/MacroAssemblerARM.h:
1003 (JSC::MacroAssemblerARM::):
1004 (JSC::MacroAssemblerARM::branchDouble):
1005 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
1007 2009-11-05 Chris Jerdonek <chris.jerdonek@gmail.com>
1009 Reviewed by Eric Seidel.
1011 Removed the "this is part of the KDE project" comments from
1012 all *.h, *.cpp, *.idl, and *.pm files.
1014 https://bugs.webkit.org/show_bug.cgi?id=31167
1016 The maintenance and architecture page in the project wiki lists
1019 This change includes no changes or additions to test cases
1020 since the change affects only comments.
1022 * wtf/wince/FastMallocWince.h:
1024 2009-11-05 Gabor Loki <loki@inf.u-szeged.hu>
1026 Reviewed by Gavin Barraclough.
1028 Use ARMv7 specific encoding for immediate constants on ARMv7 target
1029 https://bugs.webkit.org/show_bug.cgi?id=31060
1031 * assembler/ARMAssembler.cpp:
1032 (JSC::ARMAssembler::getOp2): Use INVALID_IMM
1033 (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
1034 (JSC::ARMAssembler::moveImm): Ditto.
1035 (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
1036 instructions or a PC relative load.
1037 * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
1038 encoded as an immediate constant.
1039 (JSC::ARMAssembler::):
1040 (JSC::ARMAssembler::movw_r): 16-bit immediate load
1041 (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
1042 (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
1045 2009-11-04 Mark Mentovai <mark@chromium.org>
1047 Reviewed by Mark Rowe.
1049 Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
1050 BUILDING_ON_TIGER and BUILDING_ON_LEOPARD. The TARGETING_ macros
1051 consider the deployment target; the BUILDING_ON_ macros consider the
1052 headers being built against.
1056 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1058 Reviewed by Oliver Hunt.
1060 https://bugs.webkit.org/show_bug.cgi?id=31151
1061 Fix branchDouble behaviour on ARM THUMB2 JIT.
1063 The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
1064 for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
1065 branch on unordered operands. Similarly, DoubleLessThanOrUnordered &
1066 DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
1067 ARMv7Assembler::ConditionLS, whereas they should be using
1068 ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
1070 Fix these, and fill out the missing DoubleConditions.
1072 * assembler/MacroAssemblerARMv7.h:
1073 (JSC::MacroAssemblerARMv7::):
1074 (JSC::MacroAssemblerARMv7::branchDouble):
1076 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1078 Rubber Stamped by Oliver Hunt.
1080 Enable native call optimizations on ARMv7. (Existing ARM_TRADITIONAL
1081 implementation was generic, worked perfectly, just needed turning on).
1083 * jit/JITOpcodes.cpp:
1086 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1088 Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
1090 Add a missing assert to the ARMv7 JIT.
1092 * assembler/ARMv7Assembler.h:
1093 (JSC::ARMThumbImmediate::ARMThumbImmediate):
1095 2009-11-04 Mark Rowe <mrowe@apple.com>
1097 Rubber-stamped by Oliver Hunt.
1099 Remove bogus op_ prefix on dumped version of three opcodes.
1101 * bytecode/CodeBlock.cpp:
1102 (JSC::CodeBlock::dump):
1104 2009-11-04 Mark Rowe <mrowe@apple.com>
1106 Reviewed by Sam Weinig.
1108 Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
1110 We do this by having the registerName function return information about the constant if the register
1111 number corresponds to a constant. This requires that registerName, and several functions that call it,
1112 be converted to member functions of CodeBlock so that the constant value can be retrieved. The
1113 ExecState also needs to be threaded down through these functions so that it can be passed on to
1114 constantName when needed.
1116 * bytecode/CodeBlock.cpp:
1117 (JSC::constantName):
1118 (JSC::CodeBlock::registerName):
1119 (JSC::CodeBlock::printUnaryOp):
1120 (JSC::CodeBlock::printBinaryOp):
1121 (JSC::CodeBlock::printConditionalJump):
1122 (JSC::CodeBlock::printGetByIdOp):
1123 (JSC::CodeBlock::printPutByIdOp):
1124 (JSC::CodeBlock::dump):
1125 * bytecode/CodeBlock.h:
1126 (JSC::CodeBlock::isConstantRegisterIndex):
1128 2009-11-04 Pavel Heimlich <tropikhajma@gmail.com>
1130 Reviewed by Alexey Proskuryakov.
1132 https://bugs.webkit.org/show_bug.cgi?id=30647
1133 Solaris build failure due to strnstr.
1135 * wtf/StringExtras.h: Enable strnstr on Solaris, too.
1137 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1139 Reviewed by Oliver Hunt.
1141 https://bugs.webkit.org/show_bug.cgi?id=31104
1142 Refactor x86-specific behaviour out of the JIT.
1144 - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
1145 - Refactor double to int conversion out into the MacroAssembler.
1146 - 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.
1147 - 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.
1149 * assembler/MacroAssemblerARM.h:
1150 (JSC::MacroAssemblerARM::):
1151 * assembler/MacroAssemblerARMv7.h:
1152 (JSC::MacroAssemblerARMv7::):
1153 * assembler/MacroAssemblerX86Common.h:
1154 (JSC::MacroAssemblerX86Common::):
1155 (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
1156 (JSC::MacroAssemblerX86Common::branchDouble):
1157 (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
1158 * jit/JITArithmetic.cpp:
1159 (JSC::JIT::emitBinaryDoubleOp):
1160 (JSC::JIT::emit_op_div):
1161 (JSC::JIT::emitSlow_op_jnless):
1162 (JSC::JIT::emitSlow_op_jnlesseq):
1163 * jit/JITOpcodes.cpp:
1164 (JSC::JIT::emit_op_jfalse):
1166 2009-11-04 Mark Mentovai <mark@chromium.org>
1168 Reviewed by Eric Seidel.
1170 Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp. This is supposed
1171 to be set as needed only in wtf/Platform.h.
1173 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1175 2009-11-02 Oliver Hunt <oliver@apple.com>
1177 Reviewed by Gavin Barraclough.
1179 REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
1180 https://bugs.webkit.org/show_bug.cgi?id=31045
1182 Add guards to prevent caching of prototype chain lookups with dictionaries at the
1183 head of the chain. Also add a few tighter assertions to cached prototype lookups
1184 to catch this in future.
1186 * interpreter/Interpreter.cpp:
1187 (JSC::Interpreter::tryCacheGetByID):
1188 (JSC::Interpreter::privateExecute):
1190 (JSC::JITThunks::tryCacheGetByID):
1192 2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1194 Reviewed by Darin Adler.
1196 PLATFORM(CF) should be set when building for Qt on Darwin
1197 https://bugs.webkit.org/show_bug.cgi?id=23671
1199 * wtf/Platform.h: Turn on CF support if both QT and DARWIN
1200 platforms are defined.
1202 2009-11-02 Dmitry Titov <dimich@chromium.org>
1204 Reviewed by David Levin.
1206 Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
1207 https://bugs.webkit.org/show_bug.cgi?id=30612
1209 * wtf/MessageQueue.h:
1210 (WTF::MessageQueue::alwaysTruePredicate):
1211 (WTF::MessageQueue::~MessageQueue):
1212 (WTF::MessageQueue::append):
1213 (WTF::MessageQueue::appendAndCheckEmpty):
1214 (WTF::MessageQueue::prepend):
1215 (WTF::MessageQueue::waitForMessage):
1216 (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
1217 (WTF::MessageQueue::tryGetMessage):
1218 (WTF::MessageQueue::removeIf):
1219 The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
1220 of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
1221 All methods have arguments of type PassOwnPtr<DataType> and return the same type.
1223 * wtf/Threading.cpp:
1224 (WTF::createThread):
1225 Superficial change to trigger rebuild of JSC project on Windows,
1226 workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
1228 2009-10-30 Geoffrey Garen <ggaren@apple.com>
1230 Reviewed by Oliver Hunt.
1232 Fixed failing layout test: restore a special case I accidentally deleted.
1234 * runtime/DatePrototype.cpp:
1235 (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
1236 that is NaN, reset the date to 0 *and* then apply the change; don't just
1237 reset the date to 0.
1239 2009-10-30 Geoffrey Garen <ggaren@apple.com>
1241 Windows build fix: update for object-to-pointer change.
1243 * runtime/DatePrototype.cpp:
1244 (JSC::formatLocaleDate):
1246 2009-10-29 Geoffrey Garen <ggaren@apple.com>
1248 Reviewed by Darin Adler.
1250 https://bugs.webkit.org/show_bug.cgi?id=30942
1251 Use pointers instead of copies to pass GregorianDateTime objects around.
1253 SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
1254 speedup on date-format-tofte.
1256 * runtime/DateInstance.cpp:
1257 (JSC::DateInstance::gregorianDateTime):
1258 * runtime/DateInstance.h:
1259 * runtime/DatePrototype.cpp:
1260 (JSC::formatLocaleDate):
1261 (JSC::dateProtoFuncToString):
1262 (JSC::dateProtoFuncToUTCString):
1263 (JSC::dateProtoFuncToISOString):
1264 (JSC::dateProtoFuncToDateString):
1265 (JSC::dateProtoFuncToTimeString):
1266 (JSC::dateProtoFuncGetFullYear):
1267 (JSC::dateProtoFuncGetUTCFullYear):
1268 (JSC::dateProtoFuncToGMTString):
1269 (JSC::dateProtoFuncGetMonth):
1270 (JSC::dateProtoFuncGetUTCMonth):
1271 (JSC::dateProtoFuncGetDate):
1272 (JSC::dateProtoFuncGetUTCDate):
1273 (JSC::dateProtoFuncGetDay):
1274 (JSC::dateProtoFuncGetUTCDay):
1275 (JSC::dateProtoFuncGetHours):
1276 (JSC::dateProtoFuncGetUTCHours):
1277 (JSC::dateProtoFuncGetMinutes):
1278 (JSC::dateProtoFuncGetUTCMinutes):
1279 (JSC::dateProtoFuncGetSeconds):
1280 (JSC::dateProtoFuncGetUTCSeconds):
1281 (JSC::dateProtoFuncGetTimezoneOffset):
1282 (JSC::setNewValueFromTimeArgs):
1283 (JSC::setNewValueFromDateArgs):
1284 (JSC::dateProtoFuncSetYear):
1285 (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
1286 since it no longer has an out parameter. Uses 0 to indicate invalid dates.
1288 2009-10-30 Zoltan Horvath <zoltan@webkit.org>
1290 Reviewed by Darin Adler.
1292 Allow custom memory allocation control for JavaScriptCore's ListHashSet
1293 https://bugs.webkit.org/show_bug.cgi?id=30853
1295 Inherits ListHashSet class from FastAllocBase because it is
1296 instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
1298 * wtf/ListHashSet.h:
1300 2009-10-30 Oliver Hunt <oliver@apple.com>
1302 Reviewed by Gavin Barraclough.
1304 Regression: crash enumerating properties of an object with getters or setters
1305 https://bugs.webkit.org/show_bug.cgi?id=30948
1307 Add a guard to prevent us trying to cache property enumeration on
1308 objects with getters or setters.
1310 * runtime/JSPropertyNameIterator.cpp:
1311 (JSC::JSPropertyNameIterator::create):
1313 2009-10-30 Roland Steiner <rolandsteiner@chromium.org>
1315 Reviewed by Eric Seidel.
1317 Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
1319 Bug 28420 - Implement HTML5 <ruby> rendering
1320 (https://bugs.webkit.org/show_bug.cgi?id=28420)
1322 No new tests (no functional change).
1324 * Configurations/FeatureDefines.xcconfig:
1326 2009-10-29 Oliver Hunt <oliver@apple.com>
1328 Reviewed by Maciej Stachowiak.
1330 REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
1331 https://bugs.webkit.org/show_bug.cgi?id=30947
1332 <rdar://problem/7348833>
1334 The logic for flagging that a structure has non-enumerable properties
1335 was in addPropertyWithoutTransition, rather than in the core Structure::put
1336 method. Despite this I was unable to produce a testcase that caused
1337 the failure that etrade was experiencing, but the new assertion in
1338 getEnumerablePropertyNames triggers on numerous layout tests without
1339 the fix, so in effecti all for..in enumeration in any test ends up
1340 doing the required consistency check.
1342 * runtime/Structure.cpp:
1343 (JSC::Structure::addPropertyWithoutTransition):
1344 (JSC::Structure::put):
1345 (JSC::Structure::getEnumerablePropertyNames):
1346 (JSC::Structure::checkConsistency):
1348 2009-10-29 Gabor Loki <loki@inf.u-szeged.hu>
1350 Reviewed by Gavin Barraclough.
1352 Add cacheFlush support for Thumb-2 on Linux
1353 https://bugs.webkit.org/show_bug.cgi?id=30865
1355 * jit/ExecutableAllocator.h:
1356 (JSC::ExecutableAllocator::cacheFlush):
1358 2009-10-28 Gavin Barraclough <barraclough@apple.com>
1360 Reviewed by Oliver Hunt.
1362 JSC JIT on ARMv7 cannot link jumps >16Mb range
1363 https://bugs.webkit.org/show_bug.cgi?id=30891
1365 Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
1366 In the cases where the jump would fall within a relative jump range, use a relative jump.
1368 * JavaScriptCore.xcodeproj/project.pbxproj:
1369 * assembler/ARMv7Assembler.h:
1370 (JSC::ARMv7Assembler::~ARMv7Assembler):
1371 (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
1372 (JSC::ARMv7Assembler::):
1373 (JSC::ARMv7Assembler::executableCopy):
1374 (JSC::ARMv7Assembler::linkJump):
1375 (JSC::ARMv7Assembler::relinkJump):
1376 (JSC::ARMv7Assembler::setInt32):
1377 (JSC::ARMv7Assembler::isB):
1378 (JSC::ARMv7Assembler::isBX):
1379 (JSC::ARMv7Assembler::isMOV_imm_T3):
1380 (JSC::ARMv7Assembler::isMOVT):
1381 (JSC::ARMv7Assembler::isNOP_T1):
1382 (JSC::ARMv7Assembler::isNOP_T2):
1383 (JSC::ARMv7Assembler::linkJumpAbsolute):
1384 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
1385 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
1386 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
1387 * assembler/MacroAssemblerARMv7.h:
1388 (JSC::MacroAssemblerARMv7::makeJump):
1389 (JSC::MacroAssemblerARMv7::makeBranch):
1393 2009-10-28 Oliver Hunt <oliver@apple.com>
1395 Reviewed by Geoff Garen.
1397 Improve for..in enumeration performance
1398 https://bugs.webkit.org/show_bug.cgi?id=30887
1400 Improve indexing of an object with a for..in iterator by
1401 identifying cases where get_by_val is being used with a iterator
1402 as the subscript and replace it with a new get_by_pname
1403 bytecode. get_by_pname then optimizes lookups that directly access
1406 * bytecode/CodeBlock.cpp:
1407 (JSC::CodeBlock::dump):
1408 * bytecode/Opcode.h:
1409 * bytecompiler/BytecodeGenerator.cpp:
1410 (JSC::BytecodeGenerator::emitGetByVal):
1411 * bytecompiler/BytecodeGenerator.h:
1412 (JSC::BytecodeGenerator::pushOptimisedForIn):
1413 (JSC::BytecodeGenerator::popOptimisedForIn):
1414 * interpreter/Interpreter.cpp:
1415 (JSC::Interpreter::privateExecute):
1417 (JSC::JIT::privateCompileMainPass):
1418 (JSC::JIT::privateCompileSlowCases):
1420 * jit/JITPropertyAccess.cpp:
1421 (JSC::JIT::compileGetDirectOffset):
1422 (JSC::JIT::emit_op_get_by_pname):
1423 (JSC::JIT::emitSlow_op_get_by_pname):
1425 (JSC::ForInNode::emitBytecode):
1426 * runtime/JSObject.h:
1427 * runtime/JSPropertyNameIterator.cpp:
1428 (JSC::JSPropertyNameIterator::create):
1429 * runtime/JSPropertyNameIterator.h:
1430 (JSC::JSPropertyNameIterator::getOffset):
1431 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1432 * runtime/JSValue.h:
1434 * runtime/Structure.cpp:
1435 (JSC::Structure::addPropertyTransition):
1436 (JSC::Structure::changePrototypeTransition):
1437 (JSC::Structure::despecifyFunctionTransition):
1438 (JSC::Structure::addAnonymousSlotsTransition):
1439 (JSC::Structure::getterSetterTransition):
1440 (JSC::Structure::toDictionaryTransition):
1441 (JSC::Structure::addPropertyWithoutTransition):
1442 Track the existence (or not) of non-enumerable properties.
1443 * runtime/Structure.h:
1444 (JSC::Structure::propertyStorageCapacity):
1445 (JSC::Structure::propertyStorageSize):
1446 (JSC::Structure::hasNonEnumerableProperties):
1447 (JSC::Structure::hasAnonymousSlots):
1449 2009-10-28 Dmitry Titov <dimich@chromium.org>
1451 Not reviewed, attemp to fix Windows build.
1453 Touch the cpp file to cause recompile.
1455 * wtf/Threading.cpp:
1456 (WTF::threadEntryPoint):
1458 2009-10-28 Dmitry Titov <dimich@chromium.org>
1460 Reviewed by David Levin.
1462 https://bugs.webkit.org/show_bug.cgi?id=30805
1463 Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
1464 Existing Database tests cover this since Database removes tasks when it is stopped.
1466 * wtf/MessageQueue.h:
1469 2009-10-28 Afonso R. Costa Jr. <afonso.costa@openbossa.org>
1471 Reviewed by Oliver Hunt.
1473 [Qt] Enable YARR when YARR_JIT is enabled
1474 https://bugs.webkit.org/show_bug.cgi?id=30730
1476 When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
1479 * JavaScriptCore.pri:
1481 2009-10-24 Martin Robinson <martin.james.robinson@gmail.com>
1483 Reviewed by Oliver Hunt.
1485 Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
1487 strict-aliasing warnings in JSFunction.h
1488 https://bugs.webkit.org/show_bug.cgi?id=27869
1490 * runtime/JSFunction.h:
1491 (JSC::JSFunction::nativeFunction):
1492 (JSC::JSFunction::scopeChain):
1493 (JSC::JSFunction::setScopeChain):
1494 (JSC::JSFunction::setNativeFunction):
1496 2009-10-28 Jan-Arve Sæther <jan-arve.saether@nokia.com>
1498 Reviewed by Tor Arne Vestbø.
1500 Build-fix for 64-bit Windows
1502 * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
1504 2009-10-28 Gavin Barraclough <barraclough@apple.com>
1506 Reviewed by NOBODY (build fix!).
1510 2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
1512 Rubber-stamped by Darin Adler.
1514 Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
1515 https://bugs.webkit.org/show_bug.cgi?id=30769
1517 When using -fvisibility=hidden to hide all internal symbols by default
1518 the malloc symbols will be hidden as well. For memory instrumentation
1519 it is needed to provide an instrumented version of these symbols and
1520 override the normal routines and by changing the visibility back to
1521 default this becomes possible.
1523 The only other solution would be to use system malloc instead of the
1524 TCmalloc implementation but this will not allow to analyze memory
1525 behavior with the default allocator.
1527 * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
1529 2009-10-27 Gavin Barraclough <barraclough@apple.com>
1531 Rubber Stamped by Samuel Q. Weinig.
1533 Make the asserts protecting the offsets in the JIT more descriptive.
1537 (JSC::JIT::compileOpCall):
1538 * jit/JITPropertyAccess.cpp:
1539 (JSC::JIT::emit_op_method_check):
1540 (JSC::JIT::compileGetByIdHotPath):
1541 (JSC::JIT::compileGetByIdSlowCase):
1542 (JSC::JIT::emit_op_put_by_id):
1544 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1546 Reviewed by Sam Weinig.
1548 A little bit of refactoring in the date code.
1550 * JavaScriptCore.exp: Don't export this unused symbol.
1552 * runtime/DateConstructor.cpp:
1553 (JSC::constructDate):
1555 * runtime/DateInstance.cpp:
1556 (JSC::DateInstance::DateInstance):
1557 * runtime/DateInstance.h: Removed some unused functions. Changed the default
1558 constructor to ensure that a DateInstance is always initialized.
1560 * runtime/DatePrototype.cpp:
1561 (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
1562 since it now requires one.
1565 (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
1566 output will require it. Otherwise, our offset is 0.
1568 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1570 Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
1572 * JavaScriptCore.xcodeproj/project.pbxproj:
1574 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1576 Build fix: re-readded this file.
1578 * runtime/DateInstanceCache.h: Added.
1579 (JSC::DateInstanceData::create):
1580 (JSC::DateInstanceData::DateInstanceData):
1581 (JSC::DateInstanceCache::DateInstanceCache):
1582 (JSC::DateInstanceCache::add):
1583 (JSC::DateInstanceCache::lookup):
1585 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1587 Reviewed by Darin Adler and Oliver Hunt.
1589 https://bugs.webkit.org/show_bug.cgi?id=30800
1590 Cache recently computed date data.
1592 SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
1595 * JavaScriptCore.gypi:
1596 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1597 * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
1599 * runtime/DateInstance.cpp:
1600 (JSC::DateInstance::DateInstance):
1601 (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
1603 * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
1606 * runtime/DatePrototype.cpp:
1607 (JSC::formatLocaleDate):
1608 (JSC::dateProtoFuncToString):
1609 (JSC::dateProtoFuncToUTCString):
1610 (JSC::dateProtoFuncToISOString):
1611 (JSC::dateProtoFuncToDateString):
1612 (JSC::dateProtoFuncToTimeString):
1613 (JSC::dateProtoFuncGetFullYear):
1614 (JSC::dateProtoFuncGetUTCFullYear):
1615 (JSC::dateProtoFuncToGMTString):
1616 (JSC::dateProtoFuncGetMonth):
1617 (JSC::dateProtoFuncGetUTCMonth):
1618 (JSC::dateProtoFuncGetDate):
1619 (JSC::dateProtoFuncGetUTCDate):
1620 (JSC::dateProtoFuncGetDay):
1621 (JSC::dateProtoFuncGetUTCDay):
1622 (JSC::dateProtoFuncGetHours):
1623 (JSC::dateProtoFuncGetUTCHours):
1624 (JSC::dateProtoFuncGetMinutes):
1625 (JSC::dateProtoFuncGetUTCMinutes):
1626 (JSC::dateProtoFuncGetSeconds):
1627 (JSC::dateProtoFuncGetUTCSeconds):
1628 (JSC::dateProtoFuncGetTimezoneOffset):
1629 (JSC::setNewValueFromTimeArgs):
1630 (JSC::setNewValueFromDateArgs):
1631 (JSC::dateProtoFuncSetYear):
1632 (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
1633 can access the DateInstanceCache.
1635 * runtime/JSGlobalData.h: Keep a DateInstanceCache.
1637 2009-10-27 James Robinson <jamesr@chromium.org>
1639 Reviewed by Darin Fisher.
1641 Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
1643 Chromium uses a different method to calculate the current time than is used in
1644 JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
1645 function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use.
1646 See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
1648 https://bugs.webkit.org/show_bug.cgi?id=30833
1650 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1651 * wtf/CurrentTime.cpp:
1653 2009-10-27 Peter Varga <pvarga@inf.u-szeged.hu>
1655 Rubber-stamped by Tor Arne Vestbø.
1657 Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
1660 * yarr/RegexInterpreter.cpp:
1661 (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1662 (JSC::Yarr::ByteCompiler::alternativeDisjunction):
1663 (JSC::Yarr::ByteCompiler::emitDisjunction):
1664 * yarr/RegexJIT.cpp:
1665 (JSC::Yarr::RegexGenerator::generateDisjunction):
1667 2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1669 Reviewed by Darin Adler.
1671 Make .rc files compile on Windows without depending on MFC headers
1672 https://bugs.webkit.org/show_bug.cgi?id=30750
1674 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
1675 winresrc.h because it exists even when MFC is not installed, and is
1676 all that's needed here.
1678 2009-10-26 Gabor Loki <loki@inf.u-szeged.hu>
1680 Reviewed by Gavin Barraclough.
1682 The thunkReturnAddress is on JITStackFrame on ARM JIT as well
1683 https://bugs.webkit.org/show_bug.cgi?id=30782
1685 Move the thunkReturnAddress from top of the stack into the JITStackFrame
1686 structure. This is a requirement for JSValue32_64 support on ARM.
1688 * assembler/MacroAssemblerARM.h:
1689 (JSC::MacroAssemblerARM::ret): Return with link register
1690 (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
1691 * jit/JIT.h: Remove unused ctiReturnRegister
1692 * jit/JITInlineMethods.h: Same as ARMv7
1693 (JSC::JIT::restoreArgumentReference): Ditto.
1694 (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
1695 * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
1696 * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
1697 small trampoline functions which handle return addresses for each
1699 * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
1700 (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
1701 * yarr/RegexJIT.cpp:
1702 (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
1704 2009-10-26 Steve Block <steveblock@google.com>
1706 Reviewed by Darin Adler.
1708 Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
1709 https://bugs.webkit.org/show_bug.cgi?id=30713
1711 * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
1712 * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
1713 * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
1715 2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1717 Reviewed by Holger Freyther.
1719 [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
1720 https://bugs.webkit.org/show_bug.cgi?id=30476
1722 Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
1727 2009-10-23 Steve Block <steveblock@google.com>
1729 Reviewed by Dmitry Titov.
1731 Fixes a leak in createThreadInternal on Android.
1732 https://bugs.webkit.org/show_bug.cgi?id=30698
1734 * wtf/ThreadingPthreads.cpp: Modified.
1735 (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
1737 2009-10-22 Geoffrey Garen <ggaren@apple.com>
1739 Reviewed by Alexey Proskuryakov.
1741 Fixed ASSERT when opening Safari's Caches window while the Web Inspector
1744 * runtime/Collector.cpp:
1745 (JSC::typeName): Added two new types to the type name list in the Collector.
1746 These types have been around for a while, but nobody remembered to consider them here.
1749 (JSC::JSCell::isPropertyNameIterator):
1750 * runtime/JSPropertyNameIterator.h:
1751 (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
1752 a way to tell if a cell is a JSPropertyNameIterator.
1754 2009-10-22 Steve Falkenburg <sfalken@apple.com>
1756 Reviewed by Jon Honeycutt.
1758 https://bugs.webkit.org/show_bug.cgi?id=30686
1759 Remove debug-specific def file.
1760 Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
1761 that target is only used internally, maintaining two files just to
1762 suppress a single link warning isn't worthwhile.
1764 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1765 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
1767 2009-10-21 Jon Honeycutt <jhoneycutt@apple.com>
1769 <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
1770 <rdar://problem/7270314> After halting a transparent PluginView on
1771 Windows, the transparency is applied twice
1773 Reviewed by Dan Bernstein.
1775 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1776 Export WTF::deleteOwnedPtr(HDC).
1778 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1781 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1783 Windows build fix: updated variable name.
1785 * runtime/DatePrototype.cpp:
1786 (JSC::formatLocaleDate):
1788 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1790 Reviewed by Mark Rowe.
1792 * jit/JITOpcodes.cpp:
1793 (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
1794 size of a JSValue because m_jsStrings is an array of JSValues.
1796 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1798 Reviewed by Mark Rowe.
1800 Fixed a 64-bit regression caused by the fix for
1801 https://bugs.webkit.org/show_bug.cgi?id=30570.
1803 * jit/JITOpcodes.cpp:
1804 (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
1805 64-bit pointers are eight bytes long.
1807 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1809 Reviewed by Sam Weinig.
1811 Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
1812 caller doesn't need to supply the DateInstance's own internal value to
1815 * runtime/DateInstance.cpp:
1816 (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
1818 * runtime/DateInstance.h:
1819 * runtime/DatePrototype.cpp:
1820 (JSC::formatLocaleDate):
1821 (JSC::dateProtoFuncToString):
1822 (JSC::dateProtoFuncToUTCString):
1823 (JSC::dateProtoFuncToISOString):
1824 (JSC::dateProtoFuncToDateString):
1825 (JSC::dateProtoFuncToTimeString):
1826 (JSC::dateProtoFuncToLocaleString):
1827 (JSC::dateProtoFuncToLocaleDateString):
1828 (JSC::dateProtoFuncToLocaleTimeString):
1829 (JSC::dateProtoFuncGetTime):
1830 (JSC::dateProtoFuncGetFullYear):
1831 (JSC::dateProtoFuncGetUTCFullYear):
1832 (JSC::dateProtoFuncToGMTString):
1833 (JSC::dateProtoFuncGetMonth):
1834 (JSC::dateProtoFuncGetUTCMonth):
1835 (JSC::dateProtoFuncGetDate):
1836 (JSC::dateProtoFuncGetUTCDate):
1837 (JSC::dateProtoFuncGetDay):
1838 (JSC::dateProtoFuncGetUTCDay):
1839 (JSC::dateProtoFuncGetHours):
1840 (JSC::dateProtoFuncGetUTCHours):
1841 (JSC::dateProtoFuncGetMinutes):
1842 (JSC::dateProtoFuncGetUTCMinutes):
1843 (JSC::dateProtoFuncGetSeconds):
1844 (JSC::dateProtoFuncGetUTCSeconds):
1845 (JSC::dateProtoFuncGetTimezoneOffset):
1846 (JSC::setNewValueFromTimeArgs):
1847 (JSC::setNewValueFromDateArgs):
1848 (JSC::dateProtoFuncSetYear):
1849 (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
1851 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
1853 Reviewed by Geoffrey Garen.
1855 The op_next_pname should use 4 bytes addressing mode in case of JSValue32
1856 https://bugs.webkit.org/show_bug.cgi?id=30570
1858 * jit/JITOpcodes.cpp:
1859 (JSC::JIT::emit_op_next_pname):
1861 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
1863 Reviewed by Oliver Hunt.
1865 Move OverridesMarkChildren flag from DatePrototype to its parent class
1866 https://bugs.webkit.org/show_bug.cgi?id=30372
1868 * runtime/DateInstance.h:
1869 (JSC::DateInstance::createStructure):
1870 * runtime/DatePrototype.h:
1872 2009-10-19 Geoffrey Garen <ggaren@apple.com>
1874 Reviewed by Oliver Hunt.
1876 Tightened up some put_by_id_transition code generation.
1877 https://bugs.webkit.org/show_bug.cgi?id=30539
1880 * jit/JITPropertyAccess.cpp:
1881 (JSC::JIT::testPrototype):
1882 (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
1883 checks or read Structures and prototypes from objects: they're all known
1884 constants at compile time.
1886 2009-10-19 Geoffrey Garen <ggaren@apple.com>
1888 Reviewed by Sam Weinig.
1890 Added a private API for getting a global context from a context, for
1891 clients who want to preserve a context for a later callback.
1894 (toGlobalRef): Added an ASSERT, since this function is used more often
1897 * API/JSContextRef.cpp:
1898 * API/JSContextRefPrivate.h: Added. The new API.
1900 * API/tests/testapi.c:
1901 (print_callAsFunction):
1902 (main): Test the new API.
1904 * JavaScriptCore.exp:
1905 * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
1907 2009-10-17 Geoffrey Garen <ggaren@apple.com>
1909 Reviewed by Oliver Hunt.
1911 Tightened up some instanceof code generation.
1912 https://bugs.webkit.org/show_bug.cgi?id=30488
1914 * jit/JITOpcodes.cpp:
1915 (JSC::JIT::emit_op_instanceof):
1916 (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks -
1917 cell type checks and ImplementsDefaultHasIntance checks implicitly
1918 supersede object type checks.
1920 2009-10-18 Kwang Yul Seo <skyul@company100.net>
1922 Reviewed by Darin Adler.
1924 Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
1925 https://bugs.webkit.org/show_bug.cgi?id=30474
1927 stricmp and strnicmp are deprecated beginning in Visual
1928 C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
1930 * wtf/StringExtras.h:
1934 2009-10-16 Geoffrey Garen <ggaren@apple.com>
1936 Build fix: apparently we shouldn't export those symbols?
1938 * JavaScriptCore.exp:
1940 2009-10-16 Geoffrey Garen <ggaren@apple.com>
1942 Build fix: export some symbols.
1944 * JavaScriptCore.exp:
1946 2009-10-16 Oliver Hunt <oliver@apple.com>
1948 Reviewed by Gavin Barraclough.
1950 structure typeinfo flags should be inherited.
1951 https://bugs.webkit.org/show_bug.cgi?id=30468
1953 Add StructureFlag constant to the various JSC classes and use
1954 it for the TypeInfo construction. This allows us to simply
1955 accumulate flags by basing each classes StructureInfo on its parents.
1957 * API/JSCallbackConstructor.h:
1958 (JSC::JSCallbackConstructor::createStructure):
1959 * API/JSCallbackFunction.h:
1960 (JSC::JSCallbackFunction::createStructure):
1961 * API/JSCallbackObject.h:
1962 (JSC::JSCallbackObject::createStructure):
1963 * debugger/DebuggerActivation.h:
1964 (JSC::DebuggerActivation::createStructure):
1965 * runtime/Arguments.h:
1966 (JSC::Arguments::createStructure):
1967 * runtime/BooleanObject.h:
1968 (JSC::BooleanObject::createStructure):
1969 * runtime/DatePrototype.h:
1970 (JSC::DatePrototype::createStructure):
1971 * runtime/FunctionPrototype.h:
1972 (JSC::FunctionPrototype::createStructure):
1973 * runtime/GlobalEvalFunction.h:
1974 (JSC::GlobalEvalFunction::createStructure):
1975 * runtime/InternalFunction.h:
1976 (JSC::InternalFunction::createStructure):
1977 * runtime/JSActivation.h:
1978 (JSC::JSActivation::createStructure):
1979 * runtime/JSArray.h:
1980 (JSC::JSArray::createStructure):
1981 * runtime/JSByteArray.cpp:
1982 (JSC::JSByteArray::createStructure):
1983 * runtime/JSByteArray.h:
1984 * runtime/JSFunction.h:
1985 (JSC::JSFunction::createStructure):
1986 * runtime/JSGlobalObject.h:
1987 (JSC::JSGlobalObject::createStructure):
1988 * runtime/JSNotAnObject.h:
1989 (JSC::JSNotAnObject::createStructure):
1990 * runtime/JSONObject.h:
1991 (JSC::JSONObject::createStructure):
1992 * runtime/JSObject.h:
1993 (JSC::JSObject::createStructure):
1994 * runtime/JSStaticScopeObject.h:
1995 (JSC::JSStaticScopeObject::createStructure):
1996 * runtime/JSVariableObject.h:
1997 (JSC::JSVariableObject::createStructure):
1998 * runtime/JSWrapperObject.h:
1999 (JSC::JSWrapperObject::createStructure):
2000 * runtime/MathObject.h:
2001 (JSC::MathObject::createStructure):
2002 * runtime/NumberConstructor.h:
2003 (JSC::NumberConstructor::createStructure):
2004 * runtime/NumberObject.h:
2005 (JSC::NumberObject::createStructure):
2006 * runtime/RegExpConstructor.h:
2007 (JSC::RegExpConstructor::createStructure):
2008 * runtime/RegExpObject.h:
2009 (JSC::RegExpObject::createStructure):
2010 * runtime/StringObject.h:
2011 (JSC::StringObject::createStructure):
2012 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2013 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2015 2009-10-16 Geoffrey Garen <ggaren@apple.com>
2017 Reviewed by Oliver Hunt.
2019 Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
2020 in JSPropertyNameIterator; inline more code.
2022 1.024x as fast on SunSpider (fasta: 1.43x as fast).
2024 * bytecode/CodeBlock.cpp:
2025 (JSC::CodeBlock::dump):
2026 * bytecode/Opcode.h:
2027 * bytecompiler/BytecodeGenerator.cpp:
2028 (JSC::BytecodeGenerator::emitGetPropertyNames):
2029 (JSC::BytecodeGenerator::emitNextPropertyName):
2030 * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
2031 op_get_pnames and op_next_pname so that we can track iteration state
2032 in the register file instead of in the JSPropertyNameIterator. (To be
2033 cacheable, the JSPropertyNameIterator must be stateless.)
2035 * interpreter/Interpreter.cpp:
2036 (JSC::Interpreter::tryCachePutByID):
2037 (JSC::Interpreter::tryCacheGetByID): Updated for rename to
2038 "normalizePrototypeChain" and removal of "isCacheable".
2040 (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
2041 iteration state tracking.
2044 (JSC::JIT::privateCompileMainPass):
2046 * jit/JITOpcodes.cpp:
2047 (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
2048 iteration state tracking.
2050 (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
2053 (JSC::JITThunks::tryCachePutByID):
2054 (JSC::JITThunks::tryCacheGetByID): Updated for rename to
2055 "normalizePrototypeChain" and removal of "isCacheable".
2057 (JSC::DEFINE_STUB_FUNCTION):
2059 (JSC::): Added has_property and to_object stubs. Removed op_next_pname
2060 stub, since has_property is all we need anymore.
2063 (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
2064 iteration state tracking.
2067 * runtime/JSObject.cpp:
2068 (JSC::JSObject::getPropertyNames): Don't do caching at this layer
2069 anymore, since we don't create a JSPropertyNameIterator at this layer.
2071 * runtime/JSPropertyNameIterator.cpp:
2072 (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
2073 (JSC::JSPropertyNameIterator::get): Updated for in-RegisterFile
2074 iteration state tracking.
2075 (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
2077 * runtime/JSPropertyNameIterator.h:
2078 (JSC::JSPropertyNameIterator::size):
2079 (JSC::JSPropertyNameIterator::setCachedStructure):
2080 (JSC::JSPropertyNameIterator::cachedStructure):
2081 (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
2082 (JSC::JSPropertyNameIterator::cachedPrototypeChain):
2083 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2084 (JSC::Structure::setEnumerationCache): Don't store iteration state in
2085 a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
2088 * runtime/JSValue.h:
2090 * runtime/MarkStack.h: Make those mischievous #include gods happy.
2092 * runtime/ObjectConstructor.cpp:
2094 * runtime/Operations.h:
2095 (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
2096 to normalizePrototypeChain, since it changes dictionary prototypes to
2097 non-dictionary objects.
2099 * runtime/PropertyNameArray.cpp:
2100 (JSC::PropertyNameArray::add):
2101 * runtime/PropertyNameArray.h:
2102 (JSC::PropertyNameArrayData::PropertyNameArrayData):
2103 (JSC::PropertyNameArray::data):
2104 (JSC::PropertyNameArray::size):
2105 (JSC::PropertyNameArray::begin):
2106 (JSC::PropertyNameArray::end): Simplified some code here to help with
2107 current and future refactoring.
2109 * runtime/Protect.h:
2110 * runtime/Structure.cpp:
2111 (JSC::Structure::~Structure):
2112 (JSC::Structure::addPropertyWithoutTransition):
2113 (JSC::Structure::removePropertyWithoutTransition): No need to clear
2114 the enumeration cache with adding / removing properties without
2115 transition. It is an error to add / remove properties without transition
2116 once an object has been observed, and we can ASSERT to catch that.
2118 * runtime/Structure.h:
2119 (JSC::Structure::enumerationCache): Changed the enumeration cache to
2120 hold a JSPropertyNameIterator.
2122 * runtime/StructureChain.cpp:
2123 * runtime/StructureChain.h:
2124 (JSC::StructureChain::head): Removed StructureChain::isCacheable because
2125 it was wrong-headed in two ways: (1) It gave up when a prototype was a
2126 dictionary, but instead we want un-dictionary heavily accessed
2127 prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
2128 a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
2129 is only releavant to for-in caching.
2131 2009-10-16 Steve Falkenburg <sfalken@apple.com>
2133 Reviewed by Adam Roben.
2135 Add a Debug_All configuration to build entire stack as debug.
2136 Change Debug_Internal to:
2137 - stop using _debug suffix for all WebKit/Safari binaries
2138 - not use _debug as a DLL naming suffix
2139 - use non-debug C runtime lib.
2141 * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
2142 * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
2143 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
2144 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
2145 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
2146 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
2147 * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
2148 * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
2150 2009-10-16 Oliver Hunt <oliver@apple.com>
2152 Reviewed by Gavin Barraclough.
2154 Make typeinfo flags default to false
2155 https://bugs.webkit.org/show_bug.cgi?id=30372
2157 Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
2160 * API/JSCallbackConstructor.h:
2161 (JSC::JSCallbackConstructor::createStructure):
2162 * API/JSCallbackObject.h:
2163 (JSC::JSCallbackObject::createStructure):
2164 * debugger/DebuggerActivation.h:
2165 (JSC::DebuggerActivation::createStructure):
2166 * runtime/Arguments.h:
2167 (JSC::Arguments::createStructure):
2168 * runtime/BooleanObject.h:
2169 (JSC::BooleanObject::createStructure):
2170 * runtime/DatePrototype.h:
2171 (JSC::DatePrototype::createStructure):
2172 * runtime/FunctionPrototype.h:
2173 (JSC::FunctionPrototype::createStructure):
2174 * runtime/GlobalEvalFunction.h:
2175 (JSC::GlobalEvalFunction::createStructure):
2176 * runtime/JSAPIValueWrapper.h:
2177 (JSC::JSAPIValueWrapper::createStructure):
2178 * runtime/JSActivation.h:
2179 (JSC::JSActivation::createStructure):
2180 * runtime/JSArray.h:
2181 (JSC::JSArray::createStructure):
2182 * runtime/JSByteArray.cpp:
2183 (JSC::JSByteArray::createStructure):
2184 * runtime/JSFunction.h:
2185 (JSC::JSFunction::createStructure):
2186 * runtime/JSGlobalObject.h:
2187 (JSC::JSGlobalObject::createStructure):
2188 * runtime/JSNotAnObject.h:
2189 (JSC::JSNotAnObject::createStructure):
2190 * runtime/JSONObject.h:
2191 (JSC::JSONObject::createStructure):
2192 * runtime/JSObject.cpp:
2193 (JSC::JSObject::getPropertyNames):
2194 * runtime/JSObject.h:
2195 (JSC::JSObject::createStructure):
2196 * runtime/JSStaticScopeObject.h:
2197 (JSC::JSStaticScopeObject::createStructure):
2198 * runtime/JSTypeInfo.h:
2199 (JSC::TypeInfo::overridesGetPropertyNames):
2200 * runtime/JSVariableObject.h:
2201 (JSC::JSVariableObject::createStructure):
2202 * runtime/JSWrapperObject.h:
2203 (JSC::JSWrapperObject::createStructure):
2204 * runtime/MathObject.h:
2205 (JSC::MathObject::createStructure):
2206 * runtime/NumberConstructor.h:
2207 (JSC::NumberConstructor::createStructure):
2208 * runtime/NumberObject.h:
2209 (JSC::NumberObject::createStructure):
2210 * runtime/RegExpConstructor.h:
2211 (JSC::RegExpConstructor::createStructure):
2212 * runtime/RegExpObject.h:
2213 (JSC::RegExpObject::createStructure):
2214 * runtime/StringObject.h:
2215 (JSC::StringObject::createStructure):
2216 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2217 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2218 * runtime/StructureChain.cpp:
2219 (JSC::StructureChain::isCacheable):
2221 2009-10-16 Kevin Ollivier <kevino@theolliviers.com>
2223 wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion
2228 2009-10-16 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2230 Reviewed by Simon Hausmann.
2232 [Qt] Implement ExecutableAllocator for Symbian
2233 https://bugs.webkit.org/show_bug.cgi?id=29946
2235 Tested with YARR JIT enabled for Symbian;
2236 This patch does not (yet) enable YARR JIT by default.
2238 * JavaScriptCore.pri:
2239 * jit/ExecutableAllocator.h:
2240 * jit/ExecutableAllocatorSymbian.cpp: Added.
2241 (JSC::ExecutableAllocator::intializePageSize):
2242 (JSC::ExecutablePool::systemAlloc):
2243 (JSC::ExecutablePool::systemRelease):
2245 2009-10-15 Oliver Hunt <oliver@apple.com>
2247 Reviewed by Darin Adler.
2249 Make typeinfo flags default to false
2250 https://bugs.webkit.org/show_bug.cgi?id=30372
2252 Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
2254 * API/JSCallbackConstructor.h:
2255 (JSC::JSCallbackConstructor::createStructure):
2256 * API/JSCallbackFunction.h:
2257 (JSC::JSCallbackFunction::createStructure):
2258 * API/JSCallbackObject.h:
2259 (JSC::JSCallbackObject::createStructure):
2260 * debugger/DebuggerActivation.h:
2261 (JSC::DebuggerActivation::createStructure):
2262 * runtime/Arguments.h:
2263 (JSC::Arguments::createStructure):
2264 * runtime/BooleanObject.h:
2265 (JSC::BooleanObject::createStructure):
2266 * runtime/DatePrototype.h:
2267 (JSC::DatePrototype::createStructure):
2268 * runtime/FunctionPrototype.h:
2269 (JSC::FunctionPrototype::createStructure):
2270 * runtime/GetterSetter.h:
2271 (JSC::GetterSetter::createStructure):
2272 * runtime/GlobalEvalFunction.h:
2273 (JSC::GlobalEvalFunction::createStructure):
2274 * runtime/InternalFunction.h:
2275 (JSC::InternalFunction::createStructure):
2276 * runtime/JSAPIValueWrapper.h:
2277 (JSC::JSAPIValueWrapper::createStructure):
2278 * runtime/JSActivation.h:
2279 (JSC::JSActivation::createStructure):
2280 * runtime/JSArray.h:
2281 (JSC::JSArray::createStructure):
2282 (JSC::MarkStack::markChildren):
2283 * runtime/JSByteArray.cpp:
2284 (JSC::JSByteArray::createStructure):
2285 * runtime/JSFunction.h:
2286 (JSC::JSFunction::createStructure):
2287 * runtime/JSGlobalObject.h:
2288 (JSC::JSGlobalObject::createStructure):
2289 * runtime/JSNotAnObject.h:
2290 (JSC::JSNotAnObject::createStructure):
2291 * runtime/JSNumberCell.h:
2292 (JSC::JSNumberCell::createStructure):
2293 * runtime/JSONObject.h:
2294 (JSC::JSONObject::createStructure):
2295 * runtime/JSObject.h:
2296 (JSC::JSObject::createStructure):
2297 * runtime/JSPropertyNameIterator.h:
2298 (JSC::JSPropertyNameIterator::createStructure):
2299 * runtime/JSStaticScopeObject.h:
2300 (JSC::JSStaticScopeObject::createStructure):
2301 * runtime/JSString.h:
2302 (JSC::JSString::createStructure):
2303 * runtime/JSTypeInfo.h:
2304 (JSC::TypeInfo::overridesMarkChildren):
2305 * runtime/JSVariableObject.h:
2306 (JSC::JSVariableObject::createStructure):
2307 * runtime/JSWrapperObject.h:
2308 (JSC::JSWrapperObject::createStructure):
2309 * runtime/MathObject.h:
2310 (JSC::MathObject::createStructure):
2311 * runtime/NumberConstructor.h:
2312 (JSC::NumberConstructor::createStructure):
2313 * runtime/NumberObject.h:
2314 (JSC::NumberObject::createStructure):
2315 * runtime/RegExpConstructor.h:
2316 (JSC::RegExpConstructor::createStructure):
2317 * runtime/RegExpObject.h:
2318 (JSC::RegExpObject::createStructure):
2319 * runtime/StringObject.h:
2320 (JSC::StringObject::createStructure):
2321 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2322 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2324 2009-10-14 Oliver Hunt <oliver@apple.com>
2326 Reviewed by Geoff Garen.
2328 Make typeinfo flags default to false
2329 https://bugs.webkit.org/show_bug.cgi?id=30372
2331 Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
2333 * API/JSCallbackConstructor.h:
2334 (JSC::JSCallbackConstructor::createStructure):
2335 * API/JSCallbackFunction.h:
2336 (JSC::JSCallbackFunction::createStructure):
2337 * API/JSCallbackObject.h:
2338 (JSC::JSCallbackObject::createStructure):
2339 * debugger/DebuggerActivation.h:
2340 (JSC::DebuggerActivation::createStructure):
2342 (JSC::DEFINE_STUB_FUNCTION):
2343 * runtime/Arguments.h:
2344 (JSC::Arguments::createStructure):
2345 * runtime/BooleanObject.h:
2346 (JSC::BooleanObject::createStructure):
2347 * runtime/DatePrototype.h:
2348 (JSC::DatePrototype::createStructure):
2349 * runtime/FunctionPrototype.h:
2350 (JSC::FunctionPrototype::createStructure):
2351 * runtime/GlobalEvalFunction.h:
2352 (JSC::GlobalEvalFunction::createStructure):
2353 * runtime/InternalFunction.h:
2354 (JSC::InternalFunction::createStructure):
2355 * runtime/JSActivation.h:
2356 (JSC::JSActivation::createStructure):
2357 * runtime/JSArray.h:
2358 (JSC::JSArray::createStructure):
2359 * runtime/JSByteArray.cpp:
2360 (JSC::JSByteArray::createStructure):
2361 * runtime/JSFunction.h:
2362 (JSC::JSFunction::createStructure):
2363 * runtime/JSGlobalObject.h:
2364 (JSC::JSGlobalObject::createStructure):
2365 * runtime/JSNumberCell.h:
2366 (JSC::JSNumberCell::createStructure):
2367 * runtime/JSONObject.h:
2368 (JSC::JSONObject::createStructure):
2369 * runtime/JSObject.h:
2370 (JSC::JSObject::createStructure):
2371 (JSC::JSCell::fastGetOwnPropertySlot):
2372 * runtime/JSStaticScopeObject.h:
2373 (JSC::JSStaticScopeObject::createStructure):
2374 * runtime/JSString.h:
2375 (JSC::JSString::createStructure):
2376 * runtime/JSTypeInfo.h:
2377 (JSC::TypeInfo::overridesGetOwnPropertySlot):
2378 * runtime/JSVariableObject.h:
2379 (JSC::JSVariableObject::createStructure):
2380 * runtime/JSWrapperObject.h:
2381 (JSC::JSWrapperObject::createStructure):
2382 * runtime/MathObject.h:
2383 (JSC::MathObject::createStructure):
2384 * runtime/NumberConstructor.h:
2385 (JSC::NumberConstructor::createStructure):
2386 * runtime/NumberObject.h:
2387 (JSC::NumberObject::createStructure):
2388 * runtime/RegExpConstructor.h:
2389 (JSC::RegExpConstructor::createStructure):
2390 * runtime/RegExpObject.h:
2391 (JSC::RegExpObject::createStructure):
2392 * runtime/StringObject.h:
2393 (JSC::StringObject::createStructure):
2394 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2395 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2397 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
2398 2009-10-14 Darin Adler <darin@apple.com>
2400 Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
2401 can build on Windows.
2403 * wtf/MathExtras.h: Added llround and llroundf for Windows.
2405 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
2407 wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
2411 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2413 Reviewed by Simon Hausmann.
2415 Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2416 https://bugs.webkit.org/show_bug.cgi?id=30278
2418 Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2419 from the make system into common code.
2423 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2425 Reviewed by Darin Adler.
2427 ARM compiler does not understand reinterpret_cast<void*>
2428 https://bugs.webkit.org/show_bug.cgi?id=29034
2430 Change reinterpret_cast<void*> to regular C style (void*) cast
2431 for the ARM RVCT compiler.
2433 * assembler/MacroAssemblerCodeRef.h:
2434 (JSC::FunctionPtr::FunctionPtr):
2435 * jit/JITOpcodes.cpp: Cast to FunctionPtr first
2436 instead of directly casting to reinterpret_cast
2437 * jit/JITStubCall.h: Ditto + change the type of m_stub
2438 from void* to FunctionPtr.
2439 (JSC::JITStubCall::JITStubCall):
2440 (JSC::JITStubCall::call):
2441 * jit/JITStubs.cpp: Ditto.
2442 (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
2444 2009-10-11 Oliver Hunt <oliver@apple.com>
2450 2009-10-10 Oliver Hunt <oliver@apple.com>
2452 Reviewed by Maciej Stachowiak.
2454 Support for String.trim(), String.trimLeft() and String.trimRight() methods
2455 https://bugs.webkit.org/show_bug.cgi?id=26590
2457 Implement trim, trimLeft, and trimRight
2459 * runtime/StringPrototype.cpp:
2460 (JSC::isTrimWhitespace):
2461 Our normal string whitespace function does not include U+200B which
2462 is needed for compatibility with mozilla's implementation of trim.
2463 U+200B does not appear to be expected according to spec, however I am
2464 choosing to be lax, and match mozilla behavior so have added this
2468 2009-10-09 Geoffrey Garen <ggaren@apple.com>
2470 Reviewed by Oliver Hunt.
2472 Eliminated some legacy bytecode weirdness.
2474 Use vPC[x] subscripting instead of ++vPC to access instruction operands.
2475 This is simpler, and often more efficient.
2477 To support this, and to remove use of hard-coded offsets in bytecode and
2478 JIT code generation and dumping, calculate jump offsets from the beginning
2479 of an instruction, rather than the middle or end.
2481 Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
2484 SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
2487 * bytecode/CodeBlock.cpp:
2488 (JSC::printConditionalJump):
2489 (JSC::CodeBlock::dump):
2490 * bytecompiler/BytecodeGenerator.cpp:
2491 (JSC::BytecodeGenerator::emitJump):
2492 (JSC::BytecodeGenerator::emitJumpIfTrue):
2493 (JSC::BytecodeGenerator::emitJumpIfFalse):
2494 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2495 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2496 (JSC::BytecodeGenerator::emitComplexJumpScopes):
2497 (JSC::BytecodeGenerator::emitJumpScopes):
2498 (JSC::BytecodeGenerator::emitNextPropertyName):
2499 (JSC::BytecodeGenerator::emitCatch):
2500 (JSC::BytecodeGenerator::emitJumpSubroutine):
2501 (JSC::prepareJumpTableForImmediateSwitch):
2502 (JSC::prepareJumpTableForCharacterSwitch):
2503 (JSC::prepareJumpTableForStringSwitch):
2504 (JSC::BytecodeGenerator::endSwitch):
2505 * bytecompiler/Label.h:
2506 (JSC::Label::setLocation):
2508 * interpreter/Interpreter.cpp:
2509 (JSC::Interpreter::resolve):
2510 (JSC::Interpreter::resolveSkip):
2511 (JSC::Interpreter::resolveGlobal):
2512 (JSC::Interpreter::resolveBase):
2513 (JSC::Interpreter::resolveBaseAndProperty):
2514 (JSC::Interpreter::createExceptionScope):
2515 (JSC::Interpreter::privateExecute):
2516 * interpreter/Interpreter.h:
2518 (JSC::JIT::privateCompile):
2519 * jit/JITArithmetic.cpp:
2520 (JSC::JIT::emit_op_jnless):
2521 (JSC::JIT::emitSlow_op_jnless):
2522 (JSC::JIT::emit_op_jnlesseq):
2523 (JSC::JIT::emitSlow_op_jnlesseq):
2524 (JSC::JIT::emitBinaryDoubleOp):
2525 * jit/JITOpcodes.cpp:
2526 (JSC::JIT::emit_op_jmp):
2527 (JSC::JIT::emit_op_loop):
2528 (JSC::JIT::emit_op_loop_if_less):
2529 (JSC::JIT::emitSlow_op_loop_if_less):
2530 (JSC::JIT::emit_op_loop_if_lesseq):
2531 (JSC::JIT::emitSlow_op_loop_if_lesseq):
2532 (JSC::JIT::emit_op_loop_if_true):
2533 (JSC::JIT::emitSlow_op_loop_if_true):
2534 (JSC::JIT::emit_op_jfalse):
2535 (JSC::JIT::emitSlow_op_jfalse):
2536 (JSC::JIT::emit_op_jtrue):
2537 (JSC::JIT::emitSlow_op_jtrue):
2538 (JSC::JIT::emit_op_jeq_null):
2539 (JSC::JIT::emit_op_jneq_null):
2540 (JSC::JIT::emit_op_jneq_ptr):
2541 (JSC::JIT::emit_op_jsr):
2542 (JSC::JIT::emit_op_next_pname):
2543 (JSC::JIT::emit_op_jmp_scopes):
2545 2009-10-09 Geoffrey Garen <ggaren@apple.com>
2547 Reviewed by Sam Weinig.
2549 Migrated some code that didn't belong out of Structure.
2551 SunSpider says maybe 1.03x faster.
2553 * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
2554 a Structure's prototype the direct responsility of the object using it.
2555 (Giving Structure a mark function was misleading because it implied that
2556 all live structures get marked during GC, when they don't.)
2558 * runtime/JSGlobalObject.cpp:
2559 (JSC::markIfNeeded):
2560 (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
2561 on the global object. Maybe this wasn't necessary, but now we don't have
2564 * runtime/JSObject.cpp:
2565 (JSC::JSObject::getPropertyNames):
2566 (JSC::JSObject::getOwnPropertyNames):
2567 (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
2568 * runtime/JSObject.h:
2569 (JSC::JSObject::markChildrenDirect):
2570 * runtime/PropertyNameArray.h:
2571 * runtime/Structure.cpp:
2572 * runtime/Structure.h:
2573 (JSC::Structure::setEnumerationCache):
2574 (JSC::Structure::enumerationCache): Moved property name gathering code
2575 from Structure to JSObject because having a Structure iterate its JSObject
2576 was a layering violation. A JSObject is implemented using a Structure; not
2577 the other way around.
2579 2009-10-09 Mark Rowe <mrowe@apple.com>
2581 Attempt to fix the GTK release build.
2583 * GNUmakefile.am: Include Grammar.cpp in release builds now that
2584 AllInOneFile.cpp is gone.
2586 2009-10-09 Gabor Loki <loki@inf.u-szeged.hu>
2588 Rubber-stamped by Eric Seidel.
2590 Add ARM JIT support for Gtk port (disabled by default)
2591 https://bugs.webkit.org/show_bug.cgi?id=30228
2595 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2597 Tiger build fix: added a few more variable initializations.
2599 * runtime/StringPrototype.cpp:
2600 (JSC::stringProtoFuncReplace):
2601 (JSC::stringProtoFuncSearch):
2603 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2605 Qt build fix: added missing #include.
2609 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2611 Tiger build fix: initialize variable whose initialization the compiler
2612 can't otherwise figure out.
2614 * runtime/RegExpObject.cpp:
2615 (JSC::RegExpObject::match):
2617 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2619 Windows build fix: updated exports.
2621 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2622 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2624 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2626 Tiger build fix: fixed file name case.
2628 * JavaScriptCore.xcodeproj/project.pbxproj:
2630 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2632 Reviewed by Maciej Stachowiak.
2634 At long last, I pronounce the death of AllInOneFile.cpp.
2636 SunSpider reports a 1.01x speedup.
2638 * AllInOneFile.cpp: Removed.
2640 * JavaScriptCore.exp:
2641 * JavaScriptCore.gypi:
2642 * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
2643 to compilation stages.
2649 * runtime/ArrayConstructor.cpp:
2650 (JSC::constructArrayWithSizeQuirk):
2651 * runtime/Collector.h:
2652 * runtime/JSCell.cpp:
2653 (JSC::JSCell::operator new):
2655 (JSC::JSCell::operator new):
2656 * runtime/JSGlobalObject.cpp:
2657 (JSC::JSGlobalObject::operator new):
2658 * runtime/JSNumberCell.h:
2659 (JSC::JSNumberCell::operator new):
2660 * runtime/JSString.cpp:
2661 * runtime/JSString.h:
2664 (JSC::jsOwnedString):
2665 * runtime/RegExpConstructor.cpp:
2666 * runtime/RegExpConstructor.h:
2667 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
2668 (JSC::RegExpConstructorPrivate::lastOvector):
2669 (JSC::RegExpConstructorPrivate::tempOvector):
2670 (JSC::RegExpConstructorPrivate::changeLastOvector):
2671 (JSC::RegExpConstructor::performMatch):
2672 * runtime/StringPrototype.cpp:
2673 (JSC::stringProtoFuncMatch):
2674 * yarr/RegexJIT.cpp:
2676 (JSC::Yarr::executeRegex): Inlined a few things that Shark said
2677 were hot, on the presumption that AllInOneFile.cpp used to inline them
2680 2009-10-08 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
2682 Reviewed by Gavin Barraclough.
2684 Fix for JIT'ed op_call instructions (evals, constructs, etc.)
2685 when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
2687 https://bugs.webkit.org/show_bug.cgi?id=30201
2690 (JSC::JIT::compileOpCall):
2692 2009-10-07 Geoffrey Garen <ggaren@apple.com>
2694 Windows build fix: removed no longer exported symbol.
2696 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2697 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2699 2009-10-07 Geoffrey Garen <ggaren@apple.com>
2701 Reviewed by Oliver Hunt.
2703 Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
2704 thread, permanently slowing down JavaScript
2706 Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
2707 since WebCore no longer uses it.
2709 * JavaScriptCore.exp:
2710 * runtime/Collector.cpp:
2711 (JSC::Heap::protect):
2712 (JSC::Heap::unprotect):
2713 (JSC::Heap::markProtectedObjects):
2714 (JSC::Heap::protectedGlobalObjectCount):
2715 (JSC::Heap::protectedObjectCount):
2716 (JSC::Heap::protectedObjectTypeCounts):
2717 * runtime/Collector.h:
2719 2009-10-07 Zoltan Horvath <zoltan@webkit.org>
2721 Reviewed by Darin Adler.
2723 Allow custom memory allocation control for JavaScriptCore's IdentifierArena
2724 https://bugs.webkit.org/show_bug.cgi?id=30158
2726 Inherits IdentifierArena class from FastAllocBase because it has been
2727 instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
2729 * parser/ParserArena.h:
2731 2009-10-07 Adam Roben <aroben@apple.com>
2733 Export DateInstance::info in a way that works on Windows
2735 Fixes <http://webkit.org/b/30171>
2736 fast/dom/Window/window-postmessage-clone.html fails on Windows
2738 Reviewed by Anders Carlsson.
2740 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2741 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2742 Removed the export of DateInstance::info from here.
2744 * runtime/DateInstance.h: Use JS_EXPORTDATA to export
2745 DateInstance::info, which is the required way of exporting data on
2748 2009-10-07 Jørgen Lind <jorgen.lind@nokia.com>
2750 Reviewed by Simon Hausmann.
2752 When enabling or disabling the JIT through .qmake.cache, make sure
2753 to also toggle ENABLE_YARR_JIT.
2755 * JavaScriptCore.pri:
2757 2009-10-06 Priit Laes <plaes@plaes.org>
2759 Reviewed by Gavin Barraclough.
2761 Linking fails with "relocation R_X86_64_PC32 against symbol
2763 https://bugs.webkit.org/show_bug.cgi?id=28422
2766 Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
2767 in text segment causing relocation errors on amd64 architecture.
2768 Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
2770 2009-10-06 Oliver Hunt <oliver@apple.com>
2774 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2775 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2777 2009-10-06 Oliver Hunt <oliver@apple.com>
2779 Reviewed by NOBODY (build fix).
2783 * runtime/DateInstance.cpp:
2785 2009-10-05 Oliver Hunt <oliver@apple.com>
2787 Reviewed by Gavin Barraclough.
2789 It should be possible to post (clone) built-in JS objects to Workers
2790 https://bugs.webkit.org/show_bug.cgi?id=22878
2792 Expose helpers to throw correct exceptions during object graph walk
2793 used for cloning and add a helper function to create Date instances
2794 without going through the JS Date constructor function.
2796 * JavaScriptCore.exp:
2797 * JavaScriptCore.xcodeproj/project.pbxproj:
2798 * runtime/DateInstance.cpp:
2799 (JSC::DateInstance::DateInstance):
2800 * runtime/DateInstance.h:
2801 * runtime/ExceptionHelpers.cpp:
2802 (JSC::createTypeError):
2803 * runtime/ExceptionHelpers.h:
2805 2009-10-06 David Levin <levin@chromium.org>
2807 Reviewed by Oliver Hunt.
2809 StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
2810 https://bugs.webkit.org/show_bug.cgi?id=30095
2812 * wtf/CrossThreadRefCounted.h:
2813 Removed an unused function and assert improvement.
2814 (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
2815 (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
2816 (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
2817 (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
2818 non-threadsafe operation, add an assert that the class is owned by the current thread.
2820 2009-10-05 Kevin Ollivier <kevino@theolliviers.com>
2822 wx build fix. Add Symbian files to the list of excludes.
2826 2009-10-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2828 Reviewed by Simon Hausmann.
2830 [Qt] Remove precompiled header from JavaScriptCore compilation to
2831 prevent qmake warning during autonomous compilation.
2832 https://bugs.webkit.org/show_bug.cgi?id=30069
2834 * JavaScriptCore.pro:
2836 2009-10-02 Geoffrey Garen <ggaren@apple.com>
2838 Reviewed by Sam Weinig.
2840 Removed the concept of a "fast access cutoff" in arrays, because it
2841 punished some patterns of array access too much, and made things too
2842 complex for inlining in some cases.
2844 1.3% speedup on SunSpider.
2846 * jit/JITOpcodes.cpp:
2847 (JSC::JIT::emitSlow_op_get_by_val):
2848 (JSC::JIT::emitSlow_op_put_by_val):
2849 * jit/JITPropertyAccess.cpp:
2850 (JSC::JIT::emit_op_get_by_val):
2851 (JSC::JIT::emitSlow_op_get_by_val):
2852 (JSC::JIT::emit_op_put_by_val):
2853 (JSC::JIT::emitSlow_op_put_by_val):
2856 (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
2857 getting / putting from / to an array. Inline putting past the end of
2860 * runtime/JSArray.cpp:
2861 (JSC::JSArray::JSArray):
2862 (JSC::JSArray::getOwnPropertySlot):
2863 (JSC::JSArray::getOwnPropertyDescriptor):
2864 (JSC::JSArray::put):
2865 (JSC::JSArray::putSlowCase):
2866 (JSC::JSArray::deleteProperty):
2867 (JSC::JSArray::getOwnPropertyNames):
2868 (JSC::JSArray::increaseVectorLength):
2869 (JSC::JSArray::setLength):
2870 (JSC::JSArray::pop):
2871 (JSC::JSArray::push):
2872 (JSC::JSArray::sort):
2873 (JSC::JSArray::fillArgList):
2874 (JSC::JSArray::copyToRegisters):
2875 (JSC::JSArray::compactForSorting):
2876 (JSC::JSArray::checkConsistency):
2877 * runtime/JSArray.h:
2878 (JSC::JSArray::canGetIndex):
2879 (JSC::JSArray::canSetIndex):
2880 (JSC::JSArray::setIndex):
2881 (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
2882 replaced with checks for JSValue() to detect reads and writes from / to
2883 uninitialized parts of the array.
2885 2009-10-02 Jonni Rainisto <jonni.rainisto@nokia.com>
2887 Reviewed by Darin Adler.
2889 Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
2890 https://bugs.webkit.org/show_bug.cgi?id=29956
2892 * wtf/RandomNumber.cpp:
2893 (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
2895 2009-10-02 Geoffrey Garen <ggaren@apple.com>
2897 Reviewed by Sam Weinig.
2899 Take one branch instead of two to test for JSValue().
2901 1.1% SunSpider speedup.
2904 (JSC::JIT::compileOpCall):
2905 * jit/JITOpcodes.cpp:
2906 (JSC::JIT::emit_op_to_jsnumber):
2907 (JSC::JIT::emit_op_create_arguments):
2908 * jit/JITPropertyAccess.cpp:
2909 (JSC::JIT::emitSlow_op_get_by_val):
2910 (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
2911 of testing for the cell tag with a 0 payload.
2913 * runtime/JSValue.cpp:
2914 (JSC::JSValue::description): Added support for dumping the new empty value,
2915 and deleted values, in debug builds.
2917 * runtime/JSValue.h:
2918 (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
2920 (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
2921 tag, to avoid having two different c++ versions of null / empty.
2923 (JSC::JSValue::operator bool): Test for the empty value tag, instead
2924 of testing for the cell tag with a 0 payload.
2926 2009-10-02 Steve Falkenburg <sfalken@apple.com>
2928 Reviewed by Mark Rowe.
2930 <https://bugs.webkit.org/show_bug.cgi?id=29989>
2931 Safari version number shouldn't be exposed in WebKit code
2933 For a WebKit version of 532.3.4:
2934 Product version is: 5.32.3.4 (was 4.0.3.0)
2935 File version is: 5.32.3.4 (was 4.532.3.4)
2937 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
2939 2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2941 Rubber-stamped by Simon Hausmann.
2943 Fix the Qt on Mac OS X build.
2945 * wtf/FastMalloc.cpp:
2947 2009-10-02 Jørgen Lind <jorgen.lind@nokia.com>
2949 Reviewed by Simon Hausmann.
2951 Allow enabling and disabling of the JIT through a qmake variable.
2953 Qt's configure may set this variable through .qmake.cache if a
2954 commandline option is given and/or the compile test for hwcap.h
2957 * JavaScriptCore.pri:
2959 2009-10-01 Mark Rowe <mrowe@apple.com>
2961 Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
2963 * Configurations/FeatureDefines.xcconfig:
2965 2009-10-01 Yongjun Zhang <yongjun.zhang@nokia.com>
2967 Reviewed by Darin Adler.
2969 https://bugs.webkit.org/show_bug.cgi?id=29187
2971 Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
2972 bug regarding templated classes.
2974 The compiler bug is reported at:
2975 https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
2977 The change will be reverted when the above bug is fixed in winscw compiler.
2980 (WTF::::~ListRefPtr):
2982 2009-10-01 Zoltan Horvath <zoltan@webkit.org>
2984 Reviewed by Simon Hausmann.
2986 [Qt] Allow custom memory allocation control for the whole JavaScriptCore
2987 https://bugs.webkit.org/show_bug.cgi?id=27029
2989 Since in JavaScriptCore almost every class which has been instantiated by operator new is
2990 inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
2991 when USE_SYSTEM_MALLOC=0.
2993 Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
2994 (It's needed for the functionality of TCmalloc.)
2996 Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
2998 * JavaScriptCore.pri:
2999 * wtf/FastMalloc.cpp:
3003 2009-09-30 Gabor Loki <loki@inf.u-szeged.hu>
3005 Reviewed by George Staikos.
3007 Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
3008 https://bugs.webkit.org/show_bug.cgi?id=29122
3010 Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
3011 macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
3012 when Thumb-2 instruction set is the required target. The
3013 PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
3014 case where the code is common the PLATFORM(ARM) have to be used.
3016 Modified by George Wright <gwright@rim.com> to correctly work
3017 with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
3018 compiler macros, as well as adding readability changes.
3022 2009-09-30 Oliver Hunt <oliver@apple.com>
3024 Reviewed by Geoff Garen.
3026 Devirtualise array toString conversion
3028 Tweak the implementation of Array.prototype.toString to have a fast path
3029 when acting on a true JSArray.
3031 * runtime/ArrayPrototype.cpp:
3032 (JSC::arrayProtoFuncToString):
3034 2009-09-30 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
3036 Reviewed by Geoffrey Garen.
3038 Buildfix for platforms using JSVALUE32.
3039 https://bugs.webkit.org/show_bug.cgi?id=29915
3041 After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
3042 Also removed unreachable code.
3044 * jit/JITArithmetic.cpp:
3045 (JSC::JIT::emit_op_add):
3046 - Declaration of "OperandTypes types" moved before first use.
3047 - Typos fixed: dst modified to result, regT2 added.
3048 - Unreachable code removed.
3049 (JSC::JIT::emitSlow_op_add):
3050 - Missing declaration of "OperandTypes types" added.
3052 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
3054 Reviewed by Simon Hausmann.
3056 Reduce heap size on Symbian from 64MB to 8MB.
3058 This is not a perfect fix, it requires more fine tuning.
3059 But this makes it possible again to debug in the emulator,
3060 which is more important in order to be able to fix other
3063 * runtime/Collector.h:
3065 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
3067 Reviewed by Simon Hausmann.
3069 Fix CRASH() macro for Symbian build.
3071 * wtf/Assertions.h: Added missing }
3073 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3075 Reviewed by Gavin Barraclough.
3077 Inlined a few math operations.
3079 ~1% SunSpider speedup.
3082 * jit/JITArithmetic.cpp:
3083 (JSC::JIT::compileBinaryArithOpSlowCase):
3084 (JSC::JIT::emitSlow_op_add):
3085 (JSC::JIT::emitSlow_op_mul):
3086 (JSC::JIT::emit_op_sub):
3087 (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
3088 a constant int and a double.
3090 2009-09-28 Oliver Hunt <oliver@apple.com>
3092 Reviewed by Gavin Barraclough.
3094 Tidy up codeblock sampler
3095 https://bugs.webkit.org/show_bug.cgi?id=29836
3097 Some rather simple refactoring of codeblock sampler so that
3098 it's easier for us to use it to find problems in non-jsc
3101 * JavaScriptCore.exp:
3102 * bytecode/SamplingTool.h:
3103 * debugger/Debugger.cpp:
3104 (JSC::evaluateInGlobalCallFrame):
3105 * debugger/DebuggerCallFrame.cpp:
3106 (JSC::DebuggerCallFrame::evaluate):
3107 * interpreter/Interpreter.cpp:
3108 (JSC::Interpreter::Interpreter):
3109 (JSC::Interpreter::execute):
3110 (JSC::Interpreter::privateExecute):
3111 (JSC::Interpreter::enableSampler):
3112 (JSC::Interpreter::dumpSampleData):
3113 (JSC::Interpreter::startSampling):
3114 (JSC::Interpreter::stopSampling):
3115 * interpreter/Interpreter.h:
3116 (JSC::Interpreter::sampler):
3120 * runtime/Completion.cpp:
3123 * runtime/Executable.h:
3124 (JSC::EvalExecutable::EvalExecutable):
3125 (JSC::ProgramExecutable::create):
3126 (JSC::ProgramExecutable::ProgramExecutable):
3127 * runtime/JSGlobalData.cpp:
3128 (JSC::JSGlobalData::startSampling):
3129 (JSC::JSGlobalData::stopSampling):
3130 (JSC::JSGlobalData::dumpSampleData):
3131 * runtime/JSGlobalData.h:
3132 * runtime/JSGlobalObjectFunctions.cpp:
3133 (JSC::globalFuncEval):
3135 2009-09-29 Jeremy Orlow <jorlow@chromium.org>
3137 Reviewed by Dimitri Glazkov.
3139 Add GYP generated files to svn:ignore
3140 https://bugs.webkit.org/show_bug.cgi?id=29895
3142 The following files are generated by JavaScriptCore's GYP file and should be ignored:
3152 * JavaScriptCore.gyp: Changed property svn:ignore.
3154 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3156 Reviewed by Sam Weinig.
3158 Standardized an optimization for adding non-numbers.
3160 SunSpider says maybe a tiny speedup.
3162 * jit/JITArithmetic.cpp:
3163 (JSC::JIT::emit_op_add):
3164 (JSC::JIT::emitSlow_op_add):
3166 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3168 Windows build fix: export a new symbol.
3170 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3171 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3173 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3175 Reviewed by Sam Weinig.
3177 Removed virtual destructor from JSGlobalObjectData to eliminate pointer
3178 fix-ups when accessing JSGlobalObject::d.
3180 Replaced with an explicit destructor function pointer.
3182 6% speedup on bench-alloc-nonretained.js.
3184 * JavaScriptCore.exp:
3185 * runtime/JSGlobalObject.cpp:
3186 (JSC::JSGlobalObject::~JSGlobalObject):
3187 (JSC::JSGlobalObject::destroyJSGlobalObjectData):
3188 * runtime/JSGlobalObject.h:
3189 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3190 (JSC::JSGlobalObject::JSGlobalObject):
3192 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
3194 Reviewed by David Kilzer.
3196 [Qt] Assert messages prints visible in Symbian
3197 https://bugs.webkit.org/show_bug.cgi?id=29808
3199 Asserts use vprintf to print the messages to stderr.
3200 In Symbian Open C it is not possible to see stderr so
3201 I routed the messages to stdout instead.
3203 * wtf/Assertions.cpp:
3205 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
3207 Reviewed by Darin Adler.
3209 [Qt] Symbian CRASH macro implementation
3211 Added Symbian specific crash macro that
3212 stops to crash line if JIT debugging is used.
3213 Additional differentiation of access violation
3214 (KERN-EXEC 3) and CRASH panic.
3218 2009-09-28 Mark Rowe <mrowe@apple.com>
3220 Fix the PowerPC build.
3222 * JavaScriptCore.exp:
3224 2009-09-28 Mark Rowe <mrowe@apple.com>
3226 Reviewed by Gavin Barraclough.
3228 <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
3230 * runtime/Collector.cpp:
3231 (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
3232 to ensure that we correctly interpret the contents of registers during marking.
3234 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3236 Windows build fix: added new exports.
3238 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3239 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3241 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3243 Windows build fix: removed exports that no longer exist.
3245 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3246 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3248 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3250 Reviewed by Darin Adler.
3252 NotNullPassRefPtr: smart pointer optimized for passing references that are not null
3253 https://bugs.webkit.org/show_bug.cgi?id=29822
3255 Added NotNullPassRefPtr, and deployed it in all places that initialize
3258 2.2% speedup on bench-allocate-nonretained.js.
3260 * API/JSCallbackConstructor.cpp:
3261 (JSC::JSCallbackConstructor::JSCallbackConstructor):
3262 * API/JSCallbackConstructor.h:
3263 * API/JSCallbackObject.h:
3264 * API/JSCallbackObjectFunctions.h:
3265 (JSC::JSCallbackObject::JSCallbackObject):
3266 * JavaScriptCore.exp:
3267 * bytecode/CodeBlock.h:
3268 (JSC::CodeBlock::addFunctionDecl):
3269 (JSC::CodeBlock::addFunctionExpr):
3270 * runtime/ArrayConstructor.cpp:
3271 (JSC::ArrayConstructor::ArrayConstructor):
3272 * runtime/ArrayConstructor.h:
3273 * runtime/ArrayPrototype.cpp:
3274 (JSC::ArrayPrototype::ArrayPrototype):
3275 * runtime/ArrayPrototype.h:
3276 * runtime/BooleanConstructor.cpp:
3277 (JSC::BooleanConstructor::BooleanConstructor):
3278 * runtime/BooleanConstructor.h:
3279 * runtime/BooleanObject.cpp:
3280 (JSC::BooleanObject::BooleanObject):
3281 * runtime/BooleanObject.h:
3282 * runtime/BooleanPrototype.cpp:
3283 (JSC::BooleanPrototype::BooleanPrototype):
3284 * runtime/BooleanPrototype.h:
3285 * runtime/DateConstructor.cpp:
3286 (JSC::DateConstructor::DateConstructor):
3287 * runtime/DateConstructor.h:
3288 * runtime/DateInstance.cpp:
3289 (JSC::DateInstance::DateInstance):
3290 * runtime/DateInstance.h:
3291 * runtime/DatePrototype.cpp:
3292 (JSC::DatePrototype::DatePrototype):
3293 * runtime/DatePrototype.h:
3294 * runtime/ErrorConstructor.cpp:
3295 (JSC::ErrorConstructor::ErrorConstructor):
3296 * runtime/ErrorConstructor.h:
3297 * runtime/ErrorInstance.cpp:
3298 (JSC::ErrorInstance::ErrorInstance):
3299 * runtime/ErrorInstance.h:
3300 * runtime/ErrorPrototype.cpp:
3301 (JSC::ErrorPrototype::ErrorPrototype):
3302 * runtime/ErrorPrototype.h:
3303 * runtime/FunctionConstructor.cpp:
3304 (JSC::FunctionConstructor::FunctionConstructor):
3305 * runtime/FunctionConstructor.h:
3306 * runtime/FunctionPrototype.cpp:
3307 (JSC::FunctionPrototype::FunctionPrototype):
3308 * runtime/FunctionPrototype.h:
3309 * runtime/GlobalEvalFunction.cpp:
3310 (JSC::GlobalEvalFunction::GlobalEvalFunction):
3311 * runtime/GlobalEvalFunction.h:
3312 * runtime/InternalFunction.cpp:
3313 (JSC::InternalFunction::InternalFunction):
3314 * runtime/InternalFunction.h:
3315 (JSC::InternalFunction::InternalFunction):
3316 * runtime/JSActivation.cpp:
3317 (JSC::JSActivation::JSActivation):
3318 * runtime/JSActivation.h:
3319 (JSC::JSActivation::JSActivationData::JSActivationData):
3320 * runtime/JSArray.cpp:
3321 (JSC::JSArray::JSArray):
3322 * runtime/JSArray.h:
3323 * runtime/JSByteArray.cpp:
3324 (JSC::JSByteArray::JSByteArray):
3325 * runtime/JSByteArray.h:
3326 * runtime/JSFunction.cpp:
3327 (JSC::JSFunction::JSFunction):
3328 * runtime/JSFunction.h:
3329 * runtime/JSGlobalObject.h:
3330 (JSC::JSGlobalObject::JSGlobalObject):
3331 * runtime/JSONObject.h:
3332 (JSC::JSONObject::JSONObject):
3333 * runtime/JSObject.h:
3334 (JSC::JSObject::JSObject):
3335 (JSC::JSObject::setStructure):
3336 * runtime/JSVariableObject.h:
3337 (JSC::JSVariableObject::JSVariableObject):
3338 * runtime/JSWrapperObject.h:
3339 (JSC::JSWrapperObject::JSWrapperObject):
3340 * runtime/MathObject.cpp:
3341 (JSC::MathObject::MathObject):
3342 * runtime/MathObject.h:
3343 * runtime/NativeErrorConstructor.cpp:
3344 (JSC::NativeErrorConstructor::NativeErrorConstructor):
3345 * runtime/NativeErrorConstructor.h:
3346 * runtime/NativeErrorPrototype.cpp:
3347 (JSC::NativeErrorPrototype::NativeErrorPrototype):
3348 * runtime/NativeErrorPrototype.h:
3349 * runtime/NumberConstructor.cpp:
3350 (JSC::NumberConstructor::NumberConstructor):
3351 * runtime/NumberConstructor.h:
3352 * runtime/NumberObject.cpp:
3353 (JSC::NumberObject::NumberObject):
3354 * runtime/NumberObject.h:
3355 * runtime/NumberPrototype.cpp:
3356 (JSC::NumberPrototype::NumberPrototype):
3357 * runtime/NumberPrototype.h:
3358 * runtime/ObjectConstructor.cpp:
3359 (JSC::ObjectConstructor::ObjectConstructor):
3360 * runtime/ObjectConstructor.h:
3361 * runtime/ObjectPrototype.cpp:
3362 (JSC::ObjectPrototype::ObjectPrototype):
3363 * runtime/ObjectPrototype.h:
3364 * runtime/PropertyNameArray.h:
3365 (JSC::PropertyNameArrayData::setCachedPrototypeChain):
3366 * runtime/PrototypeFunction.cpp:
3367 (JSC::PrototypeFunction::PrototypeFunction):
3368 * runtime/PrototypeFunction.h:
3369 * runtime/RegExpConstructor.cpp:
3370 (JSC::RegExpConstructor::RegExpConstructor):
3371 * runtime/RegExpConstructor.h:
3372 * runtime/RegExpObject.cpp:
3373 (JSC::RegExpObject::RegExpObject):
3374 * runtime/RegExpObject.h:
3375 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
3376 * runtime/RegExpPrototype.cpp:
3377 (JSC::RegExpPrototype::RegExpPrototype):
3378 * runtime/RegExpPrototype.h:
3379 * runtime/StringConstructor.cpp:
3380 (JSC::StringConstructor::StringConstructor):
3381 * runtime/StringConstructor.h:
3382 * runtime/StringObject.cpp:
3383 (JSC::StringObject::StringObject):
3384 * runtime/StringObject.h:
3385 * runtime/StringObjectThatMasqueradesAsUndefined.h:
3386 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
3387 * runtime/StringPrototype.cpp:
3388 (JSC::StringPrototype::StringPrototype):
3389 * runtime/StringPrototype.h:
3391 (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
3392 (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
3393 (WTF::NotNullPassRefPtr::get):
3394 (WTF::NotNullPassRefPtr::clear):
3395 (WTF::NotNullPassRefPtr::releaseRef):
3396 (WTF::NotNullPassRefPtr::operator*):
3397 (WTF::NotNullPassRefPtr::operator->):
3398 (WTF::NotNullPassRefPtr::operator!):
3399 (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
3401 (WTF::RefPtr::RefPtr):
3404 2009-09-28 Oliver Hunt <oliver@apple.com>
3406 Reviewed by Geoff Garen.
3408 Hard dependency on SSE2 instruction set with JIT
3409 https://bugs.webkit.org/show_bug.cgi?id=29779
3411 Add floating point support checks to op_jfalse and op_jtrue, and
3412 fix the logic for the slow case of op_add
3414 * jit/JITArithmetic.cpp:
3415 (JSC::JIT::emitSlow_op_add):
3416 * jit/JITOpcodes.cpp:
3417 (JSC::JIT::emit_op_jfalse):
3418 (JSC::JIT::emit_op_jtrue):
3420 2009-09-28 Yaar Schnitman <yaar@chromium.org>
3422 Reviewed by Dimitri Glazkov.
3424 Chromium port - recognize we are being built independently
3425 of chromium and look for dependencies under webkit/chromium rather
3428 https://bugs.webkit.org/show_bug.cgi?id=29722
3430 * JavaScriptCore.gyp/JavaScriptCore.gyp:
3432 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
3434 Reviewed by Simon Hausmann.
3436 [Qt] Implement XSLT support with QtXmlPatterns.
3437 https://bugs.webkit.org/show_bug.cgi?id=28303
3439 * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
3441 2009-09-28 Gabor Loki <loki@inf.u-szeged.hu>
3443 Reviewed by Simon Hausmann.
3445 Remove __clear_cache which is an internal function of GCC
3446 https://bugs.webkit.org/show_bug.cgi?id=28886
3448 Although __clear_cache is exported from GCC, this is an internal
3449 function. GCC makes no promises about it.
3451 * jit/ExecutableAllocator.h:
3452 (JSC::ExecutableAllocator::cacheFlush):
3454 2009-09-28 Sam Weinig <sam@webkit.org>
3456 Reviewed by Oliver Hunt.
3458 Fix an absolute path to somewhere in Oliver's machine to a relative path
3459 for derived JSONObject.lut.h.
3461 * JavaScriptCore.xcodeproj/project.pbxproj:
3463 2009-09-28 Joerg Bornemann <joerg.bornemann@nokia.com>
3465 Reviewed by Simon Hausmann.
3467 Add ARM version detection for Windows CE.
3471 2009-09-26 Yongjun Zhang <yongjun.zhang@nokia.com>
3473 Reviewed by Simon Hausmann.
3475 Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
3477 Re-use Windows shrinkAllocation implementation because Symbian doesn't
3478 support releasing part of memory region.
3480 Use fastMalloc and fastFree to implement allocateStack and releaseStack
3483 * JavaScriptCore.pri:
3484 * runtime/MarkStack.h:
3485 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
3486 * runtime/MarkStackSymbian.cpp: Added.
3487 (JSC::MarkStack::initializePagesize):
3488 (JSC::MarkStack::allocateStack):
3489 (JSC::MarkStack::releaseStack):
3491 2009-09-25 Gabor Loki <loki@inf.u-szeged.hu>
3493 Reviewed by Gavin Barraclough.
3495 Fix unaligned data access in YARR_JIT on ARMv5 and below.
3496 https://bugs.webkit.org/show_bug.cgi?id=29695
3498 On ARMv5 and below all data access should be naturally aligned.
3499 In the YARR_JIT there is a case when character pairs are
3500 loaded from the input string, but this data access is not
3501 naturally aligned. This fix introduces load32WithUnalignedHalfWords
3502 and branch32WithUnalignedHalfWords functions which contain
3503 naturally aligned memory loads - half word loads - on ARMv5 and below.
3505 * assembler/MacroAssemblerARM.cpp:
3506 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3507 * assembler/MacroAssemblerARM.h:
3508 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3509 (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
3510 * assembler/MacroAssemblerARMv7.h:
3511 (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
3512 (JSC::MacroAssemblerARMv7::branch32):
3513 (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
3514 * assembler/MacroAssemblerX86Common.h:
3515 (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
3516 (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
3518 * yarr/RegexJIT.cpp:
3519 (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
3521 2009-09-25 Jeremy Orlow <jorlow@chromium.org>
3523 This is breaking Chromium try bots, so I'm counting this as a build fix.
3525 Add more svn:ignore exceptions. On different platforms, these files are
3526 generated with different case for JavaScriptCore. Also there are some
3527 wtf project files that get built apparently.
3529 * JavaScriptCore.gyp: Changed property svn:ignore.
3531 2009-09-25 Ada Chan <adachan@apple.com>
3535 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3536 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3538 2009-09-25 Geoffrey Garen <ggaren@apple.com>
3540 Reviewed by Darin Adler.
3542 Inlined some object creation code, including lexicalGlobalObject access
3543 https://bugs.webkit.org/show_bug.cgi?id=29750
3545 SunSpider says 0.5% faster.
3547 0.8% speedup on bench-alloc-nonretained.js.
3548 2.5% speedup on v8-splay.js.
3550 * interpreter/CachedCall.h:
3551 (JSC::CachedCall::CachedCall):
3552 * interpreter/CallFrame.h:
3553 (JSC::ExecState::lexicalGlobalObject):
3554 (JSC::ExecState::globalThisValue):
3555 * interpreter/Interpreter.cpp:
3556 (JSC::Interpreter::dumpRegisters):
3557 (JSC::Interpreter::execute):
3558 (JSC::Interpreter::privateExecute):
3560 (JSC::DEFINE_STUB_FUNCTION):
3561 * runtime/FunctionConstructor.cpp:
3562 (JSC::constructFunction):
3563 * runtime/ScopeChain.cpp:
3564 (JSC::ScopeChainNode::print):
3565 * runtime/ScopeChain.h:
3566 (JSC::ScopeChainNode::ScopeChainNode):
3567 (JSC::ScopeChainNode::~ScopeChainNode):
3568 (JSC::ScopeChainNode::push):
3569 (JSC::ScopeChain::ScopeChain):
3570 (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
3571 Replaced accessor function for globalObject() with data member. Replaced
3572 globalThisObject() accessor with direct access to globalThis, to match.
3574 * runtime/JSGlobalObject.cpp:
3575 (JSC::JSGlobalObject::init):
3576 * runtime/JSGlobalObject.h: Inlined array and object construction.
3578 2009-09-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3580 Reviewed by Gavin Barraclough.
3582 Add ARM version detection rules for Symbian
3583 https://bugs.webkit.org/show_bug.cgi?id=29715
3587 2009-09-24 Xan Lopez <xlopez@igalia.com>
3589 Reviewed by Mark "Do It!" Rowe.
3591 Some GCC versions don't like C++-style comments in preprocessor
3592 directives, change to C-style to shut them up.
3596 2009-09-24 Oliver Hunt <oliver@apple.com>