1 2009-11-19 Steve Block <steveblock@google.com>
3 Android port lacks configuration in Platform.h and config.h.
4 https://bugs.webkit.org/show_bug.cgi?id=31671
6 * wtf/Platform.h: Modified. Added Android-specific configuration.
8 2009-11-19 Alexey Proskuryakov <ap@apple.com>
10 Reviewed by Darin Adler.
12 https://bugs.webkit.org/show_bug.cgi?id=31690
13 Make SocketStreamHandleCFNet work on Windows
15 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17 (WTF::FunctionWithContext::FunctionWithContext):
18 (WTF::dispatchFunctionsFromMainThread):
19 (WTF::callOnMainThreadAndWait):
21 Re-add callOnMainThreadAndWait(), which was removed in bug 23926.
23 2009-11-19 Dmitry Titov <dimich@chromium.org>
25 Reviewed by David Levin.
27 isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests..
28 https://bugs.webkit.org/show_bug.cgi?id=31693
30 * wtf/ThreadingPthreads.cpp:
31 (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier.
32 (WTF::isMainThread): Ditto.
34 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
36 Reviewed by Darin Adler.
38 Remove HAVE(STRING_H) guard from JavaScriptCore
39 https://bugs.webkit.org/show_bug.cgi?id=31668
42 * runtime/UString.cpp:
44 2009-11-19 Dumitru Daniliuc <dumi@chromium.org>
46 Reviewed by Dmitry Titov.
48 Fixing a bug in MessageQueue::removeIf() that leads to an
51 https://bugs.webkit.org/show_bug.cgi?id=31657
54 (WTF::MessageQueue::removeIf):
56 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
58 Reviewed by Darin Adler.
60 Remove HAVE(FLOAT_H) guard
61 https://bugs.webkit.org/show_bug.cgi?id=31661
63 JavaScriptCore has a dependency on float.h, there is
64 no need to guard float.h.
66 * runtime/DatePrototype.cpp: Remove include directive
67 for float.h as it is included in MathExtras.h already.
68 * runtime/Operations.cpp: Ditto.
69 * runtime/UString.cpp: Ditto.
70 * wtf/dtoa.cpp: Ditto.
71 * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard.
72 * wtf/Platform.h: Ditto.
74 2009-11-19 Thiago Macieira <thiago.macieira@nokia.com>
76 Reviewed by Simon Hausmann.
78 Build fix for 32-bit Sparc machines: these machines are big-endian.
82 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
84 Reviewed by Kenneth Rohde Christiansen.
86 [Qt] Remove support for Qt v4.3 or older versions
87 https://bugs.webkit.org/show_bug.cgi?id=29469
91 * wtf/unicode/qt4/UnicodeQt4.h:
93 2009-11-18 Kent Tamura <tkent@chromium.org>
95 Reviewed by Darin Adler.
97 Move UString::from(double) implementation to new
98 WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore
100 https://bugs.webkit.org/show_bug.cgi?id=31330
102 - Introduce new function createRep(const char*, unsigned) and
103 UString::UString(const char*, unsigned) to reduce 2 calls to strlen().
104 - Fix a bug that dtoa() doesn't update *rve if the input value is NaN
107 No new tests because this doesn't change the behavior.
109 * JavaScriptCore.exp:
110 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
111 * runtime/UString.cpp:
113 (JSC::UString::UString):
114 (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat().
117 (WTF::dtoa): Fix a bug about rve.
118 (WTF::append): A helper for doubleToStringInJavaScriptFormat().
119 (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double).
122 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
124 Reviewed by Kenneth Rohde Christiansen.
126 [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
127 https://bugs.webkit.org/show_bug.cgi?id=31643
129 * JavaScriptCore.pro:
131 2009-11-18 Nate Chapin <japhet@chromium.org>
133 Reviewed by Darin Fisher.
135 Remove Chromium's unnecessary dependency on wtf's tcmalloc files.
137 https://bugs.webkit.org/show_bug.cgi?id=31648
139 * JavaScriptCore.gyp/JavaScriptCore.gyp:
141 2009-11-18 Thiago Macieira <thiago.macieira@nokia.com>
143 Reviewed by Gavin Barraclough.
145 [Qt] Implement symbol hiding for JSC's JIT functions.
147 These functions are implemented directly in assembly, so they need the
148 proper directives to enable/disable visibility. On ELF systems, it's
149 .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On
150 Windows, it's not necessary since you have to explicitly export. I
151 also implemented the AIX idiom, though it's unlikely anyone will
152 implement AIX/POWER JIT.
153 https://bugs.webkit.org/show_bug.cgi?id=30864
157 2009-11-18 Oliver Hunt <oliver@apple.com>
159 Reviewed by Alexey Proskuryakov.
161 Interpreter may do an out of range access when throwing an exception in the profiler.
162 https://bugs.webkit.org/show_bug.cgi?id=31635
166 * interpreter/Interpreter.cpp:
167 (JSC::Interpreter::throwException):
169 2009-11-18 Gabor Loki <loki@inf.u-szeged.hu>
171 Reviewed by Darin Adler.
173 Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux
174 https://bugs.webkit.org/show_bug.cgi?id=31631
176 * jit/ExecutableAllocator.h:
177 (JSC::ExecutableAllocator::cacheFlush):
179 2009-11-18 Harald Fernengel <harald.fernengel@nokia.com>
181 Reviewed by Simon Hausmann.
183 [Qt] Fix detection of linux-g++
185 Never use "linux-g++*" to check for linux-g++, since this will break embedded
186 builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
189 * JavaScriptCore.pri:
191 2009-11-17 Jon Honeycutt <jhoneycutt@apple.com>
193 Add JSContextRefPrivate.h to list of copied files.
195 Reviewed by Mark Rowe.
197 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
199 2009-11-17 Martin Robinson <martin.james.robinson@gmail.com>
201 Reviewed by Adam Barth.
203 [GTK] Style cleanup for GOwnPtr
204 https://bugs.webkit.org/show_bug.cgi?id=31506
206 Remove forward declaration in GOwnPtr and do some style cleanup.
210 (WTF::GOwnPtr::GOwnPtr):
211 (WTF::GOwnPtr::~GOwnPtr):
213 (WTF::GOwnPtr::release):
214 (WTF::GOwnPtr::outPtr):
216 (WTF::GOwnPtr::clear):
217 (WTF::GOwnPtr::operator*):
218 (WTF::GOwnPtr::operator->):
219 (WTF::GOwnPtr::operator!):
220 (WTF::GOwnPtr::operator UnspecifiedBoolType):
221 (WTF::GOwnPtr::swap):
226 (WTF::freeOwnedGPtr):
228 2009-11-17 Oliver Hunt <oliver@apple.com>
230 Reviewed by Maciej Stachowiak.
232 Incorrect use of JavaScriptCore API in DumpRenderTree
233 https://bugs.webkit.org/show_bug.cgi?id=31577
235 Add assertions to the 'toJS' functions to catch mistakes like
236 this early. Restructure existing code which blindly passed potentially
237 null values to toJS when forwarding exceptions so that a null check is
243 * API/JSCallbackObjectFunctions.h:
244 (JSC::::getOwnPropertySlot):
246 (JSC::::deleteProperty):
248 (JSC::::hasInstance):
252 (JSC::::staticValueGetter):
253 (JSC::::callbackGetter):
254 * API/tests/testapi.c: Fix errors in the API tester.
255 (MyObject_getProperty):
256 (MyObject_convertToType):
257 (EvilExceptionObject_convertToType):
259 2009-11-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
261 Reviewed by Gavin Barraclough.
263 https://bugs.webkit.org/show_bug.cgi?id=31050
265 Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32
266 failed on a CortexA8 CPU, but not on a simulator; and
267 JITCall.cpp modifications was somehow not committed to mainline.
269 * assembler/ARMAssembler.h:
270 (JSC::ARMAssembler::fmrs_r):
271 * assembler/MacroAssemblerARM.h:
272 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
274 (JSC::JIT::compileOpCall):
276 2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com>
278 Reviewed by Simon Hausmann.
280 Fix Qt build on Windows CE 6.
282 * JavaScriptCore.pri: Add missing include path.
283 * wtf/Platform.h: Include ce_time.h for Windows CE 6.
285 2009-11-13 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
287 Reviewed by Gavin Barraclough.
289 https://bugs.webkit.org/show_bug.cgi?id=31050
291 Adding optimization support for mode JSVALUE32_64
296 (JSC::JIT::compileOpCall):
297 * jit/JITPropertyAccess.cpp:
298 (JSC::JIT::emit_op_method_check):
299 (JSC::JIT::compileGetByIdHotPath):
300 (JSC::JIT::compileGetByIdSlowCase):
301 (JSC::JIT::emit_op_put_by_id):
303 2009-11-14 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
305 Reviewed by Gavin Barraclough.
307 https://bugs.webkit.org/show_bug.cgi?id=31050
309 Adding JSVALUE32_64 support for ARM (but not turning it
310 on by default). All optimizations must be disabled, since
311 this patch is only the first of a series of patches.
313 During the work, a lot of x86 specific code revealed and
314 made platform independent.
315 See revisions: 50531 50541 50593 50594 50595
317 * assembler/ARMAssembler.h:
318 (JSC::ARMAssembler::):
319 (JSC::ARMAssembler::fdivd_r):
320 * assembler/MacroAssemblerARM.h:
321 (JSC::MacroAssemblerARM::lshift32):
322 (JSC::MacroAssemblerARM::neg32):
323 (JSC::MacroAssemblerARM::rshift32):
324 (JSC::MacroAssemblerARM::branchOr32):
325 (JSC::MacroAssemblerARM::set8):
326 (JSC::MacroAssemblerARM::setTest8):
327 (JSC::MacroAssemblerARM::loadDouble):
328 (JSC::MacroAssemblerARM::divDouble):
329 (JSC::MacroAssemblerARM::convertInt32ToDouble):
330 (JSC::MacroAssemblerARM::zeroDouble):
333 * jit/JITOpcodes.cpp:
334 (JSC::JIT::privateCompileCTIMachineTrampolines):
336 * wtf/StdLibExtras.h:
338 2009-11-13 Dominik Röttsches <dominik.roettsches@access-company.com>
340 Reviewed by Eric Seidel.
342 Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
343 https://bugs.webkit.org/show_bug.cgi?id=31468
345 Adding isAlphanumeric abstraction, required
346 by TextBoundaries.cpp.
348 * wtf/unicode/glib/UnicodeGLib.h:
349 (WTF::Unicode::isAlphanumeric):
350 * wtf/unicode/icu/UnicodeIcu.h:
351 (WTF::Unicode::isAlphanumeric):
353 2009-11-13 Norbert Leser <norbert.leser&nokia.com>
355 Reviewed by Eric Seidel.
357 Added macros for USERINCLUDE paths within symbian blocks
358 to guarantee inclusion of respective header files from local path
359 first (to avoid clashes with same names of header files in system include path).
361 * JavaScriptCore.pri:
363 2009-11-13 Oliver Hunt <oliver@apple.com>
365 Reviewed by Geoff Garen.
367 JSValueProtect and JSValueUnprotect don't protect API wrapper values
368 https://bugs.webkit.org/show_bug.cgi?id=31485
370 Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
371 does not attempt to to strip out API wrapper objects.
375 * API/JSValueRef.cpp:
378 * API/tests/testapi.c:
379 (makeGlobalNumberValue):
382 2009-11-13 İsmail Dönmez <ismail@namtrac.org>
384 Reviewed by Antti Koivisto.
386 Fix typo, ce_time.cpp should be ce_time.c
388 * JavaScriptCore.pri:
390 2009-11-12 Steve VanDeBogart <vandebo@chromium.org>
392 Reviewed by Adam Barth.
394 Calculate the time offset only if we were able to parse
395 the date string. This saves an IPC in Chromium for
396 invalid date strings.
397 https://bugs.webkit.org/show_bug.cgi?id=31416
400 (WTF::parseDateFromNullTerminatedCharacters):
401 (JSC::parseDateFromNullTerminatedCharacters):
403 2009-11-12 Oliver Hunt <oliver@apple.com>
405 Rollout r50896 until i can work out why it causes failures.
407 * bytecompiler/BytecodeGenerator.cpp:
408 (JSC::BytecodeGenerator::emitReturn):
409 * interpreter/Interpreter.cpp:
410 (JSC::Interpreter::execute):
412 (JSC::EvalNode::emitBytecode):
414 2009-11-12 Steve Falkenburg <sfalken@apple.com>
416 Reviewed by Stephanie Lewis.
418 Remove LIBRARY directive from def file to fix Debug_All target.
420 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
422 2009-11-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
424 Rubber-stamped by Holger Freyther.
426 Revert r50204, since it makes DRT crash on 32 bits release builds
431 2009-11-12 Oliver Hunt <oliver@apple.com>
433 Reviewed by Gavin Barraclough.
435 Start unifying entry logic for function and eval code.
437 Eval now uses a ret instruction to end execution, and sets up
438 a callframe more in line with what we do for function entry.
440 * bytecompiler/BytecodeGenerator.cpp:
441 (JSC::BytecodeGenerator::emitReturn):
442 * interpreter/Interpreter.cpp:
443 (JSC::Interpreter::execute):
445 (JSC::EvalNode::emitBytecode):
447 2009-11-12 Richard Moe Gustavsen <richard.gustavsen@nokia.com>
449 Reviewed by Kenneth Rohde Christiansen.
451 [Qt] Disable pthread_setname_np.
453 This allows Qt builds on Mac from 10.6 to run on earlier version
454 where this symbol is not present.
455 https://bugs.webkit.org/show_bug.cgi?id=31403
459 2009-11-12 Thiago Macieira <thiago.macieira@nokia.com>
461 Reviewed by Kenneth Rohde Christiansen.
463 [Qt] Fix linking on Linux 32-bit.
465 It was missing the ".text" directive at the top of the file,
466 indicating that code would follow. Without it, the assembler created
467 "NOTYPE" symbols, which would result in linker errors.
468 https://bugs.webkit.org/show_bug.cgi?id=30863
472 2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
474 Reviewed by Alexey Proskuryakov.
476 Refactor multiple JavaScriptCore threads
477 https://bugs.webkit.org/show_bug.cgi?id=31328
479 Remove the id field from the PlatformThread structure
482 * runtime/Collector.cpp:
483 (JSC::getCurrentPlatformThread):
484 (JSC::suspendThread):
486 (JSC::getPlatformThreadRegisters):
488 2009-11-10 Geoffrey Garen <ggaren@apple.com>
490 Linux build fix: Added an #include for UINT_MAX.
492 * runtime/WeakRandom.h:
494 2009-11-10 Geoffrey Garen <ggaren@apple.com>
496 JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
498 * JavaScriptCore.xcodeproj/project.pbxproj:
500 2009-11-10 Geoffrey Garen <ggaren@apple.com>
502 Reviewed by Gavin "avGni arBalroguch" Barraclough.
504 Faster Math.random, based on GameRand.
506 SunSpider says 1.4% faster.
509 * JavaScriptCore.gypi:
510 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
511 * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
513 * runtime/JSGlobalData.cpp:
514 (JSC::JSGlobalData::JSGlobalData):
515 * runtime/JSGlobalData.h: Use an object to track random number generation
516 state, initialized to the current time.
518 * runtime/MathObject.cpp:
519 (JSC::MathObject::MathObject):
520 (JSC::mathProtoFuncRandom): Use the new hotness.
522 * runtime/WeakRandom.h: Added.
523 (JSC::WeakRandom::WeakRandom):
524 (JSC::WeakRandom::get):
525 (JSC::WeakRandom::advance): The new hotness.
527 2009-11-09 Geoffrey Garen <ggaren@apple.com>
529 Reviewed by Oliver Hunt.
531 Imported the v8 DST cache.
533 SunSpider says 1.5% faster.
535 * runtime/JSGlobalData.cpp:
536 (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
539 * runtime/JSGlobalData.h:
540 (JSC::DSTOffsetCache::DSTOffsetCache):
541 (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
544 (WTF::calculateDSTOffsetSimple):
545 (WTF::calculateDSTOffset):
546 (WTF::parseDateFromNullTerminatedCharacters):
548 (JSC::gregorianDateTimeToMS):
549 (JSC::msToGregorianDateTime):
550 (JSC::parseDateFromNullTerminatedCharacters):
551 * wtf/DateMath.h: The imported code for probing and updating the cache.
553 2009-11-09 Geoffrey Garen <ggaren@apple.com>
555 Reviewed by Oliver Hunt.
557 Fixed an edge case that could cause the engine not to notice a timezone
560 No test because this case would require manual intervention to change
561 the timezone during the test.
563 SunSpider reports no change.
565 * runtime/DateInstanceCache.h:
566 (JSC::DateInstanceCache::DateInstanceCache):
567 (JSC::DateInstanceCache::reset): Added a helper function for resetting
568 this cache. Also, shrank the cache, since we'll be resetting it often.
570 * runtime/JSGlobalData.cpp:
571 (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
572 in resetting Date data. (Otherwise, a cache hit could bypass a necessary
573 timezone update check.)
575 2009-11-09 Geoffrey Garen <ggaren@apple.com>
577 Reviewed by Sam Weinig.
579 Some manual inlining and constant propogation in Date code.
581 SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
582 says some previously evident stalls are now gone.
584 * runtime/DateConstructor.cpp:
586 * runtime/DateConversion.cpp:
588 (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
590 * runtime/DateConversion.h:
591 * runtime/DateInstance.cpp:
592 (JSC::DateInstance::calculateGregorianDateTime):
593 (JSC::DateInstance::calculateGregorianDateTimeUTC):
594 * runtime/DateInstance.h:
595 (JSC::DateInstance::gregorianDateTime):
596 (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
597 a UTC and non-UTC variant, and split each variant into a fast inline
598 case and a slow out-of-line case.
600 * runtime/DatePrototype.cpp:
601 (JSC::formatLocaleDate):
602 (JSC::dateProtoFuncToString):
603 (JSC::dateProtoFuncToUTCString):
604 (JSC::dateProtoFuncToISOString):
605 (JSC::dateProtoFuncToDateString):
606 (JSC::dateProtoFuncToTimeString):
607 (JSC::dateProtoFuncGetFullYear):
608 (JSC::dateProtoFuncGetUTCFullYear):
609 (JSC::dateProtoFuncToGMTString):
610 (JSC::dateProtoFuncGetMonth):
611 (JSC::dateProtoFuncGetUTCMonth):
612 (JSC::dateProtoFuncGetDate):
613 (JSC::dateProtoFuncGetUTCDate):
614 (JSC::dateProtoFuncGetDay):
615 (JSC::dateProtoFuncGetUTCDay):
616 (JSC::dateProtoFuncGetHours):
617 (JSC::dateProtoFuncGetUTCHours):
618 (JSC::dateProtoFuncGetMinutes):
619 (JSC::dateProtoFuncGetUTCMinutes):
620 (JSC::dateProtoFuncGetSeconds):
621 (JSC::dateProtoFuncGetUTCSeconds):
622 (JSC::dateProtoFuncGetTimezoneOffset):
623 (JSC::setNewValueFromTimeArgs):
624 (JSC::setNewValueFromDateArgs):
625 (JSC::dateProtoFuncSetYear):
626 (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
628 2009-11-09 Geoffrey Garen <ggaren@apple.com>
630 Build fix: export a new symbol.
632 * JavaScriptCore.exp:
633 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
635 2009-11-09 Geoffrey Garen <ggaren@apple.com>
637 Reviewed by Sam "Home Wrecker" Weinig.
639 Added a tiny cache for Date parsing.
641 SunSpider says 1.2% faster.
643 * runtime/DateConversion.cpp:
644 (JSC::parseDate): Try to reuse the last parsed Date, if present.
646 * runtime/JSGlobalData.cpp:
647 (JSC::JSGlobalData::resetDateCache):
648 * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
649 this code to make resetting the date cache easier.
651 * runtime/JSGlobalObject.h:
652 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
656 (JSC::parseDateFromNullTerminatedCharacters):
657 * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
659 2009-11-09 Oliver Hunt <oliver@apple.com>
661 Reviewed by Gavin Barraclough.
663 Can cache prototype lookups on uncacheable dictionaries.
664 https://bugs.webkit.org/show_bug.cgi?id=31198
666 Replace fromDictionaryTransition with flattenDictionaryObject and
667 flattenDictionaryStructure. This change is necessary as we need to
668 guarantee that our attempt to convert away from a dictionary structure
669 will definitely succeed, and in some cases this requires mutating the
670 object storage itself.
672 * interpreter/Interpreter.cpp:
673 (JSC::Interpreter::tryCacheGetByID):
675 (JSC::JITThunks::tryCacheGetByID):
676 (JSC::DEFINE_STUB_FUNCTION):
677 * runtime/BatchedTransitionOptimizer.h:
678 (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
679 * runtime/JSObject.h:
680 (JSC::JSObject::flattenDictionaryObject):
681 * runtime/Operations.h:
682 (JSC::normalizePrototypeChain):
683 * runtime/Structure.cpp:
684 (JSC::Structure::flattenDictionaryStructure):
685 (JSC::comparePropertyMapEntryIndices):
686 * runtime/Structure.h:
688 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
690 Not reviewed, build fix.
692 Remove extra character from r50701.
694 * JavaScriptCore.pri:
696 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
698 Not reviewed, build fix.
700 Revert r50695 because it broke QtWebKit (clean builds).
702 * JavaScriptCore.pri:
704 2009-11-09 Norbert Leser <norbert.leser@nokia.com>
706 Reviewed by Kenneth Rohde Christiansen.
708 Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
709 Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
710 and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
712 * JavaScriptCore.pri:
714 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
716 Reviewed by Kenneth Rohde Christiansen.
718 Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
719 https://bugs.webkit.org/show_bug.cgi?id=31040
721 * interpreter/Interpreter.cpp:
722 (JSC::Interpreter::privateExecute):
724 2009-11-08 David Levin <levin@chromium.org>
726 Reviewed by NOBODY (speculative snow leopard and windows build fixes).
729 (WTF::parseDateFromNullTerminatedCharacters):
730 (JSC::gregorianDateTimeToMS):
731 (JSC::msToGregorianDateTime):
732 (JSC::parseDateFromNullTerminatedCharacters):
734 (JSC::GregorianDateTime::GregorianDateTime):
736 2009-11-08 David Levin <levin@chromium.org>
738 Reviewed by NOBODY (chromium build fix).
740 Hopefully, the last build fix.
742 Create better separation in DateMath about the JSC
743 and non-JSC portions. Also, only expose the non-JSC
744 version in the exports.
746 * JavaScriptCore.exp:
747 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
749 (WTF::parseDateFromNullTerminatedCharacters):
751 (JSC::gregorianDateTimeToMS):
752 (JSC::msToGregorianDateTime):
753 (JSC::parseDateFromNullTerminatedCharacters):
757 2009-11-08 David Levin <levin@chromium.org>
759 Reviewed by NOBODY (chromium build fix).
761 For the change in DateMath.
766 2009-11-06 Geoffrey Garen <ggaren@apple.com>
768 Windows build fix: export some symbols.
770 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
772 2009-11-06 Geoffrey Garen <ggaren@apple.com>
774 Build fix: updated export file.
776 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
778 2009-11-06 Geoffrey Garen <ggaren@apple.com>
780 Build fix: added some #includes.
785 2009-11-06 Geoffrey Garen <ggaren@apple.com>
787 Reviewed by Oliver Hunt.
789 https://bugs.webkit.org/show_bug.cgi?id=31197
790 Implemented a timezone cache not based on Mac OS X's notify_check API.
792 If the VM calculates the local timezone offset from UTC, it caches the
793 result until the end of the current VM invocation. (We don't want to cache
794 forever, because the user's timezone may change over time.)
796 This removes notify_* overhead on Mac, and, more significantly, removes
797 OS time and date call overhead on non-Mac platforms.
799 ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
800 speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
802 * JavaScriptCore.exp:
804 * interpreter/CachedCall.h:
805 (JSC::CachedCall::CachedCall):
806 * interpreter/Interpreter.cpp:
807 (JSC::Interpreter::execute):
808 * runtime/JSGlobalObject.h:
809 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the
810 DynamicGlobalObjectScope constructor responsible for checking whether a
811 dynamicGlobalObject has already been set. This eliminated some duplicate
812 client code, and allowed me to avoid adding even more duplicate client
813 code. Made DynamicGlobalObjectScope responsible for resetting the
814 local timezone cache upon first entry to the VM.
816 * runtime/DateConstructor.cpp:
817 (JSC::constructDate):
821 * runtime/DateConversion.cpp:
823 * runtime/DateConversion.h:
824 * runtime/DateInstance.cpp:
825 (JSC::DateInstance::gregorianDateTime):
826 * runtime/DateInstance.h:
827 * runtime/DateInstanceCache.h:
828 * runtime/DatePrototype.cpp:
829 (JSC::setNewValueFromTimeArgs):
830 (JSC::setNewValueFromDateArgs):
831 (JSC::dateProtoFuncSetYear):
832 * runtime/InitializeThreading.cpp:
833 (JSC::initializeThreadingOnce):
834 * runtime/JSGlobalData.cpp:
835 (JSC::JSGlobalData::JSGlobalData):
836 * runtime/JSGlobalData.h:
838 (WTF::getCurrentUTCTime):
839 (WTF::getCurrentUTCTimeWithMicroseconds):
841 (JSC::getUTCOffset): Use the new cache. Also, see below.
842 (JSC::gregorianDateTimeToMS):
843 (JSC::msToGregorianDateTime):
844 (JSC::initializeDates):
845 (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
846 accounts for the local timezone offset, to accomodate our new caching API,
847 and a (possibly misguided) caller in WebCore. Also, see below.
849 (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
850 DateMath.* into the JSC namespace. The code needed to move so it could
851 naturally interact with ExecState and JSGlobalData to support caching.
852 Logically, it seemed right to move it, too, since this code is not really
853 as low-level as the WTF namespace might imply -- it implements a set of
854 date parsing and conversion quirks that are finely tuned to the JavaScript
855 language. Also removed the Mac OS X notify_* infrastructure.
858 (WTF::currentTimeMS):
859 (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
860 it to make it consistent with WTF's currentTime function.
862 2009-11-06 Gabor Loki <loki@inf.u-szeged.hu>
864 Unreviewed trivial buildfix after r50595.
866 Rename the remaining rshiftPtr calls to rshift32
868 * jit/JITArithmetic.cpp:
869 (JSC::JIT::emit_op_rshift):
870 * jit/JITInlineMethods.h:
871 (JSC::JIT::emitFastArithImmToInt):
873 2009-11-06 Gavin Barraclough <barraclough@apple.com>
875 Reviewed by Oliver Hunt.
877 Tidy up the shift methods on the macro-assembler interface.
879 Currently behaviour of shifts of a magnitude > 0x1f is undefined.
880 Instead defined that all shifts are masked to this range. This makes a lot of
881 practical sense, both since having undefined behaviour is not particularly
882 desirable, and because this behaviour is commonly required (particularly since
883 it is required bt ECMA-262 for shifts).
885 Update the ARM assemblers to provide this behaviour. Remove (now) redundant
886 masks from JITArithmetic, and remove rshiftPtr (this was used in case that
887 could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
888 on x86-64, which uses JSVALUE64!)
890 * assembler/MacroAssembler.h:
891 * assembler/MacroAssemblerARM.h:
892 (JSC::MacroAssemblerARM::lshift32):
893 (JSC::MacroAssemblerARM::rshift32):
894 * assembler/MacroAssemblerARMv7.h:
895 (JSC::MacroAssemblerARMv7::lshift32):
896 (JSC::MacroAssemblerARMv7::rshift32):
897 * assembler/MacroAssemblerX86_64.h:
898 * jit/JITArithmetic.cpp:
899 (JSC::JIT::emit_op_lshift):
900 (JSC::JIT::emit_op_rshift):
902 2009-11-05 Gavin Barraclough <barraclough@apple.com>
904 Rubber Stamped by Oliver Hunt.
906 Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
908 * jit/JITInlineMethods.h:
909 (JSC::JIT::emitPutJITStubArg):
910 (JSC::JIT::emitPutJITStubArgConstant):
911 (JSC::JIT::emitGetJITStubArg):
912 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
914 (JSC::JITStubCall::JITStubCall):
915 (JSC::JITStubCall::getArgument):
918 2009-11-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
920 Reviewed by Gavin Barraclough.
922 https://bugs.webkit.org/show_bug.cgi?id=31159
923 Fix branchDouble behaviour on ARM THUMB2 JIT.
925 The x86 branchDouble behaviour is reworked, and all JIT
926 ports should follow the x86 port. See bug 31104 and 31151
928 This patch contains a fix for the traditional ARM port
930 * assembler/ARMAssembler.h:
931 (JSC::ARMAssembler::):
932 (JSC::ARMAssembler::fmrs_r):
933 (JSC::ARMAssembler::ftosid_r):
934 * assembler/MacroAssemblerARM.h:
935 (JSC::MacroAssemblerARM::):
936 (JSC::MacroAssemblerARM::branchDouble):
937 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
939 2009-11-05 Chris Jerdonek <chris.jerdonek@gmail.com>
941 Reviewed by Eric Seidel.
943 Removed the "this is part of the KDE project" comments from
944 all *.h, *.cpp, *.idl, and *.pm files.
946 https://bugs.webkit.org/show_bug.cgi?id=31167
948 The maintenance and architecture page in the project wiki lists
951 This change includes no changes or additions to test cases
952 since the change affects only comments.
954 * wtf/wince/FastMallocWince.h:
956 2009-11-05 Gabor Loki <loki@inf.u-szeged.hu>
958 Reviewed by Gavin Barraclough.
960 Use ARMv7 specific encoding for immediate constants on ARMv7 target
961 https://bugs.webkit.org/show_bug.cgi?id=31060
963 * assembler/ARMAssembler.cpp:
964 (JSC::ARMAssembler::getOp2): Use INVALID_IMM
965 (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
966 (JSC::ARMAssembler::moveImm): Ditto.
967 (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
968 instructions or a PC relative load.
969 * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
970 encoded as an immediate constant.
971 (JSC::ARMAssembler::):
972 (JSC::ARMAssembler::movw_r): 16-bit immediate load
973 (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
974 (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
977 2009-11-04 Mark Mentovai <mark@chromium.org>
979 Reviewed by Mark Rowe.
981 Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
982 BUILDING_ON_TIGER and BUILDING_ON_LEOPARD. The TARGETING_ macros
983 consider the deployment target; the BUILDING_ON_ macros consider the
984 headers being built against.
988 2009-11-04 Gavin Barraclough <barraclough@apple.com>
990 Reviewed by Oliver Hunt.
992 https://bugs.webkit.org/show_bug.cgi?id=31151
993 Fix branchDouble behaviour on ARM THUMB2 JIT.
995 The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
996 for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
997 branch on unordered operands. Similarly, DoubleLessThanOrUnordered &
998 DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
999 ARMv7Assembler::ConditionLS, whereas they should be using
1000 ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
1002 Fix these, and fill out the missing DoubleConditions.
1004 * assembler/MacroAssemblerARMv7.h:
1005 (JSC::MacroAssemblerARMv7::):
1006 (JSC::MacroAssemblerARMv7::branchDouble):
1008 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1010 Rubber Stamped by Oliver Hunt.
1012 Enable native call optimizations on ARMv7. (Existing ARM_TRADITIONAL
1013 implementation was generic, worked perfectly, just needed turning on).
1015 * jit/JITOpcodes.cpp:
1018 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1020 Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
1022 Add a missing assert to the ARMv7 JIT.
1024 * assembler/ARMv7Assembler.h:
1025 (JSC::ARMThumbImmediate::ARMThumbImmediate):
1027 2009-11-04 Mark Rowe <mrowe@apple.com>
1029 Rubber-stamped by Oliver Hunt.
1031 Remove bogus op_ prefix on dumped version of three opcodes.
1033 * bytecode/CodeBlock.cpp:
1034 (JSC::CodeBlock::dump):
1036 2009-11-04 Mark Rowe <mrowe@apple.com>
1038 Reviewed by Sam Weinig.
1040 Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
1042 We do this by having the registerName function return information about the constant if the register
1043 number corresponds to a constant. This requires that registerName, and several functions that call it,
1044 be converted to member functions of CodeBlock so that the constant value can be retrieved. The
1045 ExecState also needs to be threaded down through these functions so that it can be passed on to
1046 constantName when needed.
1048 * bytecode/CodeBlock.cpp:
1049 (JSC::constantName):
1050 (JSC::CodeBlock::registerName):
1051 (JSC::CodeBlock::printUnaryOp):
1052 (JSC::CodeBlock::printBinaryOp):
1053 (JSC::CodeBlock::printConditionalJump):
1054 (JSC::CodeBlock::printGetByIdOp):
1055 (JSC::CodeBlock::printPutByIdOp):
1056 (JSC::CodeBlock::dump):
1057 * bytecode/CodeBlock.h:
1058 (JSC::CodeBlock::isConstantRegisterIndex):
1060 2009-11-04 Pavel Heimlich <tropikhajma@gmail.com>
1062 Reviewed by Alexey Proskuryakov.
1064 https://bugs.webkit.org/show_bug.cgi?id=30647
1065 Solaris build failure due to strnstr.
1067 * wtf/StringExtras.h: Enable strnstr on Solaris, too.
1069 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1071 Reviewed by Oliver Hunt.
1073 https://bugs.webkit.org/show_bug.cgi?id=31104
1074 Refactor x86-specific behaviour out of the JIT.
1076 - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
1077 - Refactor double to int conversion out into the MacroAssembler.
1078 - 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.
1079 - 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.
1081 * assembler/MacroAssemblerARM.h:
1082 (JSC::MacroAssemblerARM::):
1083 * assembler/MacroAssemblerARMv7.h:
1084 (JSC::MacroAssemblerARMv7::):
1085 * assembler/MacroAssemblerX86Common.h:
1086 (JSC::MacroAssemblerX86Common::):
1087 (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
1088 (JSC::MacroAssemblerX86Common::branchDouble):
1089 (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
1090 * jit/JITArithmetic.cpp:
1091 (JSC::JIT::emitBinaryDoubleOp):
1092 (JSC::JIT::emit_op_div):
1093 (JSC::JIT::emitSlow_op_jnless):
1094 (JSC::JIT::emitSlow_op_jnlesseq):
1095 * jit/JITOpcodes.cpp:
1096 (JSC::JIT::emit_op_jfalse):
1098 2009-11-04 Mark Mentovai <mark@chromium.org>
1100 Reviewed by Eric Seidel.
1102 Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp. This is supposed
1103 to be set as needed only in wtf/Platform.h.
1105 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1107 2009-11-02 Oliver Hunt <oliver@apple.com>
1109 Reviewed by Gavin Barraclough.
1111 REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
1112 https://bugs.webkit.org/show_bug.cgi?id=31045
1114 Add guards to prevent caching of prototype chain lookups with dictionaries at the
1115 head of the chain. Also add a few tighter assertions to cached prototype lookups
1116 to catch this in future.
1118 * interpreter/Interpreter.cpp:
1119 (JSC::Interpreter::tryCacheGetByID):
1120 (JSC::Interpreter::privateExecute):
1122 (JSC::JITThunks::tryCacheGetByID):
1124 2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1126 Reviewed by Darin Adler.
1128 PLATFORM(CF) should be set when building for Qt on Darwin
1129 https://bugs.webkit.org/show_bug.cgi?id=23671
1131 * wtf/Platform.h: Turn on CF support if both QT and DARWIN
1132 platforms are defined.
1134 2009-11-02 Dmitry Titov <dimich@chromium.org>
1136 Reviewed by David Levin.
1138 Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
1139 https://bugs.webkit.org/show_bug.cgi?id=30612
1141 * wtf/MessageQueue.h:
1142 (WTF::MessageQueue::alwaysTruePredicate):
1143 (WTF::MessageQueue::~MessageQueue):
1144 (WTF::MessageQueue::append):
1145 (WTF::MessageQueue::appendAndCheckEmpty):
1146 (WTF::MessageQueue::prepend):
1147 (WTF::MessageQueue::waitForMessage):
1148 (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
1149 (WTF::MessageQueue::tryGetMessage):
1150 (WTF::MessageQueue::removeIf):
1151 The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
1152 of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
1153 All methods have arguments of type PassOwnPtr<DataType> and return the same type.
1155 * wtf/Threading.cpp:
1156 (WTF::createThread):
1157 Superficial change to trigger rebuild of JSC project on Windows,
1158 workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
1160 2009-10-30 Geoffrey Garen <ggaren@apple.com>
1162 Reviewed by Oliver Hunt.
1164 Fixed failing layout test: restore a special case I accidentally deleted.
1166 * runtime/DatePrototype.cpp:
1167 (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
1168 that is NaN, reset the date to 0 *and* then apply the change; don't just
1169 reset the date to 0.
1171 2009-10-30 Geoffrey Garen <ggaren@apple.com>
1173 Windows build fix: update for object-to-pointer change.
1175 * runtime/DatePrototype.cpp:
1176 (JSC::formatLocaleDate):
1178 2009-10-29 Geoffrey Garen <ggaren@apple.com>
1180 Reviewed by Darin Adler.
1182 https://bugs.webkit.org/show_bug.cgi?id=30942
1183 Use pointers instead of copies to pass GregorianDateTime objects around.
1185 SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
1186 speedup on date-format-tofte.
1188 * runtime/DateInstance.cpp:
1189 (JSC::DateInstance::gregorianDateTime):
1190 * runtime/DateInstance.h:
1191 * runtime/DatePrototype.cpp:
1192 (JSC::formatLocaleDate):
1193 (JSC::dateProtoFuncToString):
1194 (JSC::dateProtoFuncToUTCString):
1195 (JSC::dateProtoFuncToISOString):
1196 (JSC::dateProtoFuncToDateString):
1197 (JSC::dateProtoFuncToTimeString):
1198 (JSC::dateProtoFuncGetFullYear):
1199 (JSC::dateProtoFuncGetUTCFullYear):
1200 (JSC::dateProtoFuncToGMTString):
1201 (JSC::dateProtoFuncGetMonth):
1202 (JSC::dateProtoFuncGetUTCMonth):
1203 (JSC::dateProtoFuncGetDate):
1204 (JSC::dateProtoFuncGetUTCDate):
1205 (JSC::dateProtoFuncGetDay):
1206 (JSC::dateProtoFuncGetUTCDay):
1207 (JSC::dateProtoFuncGetHours):
1208 (JSC::dateProtoFuncGetUTCHours):
1209 (JSC::dateProtoFuncGetMinutes):
1210 (JSC::dateProtoFuncGetUTCMinutes):
1211 (JSC::dateProtoFuncGetSeconds):
1212 (JSC::dateProtoFuncGetUTCSeconds):
1213 (JSC::dateProtoFuncGetTimezoneOffset):
1214 (JSC::setNewValueFromTimeArgs):
1215 (JSC::setNewValueFromDateArgs):
1216 (JSC::dateProtoFuncSetYear):
1217 (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
1218 since it no longer has an out parameter. Uses 0 to indicate invalid dates.
1220 2009-10-30 Zoltan Horvath <zoltan@webkit.org>
1222 Reviewed by Darin Adler.
1224 Allow custom memory allocation control for JavaScriptCore's ListHashSet
1225 https://bugs.webkit.org/show_bug.cgi?id=30853
1227 Inherits ListHashSet class from FastAllocBase because it is
1228 instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
1230 * wtf/ListHashSet.h:
1232 2009-10-30 Oliver Hunt <oliver@apple.com>
1234 Reviewed by Gavin Barraclough.
1236 Regression: crash enumerating properties of an object with getters or setters
1237 https://bugs.webkit.org/show_bug.cgi?id=30948
1239 Add a guard to prevent us trying to cache property enumeration on
1240 objects with getters or setters.
1242 * runtime/JSPropertyNameIterator.cpp:
1243 (JSC::JSPropertyNameIterator::create):
1245 2009-10-30 Roland Steiner <rolandsteiner@chromium.org>
1247 Reviewed by Eric Seidel.
1249 Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
1251 Bug 28420 - Implement HTML5 <ruby> rendering
1252 (https://bugs.webkit.org/show_bug.cgi?id=28420)
1254 No new tests (no functional change).
1256 * Configurations/FeatureDefines.xcconfig:
1258 2009-10-29 Oliver Hunt <oliver@apple.com>
1260 Reviewed by Maciej Stachowiak.
1262 REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
1263 https://bugs.webkit.org/show_bug.cgi?id=30947
1264 <rdar://problem/7348833>
1266 The logic for flagging that a structure has non-enumerable properties
1267 was in addPropertyWithoutTransition, rather than in the core Structure::put
1268 method. Despite this I was unable to produce a testcase that caused
1269 the failure that etrade was experiencing, but the new assertion in
1270 getEnumerablePropertyNames triggers on numerous layout tests without
1271 the fix, so in effecti all for..in enumeration in any test ends up
1272 doing the required consistency check.
1274 * runtime/Structure.cpp:
1275 (JSC::Structure::addPropertyWithoutTransition):
1276 (JSC::Structure::put):
1277 (JSC::Structure::getEnumerablePropertyNames):
1278 (JSC::Structure::checkConsistency):
1280 2009-10-29 Gabor Loki <loki@inf.u-szeged.hu>
1282 Reviewed by Gavin Barraclough.
1284 Add cacheFlush support for Thumb-2 on Linux
1285 https://bugs.webkit.org/show_bug.cgi?id=30865
1287 * jit/ExecutableAllocator.h:
1288 (JSC::ExecutableAllocator::cacheFlush):
1290 2009-10-28 Gavin Barraclough <barraclough@apple.com>
1292 Reviewed by Oliver Hunt.
1294 JSC JIT on ARMv7 cannot link jumps >16Mb range
1295 https://bugs.webkit.org/show_bug.cgi?id=30891
1297 Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
1298 In the cases where the jump would fall within a relative jump range, use a relative jump.
1300 * JavaScriptCore.xcodeproj/project.pbxproj:
1301 * assembler/ARMv7Assembler.h:
1302 (JSC::ARMv7Assembler::~ARMv7Assembler):
1303 (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
1304 (JSC::ARMv7Assembler::):
1305 (JSC::ARMv7Assembler::executableCopy):
1306 (JSC::ARMv7Assembler::linkJump):
1307 (JSC::ARMv7Assembler::relinkJump):
1308 (JSC::ARMv7Assembler::setInt32):
1309 (JSC::ARMv7Assembler::isB):
1310 (JSC::ARMv7Assembler::isBX):
1311 (JSC::ARMv7Assembler::isMOV_imm_T3):
1312 (JSC::ARMv7Assembler::isMOVT):
1313 (JSC::ARMv7Assembler::isNOP_T1):
1314 (JSC::ARMv7Assembler::isNOP_T2):
1315 (JSC::ARMv7Assembler::linkJumpAbsolute):
1316 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
1317 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
1318 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
1319 * assembler/MacroAssemblerARMv7.h:
1320 (JSC::MacroAssemblerARMv7::makeJump):
1321 (JSC::MacroAssemblerARMv7::makeBranch):
1325 2009-10-28 Oliver Hunt <oliver@apple.com>
1327 Reviewed by Geoff Garen.
1329 Improve for..in enumeration performance
1330 https://bugs.webkit.org/show_bug.cgi?id=30887
1332 Improve indexing of an object with a for..in iterator by
1333 identifying cases where get_by_val is being used with a iterator
1334 as the subscript and replace it with a new get_by_pname
1335 bytecode. get_by_pname then optimizes lookups that directly access
1338 * bytecode/CodeBlock.cpp:
1339 (JSC::CodeBlock::dump):
1340 * bytecode/Opcode.h:
1341 * bytecompiler/BytecodeGenerator.cpp:
1342 (JSC::BytecodeGenerator::emitGetByVal):
1343 * bytecompiler/BytecodeGenerator.h:
1344 (JSC::BytecodeGenerator::pushOptimisedForIn):
1345 (JSC::BytecodeGenerator::popOptimisedForIn):
1346 * interpreter/Interpreter.cpp:
1347 (JSC::Interpreter::privateExecute):
1349 (JSC::JIT::privateCompileMainPass):
1350 (JSC::JIT::privateCompileSlowCases):
1352 * jit/JITPropertyAccess.cpp:
1353 (JSC::JIT::compileGetDirectOffset):
1354 (JSC::JIT::emit_op_get_by_pname):
1355 (JSC::JIT::emitSlow_op_get_by_pname):
1357 (JSC::ForInNode::emitBytecode):
1358 * runtime/JSObject.h:
1359 * runtime/JSPropertyNameIterator.cpp:
1360 (JSC::JSPropertyNameIterator::create):
1361 * runtime/JSPropertyNameIterator.h:
1362 (JSC::JSPropertyNameIterator::getOffset):
1363 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1364 * runtime/JSValue.h:
1366 * runtime/Structure.cpp:
1367 (JSC::Structure::addPropertyTransition):
1368 (JSC::Structure::changePrototypeTransition):
1369 (JSC::Structure::despecifyFunctionTransition):
1370 (JSC::Structure::addAnonymousSlotsTransition):
1371 (JSC::Structure::getterSetterTransition):
1372 (JSC::Structure::toDictionaryTransition):
1373 (JSC::Structure::addPropertyWithoutTransition):
1374 Track the existence (or not) of non-enumerable properties.
1375 * runtime/Structure.h:
1376 (JSC::Structure::propertyStorageCapacity):
1377 (JSC::Structure::propertyStorageSize):
1378 (JSC::Structure::hasNonEnumerableProperties):
1379 (JSC::Structure::hasAnonymousSlots):
1381 2009-10-28 Dmitry Titov <dimich@chromium.org>
1383 Not reviewed, attemp to fix Windows build.
1385 Touch the cpp file to cause recompile.
1387 * wtf/Threading.cpp:
1388 (WTF::threadEntryPoint):
1390 2009-10-28 Dmitry Titov <dimich@chromium.org>
1392 Reviewed by David Levin.
1394 https://bugs.webkit.org/show_bug.cgi?id=30805
1395 Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
1396 Existing Database tests cover this since Database removes tasks when it is stopped.
1398 * wtf/MessageQueue.h:
1401 2009-10-28 Afonso R. Costa Jr. <afonso.costa@openbossa.org>
1403 Reviewed by Oliver Hunt.
1405 [Qt] Enable YARR when YARR_JIT is enabled
1406 https://bugs.webkit.org/show_bug.cgi?id=30730
1408 When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
1411 * JavaScriptCore.pri:
1413 2009-10-24 Martin Robinson <martin.james.robinson@gmail.com>
1415 Reviewed by Oliver Hunt.
1417 Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
1419 strict-aliasing warnings in JSFunction.h
1420 https://bugs.webkit.org/show_bug.cgi?id=27869
1422 * runtime/JSFunction.h:
1423 (JSC::JSFunction::nativeFunction):
1424 (JSC::JSFunction::scopeChain):
1425 (JSC::JSFunction::setScopeChain):
1426 (JSC::JSFunction::setNativeFunction):
1428 2009-10-28 Jan-Arve Sæther <jan-arve.saether@nokia.com>
1430 Reviewed by Tor Arne Vestbø.
1432 Build-fix for 64-bit Windows
1434 * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
1436 2009-10-28 Gavin Barraclough <barraclough@apple.com>
1438 Reviewed by NOBODY (build fix!).
1442 2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
1444 Rubber-stamped by Darin Adler.
1446 Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
1447 https://bugs.webkit.org/show_bug.cgi?id=30769
1449 When using -fvisibility=hidden to hide all internal symbols by default
1450 the malloc symbols will be hidden as well. For memory instrumentation
1451 it is needed to provide an instrumented version of these symbols and
1452 override the normal routines and by changing the visibility back to
1453 default this becomes possible.
1455 The only other solution would be to use system malloc instead of the
1456 TCmalloc implementation but this will not allow to analyze memory
1457 behavior with the default allocator.
1459 * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
1461 2009-10-27 Gavin Barraclough <barraclough@apple.com>
1463 Rubber Stamped by Samuel Q. Weinig.
1465 Make the asserts protecting the offsets in the JIT more descriptive.
1469 (JSC::JIT::compileOpCall):
1470 * jit/JITPropertyAccess.cpp:
1471 (JSC::JIT::emit_op_method_check):
1472 (JSC::JIT::compileGetByIdHotPath):
1473 (JSC::JIT::compileGetByIdSlowCase):
1474 (JSC::JIT::emit_op_put_by_id):
1476 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1478 Reviewed by Sam Weinig.
1480 A little bit of refactoring in the date code.
1482 * JavaScriptCore.exp: Don't export this unused symbol.
1484 * runtime/DateConstructor.cpp:
1485 (JSC::constructDate):
1487 * runtime/DateInstance.cpp:
1488 (JSC::DateInstance::DateInstance):
1489 * runtime/DateInstance.h: Removed some unused functions. Changed the default
1490 constructor to ensure that a DateInstance is always initialized.
1492 * runtime/DatePrototype.cpp:
1493 (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
1494 since it now requires one.
1497 (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
1498 output will require it. Otherwise, our offset is 0.
1500 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1502 Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
1504 * JavaScriptCore.xcodeproj/project.pbxproj:
1506 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1508 Build fix: re-readded this file.
1510 * runtime/DateInstanceCache.h: Added.
1511 (JSC::DateInstanceData::create):
1512 (JSC::DateInstanceData::DateInstanceData):
1513 (JSC::DateInstanceCache::DateInstanceCache):
1514 (JSC::DateInstanceCache::add):
1515 (JSC::DateInstanceCache::lookup):
1517 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1519 Reviewed by Darin Adler and Oliver Hunt.
1521 https://bugs.webkit.org/show_bug.cgi?id=30800
1522 Cache recently computed date data.
1524 SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
1527 * JavaScriptCore.gypi:
1528 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1529 * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
1531 * runtime/DateInstance.cpp:
1532 (JSC::DateInstance::DateInstance):
1533 (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
1535 * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
1538 * runtime/DatePrototype.cpp:
1539 (JSC::formatLocaleDate):
1540 (JSC::dateProtoFuncToString):
1541 (JSC::dateProtoFuncToUTCString):
1542 (JSC::dateProtoFuncToISOString):
1543 (JSC::dateProtoFuncToDateString):
1544 (JSC::dateProtoFuncToTimeString):
1545 (JSC::dateProtoFuncGetFullYear):
1546 (JSC::dateProtoFuncGetUTCFullYear):
1547 (JSC::dateProtoFuncToGMTString):
1548 (JSC::dateProtoFuncGetMonth):
1549 (JSC::dateProtoFuncGetUTCMonth):
1550 (JSC::dateProtoFuncGetDate):
1551 (JSC::dateProtoFuncGetUTCDate):
1552 (JSC::dateProtoFuncGetDay):
1553 (JSC::dateProtoFuncGetUTCDay):
1554 (JSC::dateProtoFuncGetHours):
1555 (JSC::dateProtoFuncGetUTCHours):
1556 (JSC::dateProtoFuncGetMinutes):
1557 (JSC::dateProtoFuncGetUTCMinutes):
1558 (JSC::dateProtoFuncGetSeconds):
1559 (JSC::dateProtoFuncGetUTCSeconds):
1560 (JSC::dateProtoFuncGetTimezoneOffset):
1561 (JSC::setNewValueFromTimeArgs):
1562 (JSC::setNewValueFromDateArgs):
1563 (JSC::dateProtoFuncSetYear):
1564 (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
1565 can access the DateInstanceCache.
1567 * runtime/JSGlobalData.h: Keep a DateInstanceCache.
1569 2009-10-27 James Robinson <jamesr@chromium.org>
1571 Reviewed by Darin Fisher.
1573 Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
1575 Chromium uses a different method to calculate the current time than is used in
1576 JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
1577 function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use.
1578 See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
1580 https://bugs.webkit.org/show_bug.cgi?id=30833
1582 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1583 * wtf/CurrentTime.cpp:
1585 2009-10-27 Peter Varga <pvarga@inf.u-szeged.hu>
1587 Rubber-stamped by Tor Arne Vestbø.
1589 Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
1592 * yarr/RegexInterpreter.cpp:
1593 (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1594 (JSC::Yarr::ByteCompiler::alternativeDisjunction):
1595 (JSC::Yarr::ByteCompiler::emitDisjunction):
1596 * yarr/RegexJIT.cpp:
1597 (JSC::Yarr::RegexGenerator::generateDisjunction):
1599 2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1601 Reviewed by Darin Adler.
1603 Make .rc files compile on Windows without depending on MFC headers
1604 https://bugs.webkit.org/show_bug.cgi?id=30750
1606 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
1607 winresrc.h because it exists even when MFC is not installed, and is
1608 all that's needed here.
1610 2009-10-26 Gabor Loki <loki@inf.u-szeged.hu>
1612 Reviewed by Gavin Barraclough.
1614 The thunkReturnAddress is on JITStackFrame on ARM JIT as well
1615 https://bugs.webkit.org/show_bug.cgi?id=30782
1617 Move the thunkReturnAddress from top of the stack into the JITStackFrame
1618 structure. This is a requirement for JSValue32_64 support on ARM.
1620 * assembler/MacroAssemblerARM.h:
1621 (JSC::MacroAssemblerARM::ret): Return with link register
1622 (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
1623 * jit/JIT.h: Remove unused ctiReturnRegister
1624 * jit/JITInlineMethods.h: Same as ARMv7
1625 (JSC::JIT::restoreArgumentReference): Ditto.
1626 (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
1627 * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
1628 * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
1629 small trampoline functions which handle return addresses for each
1631 * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
1632 (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
1633 * yarr/RegexJIT.cpp:
1634 (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
1636 2009-10-26 Steve Block <steveblock@google.com>
1638 Reviewed by Darin Adler.
1640 Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
1641 https://bugs.webkit.org/show_bug.cgi?id=30713
1643 * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
1644 * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
1645 * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
1647 2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1649 Reviewed by Holger Freyther.
1651 [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
1652 https://bugs.webkit.org/show_bug.cgi?id=30476
1654 Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
1659 2009-10-23 Steve Block <steveblock@google.com>
1661 Reviewed by Dmitry Titov.
1663 Fixes a leak in createThreadInternal on Android.
1664 https://bugs.webkit.org/show_bug.cgi?id=30698
1666 * wtf/ThreadingPthreads.cpp: Modified.
1667 (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
1669 2009-10-22 Geoffrey Garen <ggaren@apple.com>
1671 Reviewed by Alexey Proskuryakov.
1673 Fixed ASSERT when opening Safari's Caches window while the Web Inspector
1676 * runtime/Collector.cpp:
1677 (JSC::typeName): Added two new types to the type name list in the Collector.
1678 These types have been around for a while, but nobody remembered to consider them here.
1681 (JSC::JSCell::isPropertyNameIterator):
1682 * runtime/JSPropertyNameIterator.h:
1683 (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
1684 a way to tell if a cell is a JSPropertyNameIterator.
1686 2009-10-22 Steve Falkenburg <sfalken@apple.com>
1688 Reviewed by Jon Honeycutt.
1690 https://bugs.webkit.org/show_bug.cgi?id=30686
1691 Remove debug-specific def file.
1692 Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
1693 that target is only used internally, maintaining two files just to
1694 suppress a single link warning isn't worthwhile.
1696 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1697 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
1699 2009-10-21 Jon Honeycutt <jhoneycutt@apple.com>
1701 <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
1702 <rdar://problem/7270314> After halting a transparent PluginView on
1703 Windows, the transparency is applied twice
1705 Reviewed by Dan Bernstein.
1707 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1708 Export WTF::deleteOwnedPtr(HDC).
1710 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1713 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1715 Windows build fix: updated variable name.
1717 * runtime/DatePrototype.cpp:
1718 (JSC::formatLocaleDate):
1720 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1722 Reviewed by Mark Rowe.
1724 * jit/JITOpcodes.cpp:
1725 (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
1726 size of a JSValue because m_jsStrings is an array of JSValues.
1728 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1730 Reviewed by Mark Rowe.
1732 Fixed a 64-bit regression caused by the fix for
1733 https://bugs.webkit.org/show_bug.cgi?id=30570.
1735 * jit/JITOpcodes.cpp:
1736 (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
1737 64-bit pointers are eight bytes long.
1739 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1741 Reviewed by Sam Weinig.
1743 Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
1744 caller doesn't need to supply the DateInstance's own internal value to
1747 * runtime/DateInstance.cpp:
1748 (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
1750 * runtime/DateInstance.h:
1751 * runtime/DatePrototype.cpp:
1752 (JSC::formatLocaleDate):
1753 (JSC::dateProtoFuncToString):
1754 (JSC::dateProtoFuncToUTCString):
1755 (JSC::dateProtoFuncToISOString):
1756 (JSC::dateProtoFuncToDateString):
1757 (JSC::dateProtoFuncToTimeString):
1758 (JSC::dateProtoFuncToLocaleString):
1759 (JSC::dateProtoFuncToLocaleDateString):
1760 (JSC::dateProtoFuncToLocaleTimeString):
1761 (JSC::dateProtoFuncGetTime):
1762 (JSC::dateProtoFuncGetFullYear):
1763 (JSC::dateProtoFuncGetUTCFullYear):
1764 (JSC::dateProtoFuncToGMTString):
1765 (JSC::dateProtoFuncGetMonth):
1766 (JSC::dateProtoFuncGetUTCMonth):
1767 (JSC::dateProtoFuncGetDate):
1768 (JSC::dateProtoFuncGetUTCDate):
1769 (JSC::dateProtoFuncGetDay):
1770 (JSC::dateProtoFuncGetUTCDay):
1771 (JSC::dateProtoFuncGetHours):
1772 (JSC::dateProtoFuncGetUTCHours):
1773 (JSC::dateProtoFuncGetMinutes):
1774 (JSC::dateProtoFuncGetUTCMinutes):
1775 (JSC::dateProtoFuncGetSeconds):
1776 (JSC::dateProtoFuncGetUTCSeconds):
1777 (JSC::dateProtoFuncGetTimezoneOffset):
1778 (JSC::setNewValueFromTimeArgs):
1779 (JSC::setNewValueFromDateArgs):
1780 (JSC::dateProtoFuncSetYear):
1781 (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
1783 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
1785 Reviewed by Geoffrey Garen.
1787 The op_next_pname should use 4 bytes addressing mode in case of JSValue32
1788 https://bugs.webkit.org/show_bug.cgi?id=30570
1790 * jit/JITOpcodes.cpp:
1791 (JSC::JIT::emit_op_next_pname):
1793 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
1795 Reviewed by Oliver Hunt.
1797 Move OverridesMarkChildren flag from DatePrototype to its parent class
1798 https://bugs.webkit.org/show_bug.cgi?id=30372
1800 * runtime/DateInstance.h:
1801 (JSC::DateInstance::createStructure):
1802 * runtime/DatePrototype.h:
1804 2009-10-19 Geoffrey Garen <ggaren@apple.com>
1806 Reviewed by Oliver Hunt.
1808 Tightened up some put_by_id_transition code generation.
1809 https://bugs.webkit.org/show_bug.cgi?id=30539
1812 * jit/JITPropertyAccess.cpp:
1813 (JSC::JIT::testPrototype):
1814 (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
1815 checks or read Structures and prototypes from objects: they're all known
1816 constants at compile time.
1818 2009-10-19 Geoffrey Garen <ggaren@apple.com>
1820 Reviewed by Sam Weinig.
1822 Added a private API for getting a global context from a context, for
1823 clients who want to preserve a context for a later callback.
1826 (toGlobalRef): Added an ASSERT, since this function is used more often
1829 * API/JSContextRef.cpp:
1830 * API/JSContextRefPrivate.h: Added. The new API.
1832 * API/tests/testapi.c:
1833 (print_callAsFunction):
1834 (main): Test the new API.
1836 * JavaScriptCore.exp:
1837 * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
1839 2009-10-17 Geoffrey Garen <ggaren@apple.com>
1841 Reviewed by Oliver Hunt.
1843 Tightened up some instanceof code generation.
1844 https://bugs.webkit.org/show_bug.cgi?id=30488
1846 * jit/JITOpcodes.cpp:
1847 (JSC::JIT::emit_op_instanceof):
1848 (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks -
1849 cell type checks and ImplementsDefaultHasIntance checks implicitly
1850 supersede object type checks.
1852 2009-10-18 Kwang Yul Seo <skyul@company100.net>
1854 Reviewed by Darin Adler.
1856 Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
1857 https://bugs.webkit.org/show_bug.cgi?id=30474
1859 stricmp and strnicmp are deprecated beginning in Visual
1860 C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
1862 * wtf/StringExtras.h:
1866 2009-10-16 Geoffrey Garen <ggaren@apple.com>
1868 Build fix: apparently we shouldn't export those symbols?
1870 * JavaScriptCore.exp:
1872 2009-10-16 Geoffrey Garen <ggaren@apple.com>
1874 Build fix: export some symbols.
1876 * JavaScriptCore.exp:
1878 2009-10-16 Oliver Hunt <oliver@apple.com>
1880 Reviewed by Gavin Barraclough.
1882 structure typeinfo flags should be inherited.
1883 https://bugs.webkit.org/show_bug.cgi?id=30468
1885 Add StructureFlag constant to the various JSC classes and use
1886 it for the TypeInfo construction. This allows us to simply
1887 accumulate flags by basing each classes StructureInfo on its parents.
1889 * API/JSCallbackConstructor.h:
1890 (JSC::JSCallbackConstructor::createStructure):
1891 * API/JSCallbackFunction.h:
1892 (JSC::JSCallbackFunction::createStructure):
1893 * API/JSCallbackObject.h:
1894 (JSC::JSCallbackObject::createStructure):
1895 * debugger/DebuggerActivation.h:
1896 (JSC::DebuggerActivation::createStructure):
1897 * runtime/Arguments.h:
1898 (JSC::Arguments::createStructure):
1899 * runtime/BooleanObject.h:
1900 (JSC::BooleanObject::createStructure):
1901 * runtime/DatePrototype.h:
1902 (JSC::DatePrototype::createStructure):
1903 * runtime/FunctionPrototype.h:
1904 (JSC::FunctionPrototype::createStructure):
1905 * runtime/GlobalEvalFunction.h:
1906 (JSC::GlobalEvalFunction::createStructure):
1907 * runtime/InternalFunction.h:
1908 (JSC::InternalFunction::createStructure):
1909 * runtime/JSActivation.h:
1910 (JSC::JSActivation::createStructure):
1911 * runtime/JSArray.h:
1912 (JSC::JSArray::createStructure):
1913 * runtime/JSByteArray.cpp:
1914 (JSC::JSByteArray::createStructure):
1915 * runtime/JSByteArray.h:
1916 * runtime/JSFunction.h:
1917 (JSC::JSFunction::createStructure):
1918 * runtime/JSGlobalObject.h:
1919 (JSC::JSGlobalObject::createStructure):
1920 * runtime/JSNotAnObject.h:
1921 (JSC::JSNotAnObject::createStructure):
1922 * runtime/JSONObject.h:
1923 (JSC::JSONObject::createStructure):
1924 * runtime/JSObject.h:
1925 (JSC::JSObject::createStructure):
1926 * runtime/JSStaticScopeObject.h:
1927 (JSC::JSStaticScopeObject::createStructure):
1928 * runtime/JSVariableObject.h:
1929 (JSC::JSVariableObject::createStructure):
1930 * runtime/JSWrapperObject.h:
1931 (JSC::JSWrapperObject::createStructure):
1932 * runtime/MathObject.h:
1933 (JSC::MathObject::createStructure):
1934 * runtime/NumberConstructor.h:
1935 (JSC::NumberConstructor::createStructure):
1936 * runtime/NumberObject.h:
1937 (JSC::NumberObject::createStructure):
1938 * runtime/RegExpConstructor.h:
1939 (JSC::RegExpConstructor::createStructure):
1940 * runtime/RegExpObject.h:
1941 (JSC::RegExpObject::createStructure):
1942 * runtime/StringObject.h:
1943 (JSC::StringObject::createStructure):
1944 * runtime/StringObjectThatMasqueradesAsUndefined.h:
1945 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1947 2009-10-16 Geoffrey Garen <ggaren@apple.com>
1949 Reviewed by Oliver Hunt.
1951 Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
1952 in JSPropertyNameIterator; inline more code.
1954 1.024x as fast on SunSpider (fasta: 1.43x as fast).
1956 * bytecode/CodeBlock.cpp:
1957 (JSC::CodeBlock::dump):
1958 * bytecode/Opcode.h:
1959 * bytecompiler/BytecodeGenerator.cpp:
1960 (JSC::BytecodeGenerator::emitGetPropertyNames):
1961 (JSC::BytecodeGenerator::emitNextPropertyName):
1962 * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
1963 op_get_pnames and op_next_pname so that we can track iteration state
1964 in the register file instead of in the JSPropertyNameIterator. (To be
1965 cacheable, the JSPropertyNameIterator must be stateless.)
1967 * interpreter/Interpreter.cpp:
1968 (JSC::Interpreter::tryCachePutByID):
1969 (JSC::Interpreter::tryCacheGetByID): Updated for rename to
1970 "normalizePrototypeChain" and removal of "isCacheable".
1972 (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
1973 iteration state tracking.
1976 (JSC::JIT::privateCompileMainPass):
1978 * jit/JITOpcodes.cpp:
1979 (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
1980 iteration state tracking.
1982 (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
1985 (JSC::JITThunks::tryCachePutByID):
1986 (JSC::JITThunks::tryCacheGetByID): Updated for rename to
1987 "normalizePrototypeChain" and removal of "isCacheable".
1989 (JSC::DEFINE_STUB_FUNCTION):
1991 (JSC::): Added has_property and to_object stubs. Removed op_next_pname
1992 stub, since has_property is all we need anymore.
1995 (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
1996 iteration state tracking.
1999 * runtime/JSObject.cpp:
2000 (JSC::JSObject::getPropertyNames): Don't do caching at this layer
2001 anymore, since we don't create a JSPropertyNameIterator at this layer.
2003 * runtime/JSPropertyNameIterator.cpp:
2004 (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
2005 (JSC::JSPropertyNameIterator::get): Updated for in-RegisterFile
2006 iteration state tracking.
2007 (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
2009 * runtime/JSPropertyNameIterator.h:
2010 (JSC::JSPropertyNameIterator::size):
2011 (JSC::JSPropertyNameIterator::setCachedStructure):
2012 (JSC::JSPropertyNameIterator::cachedStructure):
2013 (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
2014 (JSC::JSPropertyNameIterator::cachedPrototypeChain):
2015 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2016 (JSC::Structure::setEnumerationCache): Don't store iteration state in
2017 a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
2020 * runtime/JSValue.h:
2022 * runtime/MarkStack.h: Make those mischievous #include gods happy.
2024 * runtime/ObjectConstructor.cpp:
2026 * runtime/Operations.h:
2027 (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
2028 to normalizePrototypeChain, since it changes dictionary prototypes to
2029 non-dictionary objects.
2031 * runtime/PropertyNameArray.cpp:
2032 (JSC::PropertyNameArray::add):
2033 * runtime/PropertyNameArray.h:
2034 (JSC::PropertyNameArrayData::PropertyNameArrayData):
2035 (JSC::PropertyNameArray::data):
2036 (JSC::PropertyNameArray::size):
2037 (JSC::PropertyNameArray::begin):
2038 (JSC::PropertyNameArray::end): Simplified some code here to help with
2039 current and future refactoring.
2041 * runtime/Protect.h:
2042 * runtime/Structure.cpp:
2043 (JSC::Structure::~Structure):
2044 (JSC::Structure::addPropertyWithoutTransition):
2045 (JSC::Structure::removePropertyWithoutTransition): No need to clear
2046 the enumeration cache with adding / removing properties without
2047 transition. It is an error to add / remove properties without transition
2048 once an object has been observed, and we can ASSERT to catch that.
2050 * runtime/Structure.h:
2051 (JSC::Structure::enumerationCache): Changed the enumeration cache to
2052 hold a JSPropertyNameIterator.
2054 * runtime/StructureChain.cpp:
2055 * runtime/StructureChain.h:
2056 (JSC::StructureChain::head): Removed StructureChain::isCacheable because
2057 it was wrong-headed in two ways: (1) It gave up when a prototype was a
2058 dictionary, but instead we want un-dictionary heavily accessed
2059 prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
2060 a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
2061 is only releavant to for-in caching.
2063 2009-10-16 Steve Falkenburg <sfalken@apple.com>
2065 Reviewed by Adam Roben.
2067 Add a Debug_All configuration to build entire stack as debug.
2068 Change Debug_Internal to:
2069 - stop using _debug suffix for all WebKit/Safari binaries
2070 - not use _debug as a DLL naming suffix
2071 - use non-debug C runtime lib.
2073 * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
2074 * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
2075 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
2076 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
2077 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
2078 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
2079 * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
2080 * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
2082 2009-10-16 Oliver Hunt <oliver@apple.com>
2084 Reviewed by Gavin Barraclough.
2086 Make typeinfo flags default to false
2087 https://bugs.webkit.org/show_bug.cgi?id=30372
2089 Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
2092 * API/JSCallbackConstructor.h:
2093 (JSC::JSCallbackConstructor::createStructure):
2094 * API/JSCallbackObject.h:
2095 (JSC::JSCallbackObject::createStructure):
2096 * debugger/DebuggerActivation.h:
2097 (JSC::DebuggerActivation::createStructure):
2098 * runtime/Arguments.h:
2099 (JSC::Arguments::createStructure):
2100 * runtime/BooleanObject.h:
2101 (JSC::BooleanObject::createStructure):
2102 * runtime/DatePrototype.h:
2103 (JSC::DatePrototype::createStructure):
2104 * runtime/FunctionPrototype.h:
2105 (JSC::FunctionPrototype::createStructure):
2106 * runtime/GlobalEvalFunction.h:
2107 (JSC::GlobalEvalFunction::createStructure):
2108 * runtime/JSAPIValueWrapper.h:
2109 (JSC::JSAPIValueWrapper::createStructure):
2110 * runtime/JSActivation.h:
2111 (JSC::JSActivation::createStructure):
2112 * runtime/JSArray.h:
2113 (JSC::JSArray::createStructure):
2114 * runtime/JSByteArray.cpp:
2115 (JSC::JSByteArray::createStructure):
2116 * runtime/JSFunction.h:
2117 (JSC::JSFunction::createStructure):
2118 * runtime/JSGlobalObject.h:
2119 (JSC::JSGlobalObject::createStructure):
2120 * runtime/JSNotAnObject.h:
2121 (JSC::JSNotAnObject::createStructure):
2122 * runtime/JSONObject.h:
2123 (JSC::JSONObject::createStructure):
2124 * runtime/JSObject.cpp:
2125 (JSC::JSObject::getPropertyNames):
2126 * runtime/JSObject.h:
2127 (JSC::JSObject::createStructure):
2128 * runtime/JSStaticScopeObject.h:
2129 (JSC::JSStaticScopeObject::createStructure):
2130 * runtime/JSTypeInfo.h:
2131 (JSC::TypeInfo::overridesGetPropertyNames):
2132 * runtime/JSVariableObject.h:
2133 (JSC::JSVariableObject::createStructure):
2134 * runtime/JSWrapperObject.h:
2135 (JSC::JSWrapperObject::createStructure):
2136 * runtime/MathObject.h:
2137 (JSC::MathObject::createStructure):
2138 * runtime/NumberConstructor.h:
2139 (JSC::NumberConstructor::createStructure):
2140 * runtime/NumberObject.h:
2141 (JSC::NumberObject::createStructure):
2142 * runtime/RegExpConstructor.h:
2143 (JSC::RegExpConstructor::createStructure):
2144 * runtime/RegExpObject.h:
2145 (JSC::RegExpObject::createStructure):
2146 * runtime/StringObject.h:
2147 (JSC::StringObject::createStructure):
2148 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2149 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2150 * runtime/StructureChain.cpp:
2151 (JSC::StructureChain::isCacheable):
2153 2009-10-16 Kevin Ollivier <kevino@theolliviers.com>
2155 wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion
2160 2009-10-16 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2162 Reviewed by Simon Hausmann.
2164 [Qt] Implement ExecutableAllocator for Symbian
2165 https://bugs.webkit.org/show_bug.cgi?id=29946
2167 Tested with YARR JIT enabled for Symbian;
2168 This patch does not (yet) enable YARR JIT by default.
2170 * JavaScriptCore.pri:
2171 * jit/ExecutableAllocator.h:
2172 * jit/ExecutableAllocatorSymbian.cpp: Added.
2173 (JSC::ExecutableAllocator::intializePageSize):
2174 (JSC::ExecutablePool::systemAlloc):
2175 (JSC::ExecutablePool::systemRelease):
2177 2009-10-15 Oliver Hunt <oliver@apple.com>
2179 Reviewed by Darin Adler.
2181 Make typeinfo flags default to false
2182 https://bugs.webkit.org/show_bug.cgi?id=30372
2184 Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
2186 * API/JSCallbackConstructor.h:
2187 (JSC::JSCallbackConstructor::createStructure):
2188 * API/JSCallbackFunction.h:
2189 (JSC::JSCallbackFunction::createStructure):
2190 * API/JSCallbackObject.h:
2191 (JSC::JSCallbackObject::createStructure):
2192 * debugger/DebuggerActivation.h:
2193 (JSC::DebuggerActivation::createStructure):
2194 * runtime/Arguments.h:
2195 (JSC::Arguments::createStructure):
2196 * runtime/BooleanObject.h:
2197 (JSC::BooleanObject::createStructure):
2198 * runtime/DatePrototype.h:
2199 (JSC::DatePrototype::createStructure):
2200 * runtime/FunctionPrototype.h:
2201 (JSC::FunctionPrototype::createStructure):
2202 * runtime/GetterSetter.h:
2203 (JSC::GetterSetter::createStructure):
2204 * runtime/GlobalEvalFunction.h:
2205 (JSC::GlobalEvalFunction::createStructure):
2206 * runtime/InternalFunction.h:
2207 (JSC::InternalFunction::createStructure):
2208 * runtime/JSAPIValueWrapper.h:
2209 (JSC::JSAPIValueWrapper::createStructure):
2210 * runtime/JSActivation.h:
2211 (JSC::JSActivation::createStructure):
2212 * runtime/JSArray.h:
2213 (JSC::JSArray::createStructure):
2214 (JSC::MarkStack::markChildren):
2215 * runtime/JSByteArray.cpp:
2216 (JSC::JSByteArray::createStructure):
2217 * runtime/JSFunction.h:
2218 (JSC::JSFunction::createStructure):
2219 * runtime/JSGlobalObject.h:
2220 (JSC::JSGlobalObject::createStructure):
2221 * runtime/JSNotAnObject.h:
2222 (JSC::JSNotAnObject::createStructure):
2223 * runtime/JSNumberCell.h:
2224 (JSC::JSNumberCell::createStructure):
2225 * runtime/JSONObject.h:
2226 (JSC::JSONObject::createStructure):
2227 * runtime/JSObject.h:
2228 (JSC::JSObject::createStructure):
2229 * runtime/JSPropertyNameIterator.h:
2230 (JSC::JSPropertyNameIterator::createStructure):
2231 * runtime/JSStaticScopeObject.h:
2232 (JSC::JSStaticScopeObject::createStructure):
2233 * runtime/JSString.h:
2234 (JSC::JSString::createStructure):
2235 * runtime/JSTypeInfo.h:
2236 (JSC::TypeInfo::overridesMarkChildren):
2237 * runtime/JSVariableObject.h:
2238 (JSC::JSVariableObject::createStructure):
2239 * runtime/JSWrapperObject.h:
2240 (JSC::JSWrapperObject::createStructure):
2241 * runtime/MathObject.h:
2242 (JSC::MathObject::createStructure):
2243 * runtime/NumberConstructor.h:
2244 (JSC::NumberConstructor::createStructure):
2245 * runtime/NumberObject.h:
2246 (JSC::NumberObject::createStructure):
2247 * runtime/RegExpConstructor.h:
2248 (JSC::RegExpConstructor::createStructure):
2249 * runtime/RegExpObject.h:
2250 (JSC::RegExpObject::createStructure):
2251 * runtime/StringObject.h:
2252 (JSC::StringObject::createStructure):
2253 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2254 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2256 2009-10-14 Oliver Hunt <oliver@apple.com>
2258 Reviewed by Geoff Garen.
2260 Make typeinfo flags default to false
2261 https://bugs.webkit.org/show_bug.cgi?id=30372
2263 Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
2265 * API/JSCallbackConstructor.h:
2266 (JSC::JSCallbackConstructor::createStructure):
2267 * API/JSCallbackFunction.h:
2268 (JSC::JSCallbackFunction::createStructure):
2269 * API/JSCallbackObject.h:
2270 (JSC::JSCallbackObject::createStructure):
2271 * debugger/DebuggerActivation.h:
2272 (JSC::DebuggerActivation::createStructure):
2274 (JSC::DEFINE_STUB_FUNCTION):
2275 * runtime/Arguments.h:
2276 (JSC::Arguments::createStructure):
2277 * runtime/BooleanObject.h:
2278 (JSC::BooleanObject::createStructure):
2279 * runtime/DatePrototype.h:
2280 (JSC::DatePrototype::createStructure):
2281 * runtime/FunctionPrototype.h:
2282 (JSC::FunctionPrototype::createStructure):
2283 * runtime/GlobalEvalFunction.h:
2284 (JSC::GlobalEvalFunction::createStructure):
2285 * runtime/InternalFunction.h:
2286 (JSC::InternalFunction::createStructure):
2287 * runtime/JSActivation.h:
2288 (JSC::JSActivation::createStructure):
2289 * runtime/JSArray.h:
2290 (JSC::JSArray::createStructure):
2291 * runtime/JSByteArray.cpp:
2292 (JSC::JSByteArray::createStructure):
2293 * runtime/JSFunction.h:
2294 (JSC::JSFunction::createStructure):
2295 * runtime/JSGlobalObject.h:
2296 (JSC::JSGlobalObject::createStructure):
2297 * runtime/JSNumberCell.h:
2298 (JSC::JSNumberCell::createStructure):
2299 * runtime/JSONObject.h:
2300 (JSC::JSONObject::createStructure):
2301 * runtime/JSObject.h:
2302 (JSC::JSObject::createStructure):
2303 (JSC::JSCell::fastGetOwnPropertySlot):
2304 * runtime/JSStaticScopeObject.h:
2305 (JSC::JSStaticScopeObject::createStructure):
2306 * runtime/JSString.h:
2307 (JSC::JSString::createStructure):
2308 * runtime/JSTypeInfo.h:
2309 (JSC::TypeInfo::overridesGetOwnPropertySlot):
2310 * runtime/JSVariableObject.h:
2311 (JSC::JSVariableObject::createStructure):
2312 * runtime/JSWrapperObject.h:
2313 (JSC::JSWrapperObject::createStructure):
2314 * runtime/MathObject.h:
2315 (JSC::MathObject::createStructure):
2316 * runtime/NumberConstructor.h:
2317 (JSC::NumberConstructor::createStructure):
2318 * runtime/NumberObject.h:
2319 (JSC::NumberObject::createStructure):
2320 * runtime/RegExpConstructor.h:
2321 (JSC::RegExpConstructor::createStructure):
2322 * runtime/RegExpObject.h:
2323 (JSC::RegExpObject::createStructure):
2324 * runtime/StringObject.h:
2325 (JSC::StringObject::createStructure):
2326 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2327 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2329 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
2330 2009-10-14 Darin Adler <darin@apple.com>
2332 Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
2333 can build on Windows.
2335 * wtf/MathExtras.h: Added llround and llroundf for Windows.
2337 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
2339 wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
2343 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2345 Reviewed by Simon Hausmann.
2347 Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2348 https://bugs.webkit.org/show_bug.cgi?id=30278
2350 Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2351 from the make system into common code.
2355 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2357 Reviewed by Darin Adler.
2359 ARM compiler does not understand reinterpret_cast<void*>
2360 https://bugs.webkit.org/show_bug.cgi?id=29034
2362 Change reinterpret_cast<void*> to regular C style (void*) cast
2363 for the ARM RVCT compiler.
2365 * assembler/MacroAssemblerCodeRef.h:
2366 (JSC::FunctionPtr::FunctionPtr):
2367 * jit/JITOpcodes.cpp: Cast to FunctionPtr first
2368 instead of directly casting to reinterpret_cast
2369 * jit/JITStubCall.h: Ditto + change the type of m_stub
2370 from void* to FunctionPtr.
2371 (JSC::JITStubCall::JITStubCall):
2372 (JSC::JITStubCall::call):
2373 * jit/JITStubs.cpp: Ditto.
2374 (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
2376 2009-10-11 Oliver Hunt <oliver@apple.com>
2382 2009-10-10 Oliver Hunt <oliver@apple.com>
2384 Reviewed by Maciej Stachowiak.
2386 Support for String.trim(), String.trimLeft() and String.trimRight() methods
2387 https://bugs.webkit.org/show_bug.cgi?id=26590
2389 Implement trim, trimLeft, and trimRight
2391 * runtime/StringPrototype.cpp:
2392 (JSC::isTrimWhitespace):
2393 Our normal string whitespace function does not include U+200B which
2394 is needed for compatibility with mozilla's implementation of trim.
2395 U+200B does not appear to be expected according to spec, however I am
2396 choosing to be lax, and match mozilla behavior so have added this
2400 2009-10-09 Geoffrey Garen <ggaren@apple.com>
2402 Reviewed by Oliver Hunt.
2404 Eliminated some legacy bytecode weirdness.
2406 Use vPC[x] subscripting instead of ++vPC to access instruction operands.
2407 This is simpler, and often more efficient.
2409 To support this, and to remove use of hard-coded offsets in bytecode and
2410 JIT code generation and dumping, calculate jump offsets from the beginning
2411 of an instruction, rather than the middle or end.
2413 Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
2416 SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
2419 * bytecode/CodeBlock.cpp:
2420 (JSC::printConditionalJump):
2421 (JSC::CodeBlock::dump):
2422 * bytecompiler/BytecodeGenerator.cpp:
2423 (JSC::BytecodeGenerator::emitJump):
2424 (JSC::BytecodeGenerator::emitJumpIfTrue):
2425 (JSC::BytecodeGenerator::emitJumpIfFalse):
2426 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2427 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2428 (JSC::BytecodeGenerator::emitComplexJumpScopes):
2429 (JSC::BytecodeGenerator::emitJumpScopes):
2430 (JSC::BytecodeGenerator::emitNextPropertyName):
2431 (JSC::BytecodeGenerator::emitCatch):
2432 (JSC::BytecodeGenerator::emitJumpSubroutine):
2433 (JSC::prepareJumpTableForImmediateSwitch):
2434 (JSC::prepareJumpTableForCharacterSwitch):
2435 (JSC::prepareJumpTableForStringSwitch):
2436 (JSC::BytecodeGenerator::endSwitch):
2437 * bytecompiler/Label.h:
2438 (JSC::Label::setLocation):
2440 * interpreter/Interpreter.cpp:
2441 (JSC::Interpreter::resolve):
2442 (JSC::Interpreter::resolveSkip):
2443 (JSC::Interpreter::resolveGlobal):
2444 (JSC::Interpreter::resolveBase):
2445 (JSC::Interpreter::resolveBaseAndProperty):
2446 (JSC::Interpreter::createExceptionScope):
2447 (JSC::Interpreter::privateExecute):
2448 * interpreter/Interpreter.h:
2450 (JSC::JIT::privateCompile):
2451 * jit/JITArithmetic.cpp:
2452 (JSC::JIT::emit_op_jnless):
2453 (JSC::JIT::emitSlow_op_jnless):
2454 (JSC::JIT::emit_op_jnlesseq):
2455 (JSC::JIT::emitSlow_op_jnlesseq):
2456 (JSC::JIT::emitBinaryDoubleOp):
2457 * jit/JITOpcodes.cpp:
2458 (JSC::JIT::emit_op_jmp):
2459 (JSC::JIT::emit_op_loop):
2460 (JSC::JIT::emit_op_loop_if_less):
2461 (JSC::JIT::emitSlow_op_loop_if_less):
2462 (JSC::JIT::emit_op_loop_if_lesseq):
2463 (JSC::JIT::emitSlow_op_loop_if_lesseq):
2464 (JSC::JIT::emit_op_loop_if_true):
2465 (JSC::JIT::emitSlow_op_loop_if_true):
2466 (JSC::JIT::emit_op_jfalse):
2467 (JSC::JIT::emitSlow_op_jfalse):
2468 (JSC::JIT::emit_op_jtrue):
2469 (JSC::JIT::emitSlow_op_jtrue):
2470 (JSC::JIT::emit_op_jeq_null):
2471 (JSC::JIT::emit_op_jneq_null):
2472 (JSC::JIT::emit_op_jneq_ptr):
2473 (JSC::JIT::emit_op_jsr):
2474 (JSC::JIT::emit_op_next_pname):
2475 (JSC::JIT::emit_op_jmp_scopes):
2477 2009-10-09 Geoffrey Garen <ggaren@apple.com>
2479 Reviewed by Sam Weinig.
2481 Migrated some code that didn't belong out of Structure.
2483 SunSpider says maybe 1.03x faster.
2485 * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
2486 a Structure's prototype the direct responsility of the object using it.
2487 (Giving Structure a mark function was misleading because it implied that
2488 all live structures get marked during GC, when they don't.)
2490 * runtime/JSGlobalObject.cpp:
2491 (JSC::markIfNeeded):
2492 (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
2493 on the global object. Maybe this wasn't necessary, but now we don't have
2496 * runtime/JSObject.cpp:
2497 (JSC::JSObject::getPropertyNames):
2498 (JSC::JSObject::getOwnPropertyNames):
2499 (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
2500 * runtime/JSObject.h:
2501 (JSC::JSObject::markChildrenDirect):
2502 * runtime/PropertyNameArray.h:
2503 * runtime/Structure.cpp:
2504 * runtime/Structure.h:
2505 (JSC::Structure::setEnumerationCache):
2506 (JSC::Structure::enumerationCache): Moved property name gathering code
2507 from Structure to JSObject because having a Structure iterate its JSObject
2508 was a layering violation. A JSObject is implemented using a Structure; not
2509 the other way around.
2511 2009-10-09 Mark Rowe <mrowe@apple.com>
2513 Attempt to fix the GTK release build.
2515 * GNUmakefile.am: Include Grammar.cpp in release builds now that
2516 AllInOneFile.cpp is gone.
2518 2009-10-09 Gabor Loki <loki@inf.u-szeged.hu>
2520 Rubber-stamped by Eric Seidel.
2522 Add ARM JIT support for Gtk port (disabled by default)
2523 https://bugs.webkit.org/show_bug.cgi?id=30228
2527 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2529 Tiger build fix: added a few more variable initializations.
2531 * runtime/StringPrototype.cpp:
2532 (JSC::stringProtoFuncReplace):
2533 (JSC::stringProtoFuncSearch):
2535 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2537 Qt build fix: added missing #include.
2541 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2543 Tiger build fix: initialize variable whose initialization the compiler
2544 can't otherwise figure out.
2546 * runtime/RegExpObject.cpp:
2547 (JSC::RegExpObject::match):
2549 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2551 Windows build fix: updated exports.
2553 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2554 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2556 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2558 Tiger build fix: fixed file name case.
2560 * JavaScriptCore.xcodeproj/project.pbxproj:
2562 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2564 Reviewed by Maciej Stachowiak.
2566 At long last, I pronounce the death of AllInOneFile.cpp.
2568 SunSpider reports a 1.01x speedup.
2570 * AllInOneFile.cpp: Removed.
2572 * JavaScriptCore.exp:
2573 * JavaScriptCore.gypi:
2574 * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
2575 to compilation stages.
2581 * runtime/ArrayConstructor.cpp:
2582 (JSC::constructArrayWithSizeQuirk):
2583 * runtime/Collector.h:
2584 * runtime/JSCell.cpp:
2585 (JSC::JSCell::operator new):
2587 (JSC::JSCell::operator new):
2588 * runtime/JSGlobalObject.cpp:
2589 (JSC::JSGlobalObject::operator new):
2590 * runtime/JSNumberCell.h:
2591 (JSC::JSNumberCell::operator new):
2592 * runtime/JSString.cpp:
2593 * runtime/JSString.h:
2596 (JSC::jsOwnedString):
2597 * runtime/RegExpConstructor.cpp:
2598 * runtime/RegExpConstructor.h:
2599 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
2600 (JSC::RegExpConstructorPrivate::lastOvector):
2601 (JSC::RegExpConstructorPrivate::tempOvector):
2602 (JSC::RegExpConstructorPrivate::changeLastOvector):
2603 (JSC::RegExpConstructor::performMatch):
2604 * runtime/StringPrototype.cpp:
2605 (JSC::stringProtoFuncMatch):
2606 * yarr/RegexJIT.cpp:
2608 (JSC::Yarr::executeRegex): Inlined a few things that Shark said
2609 were hot, on the presumption that AllInOneFile.cpp used to inline them
2612 2009-10-08 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
2614 Reviewed by Gavin Barraclough.
2616 Fix for JIT'ed op_call instructions (evals, constructs, etc.)
2617 when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
2619 https://bugs.webkit.org/show_bug.cgi?id=30201
2622 (JSC::JIT::compileOpCall):
2624 2009-10-07 Geoffrey Garen <ggaren@apple.com>
2626 Windows build fix: removed no longer exported symbol.
2628 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2629 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2631 2009-10-07 Geoffrey Garen <ggaren@apple.com>
2633 Reviewed by Oliver Hunt.
2635 Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
2636 thread, permanently slowing down JavaScript
2638 Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
2639 since WebCore no longer uses it.
2641 * JavaScriptCore.exp:
2642 * runtime/Collector.cpp:
2643 (JSC::Heap::protect):
2644 (JSC::Heap::unprotect):
2645 (JSC::Heap::markProtectedObjects):
2646 (JSC::Heap::protectedGlobalObjectCount):
2647 (JSC::Heap::protectedObjectCount):
2648 (JSC::Heap::protectedObjectTypeCounts):
2649 * runtime/Collector.h:
2651 2009-10-07 Zoltan Horvath <zoltan@webkit.org>
2653 Reviewed by Darin Adler.
2655 Allow custom memory allocation control for JavaScriptCore's IdentifierArena
2656 https://bugs.webkit.org/show_bug.cgi?id=30158
2658 Inherits IdentifierArena class from FastAllocBase because it has been
2659 instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
2661 * parser/ParserArena.h:
2663 2009-10-07 Adam Roben <aroben@apple.com>
2665 Export DateInstance::info in a way that works on Windows
2667 Fixes <http://webkit.org/b/30171>
2668 fast/dom/Window/window-postmessage-clone.html fails on Windows
2670 Reviewed by Anders Carlsson.
2672 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2673 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2674 Removed the export of DateInstance::info from here.
2676 * runtime/DateInstance.h: Use JS_EXPORTDATA to export
2677 DateInstance::info, which is the required way of exporting data on
2680 2009-10-07 Jørgen Lind <jorgen.lind@nokia.com>
2682 Reviewed by Simon Hausmann.
2684 When enabling or disabling the JIT through .qmake.cache, make sure
2685 to also toggle ENABLE_YARR_JIT.
2687 * JavaScriptCore.pri:
2689 2009-10-06 Priit Laes <plaes@plaes.org>
2691 Reviewed by Gavin Barraclough.
2693 Linking fails with "relocation R_X86_64_PC32 against symbol
2695 https://bugs.webkit.org/show_bug.cgi?id=28422
2698 Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
2699 in text segment causing relocation errors on amd64 architecture.
2700 Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
2702 2009-10-06 Oliver Hunt <oliver@apple.com>
2706 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2707 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2709 2009-10-06 Oliver Hunt <oliver@apple.com>
2711 Reviewed by NOBODY (build fix).
2715 * runtime/DateInstance.cpp:
2717 2009-10-05 Oliver Hunt <oliver@apple.com>
2719 Reviewed by Gavin Barraclough.
2721 It should be possible to post (clone) built-in JS objects to Workers
2722 https://bugs.webkit.org/show_bug.cgi?id=22878
2724 Expose helpers to throw correct exceptions during object graph walk
2725 used for cloning and add a helper function to create Date instances
2726 without going through the JS Date constructor function.
2728 * JavaScriptCore.exp:
2729 * JavaScriptCore.xcodeproj/project.pbxproj:
2730 * runtime/DateInstance.cpp:
2731 (JSC::DateInstance::DateInstance):
2732 * runtime/DateInstance.h:
2733 * runtime/ExceptionHelpers.cpp:
2734 (JSC::createTypeError):
2735 * runtime/ExceptionHelpers.h:
2737 2009-10-06 David Levin <levin@chromium.org>
2739 Reviewed by Oliver Hunt.
2741 StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
2742 https://bugs.webkit.org/show_bug.cgi?id=30095
2744 * wtf/CrossThreadRefCounted.h:
2745 Removed an unused function and assert improvement.
2746 (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
2747 (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
2748 (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
2749 (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
2750 non-threadsafe operation, add an assert that the class is owned by the current thread.
2752 2009-10-05 Kevin Ollivier <kevino@theolliviers.com>
2754 wx build fix. Add Symbian files to the list of excludes.
2758 2009-10-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2760 Reviewed by Simon Hausmann.
2762 [Qt] Remove precompiled header from JavaScriptCore compilation to
2763 prevent qmake warning during autonomous compilation.
2764 https://bugs.webkit.org/show_bug.cgi?id=30069
2766 * JavaScriptCore.pro:
2768 2009-10-02 Geoffrey Garen <ggaren@apple.com>
2770 Reviewed by Sam Weinig.
2772 Removed the concept of a "fast access cutoff" in arrays, because it
2773 punished some patterns of array access too much, and made things too
2774 complex for inlining in some cases.
2776 1.3% speedup on SunSpider.
2778 * jit/JITOpcodes.cpp:
2779 (JSC::JIT::emitSlow_op_get_by_val):
2780 (JSC::JIT::emitSlow_op_put_by_val):
2781 * jit/JITPropertyAccess.cpp:
2782 (JSC::JIT::emit_op_get_by_val):
2783 (JSC::JIT::emitSlow_op_get_by_val):
2784 (JSC::JIT::emit_op_put_by_val):
2785 (JSC::JIT::emitSlow_op_put_by_val):
2788 (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
2789 getting / putting from / to an array. Inline putting past the end of
2792 * runtime/JSArray.cpp:
2793 (JSC::JSArray::JSArray):
2794 (JSC::JSArray::getOwnPropertySlot):
2795 (JSC::JSArray::getOwnPropertyDescriptor):
2796 (JSC::JSArray::put):
2797 (JSC::JSArray::putSlowCase):
2798 (JSC::JSArray::deleteProperty):
2799 (JSC::JSArray::getOwnPropertyNames):
2800 (JSC::JSArray::increaseVectorLength):
2801 (JSC::JSArray::setLength):
2802 (JSC::JSArray::pop):
2803 (JSC::JSArray::push):
2804 (JSC::JSArray::sort):
2805 (JSC::JSArray::fillArgList):
2806 (JSC::JSArray::copyToRegisters):
2807 (JSC::JSArray::compactForSorting):
2808 (JSC::JSArray::checkConsistency):
2809 * runtime/JSArray.h:
2810 (JSC::JSArray::canGetIndex):
2811 (JSC::JSArray::canSetIndex):
2812 (JSC::JSArray::setIndex):
2813 (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
2814 replaced with checks for JSValue() to detect reads and writes from / to
2815 uninitialized parts of the array.
2817 2009-10-02 Jonni Rainisto <jonni.rainisto@nokia.com>
2819 Reviewed by Darin Adler.
2821 Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
2822 https://bugs.webkit.org/show_bug.cgi?id=29956
2824 * wtf/RandomNumber.cpp:
2825 (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
2827 2009-10-02 Geoffrey Garen <ggaren@apple.com>
2829 Reviewed by Sam Weinig.
2831 Take one branch instead of two to test for JSValue().
2833 1.1% SunSpider speedup.
2836 (JSC::JIT::compileOpCall):
2837 * jit/JITOpcodes.cpp:
2838 (JSC::JIT::emit_op_to_jsnumber):
2839 (JSC::JIT::emit_op_create_arguments):
2840 * jit/JITPropertyAccess.cpp:
2841 (JSC::JIT::emitSlow_op_get_by_val):
2842 (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
2843 of testing for the cell tag with a 0 payload.
2845 * runtime/JSValue.cpp:
2846 (JSC::JSValue::description): Added support for dumping the new empty value,
2847 and deleted values, in debug builds.
2849 * runtime/JSValue.h:
2850 (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
2852 (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
2853 tag, to avoid having two different c++ versions of null / empty.
2855 (JSC::JSValue::operator bool): Test for the empty value tag, instead
2856 of testing for the cell tag with a 0 payload.
2858 2009-10-02 Steve Falkenburg <sfalken@apple.com>
2860 Reviewed by Mark Rowe.
2862 <https://bugs.webkit.org/show_bug.cgi?id=29989>
2863 Safari version number shouldn't be exposed in WebKit code
2865 For a WebKit version of 532.3.4:
2866 Product version is: 5.32.3.4 (was 4.0.3.0)
2867 File version is: 5.32.3.4 (was 4.532.3.4)
2869 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
2871 2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2873 Rubber-stamped by Simon Hausmann.
2875 Fix the Qt on Mac OS X build.
2877 * wtf/FastMalloc.cpp:
2879 2009-10-02 Jørgen Lind <jorgen.lind@nokia.com>
2881 Reviewed by Simon Hausmann.
2883 Allow enabling and disabling of the JIT through a qmake variable.
2885 Qt's configure may set this variable through .qmake.cache if a
2886 commandline option is given and/or the compile test for hwcap.h
2889 * JavaScriptCore.pri:
2891 2009-10-01 Mark Rowe <mrowe@apple.com>
2893 Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
2895 * Configurations/FeatureDefines.xcconfig:
2897 2009-10-01 Yongjun Zhang <yongjun.zhang@nokia.com>
2899 Reviewed by Darin Adler.
2901 https://bugs.webkit.org/show_bug.cgi?id=29187
2903 Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
2904 bug regarding templated classes.
2906 The compiler bug is reported at:
2907 https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
2909 The change will be reverted when the above bug is fixed in winscw compiler.
2912 (WTF::::~ListRefPtr):
2914 2009-10-01 Zoltan Horvath <zoltan@webkit.org>
2916 Reviewed by Simon Hausmann.
2918 [Qt] Allow custom memory allocation control for the whole JavaScriptCore
2919 https://bugs.webkit.org/show_bug.cgi?id=27029
2921 Since in JavaScriptCore almost every class which has been instantiated by operator new is
2922 inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
2923 when USE_SYSTEM_MALLOC=0.
2925 Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
2926 (It's needed for the functionality of TCmalloc.)
2928 Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
2930 * JavaScriptCore.pri:
2931 * wtf/FastMalloc.cpp:
2935 2009-09-30 Gabor Loki <loki@inf.u-szeged.hu>
2937 Reviewed by George Staikos.
2939 Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
2940 https://bugs.webkit.org/show_bug.cgi?id=29122
2942 Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
2943 macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
2944 when Thumb-2 instruction set is the required target. The
2945 PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
2946 case where the code is common the PLATFORM(ARM) have to be used.
2948 Modified by George Wright <gwright@rim.com> to correctly work
2949 with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
2950 compiler macros, as well as adding readability changes.
2954 2009-09-30 Oliver Hunt <oliver@apple.com>
2956 Reviewed by Geoff Garen.
2958 Devirtualise array toString conversion
2960 Tweak the implementation of Array.prototype.toString to have a fast path
2961 when acting on a true JSArray.
2963 * runtime/ArrayPrototype.cpp:
2964 (JSC::arrayProtoFuncToString):
2966 2009-09-30 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
2968 Reviewed by Geoffrey Garen.
2970 Buildfix for platforms using JSVALUE32.
2971 https://bugs.webkit.org/show_bug.cgi?id=29915
2973 After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
2974 Also removed unreachable code.
2976 * jit/JITArithmetic.cpp:
2977 (JSC::JIT::emit_op_add):
2978 - Declaration of "OperandTypes types" moved before first use.
2979 - Typos fixed: dst modified to result, regT2 added.
2980 - Unreachable code removed.
2981 (JSC::JIT::emitSlow_op_add):
2982 - Missing declaration of "OperandTypes types" added.
2984 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
2986 Reviewed by Simon Hausmann.
2988 Reduce heap size on Symbian from 64MB to 8MB.
2990 This is not a perfect fix, it requires more fine tuning.
2991 But this makes it possible again to debug in the emulator,
2992 which is more important in order to be able to fix other
2995 * runtime/Collector.h:
2997 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
2999 Reviewed by Simon Hausmann.
3001 Fix CRASH() macro for Symbian build.
3003 * wtf/Assertions.h: Added missing }
3005 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3007 Reviewed by Gavin Barraclough.
3009 Inlined a few math operations.
3011 ~1% SunSpider speedup.
3014 * jit/JITArithmetic.cpp:
3015 (JSC::JIT::compileBinaryArithOpSlowCase):
3016 (JSC::JIT::emitSlow_op_add):
3017 (JSC::JIT::emitSlow_op_mul):
3018 (JSC::JIT::emit_op_sub):
3019 (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
3020 a constant int and a double.
3022 2009-09-28 Oliver Hunt <oliver@apple.com>
3024 Reviewed by Gavin Barraclough.
3026 Tidy up codeblock sampler
3027 https://bugs.webkit.org/show_bug.cgi?id=29836
3029 Some rather simple refactoring of codeblock sampler so that
3030 it's easier for us to use it to find problems in non-jsc
3033 * JavaScriptCore.exp:
3034 * bytecode/SamplingTool.h:
3035 * debugger/Debugger.cpp:
3036 (JSC::evaluateInGlobalCallFrame):
3037 * debugger/DebuggerCallFrame.cpp:
3038 (JSC::DebuggerCallFrame::evaluate):
3039 * interpreter/Interpreter.cpp:
3040 (JSC::Interpreter::Interpreter):
3041 (JSC::Interpreter::execute):
3042 (JSC::Interpreter::privateExecute):
3043 (JSC::Interpreter::enableSampler):
3044 (JSC::Interpreter::dumpSampleData):
3045 (JSC::Interpreter::startSampling):
3046 (JSC::Interpreter::stopSampling):
3047 * interpreter/Interpreter.h:
3048 (JSC::Interpreter::sampler):
3052 * runtime/Completion.cpp:
3055 * runtime/Executable.h:
3056 (JSC::EvalExecutable::EvalExecutable):
3057 (JSC::ProgramExecutable::create):
3058 (JSC::ProgramExecutable::ProgramExecutable):
3059 * runtime/JSGlobalData.cpp:
3060 (JSC::JSGlobalData::startSampling):
3061 (JSC::JSGlobalData::stopSampling):
3062 (JSC::JSGlobalData::dumpSampleData):
3063 * runtime/JSGlobalData.h:
3064 * runtime/JSGlobalObjectFunctions.cpp:
3065 (JSC::globalFuncEval):
3067 2009-09-29 Jeremy Orlow <jorlow@chromium.org>
3069 Reviewed by Dimitri Glazkov.
3071 Add GYP generated files to svn:ignore
3072 https://bugs.webkit.org/show_bug.cgi?id=29895
3074 The following files are generated by JavaScriptCore's GYP file and should be ignored:
3084 * JavaScriptCore.gyp: Changed property svn:ignore.
3086 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3088 Reviewed by Sam Weinig.
3090 Standardized an optimization for adding non-numbers.
3092 SunSpider says maybe a tiny speedup.
3094 * jit/JITArithmetic.cpp:
3095 (JSC::JIT::emit_op_add):
3096 (JSC::JIT::emitSlow_op_add):
3098 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3100 Windows build fix: export a new symbol.
3102 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3103 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3105 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3107 Reviewed by Sam Weinig.
3109 Removed virtual destructor from JSGlobalObjectData to eliminate pointer
3110 fix-ups when accessing JSGlobalObject::d.
3112 Replaced with an explicit destructor function pointer.
3114 6% speedup on bench-alloc-nonretained.js.
3116 * JavaScriptCore.exp:
3117 * runtime/JSGlobalObject.cpp:
3118 (JSC::JSGlobalObject::~JSGlobalObject):
3119 (JSC::JSGlobalObject::destroyJSGlobalObjectData):
3120 * runtime/JSGlobalObject.h:
3121 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3122 (JSC::JSGlobalObject::JSGlobalObject):
3124 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
3126 Reviewed by David Kilzer.
3128 [Qt] Assert messages prints visible in Symbian
3129 https://bugs.webkit.org/show_bug.cgi?id=29808
3131 Asserts use vprintf to print the messages to stderr.
3132 In Symbian Open C it is not possible to see stderr so
3133 I routed the messages to stdout instead.
3135 * wtf/Assertions.cpp:
3137 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
3139 Reviewed by Darin Adler.
3141 [Qt] Symbian CRASH macro implementation
3143 Added Symbian specific crash macro that
3144 stops to crash line if JIT debugging is used.
3145 Additional differentiation of access violation
3146 (KERN-EXEC 3) and CRASH panic.
3150 2009-09-28 Mark Rowe <mrowe@apple.com>
3152 Fix the PowerPC build.
3154 * JavaScriptCore.exp:
3156 2009-09-28 Mark Rowe <mrowe@apple.com>
3158 Reviewed by Gavin Barraclough.
3160 <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
3162 * runtime/Collector.cpp:
3163 (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
3164 to ensure that we correctly interpret the contents of registers during marking.
3166 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3168 Windows build fix: added new exports.
3170 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3171 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3173 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3175 Windows build fix: removed exports that no longer exist.
3177 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3178 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3180 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3182 Reviewed by Darin Adler.
3184 NotNullPassRefPtr: smart pointer optimized for passing references that are not null
3185 https://bugs.webkit.org/show_bug.cgi?id=29822
3187 Added NotNullPassRefPtr, and deployed it in all places that initialize
3190 2.2% speedup on bench-allocate-nonretained.js.
3192 * API/JSCallbackConstructor.cpp:
3193 (JSC::JSCallbackConstructor::JSCallbackConstructor):
3194 * API/JSCallbackConstructor.h:
3195 * API/JSCallbackObject.h:
3196 * API/JSCallbackObjectFunctions.h:
3197 (JSC::JSCallbackObject::JSCallbackObject):
3198 * JavaScriptCore.exp:
3199 * bytecode/CodeBlock.h:
3200 (JSC::CodeBlock::addFunctionDecl):
3201 (JSC::CodeBlock::addFunctionExpr):
3202 * runtime/ArrayConstructor.cpp:
3203 (JSC::ArrayConstructor::ArrayConstructor):
3204 * runtime/ArrayConstructor.h:
3205 * runtime/ArrayPrototype.cpp:
3206 (JSC::ArrayPrototype::ArrayPrototype):
3207 * runtime/ArrayPrototype.h:
3208 * runtime/BooleanConstructor.cpp:
3209 (JSC::BooleanConstructor::BooleanConstructor):
3210 * runtime/BooleanConstructor.h:
3211 * runtime/BooleanObject.cpp:
3212 (JSC::BooleanObject::BooleanObject):
3213 * runtime/BooleanObject.h:
3214 * runtime/BooleanPrototype.cpp:
3215 (JSC::BooleanPrototype::BooleanPrototype):
3216 * runtime/BooleanPrototype.h:
3217 * runtime/DateConstructor.cpp:
3218 (JSC::DateConstructor::DateConstructor):
3219 * runtime/DateConstructor.h:
3220 * runtime/DateInstance.cpp:
3221 (JSC::DateInstance::DateInstance):
3222 * runtime/DateInstance.h:
3223 * runtime/DatePrototype.cpp:
3224 (JSC::DatePrototype::DatePrototype):
3225 * runtime/DatePrototype.h:
3226 * runtime/ErrorConstructor.cpp:
3227 (JSC::ErrorConstructor::ErrorConstructor):
3228 * runtime/ErrorConstructor.h:
3229 * runtime/ErrorInstance.cpp:
3230 (JSC::ErrorInstance::ErrorInstance):
3231 * runtime/ErrorInstance.h:
3232 * runtime/ErrorPrototype.cpp:
3233 (JSC::ErrorPrototype::ErrorPrototype):
3234 * runtime/ErrorPrototype.h:
3235 * runtime/FunctionConstructor.cpp:
3236 (JSC::FunctionConstructor::FunctionConstructor):
3237 * runtime/FunctionConstructor.h:
3238 * runtime/FunctionPrototype.cpp:
3239 (JSC::FunctionPrototype::FunctionPrototype):
3240 * runtime/FunctionPrototype.h:
3241 * runtime/GlobalEvalFunction.cpp:
3242 (JSC::GlobalEvalFunction::GlobalEvalFunction):
3243 * runtime/GlobalEvalFunction.h:
3244 * runtime/InternalFunction.cpp:
3245 (JSC::InternalFunction::InternalFunction):
3246 * runtime/InternalFunction.h:
3247 (JSC::InternalFunction::InternalFunction):
3248 * runtime/JSActivation.cpp:
3249 (JSC::JSActivation::JSActivation):
3250 * runtime/JSActivation.h:
3251 (JSC::JSActivation::JSActivationData::JSActivationData):
3252 * runtime/JSArray.cpp:
3253 (JSC::JSArray::JSArray):
3254 * runtime/JSArray.h:
3255 * runtime/JSByteArray.cpp:
3256 (JSC::JSByteArray::JSByteArray):
3257 * runtime/JSByteArray.h:
3258 * runtime/JSFunction.cpp:
3259 (JSC::JSFunction::JSFunction):
3260 * runtime/JSFunction.h:
3261 * runtime/JSGlobalObject.h:
3262 (JSC::JSGlobalObject::JSGlobalObject):
3263 * runtime/JSONObject.h:
3264 (JSC::JSONObject::JSONObject):
3265 * runtime/JSObject.h:
3266 (JSC::JSObject::JSObject):
3267 (JSC::JSObject::setStructure):
3268 * runtime/JSVariableObject.h:
3269 (JSC::JSVariableObject::JSVariableObject):
3270 * runtime/JSWrapperObject.h:
3271 (JSC::JSWrapperObject::JSWrapperObject):
3272 * runtime/MathObject.cpp:
3273 (JSC::MathObject::MathObject):
3274 * runtime/MathObject.h:
3275 * runtime/NativeErrorConstructor.cpp:
3276 (JSC::NativeErrorConstructor::NativeErrorConstructor):
3277 * runtime/NativeErrorConstructor.h:
3278 * runtime/NativeErrorPrototype.cpp:
3279 (JSC::NativeErrorPrototype::NativeErrorPrototype):
3280 * runtime/NativeErrorPrototype.h:
3281 * runtime/NumberConstructor.cpp:
3282 (JSC::NumberConstructor::NumberConstructor):
3283 * runtime/NumberConstructor.h:
3284 * runtime/NumberObject.cpp:
3285 (JSC::NumberObject::NumberObject):
3286 * runtime/NumberObject.h:
3287 * runtime/NumberPrototype.cpp:
3288 (JSC::NumberPrototype::NumberPrototype):
3289 * runtime/NumberPrototype.h:
3290 * runtime/ObjectConstructor.cpp:
3291 (JSC::ObjectConstructor::ObjectConstructor):
3292 * runtime/ObjectConstructor.h:
3293 * runtime/ObjectPrototype.cpp:
3294 (JSC::ObjectPrototype::ObjectPrototype):
3295 * runtime/ObjectPrototype.h:
3296 * runtime/PropertyNameArray.h:
3297 (JSC::PropertyNameArrayData::setCachedPrototypeChain):
3298 * runtime/PrototypeFunction.cpp:
3299 (JSC::PrototypeFunction::PrototypeFunction):
3300 * runtime/PrototypeFunction.h:
3301 * runtime/RegExpConstructor.cpp:
3302 (JSC::RegExpConstructor::RegExpConstructor):
3303 * runtime/RegExpConstructor.h:
3304 * runtime/RegExpObject.cpp:
3305 (JSC::RegExpObject::RegExpObject):
3306 * runtime/RegExpObject.h:
3307 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
3308 * runtime/RegExpPrototype.cpp:
3309 (JSC::RegExpPrototype::RegExpPrototype):
3310 * runtime/RegExpPrototype.h:
3311 * runtime/StringConstructor.cpp:
3312 (JSC::StringConstructor::StringConstructor):
3313 * runtime/StringConstructor.h:
3314 * runtime/StringObject.cpp:
3315 (JSC::StringObject::StringObject):
3316 * runtime/StringObject.h:
3317 * runtime/StringObjectThatMasqueradesAsUndefined.h:
3318 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
3319 * runtime/StringPrototype.cpp:
3320 (JSC::StringPrototype::StringPrototype):
3321 * runtime/StringPrototype.h:
3323 (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
3324 (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
3325 (WTF::NotNullPassRefPtr::get):
3326 (WTF::NotNullPassRefPtr::clear):
3327 (WTF::NotNullPassRefPtr::releaseRef):
3328 (WTF::NotNullPassRefPtr::operator*):
3329 (WTF::NotNullPassRefPtr::operator->):
3330 (WTF::NotNullPassRefPtr::operator!):
3331 (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
3333 (WTF::RefPtr::RefPtr):
3336 2009-09-28 Oliver Hunt <oliver@apple.com>
3338 Reviewed by Geoff Garen.
3340 Hard dependency on SSE2 instruction set with JIT
3341 https://bugs.webkit.org/show_bug.cgi?id=29779
3343 Add floating point support checks to op_jfalse and op_jtrue, and
3344 fix the logic for the slow case of op_add
3346 * jit/JITArithmetic.cpp:
3347 (JSC::JIT::emitSlow_op_add):
3348 * jit/JITOpcodes.cpp:
3349 (JSC::JIT::emit_op_jfalse):
3350 (JSC::JIT::emit_op_jtrue):
3352 2009-09-28 Yaar Schnitman <yaar@chromium.org>
3354 Reviewed by Dimitri Glazkov.
3356 Chromium port - recognize we are being built independently
3357 of chromium and look for dependencies under webkit/chromium rather
3360 https://bugs.webkit.org/show_bug.cgi?id=29722
3362 * JavaScriptCore.gyp/JavaScriptCore.gyp:
3364 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
3366 Reviewed by Simon Hausmann.
3368 [Qt] Implement XSLT support with QtXmlPatterns.
3369 https://bugs.webkit.org/show_bug.cgi?id=28303
3371 * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
3373 2009-09-28 Gabor Loki <loki@inf.u-szeged.hu>
3375 Reviewed by Simon Hausmann.
3377 Remove __clear_cache which is an internal function of GCC
3378 https://bugs.webkit.org/show_bug.cgi?id=28886
3380 Although __clear_cache is exported from GCC, this is an internal
3381 function. GCC makes no promises about it.
3383 * jit/ExecutableAllocator.h:
3384 (JSC::ExecutableAllocator::cacheFlush):
3386 2009-09-28 Sam Weinig <sam@webkit.org>
3388 Reviewed by Oliver Hunt.
3390 Fix an absolute path to somewhere in Oliver's machine to a relative path
3391 for derived JSONObject.lut.h.
3393 * JavaScriptCore.xcodeproj/project.pbxproj:
3395 2009-09-28 Joerg Bornemann <joerg.bornemann@nokia.com>
3397 Reviewed by Simon Hausmann.
3399 Add ARM version detection for Windows CE.
3403 2009-09-26 Yongjun Zhang <yongjun.zhang@nokia.com>
3405 Reviewed by Simon Hausmann.
3407 Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
3409 Re-use Windows shrinkAllocation implementation because Symbian doesn't
3410 support releasing part of memory region.
3412 Use fastMalloc and fastFree to implement allocateStack and releaseStack
3415 * JavaScriptCore.pri:
3416 * runtime/MarkStack.h:
3417 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
3418 * runtime/MarkStackSymbian.cpp: Added.
3419 (JSC::MarkStack::initializePagesize):
3420 (JSC::MarkStack::allocateStack):
3421 (JSC::MarkStack::releaseStack):
3423 2009-09-25 Gabor Loki <loki@inf.u-szeged.hu>
3425 Reviewed by Gavin Barraclough.
3427 Fix unaligned data access in YARR_JIT on ARMv5 and below.
3428 https://bugs.webkit.org/show_bug.cgi?id=29695
3430 On ARMv5 and below all data access should be naturally aligned.
3431 In the YARR_JIT there is a case when character pairs are
3432 loaded from the input string, but this data access is not
3433 naturally aligned. This fix introduces load32WithUnalignedHalfWords
3434 and branch32WithUnalignedHalfWords functions which contain
3435 naturally aligned memory loads - half word loads - on ARMv5 and below.
3437 * assembler/MacroAssemblerARM.cpp:
3438 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3439 * assembler/MacroAssemblerARM.h:
3440 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3441 (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
3442 * assembler/MacroAssemblerARMv7.h:
3443 (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
3444 (JSC::MacroAssemblerARMv7::branch32):
3445 (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
3446 * assembler/MacroAssemblerX86Common.h:
3447 (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
3448 (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
3450 * yarr/RegexJIT.cpp:
3451 (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
3453 2009-09-25 Jeremy Orlow <jorlow@chromium.org>
3455 This is breaking Chromium try bots, so I'm counting this as a build fix.
3457 Add more svn:ignore exceptions. On different platforms, these files are
3458 generated with different case for JavaScriptCore. Also there are some
3459 wtf project files that get built apparently.
3461 * JavaScriptCore.gyp: Changed property svn:ignore.
3463 2009-09-25 Ada Chan <adachan@apple.com>
3467 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3468 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3470 2009-09-25 Geoffrey Garen <ggaren@apple.com>
3472 Reviewed by Darin Adler.
3474 Inlined some object creation code, including lexicalGlobalObject access
3475 https://bugs.webkit.org/show_bug.cgi?id=29750
3477 SunSpider says 0.5% faster.
3479 0.8% speedup on bench-alloc-nonretained.js.
3480 2.5% speedup on v8-splay.js.
3482 * interpreter/CachedCall.h:
3483 (JSC::CachedCall::CachedCall):
3484 * interpreter/CallFrame.h:
3485 (JSC::ExecState::lexicalGlobalObject):
3486 (JSC::ExecState::globalThisValue):
3487 * interpreter/Interpreter.cpp:
3488 (JSC::Interpreter::dumpRegisters):
3489 (JSC::Interpreter::execute):
3490 (JSC::Interpreter::privateExecute):
3492 (JSC::DEFINE_STUB_FUNCTION):
3493 * runtime/FunctionConstructor.cpp:
3494 (JSC::constructFunction):
3495 * runtime/ScopeChain.cpp:
3496 (JSC::ScopeChainNode::print):
3497 * runtime/ScopeChain.h:
3498 (JSC::ScopeChainNode::ScopeChainNode):
3499 (JSC::ScopeChainNode::~ScopeChainNode):
3500 (JSC::ScopeChainNode::push):
3501 (JSC::ScopeChain::ScopeChain):
3502 (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
3503 Replaced accessor function for globalObject() with data member. Replaced
3504 globalThisObject() accessor with direct access to globalThis, to match.
3506 * runtime/JSGlobalObject.cpp:
3507 (JSC::JSGlobalObject::init):
3508 * runtime/JSGlobalObject.h: Inlined array and object construction.
3510 2009-09-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3512 Reviewed by Gavin Barraclough.
3514 Add ARM version detection rules for Symbian
3515 https://bugs.webkit.org/show_bug.cgi?id=29715
3519 2009-09-24 Xan Lopez <xlopez@igalia.com>
3521 Reviewed by Mark "Do It!" Rowe.
3523 Some GCC versions don't like C++-style comments in preprocessor
3524 directives, change to C-style to shut them up.
3528 2009-09-24 Oliver Hunt <oliver@apple.com>
3530 Reviewed by Gavin Barraclough.
3532 Division is needlessly slow in 64-bit
3533 https://bugs.webkit.org/show_bug.cgi?id=29723
3535 Add codegen for op_div on x86-64
3538 (JSC::JIT::privateCompileMainPass):
3539 (JSC::JIT::privateCompileSlowCases):
3541 * jit/JITArithmetic.cpp:
3542 (JSC::JIT::compileBinaryArithOpSlowCase):
3543 (JSC::JIT::emit_op_div):
3544 (JSC::JIT::emitSlow_op_div):
3545 * jit/JITInlineMethods.h:
3546 (JSC::JIT::isOperandConstantImmediateDouble):
3547 (JSC::JIT::addressFor):
3548 (JSC::JIT::emitLoadDouble):
3549 (JSC::JIT::emitLoadInt32ToDouble):
3550 (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
3552 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
3554 Reviewed by Dimitri Glazkov.
3556 Add GYP generated files to svn:ignore
3557 https://bugs.webkit.org/show_bug.cgi?id=29724
3559 Adding the following files to the svn:ignore list (all in the
3560 JavaScriptCore/JavaScriptCore.gyp directory)
3562 JavaScriptCore.xcodeproj
3564 JavaScriptCore.vcproj
3565 JavaScriptCore_Debug.rules
3566 JavaScriptCore_Release.rules
3567 JavaScriptCore_Release - no tcmalloc.rules
3568 JavaScriptCore_Purify.rules
3570 JavaScriptCore_Debug_rules.mk
3571 JavaScriptCore_Release_rules.mk
3572 JavaScriptCore_Release - no tcmalloc_rules.mk
3573 JavaScriptCore_Purify_rules.mk
3574 JavaScriptCore.scons
3575 JavaScriptCore_main.scons
3577 * JavaScriptCore.gyp: Changed property svn:ignore.
3579 2009-09-24 Yong Li <yong.li@torchmobile.com>
3581 Reviewed by Adam Barth.
3583 Replace platform-dependent code with WTF::currentTime()
3584 https://bugs.webkit.org/show_bug.cgi?id=29148
3589 (StopWatch::getElapsedMS):
3590 * runtime/TimeoutChecker.cpp:
3593 2009-09-24 Mark Rowe <mrowe@apple.com>
3595 Reviewed by Sam Weinig.