1 2009-11-23 Alexey Proskuryakov <ap@apple.com>
3 Reviewed by Brady Eidson.
5 https://bugs.webkit.org/show_bug.cgi?id=31748
6 Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
8 * JavaScriptCore.exp: Export callOnMainThreadAndWait.
10 2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
12 Reviewed by Kenneth Rohde Christiansen.
14 [Symbian] Fix lastIndexOf() for Symbian
15 https://bugs.webkit.org/show_bug.cgi?id=31773
17 Symbian soft floating point library has problems with operators
18 comparing NaN to numbers. Without a workaround lastIndexOf()
19 function does not work.
21 Patch developed by David Leong.
23 * runtime/StringPrototype.cpp:
24 (JSC::stringProtoFuncLastIndexOf):Add an extra test
25 to check for NaN for Symbian.
27 2009-11-23 Steve Block <steveblock@google.com>
29 Reviewed by Eric Seidel.
31 Android port lacks implementation of atomicIncrement and atomicDecrement.
32 https://bugs.webkit.org/show_bug.cgi?id=31715
34 * wtf/Threading.h: Modified.
35 (WTF::atomicIncrement): Added Android implementation.
36 (WTF::atomicDecrement): Added Android implementation.
38 2009-11-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
42 [Qt] Sort source lists and remove obsolete comments
43 from the build system.
47 2009-11-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
49 Reviewed by Eric Seidel.
51 [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac
52 https://bugs.webkit.org/show_bug.cgi?id=31753
56 2009-11-19 Steve Block <steveblock@google.com>
58 Android port lacks configuration in Platform.h and config.h.
59 https://bugs.webkit.org/show_bug.cgi?id=31671
61 * wtf/Platform.h: Modified. Added Android-specific configuration.
63 2009-11-19 Alexey Proskuryakov <ap@apple.com>
65 Reviewed by Darin Adler.
67 https://bugs.webkit.org/show_bug.cgi?id=31690
68 Make SocketStreamHandleCFNet work on Windows
70 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
72 (WTF::FunctionWithContext::FunctionWithContext):
73 (WTF::dispatchFunctionsFromMainThread):
74 (WTF::callOnMainThreadAndWait):
76 Re-add callOnMainThreadAndWait(), which was removed in bug 23926.
78 2009-11-19 Dmitry Titov <dimich@chromium.org>
80 Reviewed by David Levin.
82 isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests..
83 https://bugs.webkit.org/show_bug.cgi?id=31693
85 * wtf/ThreadingPthreads.cpp:
86 (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier.
87 (WTF::isMainThread): Ditto.
89 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
91 Reviewed by Darin Adler.
93 Remove HAVE(STRING_H) guard from JavaScriptCore
94 https://bugs.webkit.org/show_bug.cgi?id=31668
97 * runtime/UString.cpp:
99 2009-11-19 Dumitru Daniliuc <dumi@chromium.org>
101 Reviewed by Dmitry Titov.
103 Fixing a bug in MessageQueue::removeIf() that leads to an
106 https://bugs.webkit.org/show_bug.cgi?id=31657
108 * wtf/MessageQueue.h:
109 (WTF::MessageQueue::removeIf):
111 2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
113 Reviewed by Darin Adler.
115 Remove HAVE(FLOAT_H) guard
116 https://bugs.webkit.org/show_bug.cgi?id=31661
118 JavaScriptCore has a dependency on float.h, there is
119 no need to guard float.h.
121 * runtime/DatePrototype.cpp: Remove include directive
122 for float.h as it is included in MathExtras.h already.
123 * runtime/Operations.cpp: Ditto.
124 * runtime/UString.cpp: Ditto.
125 * wtf/dtoa.cpp: Ditto.
126 * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard.
127 * wtf/Platform.h: Ditto.
129 2009-11-19 Thiago Macieira <thiago.macieira@nokia.com>
131 Reviewed by Simon Hausmann.
133 Build fix for 32-bit Sparc machines: these machines are big-endian.
137 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
139 Reviewed by Kenneth Rohde Christiansen.
141 [Qt] Remove support for Qt v4.3 or older versions
142 https://bugs.webkit.org/show_bug.cgi?id=29469
144 * JavaScriptCore.pro:
146 * wtf/unicode/qt4/UnicodeQt4.h:
148 2009-11-18 Kent Tamura <tkent@chromium.org>
150 Reviewed by Darin Adler.
152 Move UString::from(double) implementation to new
153 WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore
155 https://bugs.webkit.org/show_bug.cgi?id=31330
157 - Introduce new function createRep(const char*, unsigned) and
158 UString::UString(const char*, unsigned) to reduce 2 calls to strlen().
159 - Fix a bug that dtoa() doesn't update *rve if the input value is NaN
162 No new tests because this doesn't change the behavior.
164 * JavaScriptCore.exp:
165 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
166 * runtime/UString.cpp:
168 (JSC::UString::UString):
169 (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat().
172 (WTF::dtoa): Fix a bug about rve.
173 (WTF::append): A helper for doubleToStringInJavaScriptFormat().
174 (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double).
177 2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
179 Reviewed by Kenneth Rohde Christiansen.
181 [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
182 https://bugs.webkit.org/show_bug.cgi?id=31643
184 * JavaScriptCore.pro:
186 2009-11-18 Nate Chapin <japhet@chromium.org>
188 Reviewed by Darin Fisher.
190 Remove Chromium's unnecessary dependency on wtf's tcmalloc files.
192 https://bugs.webkit.org/show_bug.cgi?id=31648
194 * JavaScriptCore.gyp/JavaScriptCore.gyp:
196 2009-11-18 Thiago Macieira <thiago.macieira@nokia.com>
198 Reviewed by Gavin Barraclough.
200 [Qt] Implement symbol hiding for JSC's JIT functions.
202 These functions are implemented directly in assembly, so they need the
203 proper directives to enable/disable visibility. On ELF systems, it's
204 .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On
205 Windows, it's not necessary since you have to explicitly export. I
206 also implemented the AIX idiom, though it's unlikely anyone will
207 implement AIX/POWER JIT.
208 https://bugs.webkit.org/show_bug.cgi?id=30864
212 2009-11-18 Oliver Hunt <oliver@apple.com>
214 Reviewed by Alexey Proskuryakov.
216 Interpreter may do an out of range access when throwing an exception in the profiler.
217 https://bugs.webkit.org/show_bug.cgi?id=31635
221 * interpreter/Interpreter.cpp:
222 (JSC::Interpreter::throwException):
224 2009-11-18 Gabor Loki <loki@inf.u-szeged.hu>
226 Reviewed by Darin Adler.
228 Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux
229 https://bugs.webkit.org/show_bug.cgi?id=31631
231 * jit/ExecutableAllocator.h:
232 (JSC::ExecutableAllocator::cacheFlush):
234 2009-11-18 Harald Fernengel <harald.fernengel@nokia.com>
236 Reviewed by Simon Hausmann.
238 [Qt] Fix detection of linux-g++
240 Never use "linux-g++*" to check for linux-g++, since this will break embedded
241 builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
244 * JavaScriptCore.pri:
246 2009-11-17 Jon Honeycutt <jhoneycutt@apple.com>
248 Add JSContextRefPrivate.h to list of copied files.
250 Reviewed by Mark Rowe.
252 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
254 2009-11-17 Martin Robinson <martin.james.robinson@gmail.com>
256 Reviewed by Adam Barth.
258 [GTK] Style cleanup for GOwnPtr
259 https://bugs.webkit.org/show_bug.cgi?id=31506
261 Remove forward declaration in GOwnPtr and do some style cleanup.
265 (WTF::GOwnPtr::GOwnPtr):
266 (WTF::GOwnPtr::~GOwnPtr):
268 (WTF::GOwnPtr::release):
269 (WTF::GOwnPtr::outPtr):
271 (WTF::GOwnPtr::clear):
272 (WTF::GOwnPtr::operator*):
273 (WTF::GOwnPtr::operator->):
274 (WTF::GOwnPtr::operator!):
275 (WTF::GOwnPtr::operator UnspecifiedBoolType):
276 (WTF::GOwnPtr::swap):
281 (WTF::freeOwnedGPtr):
283 2009-11-17 Oliver Hunt <oliver@apple.com>
285 Reviewed by Maciej Stachowiak.
287 Incorrect use of JavaScriptCore API in DumpRenderTree
288 https://bugs.webkit.org/show_bug.cgi?id=31577
290 Add assertions to the 'toJS' functions to catch mistakes like
291 this early. Restructure existing code which blindly passed potentially
292 null values to toJS when forwarding exceptions so that a null check is
298 * API/JSCallbackObjectFunctions.h:
299 (JSC::::getOwnPropertySlot):
301 (JSC::::deleteProperty):
303 (JSC::::hasInstance):
307 (JSC::::staticValueGetter):
308 (JSC::::callbackGetter):
309 * API/tests/testapi.c: Fix errors in the API tester.
310 (MyObject_getProperty):
311 (MyObject_convertToType):
312 (EvilExceptionObject_convertToType):
314 2009-11-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
316 Reviewed by Gavin Barraclough.
318 https://bugs.webkit.org/show_bug.cgi?id=31050
320 Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32
321 failed on a CortexA8 CPU, but not on a simulator; and
322 JITCall.cpp modifications was somehow not committed to mainline.
324 * assembler/ARMAssembler.h:
325 (JSC::ARMAssembler::fmrs_r):
326 * assembler/MacroAssemblerARM.h:
327 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
329 (JSC::JIT::compileOpCall):
331 2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com>
333 Reviewed by Simon Hausmann.
335 Fix Qt build on Windows CE 6.
337 * JavaScriptCore.pri: Add missing include path.
338 * wtf/Platform.h: Include ce_time.h for Windows CE 6.
340 2009-11-13 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
342 Reviewed by Gavin Barraclough.
344 https://bugs.webkit.org/show_bug.cgi?id=31050
346 Adding optimization support for mode JSVALUE32_64
351 (JSC::JIT::compileOpCall):
352 * jit/JITPropertyAccess.cpp:
353 (JSC::JIT::emit_op_method_check):
354 (JSC::JIT::compileGetByIdHotPath):
355 (JSC::JIT::compileGetByIdSlowCase):
356 (JSC::JIT::emit_op_put_by_id):
358 2009-11-14 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
360 Reviewed by Gavin Barraclough.
362 https://bugs.webkit.org/show_bug.cgi?id=31050
364 Adding JSVALUE32_64 support for ARM (but not turning it
365 on by default). All optimizations must be disabled, since
366 this patch is only the first of a series of patches.
368 During the work, a lot of x86 specific code revealed and
369 made platform independent.
370 See revisions: 50531 50541 50593 50594 50595
372 * assembler/ARMAssembler.h:
373 (JSC::ARMAssembler::):
374 (JSC::ARMAssembler::fdivd_r):
375 * assembler/MacroAssemblerARM.h:
376 (JSC::MacroAssemblerARM::lshift32):
377 (JSC::MacroAssemblerARM::neg32):
378 (JSC::MacroAssemblerARM::rshift32):
379 (JSC::MacroAssemblerARM::branchOr32):
380 (JSC::MacroAssemblerARM::set8):
381 (JSC::MacroAssemblerARM::setTest8):
382 (JSC::MacroAssemblerARM::loadDouble):
383 (JSC::MacroAssemblerARM::divDouble):
384 (JSC::MacroAssemblerARM::convertInt32ToDouble):
385 (JSC::MacroAssemblerARM::zeroDouble):
388 * jit/JITOpcodes.cpp:
389 (JSC::JIT::privateCompileCTIMachineTrampolines):
391 * wtf/StdLibExtras.h:
393 2009-11-13 Dominik Röttsches <dominik.roettsches@access-company.com>
395 Reviewed by Eric Seidel.
397 Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
398 https://bugs.webkit.org/show_bug.cgi?id=31468
400 Adding isAlphanumeric abstraction, required
401 by TextBoundaries.cpp.
403 * wtf/unicode/glib/UnicodeGLib.h:
404 (WTF::Unicode::isAlphanumeric):
405 * wtf/unicode/icu/UnicodeIcu.h:
406 (WTF::Unicode::isAlphanumeric):
408 2009-11-13 Norbert Leser <norbert.leser&nokia.com>
410 Reviewed by Eric Seidel.
412 Added macros for USERINCLUDE paths within symbian blocks
413 to guarantee inclusion of respective header files from local path
414 first (to avoid clashes with same names of header files in system include path).
416 * JavaScriptCore.pri:
418 2009-11-13 Oliver Hunt <oliver@apple.com>
420 Reviewed by Geoff Garen.
422 JSValueProtect and JSValueUnprotect don't protect API wrapper values
423 https://bugs.webkit.org/show_bug.cgi?id=31485
425 Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
426 does not attempt to to strip out API wrapper objects.
430 * API/JSValueRef.cpp:
433 * API/tests/testapi.c:
434 (makeGlobalNumberValue):
437 2009-11-13 İsmail Dönmez <ismail@namtrac.org>
439 Reviewed by Antti Koivisto.
441 Fix typo, ce_time.cpp should be ce_time.c
443 * JavaScriptCore.pri:
445 2009-11-12 Steve VanDeBogart <vandebo@chromium.org>
447 Reviewed by Adam Barth.
449 Calculate the time offset only if we were able to parse
450 the date string. This saves an IPC in Chromium for
451 invalid date strings.
452 https://bugs.webkit.org/show_bug.cgi?id=31416
455 (WTF::parseDateFromNullTerminatedCharacters):
456 (JSC::parseDateFromNullTerminatedCharacters):
458 2009-11-12 Oliver Hunt <oliver@apple.com>
460 Rollout r50896 until i can work out why it causes failures.
462 * bytecompiler/BytecodeGenerator.cpp:
463 (JSC::BytecodeGenerator::emitReturn):
464 * interpreter/Interpreter.cpp:
465 (JSC::Interpreter::execute):
467 (JSC::EvalNode::emitBytecode):
469 2009-11-12 Steve Falkenburg <sfalken@apple.com>
471 Reviewed by Stephanie Lewis.
473 Remove LIBRARY directive from def file to fix Debug_All target.
475 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
477 2009-11-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
479 Rubber-stamped by Holger Freyther.
481 Revert r50204, since it makes DRT crash on 32 bits release builds
486 2009-11-12 Oliver Hunt <oliver@apple.com>
488 Reviewed by Gavin Barraclough.
490 Start unifying entry logic for function and eval code.
492 Eval now uses a ret instruction to end execution, and sets up
493 a callframe more in line with what we do for function entry.
495 * bytecompiler/BytecodeGenerator.cpp:
496 (JSC::BytecodeGenerator::emitReturn):
497 * interpreter/Interpreter.cpp:
498 (JSC::Interpreter::execute):
500 (JSC::EvalNode::emitBytecode):
502 2009-11-12 Richard Moe Gustavsen <richard.gustavsen@nokia.com>
504 Reviewed by Kenneth Rohde Christiansen.
506 [Qt] Disable pthread_setname_np.
508 This allows Qt builds on Mac from 10.6 to run on earlier version
509 where this symbol is not present.
510 https://bugs.webkit.org/show_bug.cgi?id=31403
514 2009-11-12 Thiago Macieira <thiago.macieira@nokia.com>
516 Reviewed by Kenneth Rohde Christiansen.
518 [Qt] Fix linking on Linux 32-bit.
520 It was missing the ".text" directive at the top of the file,
521 indicating that code would follow. Without it, the assembler created
522 "NOTYPE" symbols, which would result in linker errors.
523 https://bugs.webkit.org/show_bug.cgi?id=30863
527 2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
529 Reviewed by Alexey Proskuryakov.
531 Refactor multiple JavaScriptCore threads
532 https://bugs.webkit.org/show_bug.cgi?id=31328
534 Remove the id field from the PlatformThread structure
537 * runtime/Collector.cpp:
538 (JSC::getCurrentPlatformThread):
539 (JSC::suspendThread):
541 (JSC::getPlatformThreadRegisters):
543 2009-11-10 Geoffrey Garen <ggaren@apple.com>
545 Linux build fix: Added an #include for UINT_MAX.
547 * runtime/WeakRandom.h:
549 2009-11-10 Geoffrey Garen <ggaren@apple.com>
551 JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
553 * JavaScriptCore.xcodeproj/project.pbxproj:
555 2009-11-10 Geoffrey Garen <ggaren@apple.com>
557 Reviewed by Gavin "avGni arBalroguch" Barraclough.
559 Faster Math.random, based on GameRand.
561 SunSpider says 1.4% faster.
564 * JavaScriptCore.gypi:
565 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
566 * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
568 * runtime/JSGlobalData.cpp:
569 (JSC::JSGlobalData::JSGlobalData):
570 * runtime/JSGlobalData.h: Use an object to track random number generation
571 state, initialized to the current time.
573 * runtime/MathObject.cpp:
574 (JSC::MathObject::MathObject):
575 (JSC::mathProtoFuncRandom): Use the new hotness.
577 * runtime/WeakRandom.h: Added.
578 (JSC::WeakRandom::WeakRandom):
579 (JSC::WeakRandom::get):
580 (JSC::WeakRandom::advance): The new hotness.
582 2009-11-09 Geoffrey Garen <ggaren@apple.com>
584 Reviewed by Oliver Hunt.
586 Imported the v8 DST cache.
588 SunSpider says 1.5% faster.
590 * runtime/JSGlobalData.cpp:
591 (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
594 * runtime/JSGlobalData.h:
595 (JSC::DSTOffsetCache::DSTOffsetCache):
596 (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
599 (WTF::calculateDSTOffsetSimple):
600 (WTF::calculateDSTOffset):
601 (WTF::parseDateFromNullTerminatedCharacters):
603 (JSC::gregorianDateTimeToMS):
604 (JSC::msToGregorianDateTime):
605 (JSC::parseDateFromNullTerminatedCharacters):
606 * wtf/DateMath.h: The imported code for probing and updating the cache.
608 2009-11-09 Geoffrey Garen <ggaren@apple.com>
610 Reviewed by Oliver Hunt.
612 Fixed an edge case that could cause the engine not to notice a timezone
615 No test because this case would require manual intervention to change
616 the timezone during the test.
618 SunSpider reports no change.
620 * runtime/DateInstanceCache.h:
621 (JSC::DateInstanceCache::DateInstanceCache):
622 (JSC::DateInstanceCache::reset): Added a helper function for resetting
623 this cache. Also, shrank the cache, since we'll be resetting it often.
625 * runtime/JSGlobalData.cpp:
626 (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
627 in resetting Date data. (Otherwise, a cache hit could bypass a necessary
628 timezone update check.)
630 2009-11-09 Geoffrey Garen <ggaren@apple.com>
632 Reviewed by Sam Weinig.
634 Some manual inlining and constant propogation in Date code.
636 SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
637 says some previously evident stalls are now gone.
639 * runtime/DateConstructor.cpp:
641 * runtime/DateConversion.cpp:
643 (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
645 * runtime/DateConversion.h:
646 * runtime/DateInstance.cpp:
647 (JSC::DateInstance::calculateGregorianDateTime):
648 (JSC::DateInstance::calculateGregorianDateTimeUTC):
649 * runtime/DateInstance.h:
650 (JSC::DateInstance::gregorianDateTime):
651 (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
652 a UTC and non-UTC variant, and split each variant into a fast inline
653 case and a slow out-of-line case.
655 * runtime/DatePrototype.cpp:
656 (JSC::formatLocaleDate):
657 (JSC::dateProtoFuncToString):
658 (JSC::dateProtoFuncToUTCString):
659 (JSC::dateProtoFuncToISOString):
660 (JSC::dateProtoFuncToDateString):
661 (JSC::dateProtoFuncToTimeString):
662 (JSC::dateProtoFuncGetFullYear):
663 (JSC::dateProtoFuncGetUTCFullYear):
664 (JSC::dateProtoFuncToGMTString):
665 (JSC::dateProtoFuncGetMonth):
666 (JSC::dateProtoFuncGetUTCMonth):
667 (JSC::dateProtoFuncGetDate):
668 (JSC::dateProtoFuncGetUTCDate):
669 (JSC::dateProtoFuncGetDay):
670 (JSC::dateProtoFuncGetUTCDay):
671 (JSC::dateProtoFuncGetHours):
672 (JSC::dateProtoFuncGetUTCHours):
673 (JSC::dateProtoFuncGetMinutes):
674 (JSC::dateProtoFuncGetUTCMinutes):
675 (JSC::dateProtoFuncGetSeconds):
676 (JSC::dateProtoFuncGetUTCSeconds):
677 (JSC::dateProtoFuncGetTimezoneOffset):
678 (JSC::setNewValueFromTimeArgs):
679 (JSC::setNewValueFromDateArgs):
680 (JSC::dateProtoFuncSetYear):
681 (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
683 2009-11-09 Geoffrey Garen <ggaren@apple.com>
685 Build fix: export a new symbol.
687 * JavaScriptCore.exp:
688 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
690 2009-11-09 Geoffrey Garen <ggaren@apple.com>
692 Reviewed by Sam "Home Wrecker" Weinig.
694 Added a tiny cache for Date parsing.
696 SunSpider says 1.2% faster.
698 * runtime/DateConversion.cpp:
699 (JSC::parseDate): Try to reuse the last parsed Date, if present.
701 * runtime/JSGlobalData.cpp:
702 (JSC::JSGlobalData::resetDateCache):
703 * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
704 this code to make resetting the date cache easier.
706 * runtime/JSGlobalObject.h:
707 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
711 (JSC::parseDateFromNullTerminatedCharacters):
712 * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
714 2009-11-09 Oliver Hunt <oliver@apple.com>
716 Reviewed by Gavin Barraclough.
718 Can cache prototype lookups on uncacheable dictionaries.
719 https://bugs.webkit.org/show_bug.cgi?id=31198
721 Replace fromDictionaryTransition with flattenDictionaryObject and
722 flattenDictionaryStructure. This change is necessary as we need to
723 guarantee that our attempt to convert away from a dictionary structure
724 will definitely succeed, and in some cases this requires mutating the
725 object storage itself.
727 * interpreter/Interpreter.cpp:
728 (JSC::Interpreter::tryCacheGetByID):
730 (JSC::JITThunks::tryCacheGetByID):
731 (JSC::DEFINE_STUB_FUNCTION):
732 * runtime/BatchedTransitionOptimizer.h:
733 (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
734 * runtime/JSObject.h:
735 (JSC::JSObject::flattenDictionaryObject):
736 * runtime/Operations.h:
737 (JSC::normalizePrototypeChain):
738 * runtime/Structure.cpp:
739 (JSC::Structure::flattenDictionaryStructure):
740 (JSC::comparePropertyMapEntryIndices):
741 * runtime/Structure.h:
743 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
745 Not reviewed, build fix.
747 Remove extra character from r50701.
749 * JavaScriptCore.pri:
751 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
753 Not reviewed, build fix.
755 Revert r50695 because it broke QtWebKit (clean builds).
757 * JavaScriptCore.pri:
759 2009-11-09 Norbert Leser <norbert.leser@nokia.com>
761 Reviewed by Kenneth Rohde Christiansen.
763 Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
764 Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
765 and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
767 * JavaScriptCore.pri:
769 2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
771 Reviewed by Kenneth Rohde Christiansen.
773 Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
774 https://bugs.webkit.org/show_bug.cgi?id=31040
776 * interpreter/Interpreter.cpp:
777 (JSC::Interpreter::privateExecute):
779 2009-11-08 David Levin <levin@chromium.org>
781 Reviewed by NOBODY (speculative snow leopard and windows build fixes).
784 (WTF::parseDateFromNullTerminatedCharacters):
785 (JSC::gregorianDateTimeToMS):
786 (JSC::msToGregorianDateTime):
787 (JSC::parseDateFromNullTerminatedCharacters):
789 (JSC::GregorianDateTime::GregorianDateTime):
791 2009-11-08 David Levin <levin@chromium.org>
793 Reviewed by NOBODY (chromium build fix).
795 Hopefully, the last build fix.
797 Create better separation in DateMath about the JSC
798 and non-JSC portions. Also, only expose the non-JSC
799 version in the exports.
801 * JavaScriptCore.exp:
802 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
804 (WTF::parseDateFromNullTerminatedCharacters):
806 (JSC::gregorianDateTimeToMS):
807 (JSC::msToGregorianDateTime):
808 (JSC::parseDateFromNullTerminatedCharacters):
812 2009-11-08 David Levin <levin@chromium.org>
814 Reviewed by NOBODY (chromium build fix).
816 For the change in DateMath.
821 2009-11-06 Geoffrey Garen <ggaren@apple.com>
823 Windows build fix: export some symbols.
825 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
827 2009-11-06 Geoffrey Garen <ggaren@apple.com>
829 Build fix: updated export file.
831 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
833 2009-11-06 Geoffrey Garen <ggaren@apple.com>
835 Build fix: added some #includes.
840 2009-11-06 Geoffrey Garen <ggaren@apple.com>
842 Reviewed by Oliver Hunt.
844 https://bugs.webkit.org/show_bug.cgi?id=31197
845 Implemented a timezone cache not based on Mac OS X's notify_check API.
847 If the VM calculates the local timezone offset from UTC, it caches the
848 result until the end of the current VM invocation. (We don't want to cache
849 forever, because the user's timezone may change over time.)
851 This removes notify_* overhead on Mac, and, more significantly, removes
852 OS time and date call overhead on non-Mac platforms.
854 ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
855 speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
857 * JavaScriptCore.exp:
859 * interpreter/CachedCall.h:
860 (JSC::CachedCall::CachedCall):
861 * interpreter/Interpreter.cpp:
862 (JSC::Interpreter::execute):
863 * runtime/JSGlobalObject.h:
864 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the
865 DynamicGlobalObjectScope constructor responsible for checking whether a
866 dynamicGlobalObject has already been set. This eliminated some duplicate
867 client code, and allowed me to avoid adding even more duplicate client
868 code. Made DynamicGlobalObjectScope responsible for resetting the
869 local timezone cache upon first entry to the VM.
871 * runtime/DateConstructor.cpp:
872 (JSC::constructDate):
876 * runtime/DateConversion.cpp:
878 * runtime/DateConversion.h:
879 * runtime/DateInstance.cpp:
880 (JSC::DateInstance::gregorianDateTime):
881 * runtime/DateInstance.h:
882 * runtime/DateInstanceCache.h:
883 * runtime/DatePrototype.cpp:
884 (JSC::setNewValueFromTimeArgs):
885 (JSC::setNewValueFromDateArgs):
886 (JSC::dateProtoFuncSetYear):
887 * runtime/InitializeThreading.cpp:
888 (JSC::initializeThreadingOnce):
889 * runtime/JSGlobalData.cpp:
890 (JSC::JSGlobalData::JSGlobalData):
891 * runtime/JSGlobalData.h:
893 (WTF::getCurrentUTCTime):
894 (WTF::getCurrentUTCTimeWithMicroseconds):
896 (JSC::getUTCOffset): Use the new cache. Also, see below.
897 (JSC::gregorianDateTimeToMS):
898 (JSC::msToGregorianDateTime):
899 (JSC::initializeDates):
900 (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
901 accounts for the local timezone offset, to accomodate our new caching API,
902 and a (possibly misguided) caller in WebCore. Also, see below.
904 (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
905 DateMath.* into the JSC namespace. The code needed to move so it could
906 naturally interact with ExecState and JSGlobalData to support caching.
907 Logically, it seemed right to move it, too, since this code is not really
908 as low-level as the WTF namespace might imply -- it implements a set of
909 date parsing and conversion quirks that are finely tuned to the JavaScript
910 language. Also removed the Mac OS X notify_* infrastructure.
913 (WTF::currentTimeMS):
914 (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
915 it to make it consistent with WTF's currentTime function.
917 2009-11-06 Gabor Loki <loki@inf.u-szeged.hu>
919 Unreviewed trivial buildfix after r50595.
921 Rename the remaining rshiftPtr calls to rshift32
923 * jit/JITArithmetic.cpp:
924 (JSC::JIT::emit_op_rshift):
925 * jit/JITInlineMethods.h:
926 (JSC::JIT::emitFastArithImmToInt):
928 2009-11-06 Gavin Barraclough <barraclough@apple.com>
930 Reviewed by Oliver Hunt.
932 Tidy up the shift methods on the macro-assembler interface.
934 Currently behaviour of shifts of a magnitude > 0x1f is undefined.
935 Instead defined that all shifts are masked to this range. This makes a lot of
936 practical sense, both since having undefined behaviour is not particularly
937 desirable, and because this behaviour is commonly required (particularly since
938 it is required bt ECMA-262 for shifts).
940 Update the ARM assemblers to provide this behaviour. Remove (now) redundant
941 masks from JITArithmetic, and remove rshiftPtr (this was used in case that
942 could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
943 on x86-64, which uses JSVALUE64!)
945 * assembler/MacroAssembler.h:
946 * assembler/MacroAssemblerARM.h:
947 (JSC::MacroAssemblerARM::lshift32):
948 (JSC::MacroAssemblerARM::rshift32):
949 * assembler/MacroAssemblerARMv7.h:
950 (JSC::MacroAssemblerARMv7::lshift32):
951 (JSC::MacroAssemblerARMv7::rshift32):
952 * assembler/MacroAssemblerX86_64.h:
953 * jit/JITArithmetic.cpp:
954 (JSC::JIT::emit_op_lshift):
955 (JSC::JIT::emit_op_rshift):
957 2009-11-05 Gavin Barraclough <barraclough@apple.com>
959 Rubber Stamped by Oliver Hunt.
961 Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
963 * jit/JITInlineMethods.h:
964 (JSC::JIT::emitPutJITStubArg):
965 (JSC::JIT::emitPutJITStubArgConstant):
966 (JSC::JIT::emitGetJITStubArg):
967 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
969 (JSC::JITStubCall::JITStubCall):
970 (JSC::JITStubCall::getArgument):
973 2009-11-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
975 Reviewed by Gavin Barraclough.
977 https://bugs.webkit.org/show_bug.cgi?id=31159
978 Fix branchDouble behaviour on ARM THUMB2 JIT.
980 The x86 branchDouble behaviour is reworked, and all JIT
981 ports should follow the x86 port. See bug 31104 and 31151
983 This patch contains a fix for the traditional ARM port
985 * assembler/ARMAssembler.h:
986 (JSC::ARMAssembler::):
987 (JSC::ARMAssembler::fmrs_r):
988 (JSC::ARMAssembler::ftosid_r):
989 * assembler/MacroAssemblerARM.h:
990 (JSC::MacroAssemblerARM::):
991 (JSC::MacroAssemblerARM::branchDouble):
992 (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
994 2009-11-05 Chris Jerdonek <chris.jerdonek@gmail.com>
996 Reviewed by Eric Seidel.
998 Removed the "this is part of the KDE project" comments from
999 all *.h, *.cpp, *.idl, and *.pm files.
1001 https://bugs.webkit.org/show_bug.cgi?id=31167
1003 The maintenance and architecture page in the project wiki lists
1006 This change includes no changes or additions to test cases
1007 since the change affects only comments.
1009 * wtf/wince/FastMallocWince.h:
1011 2009-11-05 Gabor Loki <loki@inf.u-szeged.hu>
1013 Reviewed by Gavin Barraclough.
1015 Use ARMv7 specific encoding for immediate constants on ARMv7 target
1016 https://bugs.webkit.org/show_bug.cgi?id=31060
1018 * assembler/ARMAssembler.cpp:
1019 (JSC::ARMAssembler::getOp2): Use INVALID_IMM
1020 (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
1021 (JSC::ARMAssembler::moveImm): Ditto.
1022 (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
1023 instructions or a PC relative load.
1024 * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
1025 encoded as an immediate constant.
1026 (JSC::ARMAssembler::):
1027 (JSC::ARMAssembler::movw_r): 16-bit immediate load
1028 (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
1029 (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
1032 2009-11-04 Mark Mentovai <mark@chromium.org>
1034 Reviewed by Mark Rowe.
1036 Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
1037 BUILDING_ON_TIGER and BUILDING_ON_LEOPARD. The TARGETING_ macros
1038 consider the deployment target; the BUILDING_ON_ macros consider the
1039 headers being built against.
1043 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1045 Reviewed by Oliver Hunt.
1047 https://bugs.webkit.org/show_bug.cgi?id=31151
1048 Fix branchDouble behaviour on ARM THUMB2 JIT.
1050 The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
1051 for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
1052 branch on unordered operands. Similarly, DoubleLessThanOrUnordered &
1053 DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
1054 ARMv7Assembler::ConditionLS, whereas they should be using
1055 ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
1057 Fix these, and fill out the missing DoubleConditions.
1059 * assembler/MacroAssemblerARMv7.h:
1060 (JSC::MacroAssemblerARMv7::):
1061 (JSC::MacroAssemblerARMv7::branchDouble):
1063 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1065 Rubber Stamped by Oliver Hunt.
1067 Enable native call optimizations on ARMv7. (Existing ARM_TRADITIONAL
1068 implementation was generic, worked perfectly, just needed turning on).
1070 * jit/JITOpcodes.cpp:
1073 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1075 Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
1077 Add a missing assert to the ARMv7 JIT.
1079 * assembler/ARMv7Assembler.h:
1080 (JSC::ARMThumbImmediate::ARMThumbImmediate):
1082 2009-11-04 Mark Rowe <mrowe@apple.com>
1084 Rubber-stamped by Oliver Hunt.
1086 Remove bogus op_ prefix on dumped version of three opcodes.
1088 * bytecode/CodeBlock.cpp:
1089 (JSC::CodeBlock::dump):
1091 2009-11-04 Mark Rowe <mrowe@apple.com>
1093 Reviewed by Sam Weinig.
1095 Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
1097 We do this by having the registerName function return information about the constant if the register
1098 number corresponds to a constant. This requires that registerName, and several functions that call it,
1099 be converted to member functions of CodeBlock so that the constant value can be retrieved. The
1100 ExecState also needs to be threaded down through these functions so that it can be passed on to
1101 constantName when needed.
1103 * bytecode/CodeBlock.cpp:
1104 (JSC::constantName):
1105 (JSC::CodeBlock::registerName):
1106 (JSC::CodeBlock::printUnaryOp):
1107 (JSC::CodeBlock::printBinaryOp):
1108 (JSC::CodeBlock::printConditionalJump):
1109 (JSC::CodeBlock::printGetByIdOp):
1110 (JSC::CodeBlock::printPutByIdOp):
1111 (JSC::CodeBlock::dump):
1112 * bytecode/CodeBlock.h:
1113 (JSC::CodeBlock::isConstantRegisterIndex):
1115 2009-11-04 Pavel Heimlich <tropikhajma@gmail.com>
1117 Reviewed by Alexey Proskuryakov.
1119 https://bugs.webkit.org/show_bug.cgi?id=30647
1120 Solaris build failure due to strnstr.
1122 * wtf/StringExtras.h: Enable strnstr on Solaris, too.
1124 2009-11-04 Gavin Barraclough <barraclough@apple.com>
1126 Reviewed by Oliver Hunt.
1128 https://bugs.webkit.org/show_bug.cgi?id=31104
1129 Refactor x86-specific behaviour out of the JIT.
1131 - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
1132 - Refactor double to int conversion out into the MacroAssembler.
1133 - 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.
1134 - 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.
1136 * assembler/MacroAssemblerARM.h:
1137 (JSC::MacroAssemblerARM::):
1138 * assembler/MacroAssemblerARMv7.h:
1139 (JSC::MacroAssemblerARMv7::):
1140 * assembler/MacroAssemblerX86Common.h:
1141 (JSC::MacroAssemblerX86Common::):
1142 (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
1143 (JSC::MacroAssemblerX86Common::branchDouble):
1144 (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
1145 * jit/JITArithmetic.cpp:
1146 (JSC::JIT::emitBinaryDoubleOp):
1147 (JSC::JIT::emit_op_div):
1148 (JSC::JIT::emitSlow_op_jnless):
1149 (JSC::JIT::emitSlow_op_jnlesseq):
1150 * jit/JITOpcodes.cpp:
1151 (JSC::JIT::emit_op_jfalse):
1153 2009-11-04 Mark Mentovai <mark@chromium.org>
1155 Reviewed by Eric Seidel.
1157 Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp. This is supposed
1158 to be set as needed only in wtf/Platform.h.
1160 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1162 2009-11-02 Oliver Hunt <oliver@apple.com>
1164 Reviewed by Gavin Barraclough.
1166 REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
1167 https://bugs.webkit.org/show_bug.cgi?id=31045
1169 Add guards to prevent caching of prototype chain lookups with dictionaries at the
1170 head of the chain. Also add a few tighter assertions to cached prototype lookups
1171 to catch this in future.
1173 * interpreter/Interpreter.cpp:
1174 (JSC::Interpreter::tryCacheGetByID):
1175 (JSC::Interpreter::privateExecute):
1177 (JSC::JITThunks::tryCacheGetByID):
1179 2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1181 Reviewed by Darin Adler.
1183 PLATFORM(CF) should be set when building for Qt on Darwin
1184 https://bugs.webkit.org/show_bug.cgi?id=23671
1186 * wtf/Platform.h: Turn on CF support if both QT and DARWIN
1187 platforms are defined.
1189 2009-11-02 Dmitry Titov <dimich@chromium.org>
1191 Reviewed by David Levin.
1193 Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
1194 https://bugs.webkit.org/show_bug.cgi?id=30612
1196 * wtf/MessageQueue.h:
1197 (WTF::MessageQueue::alwaysTruePredicate):
1198 (WTF::MessageQueue::~MessageQueue):
1199 (WTF::MessageQueue::append):
1200 (WTF::MessageQueue::appendAndCheckEmpty):
1201 (WTF::MessageQueue::prepend):
1202 (WTF::MessageQueue::waitForMessage):
1203 (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
1204 (WTF::MessageQueue::tryGetMessage):
1205 (WTF::MessageQueue::removeIf):
1206 The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
1207 of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
1208 All methods have arguments of type PassOwnPtr<DataType> and return the same type.
1210 * wtf/Threading.cpp:
1211 (WTF::createThread):
1212 Superficial change to trigger rebuild of JSC project on Windows,
1213 workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
1215 2009-10-30 Geoffrey Garen <ggaren@apple.com>
1217 Reviewed by Oliver Hunt.
1219 Fixed failing layout test: restore a special case I accidentally deleted.
1221 * runtime/DatePrototype.cpp:
1222 (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
1223 that is NaN, reset the date to 0 *and* then apply the change; don't just
1224 reset the date to 0.
1226 2009-10-30 Geoffrey Garen <ggaren@apple.com>
1228 Windows build fix: update for object-to-pointer change.
1230 * runtime/DatePrototype.cpp:
1231 (JSC::formatLocaleDate):
1233 2009-10-29 Geoffrey Garen <ggaren@apple.com>
1235 Reviewed by Darin Adler.
1237 https://bugs.webkit.org/show_bug.cgi?id=30942
1238 Use pointers instead of copies to pass GregorianDateTime objects around.
1240 SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
1241 speedup on date-format-tofte.
1243 * runtime/DateInstance.cpp:
1244 (JSC::DateInstance::gregorianDateTime):
1245 * runtime/DateInstance.h:
1246 * runtime/DatePrototype.cpp:
1247 (JSC::formatLocaleDate):
1248 (JSC::dateProtoFuncToString):
1249 (JSC::dateProtoFuncToUTCString):
1250 (JSC::dateProtoFuncToISOString):
1251 (JSC::dateProtoFuncToDateString):
1252 (JSC::dateProtoFuncToTimeString):
1253 (JSC::dateProtoFuncGetFullYear):
1254 (JSC::dateProtoFuncGetUTCFullYear):
1255 (JSC::dateProtoFuncToGMTString):
1256 (JSC::dateProtoFuncGetMonth):
1257 (JSC::dateProtoFuncGetUTCMonth):
1258 (JSC::dateProtoFuncGetDate):
1259 (JSC::dateProtoFuncGetUTCDate):
1260 (JSC::dateProtoFuncGetDay):
1261 (JSC::dateProtoFuncGetUTCDay):
1262 (JSC::dateProtoFuncGetHours):
1263 (JSC::dateProtoFuncGetUTCHours):
1264 (JSC::dateProtoFuncGetMinutes):
1265 (JSC::dateProtoFuncGetUTCMinutes):
1266 (JSC::dateProtoFuncGetSeconds):
1267 (JSC::dateProtoFuncGetUTCSeconds):
1268 (JSC::dateProtoFuncGetTimezoneOffset):
1269 (JSC::setNewValueFromTimeArgs):
1270 (JSC::setNewValueFromDateArgs):
1271 (JSC::dateProtoFuncSetYear):
1272 (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
1273 since it no longer has an out parameter. Uses 0 to indicate invalid dates.
1275 2009-10-30 Zoltan Horvath <zoltan@webkit.org>
1277 Reviewed by Darin Adler.
1279 Allow custom memory allocation control for JavaScriptCore's ListHashSet
1280 https://bugs.webkit.org/show_bug.cgi?id=30853
1282 Inherits ListHashSet class from FastAllocBase because it is
1283 instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
1285 * wtf/ListHashSet.h:
1287 2009-10-30 Oliver Hunt <oliver@apple.com>
1289 Reviewed by Gavin Barraclough.
1291 Regression: crash enumerating properties of an object with getters or setters
1292 https://bugs.webkit.org/show_bug.cgi?id=30948
1294 Add a guard to prevent us trying to cache property enumeration on
1295 objects with getters or setters.
1297 * runtime/JSPropertyNameIterator.cpp:
1298 (JSC::JSPropertyNameIterator::create):
1300 2009-10-30 Roland Steiner <rolandsteiner@chromium.org>
1302 Reviewed by Eric Seidel.
1304 Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
1306 Bug 28420 - Implement HTML5 <ruby> rendering
1307 (https://bugs.webkit.org/show_bug.cgi?id=28420)
1309 No new tests (no functional change).
1311 * Configurations/FeatureDefines.xcconfig:
1313 2009-10-29 Oliver Hunt <oliver@apple.com>
1315 Reviewed by Maciej Stachowiak.
1317 REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
1318 https://bugs.webkit.org/show_bug.cgi?id=30947
1319 <rdar://problem/7348833>
1321 The logic for flagging that a structure has non-enumerable properties
1322 was in addPropertyWithoutTransition, rather than in the core Structure::put
1323 method. Despite this I was unable to produce a testcase that caused
1324 the failure that etrade was experiencing, but the new assertion in
1325 getEnumerablePropertyNames triggers on numerous layout tests without
1326 the fix, so in effecti all for..in enumeration in any test ends up
1327 doing the required consistency check.
1329 * runtime/Structure.cpp:
1330 (JSC::Structure::addPropertyWithoutTransition):
1331 (JSC::Structure::put):
1332 (JSC::Structure::getEnumerablePropertyNames):
1333 (JSC::Structure::checkConsistency):
1335 2009-10-29 Gabor Loki <loki@inf.u-szeged.hu>
1337 Reviewed by Gavin Barraclough.
1339 Add cacheFlush support for Thumb-2 on Linux
1340 https://bugs.webkit.org/show_bug.cgi?id=30865
1342 * jit/ExecutableAllocator.h:
1343 (JSC::ExecutableAllocator::cacheFlush):
1345 2009-10-28 Gavin Barraclough <barraclough@apple.com>
1347 Reviewed by Oliver Hunt.
1349 JSC JIT on ARMv7 cannot link jumps >16Mb range
1350 https://bugs.webkit.org/show_bug.cgi?id=30891
1352 Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
1353 In the cases where the jump would fall within a relative jump range, use a relative jump.
1355 * JavaScriptCore.xcodeproj/project.pbxproj:
1356 * assembler/ARMv7Assembler.h:
1357 (JSC::ARMv7Assembler::~ARMv7Assembler):
1358 (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
1359 (JSC::ARMv7Assembler::):
1360 (JSC::ARMv7Assembler::executableCopy):
1361 (JSC::ARMv7Assembler::linkJump):
1362 (JSC::ARMv7Assembler::relinkJump):
1363 (JSC::ARMv7Assembler::setInt32):
1364 (JSC::ARMv7Assembler::isB):
1365 (JSC::ARMv7Assembler::isBX):
1366 (JSC::ARMv7Assembler::isMOV_imm_T3):
1367 (JSC::ARMv7Assembler::isMOVT):
1368 (JSC::ARMv7Assembler::isNOP_T1):
1369 (JSC::ARMv7Assembler::isNOP_T2):
1370 (JSC::ARMv7Assembler::linkJumpAbsolute):
1371 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
1372 (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
1373 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
1374 * assembler/MacroAssemblerARMv7.h:
1375 (JSC::MacroAssemblerARMv7::makeJump):
1376 (JSC::MacroAssemblerARMv7::makeBranch):
1380 2009-10-28 Oliver Hunt <oliver@apple.com>
1382 Reviewed by Geoff Garen.
1384 Improve for..in enumeration performance
1385 https://bugs.webkit.org/show_bug.cgi?id=30887
1387 Improve indexing of an object with a for..in iterator by
1388 identifying cases where get_by_val is being used with a iterator
1389 as the subscript and replace it with a new get_by_pname
1390 bytecode. get_by_pname then optimizes lookups that directly access
1393 * bytecode/CodeBlock.cpp:
1394 (JSC::CodeBlock::dump):
1395 * bytecode/Opcode.h:
1396 * bytecompiler/BytecodeGenerator.cpp:
1397 (JSC::BytecodeGenerator::emitGetByVal):
1398 * bytecompiler/BytecodeGenerator.h:
1399 (JSC::BytecodeGenerator::pushOptimisedForIn):
1400 (JSC::BytecodeGenerator::popOptimisedForIn):
1401 * interpreter/Interpreter.cpp:
1402 (JSC::Interpreter::privateExecute):
1404 (JSC::JIT::privateCompileMainPass):
1405 (JSC::JIT::privateCompileSlowCases):
1407 * jit/JITPropertyAccess.cpp:
1408 (JSC::JIT::compileGetDirectOffset):
1409 (JSC::JIT::emit_op_get_by_pname):
1410 (JSC::JIT::emitSlow_op_get_by_pname):
1412 (JSC::ForInNode::emitBytecode):
1413 * runtime/JSObject.h:
1414 * runtime/JSPropertyNameIterator.cpp:
1415 (JSC::JSPropertyNameIterator::create):
1416 * runtime/JSPropertyNameIterator.h:
1417 (JSC::JSPropertyNameIterator::getOffset):
1418 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1419 * runtime/JSValue.h:
1421 * runtime/Structure.cpp:
1422 (JSC::Structure::addPropertyTransition):
1423 (JSC::Structure::changePrototypeTransition):
1424 (JSC::Structure::despecifyFunctionTransition):
1425 (JSC::Structure::addAnonymousSlotsTransition):
1426 (JSC::Structure::getterSetterTransition):
1427 (JSC::Structure::toDictionaryTransition):
1428 (JSC::Structure::addPropertyWithoutTransition):
1429 Track the existence (or not) of non-enumerable properties.
1430 * runtime/Structure.h:
1431 (JSC::Structure::propertyStorageCapacity):
1432 (JSC::Structure::propertyStorageSize):
1433 (JSC::Structure::hasNonEnumerableProperties):
1434 (JSC::Structure::hasAnonymousSlots):
1436 2009-10-28 Dmitry Titov <dimich@chromium.org>
1438 Not reviewed, attemp to fix Windows build.
1440 Touch the cpp file to cause recompile.
1442 * wtf/Threading.cpp:
1443 (WTF::threadEntryPoint):
1445 2009-10-28 Dmitry Titov <dimich@chromium.org>
1447 Reviewed by David Levin.
1449 https://bugs.webkit.org/show_bug.cgi?id=30805
1450 Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
1451 Existing Database tests cover this since Database removes tasks when it is stopped.
1453 * wtf/MessageQueue.h:
1456 2009-10-28 Afonso R. Costa Jr. <afonso.costa@openbossa.org>
1458 Reviewed by Oliver Hunt.
1460 [Qt] Enable YARR when YARR_JIT is enabled
1461 https://bugs.webkit.org/show_bug.cgi?id=30730
1463 When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
1466 * JavaScriptCore.pri:
1468 2009-10-24 Martin Robinson <martin.james.robinson@gmail.com>
1470 Reviewed by Oliver Hunt.
1472 Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
1474 strict-aliasing warnings in JSFunction.h
1475 https://bugs.webkit.org/show_bug.cgi?id=27869
1477 * runtime/JSFunction.h:
1478 (JSC::JSFunction::nativeFunction):
1479 (JSC::JSFunction::scopeChain):
1480 (JSC::JSFunction::setScopeChain):
1481 (JSC::JSFunction::setNativeFunction):
1483 2009-10-28 Jan-Arve Sæther <jan-arve.saether@nokia.com>
1485 Reviewed by Tor Arne Vestbø.
1487 Build-fix for 64-bit Windows
1489 * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
1491 2009-10-28 Gavin Barraclough <barraclough@apple.com>
1493 Reviewed by NOBODY (build fix!).
1497 2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org>
1499 Rubber-stamped by Darin Adler.
1501 Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
1502 https://bugs.webkit.org/show_bug.cgi?id=30769
1504 When using -fvisibility=hidden to hide all internal symbols by default
1505 the malloc symbols will be hidden as well. For memory instrumentation
1506 it is needed to provide an instrumented version of these symbols and
1507 override the normal routines and by changing the visibility back to
1508 default this becomes possible.
1510 The only other solution would be to use system malloc instead of the
1511 TCmalloc implementation but this will not allow to analyze memory
1512 behavior with the default allocator.
1514 * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
1516 2009-10-27 Gavin Barraclough <barraclough@apple.com>
1518 Rubber Stamped by Samuel Q. Weinig.
1520 Make the asserts protecting the offsets in the JIT more descriptive.
1524 (JSC::JIT::compileOpCall):
1525 * jit/JITPropertyAccess.cpp:
1526 (JSC::JIT::emit_op_method_check):
1527 (JSC::JIT::compileGetByIdHotPath):
1528 (JSC::JIT::compileGetByIdSlowCase):
1529 (JSC::JIT::emit_op_put_by_id):
1531 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1533 Reviewed by Sam Weinig.
1535 A little bit of refactoring in the date code.
1537 * JavaScriptCore.exp: Don't export this unused symbol.
1539 * runtime/DateConstructor.cpp:
1540 (JSC::constructDate):
1542 * runtime/DateInstance.cpp:
1543 (JSC::DateInstance::DateInstance):
1544 * runtime/DateInstance.h: Removed some unused functions. Changed the default
1545 constructor to ensure that a DateInstance is always initialized.
1547 * runtime/DatePrototype.cpp:
1548 (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
1549 since it now requires one.
1552 (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
1553 output will require it. Otherwise, our offset is 0.
1555 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1557 Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
1559 * JavaScriptCore.xcodeproj/project.pbxproj:
1561 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1563 Build fix: re-readded this file.
1565 * runtime/DateInstanceCache.h: Added.
1566 (JSC::DateInstanceData::create):
1567 (JSC::DateInstanceData::DateInstanceData):
1568 (JSC::DateInstanceCache::DateInstanceCache):
1569 (JSC::DateInstanceCache::add):
1570 (JSC::DateInstanceCache::lookup):
1572 2009-10-27 Geoffrey Garen <ggaren@apple.com>
1574 Reviewed by Darin Adler and Oliver Hunt.
1576 https://bugs.webkit.org/show_bug.cgi?id=30800
1577 Cache recently computed date data.
1579 SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
1582 * JavaScriptCore.gypi:
1583 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1584 * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
1586 * runtime/DateInstance.cpp:
1587 (JSC::DateInstance::DateInstance):
1588 (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
1590 * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
1593 * runtime/DatePrototype.cpp:
1594 (JSC::formatLocaleDate):
1595 (JSC::dateProtoFuncToString):
1596 (JSC::dateProtoFuncToUTCString):
1597 (JSC::dateProtoFuncToISOString):
1598 (JSC::dateProtoFuncToDateString):
1599 (JSC::dateProtoFuncToTimeString):
1600 (JSC::dateProtoFuncGetFullYear):
1601 (JSC::dateProtoFuncGetUTCFullYear):
1602 (JSC::dateProtoFuncToGMTString):
1603 (JSC::dateProtoFuncGetMonth):
1604 (JSC::dateProtoFuncGetUTCMonth):
1605 (JSC::dateProtoFuncGetDate):
1606 (JSC::dateProtoFuncGetUTCDate):
1607 (JSC::dateProtoFuncGetDay):
1608 (JSC::dateProtoFuncGetUTCDay):
1609 (JSC::dateProtoFuncGetHours):
1610 (JSC::dateProtoFuncGetUTCHours):
1611 (JSC::dateProtoFuncGetMinutes):
1612 (JSC::dateProtoFuncGetUTCMinutes):
1613 (JSC::dateProtoFuncGetSeconds):
1614 (JSC::dateProtoFuncGetUTCSeconds):
1615 (JSC::dateProtoFuncGetTimezoneOffset):
1616 (JSC::setNewValueFromTimeArgs):
1617 (JSC::setNewValueFromDateArgs):
1618 (JSC::dateProtoFuncSetYear):
1619 (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
1620 can access the DateInstanceCache.
1622 * runtime/JSGlobalData.h: Keep a DateInstanceCache.
1624 2009-10-27 James Robinson <jamesr@chromium.org>
1626 Reviewed by Darin Fisher.
1628 Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
1630 Chromium uses a different method to calculate the current time than is used in
1631 JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
1632 function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use.
1633 See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
1635 https://bugs.webkit.org/show_bug.cgi?id=30833
1637 * JavaScriptCore.gyp/JavaScriptCore.gyp:
1638 * wtf/CurrentTime.cpp:
1640 2009-10-27 Peter Varga <pvarga@inf.u-szeged.hu>
1642 Rubber-stamped by Tor Arne Vestbø.
1644 Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
1647 * yarr/RegexInterpreter.cpp:
1648 (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1649 (JSC::Yarr::ByteCompiler::alternativeDisjunction):
1650 (JSC::Yarr::ByteCompiler::emitDisjunction):
1651 * yarr/RegexJIT.cpp:
1652 (JSC::Yarr::RegexGenerator::generateDisjunction):
1654 2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1656 Reviewed by Darin Adler.
1658 Make .rc files compile on Windows without depending on MFC headers
1659 https://bugs.webkit.org/show_bug.cgi?id=30750
1661 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
1662 winresrc.h because it exists even when MFC is not installed, and is
1663 all that's needed here.
1665 2009-10-26 Gabor Loki <loki@inf.u-szeged.hu>
1667 Reviewed by Gavin Barraclough.
1669 The thunkReturnAddress is on JITStackFrame on ARM JIT as well
1670 https://bugs.webkit.org/show_bug.cgi?id=30782
1672 Move the thunkReturnAddress from top of the stack into the JITStackFrame
1673 structure. This is a requirement for JSValue32_64 support on ARM.
1675 * assembler/MacroAssemblerARM.h:
1676 (JSC::MacroAssemblerARM::ret): Return with link register
1677 (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
1678 * jit/JIT.h: Remove unused ctiReturnRegister
1679 * jit/JITInlineMethods.h: Same as ARMv7
1680 (JSC::JIT::restoreArgumentReference): Ditto.
1681 (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
1682 * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
1683 * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
1684 small trampoline functions which handle return addresses for each
1686 * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
1687 (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
1688 * yarr/RegexJIT.cpp:
1689 (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
1691 2009-10-26 Steve Block <steveblock@google.com>
1693 Reviewed by Darin Adler.
1695 Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
1696 https://bugs.webkit.org/show_bug.cgi?id=30713
1698 * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
1699 * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
1700 * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
1702 2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1704 Reviewed by Holger Freyther.
1706 [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
1707 https://bugs.webkit.org/show_bug.cgi?id=30476
1709 Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
1714 2009-10-23 Steve Block <steveblock@google.com>
1716 Reviewed by Dmitry Titov.
1718 Fixes a leak in createThreadInternal on Android.
1719 https://bugs.webkit.org/show_bug.cgi?id=30698
1721 * wtf/ThreadingPthreads.cpp: Modified.
1722 (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
1724 2009-10-22 Geoffrey Garen <ggaren@apple.com>
1726 Reviewed by Alexey Proskuryakov.
1728 Fixed ASSERT when opening Safari's Caches window while the Web Inspector
1731 * runtime/Collector.cpp:
1732 (JSC::typeName): Added two new types to the type name list in the Collector.
1733 These types have been around for a while, but nobody remembered to consider them here.
1736 (JSC::JSCell::isPropertyNameIterator):
1737 * runtime/JSPropertyNameIterator.h:
1738 (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
1739 a way to tell if a cell is a JSPropertyNameIterator.
1741 2009-10-22 Steve Falkenburg <sfalken@apple.com>
1743 Reviewed by Jon Honeycutt.
1745 https://bugs.webkit.org/show_bug.cgi?id=30686
1746 Remove debug-specific def file.
1747 Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
1748 that target is only used internally, maintaining two files just to
1749 suppress a single link warning isn't worthwhile.
1751 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1752 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
1754 2009-10-21 Jon Honeycutt <jhoneycutt@apple.com>
1756 <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
1757 <rdar://problem/7270314> After halting a transparent PluginView on
1758 Windows, the transparency is applied twice
1760 Reviewed by Dan Bernstein.
1762 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1763 Export WTF::deleteOwnedPtr(HDC).
1765 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1768 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1770 Windows build fix: updated variable name.
1772 * runtime/DatePrototype.cpp:
1773 (JSC::formatLocaleDate):
1775 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1777 Reviewed by Mark Rowe.
1779 * jit/JITOpcodes.cpp:
1780 (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
1781 size of a JSValue because m_jsStrings is an array of JSValues.
1783 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1785 Reviewed by Mark Rowe.
1787 Fixed a 64-bit regression caused by the fix for
1788 https://bugs.webkit.org/show_bug.cgi?id=30570.
1790 * jit/JITOpcodes.cpp:
1791 (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
1792 64-bit pointers are eight bytes long.
1794 2009-10-20 Geoffrey Garen <ggaren@apple.com>
1796 Reviewed by Sam Weinig.
1798 Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
1799 caller doesn't need to supply the DateInstance's own internal value to
1802 * runtime/DateInstance.cpp:
1803 (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
1805 * runtime/DateInstance.h:
1806 * runtime/DatePrototype.cpp:
1807 (JSC::formatLocaleDate):
1808 (JSC::dateProtoFuncToString):
1809 (JSC::dateProtoFuncToUTCString):
1810 (JSC::dateProtoFuncToISOString):
1811 (JSC::dateProtoFuncToDateString):
1812 (JSC::dateProtoFuncToTimeString):
1813 (JSC::dateProtoFuncToLocaleString):
1814 (JSC::dateProtoFuncToLocaleDateString):
1815 (JSC::dateProtoFuncToLocaleTimeString):
1816 (JSC::dateProtoFuncGetTime):
1817 (JSC::dateProtoFuncGetFullYear):
1818 (JSC::dateProtoFuncGetUTCFullYear):
1819 (JSC::dateProtoFuncToGMTString):
1820 (JSC::dateProtoFuncGetMonth):
1821 (JSC::dateProtoFuncGetUTCMonth):
1822 (JSC::dateProtoFuncGetDate):
1823 (JSC::dateProtoFuncGetUTCDate):
1824 (JSC::dateProtoFuncGetDay):
1825 (JSC::dateProtoFuncGetUTCDay):
1826 (JSC::dateProtoFuncGetHours):
1827 (JSC::dateProtoFuncGetUTCHours):
1828 (JSC::dateProtoFuncGetMinutes):
1829 (JSC::dateProtoFuncGetUTCMinutes):
1830 (JSC::dateProtoFuncGetSeconds):
1831 (JSC::dateProtoFuncGetUTCSeconds):
1832 (JSC::dateProtoFuncGetTimezoneOffset):
1833 (JSC::setNewValueFromTimeArgs):
1834 (JSC::setNewValueFromDateArgs):
1835 (JSC::dateProtoFuncSetYear):
1836 (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
1838 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
1840 Reviewed by Geoffrey Garen.
1842 The op_next_pname should use 4 bytes addressing mode in case of JSValue32
1843 https://bugs.webkit.org/show_bug.cgi?id=30570
1845 * jit/JITOpcodes.cpp:
1846 (JSC::JIT::emit_op_next_pname):
1848 2009-10-20 Gabor Loki <loki@inf.u-szeged.hu>
1850 Reviewed by Oliver Hunt.
1852 Move OverridesMarkChildren flag from DatePrototype to its parent class
1853 https://bugs.webkit.org/show_bug.cgi?id=30372
1855 * runtime/DateInstance.h:
1856 (JSC::DateInstance::createStructure):
1857 * runtime/DatePrototype.h:
1859 2009-10-19 Geoffrey Garen <ggaren@apple.com>
1861 Reviewed by Oliver Hunt.
1863 Tightened up some put_by_id_transition code generation.
1864 https://bugs.webkit.org/show_bug.cgi?id=30539
1867 * jit/JITPropertyAccess.cpp:
1868 (JSC::JIT::testPrototype):
1869 (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
1870 checks or read Structures and prototypes from objects: they're all known
1871 constants at compile time.
1873 2009-10-19 Geoffrey Garen <ggaren@apple.com>
1875 Reviewed by Sam Weinig.
1877 Added a private API for getting a global context from a context, for
1878 clients who want to preserve a context for a later callback.
1881 (toGlobalRef): Added an ASSERT, since this function is used more often
1884 * API/JSContextRef.cpp:
1885 * API/JSContextRefPrivate.h: Added. The new API.
1887 * API/tests/testapi.c:
1888 (print_callAsFunction):
1889 (main): Test the new API.
1891 * JavaScriptCore.exp:
1892 * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
1894 2009-10-17 Geoffrey Garen <ggaren@apple.com>
1896 Reviewed by Oliver Hunt.
1898 Tightened up some instanceof code generation.
1899 https://bugs.webkit.org/show_bug.cgi?id=30488
1901 * jit/JITOpcodes.cpp:
1902 (JSC::JIT::emit_op_instanceof):
1903 (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks -
1904 cell type checks and ImplementsDefaultHasIntance checks implicitly
1905 supersede object type checks.
1907 2009-10-18 Kwang Yul Seo <skyul@company100.net>
1909 Reviewed by Darin Adler.
1911 Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
1912 https://bugs.webkit.org/show_bug.cgi?id=30474
1914 stricmp and strnicmp are deprecated beginning in Visual
1915 C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
1917 * wtf/StringExtras.h:
1921 2009-10-16 Geoffrey Garen <ggaren@apple.com>
1923 Build fix: apparently we shouldn't export those symbols?
1925 * JavaScriptCore.exp:
1927 2009-10-16 Geoffrey Garen <ggaren@apple.com>
1929 Build fix: export some symbols.
1931 * JavaScriptCore.exp:
1933 2009-10-16 Oliver Hunt <oliver@apple.com>
1935 Reviewed by Gavin Barraclough.
1937 structure typeinfo flags should be inherited.
1938 https://bugs.webkit.org/show_bug.cgi?id=30468
1940 Add StructureFlag constant to the various JSC classes and use
1941 it for the TypeInfo construction. This allows us to simply
1942 accumulate flags by basing each classes StructureInfo on its parents.
1944 * API/JSCallbackConstructor.h:
1945 (JSC::JSCallbackConstructor::createStructure):
1946 * API/JSCallbackFunction.h:
1947 (JSC::JSCallbackFunction::createStructure):
1948 * API/JSCallbackObject.h:
1949 (JSC::JSCallbackObject::createStructure):
1950 * debugger/DebuggerActivation.h:
1951 (JSC::DebuggerActivation::createStructure):
1952 * runtime/Arguments.h:
1953 (JSC::Arguments::createStructure):
1954 * runtime/BooleanObject.h:
1955 (JSC::BooleanObject::createStructure):
1956 * runtime/DatePrototype.h:
1957 (JSC::DatePrototype::createStructure):
1958 * runtime/FunctionPrototype.h:
1959 (JSC::FunctionPrototype::createStructure):
1960 * runtime/GlobalEvalFunction.h:
1961 (JSC::GlobalEvalFunction::createStructure):
1962 * runtime/InternalFunction.h:
1963 (JSC::InternalFunction::createStructure):
1964 * runtime/JSActivation.h:
1965 (JSC::JSActivation::createStructure):
1966 * runtime/JSArray.h:
1967 (JSC::JSArray::createStructure):
1968 * runtime/JSByteArray.cpp:
1969 (JSC::JSByteArray::createStructure):
1970 * runtime/JSByteArray.h:
1971 * runtime/JSFunction.h:
1972 (JSC::JSFunction::createStructure):
1973 * runtime/JSGlobalObject.h:
1974 (JSC::JSGlobalObject::createStructure):
1975 * runtime/JSNotAnObject.h:
1976 (JSC::JSNotAnObject::createStructure):
1977 * runtime/JSONObject.h:
1978 (JSC::JSONObject::createStructure):
1979 * runtime/JSObject.h:
1980 (JSC::JSObject::createStructure):
1981 * runtime/JSStaticScopeObject.h:
1982 (JSC::JSStaticScopeObject::createStructure):
1983 * runtime/JSVariableObject.h:
1984 (JSC::JSVariableObject::createStructure):
1985 * runtime/JSWrapperObject.h:
1986 (JSC::JSWrapperObject::createStructure):
1987 * runtime/MathObject.h:
1988 (JSC::MathObject::createStructure):
1989 * runtime/NumberConstructor.h:
1990 (JSC::NumberConstructor::createStructure):
1991 * runtime/NumberObject.h:
1992 (JSC::NumberObject::createStructure):
1993 * runtime/RegExpConstructor.h:
1994 (JSC::RegExpConstructor::createStructure):
1995 * runtime/RegExpObject.h:
1996 (JSC::RegExpObject::createStructure):
1997 * runtime/StringObject.h:
1998 (JSC::StringObject::createStructure):
1999 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2000 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2002 2009-10-16 Geoffrey Garen <ggaren@apple.com>
2004 Reviewed by Oliver Hunt.
2006 Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
2007 in JSPropertyNameIterator; inline more code.
2009 1.024x as fast on SunSpider (fasta: 1.43x as fast).
2011 * bytecode/CodeBlock.cpp:
2012 (JSC::CodeBlock::dump):
2013 * bytecode/Opcode.h:
2014 * bytecompiler/BytecodeGenerator.cpp:
2015 (JSC::BytecodeGenerator::emitGetPropertyNames):
2016 (JSC::BytecodeGenerator::emitNextPropertyName):
2017 * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
2018 op_get_pnames and op_next_pname so that we can track iteration state
2019 in the register file instead of in the JSPropertyNameIterator. (To be
2020 cacheable, the JSPropertyNameIterator must be stateless.)
2022 * interpreter/Interpreter.cpp:
2023 (JSC::Interpreter::tryCachePutByID):
2024 (JSC::Interpreter::tryCacheGetByID): Updated for rename to
2025 "normalizePrototypeChain" and removal of "isCacheable".
2027 (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
2028 iteration state tracking.
2031 (JSC::JIT::privateCompileMainPass):
2033 * jit/JITOpcodes.cpp:
2034 (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
2035 iteration state tracking.
2037 (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
2040 (JSC::JITThunks::tryCachePutByID):
2041 (JSC::JITThunks::tryCacheGetByID): Updated for rename to
2042 "normalizePrototypeChain" and removal of "isCacheable".
2044 (JSC::DEFINE_STUB_FUNCTION):
2046 (JSC::): Added has_property and to_object stubs. Removed op_next_pname
2047 stub, since has_property is all we need anymore.
2050 (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
2051 iteration state tracking.
2054 * runtime/JSObject.cpp:
2055 (JSC::JSObject::getPropertyNames): Don't do caching at this layer
2056 anymore, since we don't create a JSPropertyNameIterator at this layer.
2058 * runtime/JSPropertyNameIterator.cpp:
2059 (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
2060 (JSC::JSPropertyNameIterator::get): Updated for in-RegisterFile
2061 iteration state tracking.
2062 (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
2064 * runtime/JSPropertyNameIterator.h:
2065 (JSC::JSPropertyNameIterator::size):
2066 (JSC::JSPropertyNameIterator::setCachedStructure):
2067 (JSC::JSPropertyNameIterator::cachedStructure):
2068 (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
2069 (JSC::JSPropertyNameIterator::cachedPrototypeChain):
2070 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2071 (JSC::Structure::setEnumerationCache): Don't store iteration state in
2072 a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
2075 * runtime/JSValue.h:
2077 * runtime/MarkStack.h: Make those mischievous #include gods happy.
2079 * runtime/ObjectConstructor.cpp:
2081 * runtime/Operations.h:
2082 (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
2083 to normalizePrototypeChain, since it changes dictionary prototypes to
2084 non-dictionary objects.
2086 * runtime/PropertyNameArray.cpp:
2087 (JSC::PropertyNameArray::add):
2088 * runtime/PropertyNameArray.h:
2089 (JSC::PropertyNameArrayData::PropertyNameArrayData):
2090 (JSC::PropertyNameArray::data):
2091 (JSC::PropertyNameArray::size):
2092 (JSC::PropertyNameArray::begin):
2093 (JSC::PropertyNameArray::end): Simplified some code here to help with
2094 current and future refactoring.
2096 * runtime/Protect.h:
2097 * runtime/Structure.cpp:
2098 (JSC::Structure::~Structure):
2099 (JSC::Structure::addPropertyWithoutTransition):
2100 (JSC::Structure::removePropertyWithoutTransition): No need to clear
2101 the enumeration cache with adding / removing properties without
2102 transition. It is an error to add / remove properties without transition
2103 once an object has been observed, and we can ASSERT to catch that.
2105 * runtime/Structure.h:
2106 (JSC::Structure::enumerationCache): Changed the enumeration cache to
2107 hold a JSPropertyNameIterator.
2109 * runtime/StructureChain.cpp:
2110 * runtime/StructureChain.h:
2111 (JSC::StructureChain::head): Removed StructureChain::isCacheable because
2112 it was wrong-headed in two ways: (1) It gave up when a prototype was a
2113 dictionary, but instead we want un-dictionary heavily accessed
2114 prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
2115 a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
2116 is only releavant to for-in caching.
2118 2009-10-16 Steve Falkenburg <sfalken@apple.com>
2120 Reviewed by Adam Roben.
2122 Add a Debug_All configuration to build entire stack as debug.
2123 Change Debug_Internal to:
2124 - stop using _debug suffix for all WebKit/Safari binaries
2125 - not use _debug as a DLL naming suffix
2126 - use non-debug C runtime lib.
2128 * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
2129 * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
2130 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
2131 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
2132 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
2133 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
2134 * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
2135 * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
2137 2009-10-16 Oliver Hunt <oliver@apple.com>
2139 Reviewed by Gavin Barraclough.
2141 Make typeinfo flags default to false
2142 https://bugs.webkit.org/show_bug.cgi?id=30372
2144 Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
2147 * API/JSCallbackConstructor.h:
2148 (JSC::JSCallbackConstructor::createStructure):
2149 * API/JSCallbackObject.h:
2150 (JSC::JSCallbackObject::createStructure):
2151 * debugger/DebuggerActivation.h:
2152 (JSC::DebuggerActivation::createStructure):
2153 * runtime/Arguments.h:
2154 (JSC::Arguments::createStructure):
2155 * runtime/BooleanObject.h:
2156 (JSC::BooleanObject::createStructure):
2157 * runtime/DatePrototype.h:
2158 (JSC::DatePrototype::createStructure):
2159 * runtime/FunctionPrototype.h:
2160 (JSC::FunctionPrototype::createStructure):
2161 * runtime/GlobalEvalFunction.h:
2162 (JSC::GlobalEvalFunction::createStructure):
2163 * runtime/JSAPIValueWrapper.h:
2164 (JSC::JSAPIValueWrapper::createStructure):
2165 * runtime/JSActivation.h:
2166 (JSC::JSActivation::createStructure):
2167 * runtime/JSArray.h:
2168 (JSC::JSArray::createStructure):
2169 * runtime/JSByteArray.cpp:
2170 (JSC::JSByteArray::createStructure):
2171 * runtime/JSFunction.h:
2172 (JSC::JSFunction::createStructure):
2173 * runtime/JSGlobalObject.h:
2174 (JSC::JSGlobalObject::createStructure):
2175 * runtime/JSNotAnObject.h:
2176 (JSC::JSNotAnObject::createStructure):
2177 * runtime/JSONObject.h:
2178 (JSC::JSONObject::createStructure):
2179 * runtime/JSObject.cpp:
2180 (JSC::JSObject::getPropertyNames):
2181 * runtime/JSObject.h:
2182 (JSC::JSObject::createStructure):
2183 * runtime/JSStaticScopeObject.h:
2184 (JSC::JSStaticScopeObject::createStructure):
2185 * runtime/JSTypeInfo.h:
2186 (JSC::TypeInfo::overridesGetPropertyNames):
2187 * runtime/JSVariableObject.h:
2188 (JSC::JSVariableObject::createStructure):
2189 * runtime/JSWrapperObject.h:
2190 (JSC::JSWrapperObject::createStructure):
2191 * runtime/MathObject.h:
2192 (JSC::MathObject::createStructure):
2193 * runtime/NumberConstructor.h:
2194 (JSC::NumberConstructor::createStructure):
2195 * runtime/NumberObject.h:
2196 (JSC::NumberObject::createStructure):
2197 * runtime/RegExpConstructor.h:
2198 (JSC::RegExpConstructor::createStructure):
2199 * runtime/RegExpObject.h:
2200 (JSC::RegExpObject::createStructure):
2201 * runtime/StringObject.h:
2202 (JSC::StringObject::createStructure):
2203 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2204 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2205 * runtime/StructureChain.cpp:
2206 (JSC::StructureChain::isCacheable):
2208 2009-10-16 Kevin Ollivier <kevino@theolliviers.com>
2210 wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion
2215 2009-10-16 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2217 Reviewed by Simon Hausmann.
2219 [Qt] Implement ExecutableAllocator for Symbian
2220 https://bugs.webkit.org/show_bug.cgi?id=29946
2222 Tested with YARR JIT enabled for Symbian;
2223 This patch does not (yet) enable YARR JIT by default.
2225 * JavaScriptCore.pri:
2226 * jit/ExecutableAllocator.h:
2227 * jit/ExecutableAllocatorSymbian.cpp: Added.
2228 (JSC::ExecutableAllocator::intializePageSize):
2229 (JSC::ExecutablePool::systemAlloc):
2230 (JSC::ExecutablePool::systemRelease):
2232 2009-10-15 Oliver Hunt <oliver@apple.com>
2234 Reviewed by Darin Adler.
2236 Make typeinfo flags default to false
2237 https://bugs.webkit.org/show_bug.cgi?id=30372
2239 Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
2241 * API/JSCallbackConstructor.h:
2242 (JSC::JSCallbackConstructor::createStructure):
2243 * API/JSCallbackFunction.h:
2244 (JSC::JSCallbackFunction::createStructure):
2245 * API/JSCallbackObject.h:
2246 (JSC::JSCallbackObject::createStructure):
2247 * debugger/DebuggerActivation.h:
2248 (JSC::DebuggerActivation::createStructure):
2249 * runtime/Arguments.h:
2250 (JSC::Arguments::createStructure):
2251 * runtime/BooleanObject.h:
2252 (JSC::BooleanObject::createStructure):
2253 * runtime/DatePrototype.h:
2254 (JSC::DatePrototype::createStructure):
2255 * runtime/FunctionPrototype.h:
2256 (JSC::FunctionPrototype::createStructure):
2257 * runtime/GetterSetter.h:
2258 (JSC::GetterSetter::createStructure):
2259 * runtime/GlobalEvalFunction.h:
2260 (JSC::GlobalEvalFunction::createStructure):
2261 * runtime/InternalFunction.h:
2262 (JSC::InternalFunction::createStructure):
2263 * runtime/JSAPIValueWrapper.h:
2264 (JSC::JSAPIValueWrapper::createStructure):
2265 * runtime/JSActivation.h:
2266 (JSC::JSActivation::createStructure):
2267 * runtime/JSArray.h:
2268 (JSC::JSArray::createStructure):
2269 (JSC::MarkStack::markChildren):
2270 * runtime/JSByteArray.cpp:
2271 (JSC::JSByteArray::createStructure):
2272 * runtime/JSFunction.h:
2273 (JSC::JSFunction::createStructure):
2274 * runtime/JSGlobalObject.h:
2275 (JSC::JSGlobalObject::createStructure):
2276 * runtime/JSNotAnObject.h:
2277 (JSC::JSNotAnObject::createStructure):
2278 * runtime/JSNumberCell.h:
2279 (JSC::JSNumberCell::createStructure):
2280 * runtime/JSONObject.h:
2281 (JSC::JSONObject::createStructure):
2282 * runtime/JSObject.h:
2283 (JSC::JSObject::createStructure):
2284 * runtime/JSPropertyNameIterator.h:
2285 (JSC::JSPropertyNameIterator::createStructure):
2286 * runtime/JSStaticScopeObject.h:
2287 (JSC::JSStaticScopeObject::createStructure):
2288 * runtime/JSString.h:
2289 (JSC::JSString::createStructure):
2290 * runtime/JSTypeInfo.h:
2291 (JSC::TypeInfo::overridesMarkChildren):
2292 * runtime/JSVariableObject.h:
2293 (JSC::JSVariableObject::createStructure):
2294 * runtime/JSWrapperObject.h:
2295 (JSC::JSWrapperObject::createStructure):
2296 * runtime/MathObject.h:
2297 (JSC::MathObject::createStructure):
2298 * runtime/NumberConstructor.h:
2299 (JSC::NumberConstructor::createStructure):
2300 * runtime/NumberObject.h:
2301 (JSC::NumberObject::createStructure):
2302 * runtime/RegExpConstructor.h:
2303 (JSC::RegExpConstructor::createStructure):
2304 * runtime/RegExpObject.h:
2305 (JSC::RegExpObject::createStructure):
2306 * runtime/StringObject.h:
2307 (JSC::StringObject::createStructure):
2308 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2309 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2311 2009-10-14 Oliver Hunt <oliver@apple.com>
2313 Reviewed by Geoff Garen.
2315 Make typeinfo flags default to false
2316 https://bugs.webkit.org/show_bug.cgi?id=30372
2318 Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
2320 * API/JSCallbackConstructor.h:
2321 (JSC::JSCallbackConstructor::createStructure):
2322 * API/JSCallbackFunction.h:
2323 (JSC::JSCallbackFunction::createStructure):
2324 * API/JSCallbackObject.h:
2325 (JSC::JSCallbackObject::createStructure):
2326 * debugger/DebuggerActivation.h:
2327 (JSC::DebuggerActivation::createStructure):
2329 (JSC::DEFINE_STUB_FUNCTION):
2330 * runtime/Arguments.h:
2331 (JSC::Arguments::createStructure):
2332 * runtime/BooleanObject.h:
2333 (JSC::BooleanObject::createStructure):
2334 * runtime/DatePrototype.h:
2335 (JSC::DatePrototype::createStructure):
2336 * runtime/FunctionPrototype.h:
2337 (JSC::FunctionPrototype::createStructure):
2338 * runtime/GlobalEvalFunction.h:
2339 (JSC::GlobalEvalFunction::createStructure):
2340 * runtime/InternalFunction.h:
2341 (JSC::InternalFunction::createStructure):
2342 * runtime/JSActivation.h:
2343 (JSC::JSActivation::createStructure):
2344 * runtime/JSArray.h:
2345 (JSC::JSArray::createStructure):
2346 * runtime/JSByteArray.cpp:
2347 (JSC::JSByteArray::createStructure):
2348 * runtime/JSFunction.h:
2349 (JSC::JSFunction::createStructure):
2350 * runtime/JSGlobalObject.h:
2351 (JSC::JSGlobalObject::createStructure):
2352 * runtime/JSNumberCell.h:
2353 (JSC::JSNumberCell::createStructure):
2354 * runtime/JSONObject.h:
2355 (JSC::JSONObject::createStructure):
2356 * runtime/JSObject.h:
2357 (JSC::JSObject::createStructure):
2358 (JSC::JSCell::fastGetOwnPropertySlot):
2359 * runtime/JSStaticScopeObject.h:
2360 (JSC::JSStaticScopeObject::createStructure):
2361 * runtime/JSString.h:
2362 (JSC::JSString::createStructure):
2363 * runtime/JSTypeInfo.h:
2364 (JSC::TypeInfo::overridesGetOwnPropertySlot):
2365 * runtime/JSVariableObject.h:
2366 (JSC::JSVariableObject::createStructure):
2367 * runtime/JSWrapperObject.h:
2368 (JSC::JSWrapperObject::createStructure):
2369 * runtime/MathObject.h:
2370 (JSC::MathObject::createStructure):
2371 * runtime/NumberConstructor.h:
2372 (JSC::NumberConstructor::createStructure):
2373 * runtime/NumberObject.h:
2374 (JSC::NumberObject::createStructure):
2375 * runtime/RegExpConstructor.h:
2376 (JSC::RegExpConstructor::createStructure):
2377 * runtime/RegExpObject.h:
2378 (JSC::RegExpObject::createStructure):
2379 * runtime/StringObject.h:
2380 (JSC::StringObject::createStructure):
2381 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2382 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2384 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
2385 2009-10-14 Darin Adler <darin@apple.com>
2387 Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
2388 can build on Windows.
2390 * wtf/MathExtras.h: Added llround and llroundf for Windows.
2392 2009-10-14 Kevin Ollivier <kevino@theolliviers.com>
2394 wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
2398 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2400 Reviewed by Simon Hausmann.
2402 Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2403 https://bugs.webkit.org/show_bug.cgi?id=30278
2405 Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2406 from the make system into common code.
2410 2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2412 Reviewed by Darin Adler.
2414 ARM compiler does not understand reinterpret_cast<void*>
2415 https://bugs.webkit.org/show_bug.cgi?id=29034
2417 Change reinterpret_cast<void*> to regular C style (void*) cast
2418 for the ARM RVCT compiler.
2420 * assembler/MacroAssemblerCodeRef.h:
2421 (JSC::FunctionPtr::FunctionPtr):
2422 * jit/JITOpcodes.cpp: Cast to FunctionPtr first
2423 instead of directly casting to reinterpret_cast
2424 * jit/JITStubCall.h: Ditto + change the type of m_stub
2425 from void* to FunctionPtr.
2426 (JSC::JITStubCall::JITStubCall):
2427 (JSC::JITStubCall::call):
2428 * jit/JITStubs.cpp: Ditto.
2429 (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
2431 2009-10-11 Oliver Hunt <oliver@apple.com>
2437 2009-10-10 Oliver Hunt <oliver@apple.com>
2439 Reviewed by Maciej Stachowiak.
2441 Support for String.trim(), String.trimLeft() and String.trimRight() methods
2442 https://bugs.webkit.org/show_bug.cgi?id=26590
2444 Implement trim, trimLeft, and trimRight
2446 * runtime/StringPrototype.cpp:
2447 (JSC::isTrimWhitespace):
2448 Our normal string whitespace function does not include U+200B which
2449 is needed for compatibility with mozilla's implementation of trim.
2450 U+200B does not appear to be expected according to spec, however I am
2451 choosing to be lax, and match mozilla behavior so have added this
2455 2009-10-09 Geoffrey Garen <ggaren@apple.com>
2457 Reviewed by Oliver Hunt.
2459 Eliminated some legacy bytecode weirdness.
2461 Use vPC[x] subscripting instead of ++vPC to access instruction operands.
2462 This is simpler, and often more efficient.
2464 To support this, and to remove use of hard-coded offsets in bytecode and
2465 JIT code generation and dumping, calculate jump offsets from the beginning
2466 of an instruction, rather than the middle or end.
2468 Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
2471 SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
2474 * bytecode/CodeBlock.cpp:
2475 (JSC::printConditionalJump):
2476 (JSC::CodeBlock::dump):
2477 * bytecompiler/BytecodeGenerator.cpp:
2478 (JSC::BytecodeGenerator::emitJump):
2479 (JSC::BytecodeGenerator::emitJumpIfTrue):
2480 (JSC::BytecodeGenerator::emitJumpIfFalse):
2481 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2482 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2483 (JSC::BytecodeGenerator::emitComplexJumpScopes):
2484 (JSC::BytecodeGenerator::emitJumpScopes):
2485 (JSC::BytecodeGenerator::emitNextPropertyName):
2486 (JSC::BytecodeGenerator::emitCatch):
2487 (JSC::BytecodeGenerator::emitJumpSubroutine):
2488 (JSC::prepareJumpTableForImmediateSwitch):
2489 (JSC::prepareJumpTableForCharacterSwitch):
2490 (JSC::prepareJumpTableForStringSwitch):
2491 (JSC::BytecodeGenerator::endSwitch):
2492 * bytecompiler/Label.h:
2493 (JSC::Label::setLocation):
2495 * interpreter/Interpreter.cpp:
2496 (JSC::Interpreter::resolve):
2497 (JSC::Interpreter::resolveSkip):
2498 (JSC::Interpreter::resolveGlobal):
2499 (JSC::Interpreter::resolveBase):
2500 (JSC::Interpreter::resolveBaseAndProperty):
2501 (JSC::Interpreter::createExceptionScope):
2502 (JSC::Interpreter::privateExecute):
2503 * interpreter/Interpreter.h:
2505 (JSC::JIT::privateCompile):
2506 * jit/JITArithmetic.cpp:
2507 (JSC::JIT::emit_op_jnless):
2508 (JSC::JIT::emitSlow_op_jnless):
2509 (JSC::JIT::emit_op_jnlesseq):
2510 (JSC::JIT::emitSlow_op_jnlesseq):
2511 (JSC::JIT::emitBinaryDoubleOp):
2512 * jit/JITOpcodes.cpp:
2513 (JSC::JIT::emit_op_jmp):
2514 (JSC::JIT::emit_op_loop):
2515 (JSC::JIT::emit_op_loop_if_less):
2516 (JSC::JIT::emitSlow_op_loop_if_less):
2517 (JSC::JIT::emit_op_loop_if_lesseq):
2518 (JSC::JIT::emitSlow_op_loop_if_lesseq):
2519 (JSC::JIT::emit_op_loop_if_true):
2520 (JSC::JIT::emitSlow_op_loop_if_true):
2521 (JSC::JIT::emit_op_jfalse):
2522 (JSC::JIT::emitSlow_op_jfalse):
2523 (JSC::JIT::emit_op_jtrue):
2524 (JSC::JIT::emitSlow_op_jtrue):
2525 (JSC::JIT::emit_op_jeq_null):
2526 (JSC::JIT::emit_op_jneq_null):
2527 (JSC::JIT::emit_op_jneq_ptr):
2528 (JSC::JIT::emit_op_jsr):
2529 (JSC::JIT::emit_op_next_pname):
2530 (JSC::JIT::emit_op_jmp_scopes):
2532 2009-10-09 Geoffrey Garen <ggaren@apple.com>
2534 Reviewed by Sam Weinig.
2536 Migrated some code that didn't belong out of Structure.
2538 SunSpider says maybe 1.03x faster.
2540 * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
2541 a Structure's prototype the direct responsility of the object using it.
2542 (Giving Structure a mark function was misleading because it implied that
2543 all live structures get marked during GC, when they don't.)
2545 * runtime/JSGlobalObject.cpp:
2546 (JSC::markIfNeeded):
2547 (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
2548 on the global object. Maybe this wasn't necessary, but now we don't have
2551 * runtime/JSObject.cpp:
2552 (JSC::JSObject::getPropertyNames):
2553 (JSC::JSObject::getOwnPropertyNames):
2554 (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
2555 * runtime/JSObject.h:
2556 (JSC::JSObject::markChildrenDirect):
2557 * runtime/PropertyNameArray.h:
2558 * runtime/Structure.cpp:
2559 * runtime/Structure.h:
2560 (JSC::Structure::setEnumerationCache):
2561 (JSC::Structure::enumerationCache): Moved property name gathering code
2562 from Structure to JSObject because having a Structure iterate its JSObject
2563 was a layering violation. A JSObject is implemented using a Structure; not
2564 the other way around.
2566 2009-10-09 Mark Rowe <mrowe@apple.com>
2568 Attempt to fix the GTK release build.
2570 * GNUmakefile.am: Include Grammar.cpp in release builds now that
2571 AllInOneFile.cpp is gone.
2573 2009-10-09 Gabor Loki <loki@inf.u-szeged.hu>
2575 Rubber-stamped by Eric Seidel.
2577 Add ARM JIT support for Gtk port (disabled by default)
2578 https://bugs.webkit.org/show_bug.cgi?id=30228
2582 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2584 Tiger build fix: added a few more variable initializations.
2586 * runtime/StringPrototype.cpp:
2587 (JSC::stringProtoFuncReplace):
2588 (JSC::stringProtoFuncSearch):
2590 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2592 Qt build fix: added missing #include.
2596 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2598 Tiger build fix: initialize variable whose initialization the compiler
2599 can't otherwise figure out.
2601 * runtime/RegExpObject.cpp:
2602 (JSC::RegExpObject::match):
2604 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2606 Windows build fix: updated exports.
2608 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2609 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2611 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2613 Tiger build fix: fixed file name case.
2615 * JavaScriptCore.xcodeproj/project.pbxproj:
2617 2009-10-08 Geoffrey Garen <ggaren@apple.com>
2619 Reviewed by Maciej Stachowiak.
2621 At long last, I pronounce the death of AllInOneFile.cpp.
2623 SunSpider reports a 1.01x speedup.
2625 * AllInOneFile.cpp: Removed.
2627 * JavaScriptCore.exp:
2628 * JavaScriptCore.gypi:
2629 * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
2630 to compilation stages.
2636 * runtime/ArrayConstructor.cpp:
2637 (JSC::constructArrayWithSizeQuirk):
2638 * runtime/Collector.h:
2639 * runtime/JSCell.cpp:
2640 (JSC::JSCell::operator new):
2642 (JSC::JSCell::operator new):
2643 * runtime/JSGlobalObject.cpp:
2644 (JSC::JSGlobalObject::operator new):
2645 * runtime/JSNumberCell.h:
2646 (JSC::JSNumberCell::operator new):
2647 * runtime/JSString.cpp:
2648 * runtime/JSString.h:
2651 (JSC::jsOwnedString):
2652 * runtime/RegExpConstructor.cpp:
2653 * runtime/RegExpConstructor.h:
2654 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
2655 (JSC::RegExpConstructorPrivate::lastOvector):
2656 (JSC::RegExpConstructorPrivate::tempOvector):
2657 (JSC::RegExpConstructorPrivate::changeLastOvector):
2658 (JSC::RegExpConstructor::performMatch):
2659 * runtime/StringPrototype.cpp:
2660 (JSC::stringProtoFuncMatch):
2661 * yarr/RegexJIT.cpp:
2663 (JSC::Yarr::executeRegex): Inlined a few things that Shark said
2664 were hot, on the presumption that AllInOneFile.cpp used to inline them
2667 2009-10-08 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
2669 Reviewed by Gavin Barraclough.
2671 Fix for JIT'ed op_call instructions (evals, constructs, etc.)
2672 when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
2674 https://bugs.webkit.org/show_bug.cgi?id=30201
2677 (JSC::JIT::compileOpCall):
2679 2009-10-07 Geoffrey Garen <ggaren@apple.com>
2681 Windows build fix: removed no longer exported symbol.
2683 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2684 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2686 2009-10-07 Geoffrey Garen <ggaren@apple.com>
2688 Reviewed by Oliver Hunt.
2690 Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
2691 thread, permanently slowing down JavaScript
2693 Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
2694 since WebCore no longer uses it.
2696 * JavaScriptCore.exp:
2697 * runtime/Collector.cpp:
2698 (JSC::Heap::protect):
2699 (JSC::Heap::unprotect):
2700 (JSC::Heap::markProtectedObjects):
2701 (JSC::Heap::protectedGlobalObjectCount):
2702 (JSC::Heap::protectedObjectCount):
2703 (JSC::Heap::protectedObjectTypeCounts):
2704 * runtime/Collector.h:
2706 2009-10-07 Zoltan Horvath <zoltan@webkit.org>
2708 Reviewed by Darin Adler.
2710 Allow custom memory allocation control for JavaScriptCore's IdentifierArena
2711 https://bugs.webkit.org/show_bug.cgi?id=30158
2713 Inherits IdentifierArena class from FastAllocBase because it has been
2714 instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
2716 * parser/ParserArena.h:
2718 2009-10-07 Adam Roben <aroben@apple.com>
2720 Export DateInstance::info in a way that works on Windows
2722 Fixes <http://webkit.org/b/30171>
2723 fast/dom/Window/window-postmessage-clone.html fails on Windows
2725 Reviewed by Anders Carlsson.
2727 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2728 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2729 Removed the export of DateInstance::info from here.
2731 * runtime/DateInstance.h: Use JS_EXPORTDATA to export
2732 DateInstance::info, which is the required way of exporting data on
2735 2009-10-07 Jørgen Lind <jorgen.lind@nokia.com>
2737 Reviewed by Simon Hausmann.
2739 When enabling or disabling the JIT through .qmake.cache, make sure
2740 to also toggle ENABLE_YARR_JIT.
2742 * JavaScriptCore.pri:
2744 2009-10-06 Priit Laes <plaes@plaes.org>
2746 Reviewed by Gavin Barraclough.
2748 Linking fails with "relocation R_X86_64_PC32 against symbol
2750 https://bugs.webkit.org/show_bug.cgi?id=28422
2753 Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
2754 in text segment causing relocation errors on amd64 architecture.
2755 Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
2757 2009-10-06 Oliver Hunt <oliver@apple.com>
2761 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2762 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2764 2009-10-06 Oliver Hunt <oliver@apple.com>
2766 Reviewed by NOBODY (build fix).
2770 * runtime/DateInstance.cpp:
2772 2009-10-05 Oliver Hunt <oliver@apple.com>
2774 Reviewed by Gavin Barraclough.
2776 It should be possible to post (clone) built-in JS objects to Workers
2777 https://bugs.webkit.org/show_bug.cgi?id=22878
2779 Expose helpers to throw correct exceptions during object graph walk
2780 used for cloning and add a helper function to create Date instances
2781 without going through the JS Date constructor function.
2783 * JavaScriptCore.exp:
2784 * JavaScriptCore.xcodeproj/project.pbxproj:
2785 * runtime/DateInstance.cpp:
2786 (JSC::DateInstance::DateInstance):
2787 * runtime/DateInstance.h:
2788 * runtime/ExceptionHelpers.cpp:
2789 (JSC::createTypeError):
2790 * runtime/ExceptionHelpers.h:
2792 2009-10-06 David Levin <levin@chromium.org>
2794 Reviewed by Oliver Hunt.
2796 StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
2797 https://bugs.webkit.org/show_bug.cgi?id=30095
2799 * wtf/CrossThreadRefCounted.h:
2800 Removed an unused function and assert improvement.
2801 (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
2802 (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
2803 (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
2804 (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
2805 non-threadsafe operation, add an assert that the class is owned by the current thread.
2807 2009-10-05 Kevin Ollivier <kevino@theolliviers.com>
2809 wx build fix. Add Symbian files to the list of excludes.
2813 2009-10-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2815 Reviewed by Simon Hausmann.
2817 [Qt] Remove precompiled header from JavaScriptCore compilation to
2818 prevent qmake warning during autonomous compilation.
2819 https://bugs.webkit.org/show_bug.cgi?id=30069
2821 * JavaScriptCore.pro:
2823 2009-10-02 Geoffrey Garen <ggaren@apple.com>
2825 Reviewed by Sam Weinig.
2827 Removed the concept of a "fast access cutoff" in arrays, because it
2828 punished some patterns of array access too much, and made things too
2829 complex for inlining in some cases.
2831 1.3% speedup on SunSpider.
2833 * jit/JITOpcodes.cpp:
2834 (JSC::JIT::emitSlow_op_get_by_val):
2835 (JSC::JIT::emitSlow_op_put_by_val):
2836 * jit/JITPropertyAccess.cpp:
2837 (JSC::JIT::emit_op_get_by_val):
2838 (JSC::JIT::emitSlow_op_get_by_val):
2839 (JSC::JIT::emit_op_put_by_val):
2840 (JSC::JIT::emitSlow_op_put_by_val):
2843 (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
2844 getting / putting from / to an array. Inline putting past the end of
2847 * runtime/JSArray.cpp:
2848 (JSC::JSArray::JSArray):
2849 (JSC::JSArray::getOwnPropertySlot):
2850 (JSC::JSArray::getOwnPropertyDescriptor):
2851 (JSC::JSArray::put):
2852 (JSC::JSArray::putSlowCase):
2853 (JSC::JSArray::deleteProperty):
2854 (JSC::JSArray::getOwnPropertyNames):
2855 (JSC::JSArray::increaseVectorLength):
2856 (JSC::JSArray::setLength):
2857 (JSC::JSArray::pop):
2858 (JSC::JSArray::push):
2859 (JSC::JSArray::sort):
2860 (JSC::JSArray::fillArgList):
2861 (JSC::JSArray::copyToRegisters):
2862 (JSC::JSArray::compactForSorting):
2863 (JSC::JSArray::checkConsistency):
2864 * runtime/JSArray.h:
2865 (JSC::JSArray::canGetIndex):
2866 (JSC::JSArray::canSetIndex):
2867 (JSC::JSArray::setIndex):
2868 (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
2869 replaced with checks for JSValue() to detect reads and writes from / to
2870 uninitialized parts of the array.
2872 2009-10-02 Jonni Rainisto <jonni.rainisto@nokia.com>
2874 Reviewed by Darin Adler.
2876 Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
2877 https://bugs.webkit.org/show_bug.cgi?id=29956
2879 * wtf/RandomNumber.cpp:
2880 (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
2882 2009-10-02 Geoffrey Garen <ggaren@apple.com>
2884 Reviewed by Sam Weinig.
2886 Take one branch instead of two to test for JSValue().
2888 1.1% SunSpider speedup.
2891 (JSC::JIT::compileOpCall):
2892 * jit/JITOpcodes.cpp:
2893 (JSC::JIT::emit_op_to_jsnumber):
2894 (JSC::JIT::emit_op_create_arguments):
2895 * jit/JITPropertyAccess.cpp:
2896 (JSC::JIT::emitSlow_op_get_by_val):
2897 (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
2898 of testing for the cell tag with a 0 payload.
2900 * runtime/JSValue.cpp:
2901 (JSC::JSValue::description): Added support for dumping the new empty value,
2902 and deleted values, in debug builds.
2904 * runtime/JSValue.h:
2905 (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
2907 (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
2908 tag, to avoid having two different c++ versions of null / empty.
2910 (JSC::JSValue::operator bool): Test for the empty value tag, instead
2911 of testing for the cell tag with a 0 payload.
2913 2009-10-02 Steve Falkenburg <sfalken@apple.com>
2915 Reviewed by Mark Rowe.
2917 <https://bugs.webkit.org/show_bug.cgi?id=29989>
2918 Safari version number shouldn't be exposed in WebKit code
2920 For a WebKit version of 532.3.4:
2921 Product version is: 5.32.3.4 (was 4.0.3.0)
2922 File version is: 5.32.3.4 (was 4.532.3.4)
2924 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
2926 2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2928 Rubber-stamped by Simon Hausmann.
2930 Fix the Qt on Mac OS X build.
2932 * wtf/FastMalloc.cpp:
2934 2009-10-02 Jørgen Lind <jorgen.lind@nokia.com>
2936 Reviewed by Simon Hausmann.
2938 Allow enabling and disabling of the JIT through a qmake variable.
2940 Qt's configure may set this variable through .qmake.cache if a
2941 commandline option is given and/or the compile test for hwcap.h
2944 * JavaScriptCore.pri:
2946 2009-10-01 Mark Rowe <mrowe@apple.com>
2948 Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger.
2950 * Configurations/FeatureDefines.xcconfig:
2952 2009-10-01 Yongjun Zhang <yongjun.zhang@nokia.com>
2954 Reviewed by Darin Adler.
2956 https://bugs.webkit.org/show_bug.cgi?id=29187
2958 Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
2959 bug regarding templated classes.
2961 The compiler bug is reported at:
2962 https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
2964 The change will be reverted when the above bug is fixed in winscw compiler.
2967 (WTF::::~ListRefPtr):
2969 2009-10-01 Zoltan Horvath <zoltan@webkit.org>
2971 Reviewed by Simon Hausmann.
2973 [Qt] Allow custom memory allocation control for the whole JavaScriptCore
2974 https://bugs.webkit.org/show_bug.cgi?id=27029
2976 Since in JavaScriptCore almost every class which has been instantiated by operator new is
2977 inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
2978 when USE_SYSTEM_MALLOC=0.
2980 Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
2981 (It's needed for the functionality of TCmalloc.)
2983 Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
2985 * JavaScriptCore.pri:
2986 * wtf/FastMalloc.cpp:
2990 2009-09-30 Gabor Loki <loki@inf.u-szeged.hu>
2992 Reviewed by George Staikos.
2994 Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
2995 https://bugs.webkit.org/show_bug.cgi?id=29122
2997 Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
2998 macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
2999 when Thumb-2 instruction set is the required target. The
3000 PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
3001 case where the code is common the PLATFORM(ARM) have to be used.
3003 Modified by George Wright <gwright@rim.com> to correctly work
3004 with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
3005 compiler macros, as well as adding readability changes.
3009 2009-09-30 Oliver Hunt <oliver@apple.com>
3011 Reviewed by Geoff Garen.
3013 Devirtualise array toString conversion
3015 Tweak the implementation of Array.prototype.toString to have a fast path
3016 when acting on a true JSArray.
3018 * runtime/ArrayPrototype.cpp:
3019 (JSC::arrayProtoFuncToString):
3021 2009-09-30 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
3023 Reviewed by Geoffrey Garen.
3025 Buildfix for platforms using JSVALUE32.
3026 https://bugs.webkit.org/show_bug.cgi?id=29915
3028 After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
3029 Also removed unreachable code.
3031 * jit/JITArithmetic.cpp:
3032 (JSC::JIT::emit_op_add):
3033 - Declaration of "OperandTypes types" moved before first use.
3034 - Typos fixed: dst modified to result, regT2 added.
3035 - Unreachable code removed.
3036 (JSC::JIT::emitSlow_op_add):
3037 - Missing declaration of "OperandTypes types" added.
3039 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
3041 Reviewed by Simon Hausmann.
3043 Reduce heap size on Symbian from 64MB to 8MB.
3045 This is not a perfect fix, it requires more fine tuning.
3046 But this makes it possible again to debug in the emulator,
3047 which is more important in order to be able to fix other
3050 * runtime/Collector.h:
3052 2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
3054 Reviewed by Simon Hausmann.
3056 Fix CRASH() macro for Symbian build.
3058 * wtf/Assertions.h: Added missing }
3060 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3062 Reviewed by Gavin Barraclough.
3064 Inlined a few math operations.
3066 ~1% SunSpider speedup.
3069 * jit/JITArithmetic.cpp:
3070 (JSC::JIT::compileBinaryArithOpSlowCase):
3071 (JSC::JIT::emitSlow_op_add):
3072 (JSC::JIT::emitSlow_op_mul):
3073 (JSC::JIT::emit_op_sub):
3074 (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
3075 a constant int and a double.
3077 2009-09-28 Oliver Hunt <oliver@apple.com>
3079 Reviewed by Gavin Barraclough.
3081 Tidy up codeblock sampler
3082 https://bugs.webkit.org/show_bug.cgi?id=29836
3084 Some rather simple refactoring of codeblock sampler so that
3085 it's easier for us to use it to find problems in non-jsc
3088 * JavaScriptCore.exp:
3089 * bytecode/SamplingTool.h:
3090 * debugger/Debugger.cpp:
3091 (JSC::evaluateInGlobalCallFrame):
3092 * debugger/DebuggerCallFrame.cpp:
3093 (JSC::DebuggerCallFrame::evaluate):
3094 * interpreter/Interpreter.cpp:
3095 (JSC::Interpreter::Interpreter):
3096 (JSC::Interpreter::execute):
3097 (JSC::Interpreter::privateExecute):
3098 (JSC::Interpreter::enableSampler):
3099 (JSC::Interpreter::dumpSampleData):
3100 (JSC::Interpreter::startSampling):
3101 (JSC::Interpreter::stopSampling):
3102 * interpreter/Interpreter.h:
3103 (JSC::Interpreter::sampler):
3107 * runtime/Completion.cpp:
3110 * runtime/Executable.h:
3111 (JSC::EvalExecutable::EvalExecutable):
3112 (JSC::ProgramExecutable::create):
3113 (JSC::ProgramExecutable::ProgramExecutable):
3114 * runtime/JSGlobalData.cpp:
3115 (JSC::JSGlobalData::startSampling):
3116 (JSC::JSGlobalData::stopSampling):
3117 (JSC::JSGlobalData::dumpSampleData):
3118 * runtime/JSGlobalData.h:
3119 * runtime/JSGlobalObjectFunctions.cpp:
3120 (JSC::globalFuncEval):
3122 2009-09-29 Jeremy Orlow <jorlow@chromium.org>
3124 Reviewed by Dimitri Glazkov.
3126 Add GYP generated files to svn:ignore
3127 https://bugs.webkit.org/show_bug.cgi?id=29895
3129 The following files are generated by JavaScriptCore's GYP file and should be ignored:
3139 * JavaScriptCore.gyp: Changed property svn:ignore.
3141 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3143 Reviewed by Sam Weinig.
3145 Standardized an optimization for adding non-numbers.
3147 SunSpider says maybe a tiny speedup.
3149 * jit/JITArithmetic.cpp:
3150 (JSC::JIT::emit_op_add):
3151 (JSC::JIT::emitSlow_op_add):
3153 2009-09-29 Geoffrey Garen <ggaren@apple.com>
3155 Windows build fix: export a new symbol.
3157 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3158 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3160 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3162 Reviewed by Sam Weinig.
3164 Removed virtual destructor from JSGlobalObjectData to eliminate pointer
3165 fix-ups when accessing JSGlobalObject::d.
3167 Replaced with an explicit destructor function pointer.
3169 6% speedup on bench-alloc-nonretained.js.
3171 * JavaScriptCore.exp:
3172 * runtime/JSGlobalObject.cpp:
3173 (JSC::JSGlobalObject::~JSGlobalObject):
3174 (JSC::JSGlobalObject::destroyJSGlobalObjectData):
3175 * runtime/JSGlobalObject.h:
3176 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3177 (JSC::JSGlobalObject::JSGlobalObject):
3179 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
3181 Reviewed by David Kilzer.
3183 [Qt] Assert messages prints visible in Symbian
3184 https://bugs.webkit.org/show_bug.cgi?id=29808
3186 Asserts use vprintf to print the messages to stderr.
3187 In Symbian Open C it is not possible to see stderr so
3188 I routed the messages to stdout instead.
3190 * wtf/Assertions.cpp:
3192 2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
3194 Reviewed by Darin Adler.
3196 [Qt] Symbian CRASH macro implementation
3198 Added Symbian specific crash macro that
3199 stops to crash line if JIT debugging is used.
3200 Additional differentiation of access violation
3201 (KERN-EXEC 3) and CRASH panic.
3205 2009-09-28 Mark Rowe <mrowe@apple.com>
3207 Fix the PowerPC build.
3209 * JavaScriptCore.exp:
3211 2009-09-28 Mark Rowe <mrowe@apple.com>
3213 Reviewed by Gavin Barraclough.
3215 <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
3217 * runtime/Collector.cpp:
3218 (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
3219 to ensure that we correctly interpret the contents of registers during marking.
3221 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3223 Windows build fix: added new exports.
3225 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3226 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3228 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3230 Windows build fix: removed exports that no longer exist.
3232 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3233 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3235 2009-09-28 Geoffrey Garen <ggaren@apple.com>
3237 Reviewed by Darin Adler.
3239 NotNullPassRefPtr: smart pointer optimized for passing references that are not null
3240 https://bugs.webkit.org/show_bug.cgi?id=29822
3242 Added NotNullPassRefPtr, and deployed it in all places that initialize
3245 2.2% speedup on bench-allocate-nonretained.js.
3247 * API/JSCallbackConstructor.cpp:
3248 (JSC::JSCallbackConstructor::JSCallbackConstructor):
3249 * API/JSCallbackConstructor.h:
3250 * API/JSCallbackObject.h:
3251 * API/JSCallbackObjectFunctions.h:
3252 (JSC::JSCallbackObject::JSCallbackObject):
3253 * JavaScriptCore.exp:
3254 * bytecode/CodeBlock.h:
3255 (JSC::CodeBlock::addFunctionDecl):
3256 (JSC::CodeBlock::addFunctionExpr):
3257 * runtime/ArrayConstructor.cpp:
3258 (JSC::ArrayConstructor::ArrayConstructor):
3259 * runtime/ArrayConstructor.h:
3260 * runtime/ArrayPrototype.cpp:
3261 (JSC::ArrayPrototype::ArrayPrototype):
3262 * runtime/ArrayPrototype.h:
3263 * runtime/BooleanConstructor.cpp:
3264 (JSC::BooleanConstructor::BooleanConstructor):
3265 * runtime/BooleanConstructor.h:
3266 * runtime/BooleanObject.cpp:
3267 (JSC::BooleanObject::BooleanObject):
3268 * runtime/BooleanObject.h:
3269 * runtime/BooleanPrototype.cpp:
3270 (JSC::BooleanPrototype::BooleanPrototype):
3271 * runtime/BooleanPrototype.h:
3272 * runtime/DateConstructor.cpp:
3273 (JSC::DateConstructor::DateConstructor):
3274 * runtime/DateConstructor.h:
3275 * runtime/DateInstance.cpp:
3276 (JSC::DateInstance::DateInstance):
3277 * runtime/DateInstance.h:
3278 * runtime/DatePrototype.cpp:
3279 (JSC::DatePrototype::DatePrototype):
3280 * runtime/DatePrototype.h:
3281 * runtime/ErrorConstructor.cpp:
3282 (JSC::ErrorConstructor::ErrorConstructor):
3283 * runtime/ErrorConstructor.h:
3284 * runtime/ErrorInstance.cpp:
3285 (JSC::ErrorInstance::ErrorInstance):
3286 * runtime/ErrorInstance.h:
3287 * runtime/ErrorPrototype.cpp:
3288 (JSC::ErrorPrototype::ErrorPrototype):
3289 * runtime/ErrorPrototype.h:
3290 * runtime/FunctionConstructor.cpp:
3291 (JSC::FunctionConstructor::FunctionConstructor):
3292 * runtime/FunctionConstructor.h:
3293 * runtime/FunctionPrototype.cpp:
3294 (JSC::FunctionPrototype::FunctionPrototype):
3295 * runtime/FunctionPrototype.h:
3296 * runtime/GlobalEvalFunction.cpp:
3297 (JSC::GlobalEvalFunction::GlobalEvalFunction):
3298 * runtime/GlobalEvalFunction.h:
3299 * runtime/InternalFunction.cpp:
3300 (JSC::InternalFunction::InternalFunction):
3301 * runtime/InternalFunction.h:
3302 (JSC::InternalFunction::InternalFunction):
3303 * runtime/JSActivation.cpp:
3304 (JSC::JSActivation::JSActivation):
3305 * runtime/JSActivation.h:
3306 (JSC::JSActivation::JSActivationData::JSActivationData):
3307 * runtime/JSArray.cpp:
3308 (JSC::JSArray::JSArray):
3309 * runtime/JSArray.h:
3310 * runtime/JSByteArray.cpp:
3311 (JSC::JSByteArray::JSByteArray):
3312 * runtime/JSByteArray.h:
3313 * runtime/JSFunction.cpp:
3314 (JSC::JSFunction::JSFunction):
3315 * runtime/JSFunction.h:
3316 * runtime/JSGlobalObject.h:
3317 (JSC::JSGlobalObject::JSGlobalObject):
3318 * runtime/JSONObject.h:
3319 (JSC::JSONObject::JSONObject):
3320 * runtime/JSObject.h:
3321 (JSC::JSObject::JSObject):
3322 (JSC::JSObject::setStructure):
3323 * runtime/JSVariableObject.h:
3324 (JSC::JSVariableObject::JSVariableObject):
3325 * runtime/JSWrapperObject.h:
3326 (JSC::JSWrapperObject::JSWrapperObject):
3327 * runtime/MathObject.cpp:
3328 (JSC::MathObject::MathObject):
3329 * runtime/MathObject.h:
3330 * runtime/NativeErrorConstructor.cpp:
3331 (JSC::NativeErrorConstructor::NativeErrorConstructor):
3332 * runtime/NativeErrorConstructor.h:
3333 * runtime/NativeErrorPrototype.cpp:
3334 (JSC::NativeErrorPrototype::NativeErrorPrototype):
3335 * runtime/NativeErrorPrototype.h:
3336 * runtime/NumberConstructor.cpp:
3337 (JSC::NumberConstructor::NumberConstructor):
3338 * runtime/NumberConstructor.h:
3339 * runtime/NumberObject.cpp:
3340 (JSC::NumberObject::NumberObject):
3341 * runtime/NumberObject.h:
3342 * runtime/NumberPrototype.cpp:
3343 (JSC::NumberPrototype::NumberPrototype):
3344 * runtime/NumberPrototype.h:
3345 * runtime/ObjectConstructor.cpp:
3346 (JSC::ObjectConstructor::ObjectConstructor):
3347 * runtime/ObjectConstructor.h:
3348 * runtime/ObjectPrototype.cpp:
3349 (JSC::ObjectPrototype::ObjectPrototype):
3350 * runtime/ObjectPrototype.h:
3351 * runtime/PropertyNameArray.h:
3352 (JSC::PropertyNameArrayData::setCachedPrototypeChain):
3353 * runtime/PrototypeFunction.cpp:
3354 (JSC::PrototypeFunction::PrototypeFunction):
3355 * runtime/PrototypeFunction.h:
3356 * runtime/RegExpConstructor.cpp:
3357 (JSC::RegExpConstructor::RegExpConstructor):
3358 * runtime/RegExpConstructor.h:
3359 * runtime/RegExpObject.cpp:
3360 (JSC::RegExpObject::RegExpObject):
3361 * runtime/RegExpObject.h:
3362 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
3363 * runtime/RegExpPrototype.cpp:
3364 (JSC::RegExpPrototype::RegExpPrototype):
3365 * runtime/RegExpPrototype.h:
3366 * runtime/StringConstructor.cpp:
3367 (JSC::StringConstructor::StringConstructor):
3368 * runtime/StringConstructor.h:
3369 * runtime/StringObject.cpp:
3370 (JSC::StringObject::StringObject):
3371 * runtime/StringObject.h:
3372 * runtime/StringObjectThatMasqueradesAsUndefined.h:
3373 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
3374 * runtime/StringPrototype.cpp:
3375 (JSC::StringPrototype::StringPrototype):
3376 * runtime/StringPrototype.h:
3378 (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
3379 (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
3380 (WTF::NotNullPassRefPtr::get):
3381 (WTF::NotNullPassRefPtr::clear):
3382 (WTF::NotNullPassRefPtr::releaseRef):
3383 (WTF::NotNullPassRefPtr::operator*):
3384 (WTF::NotNullPassRefPtr::operator->):
3385 (WTF::NotNullPassRefPtr::operator!):
3386 (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
3388 (WTF::RefPtr::RefPtr):
3391 2009-09-28 Oliver Hunt <oliver@apple.com>
3393 Reviewed by Geoff Garen.
3395 Hard dependency on SSE2 instruction set with JIT
3396 https://bugs.webkit.org/show_bug.cgi?id=29779
3398 Add floating point support checks to op_jfalse and op_jtrue, and
3399 fix the logic for the slow case of op_add
3401 * jit/JITArithmetic.cpp:
3402 (JSC::JIT::emitSlow_op_add):
3403 * jit/JITOpcodes.cpp:
3404 (JSC::JIT::emit_op_jfalse):
3405 (JSC::JIT::emit_op_jtrue):
3407 2009-09-28 Yaar Schnitman <yaar@chromium.org>
3409 Reviewed by Dimitri Glazkov.
3411 Chromium port - recognize we are being built independently
3412 of chromium and look for dependencies under webkit/chromium rather
3415 https://bugs.webkit.org/show_bug.cgi?id=29722
3417 * JavaScriptCore.gyp/JavaScriptCore.gyp:
3419 2009-09-28 Jakub Wieczorek <faw217@gmail.com>
3421 Reviewed by Simon Hausmann.
3423 [Qt] Implement XSLT support with QtXmlPatterns.
3424 https://bugs.webkit.org/show_bug.cgi?id=28303
3426 * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
3428 2009-09-28 Gabor Loki <loki@inf.u-szeged.hu>
3430 Reviewed by Simon Hausmann.
3432 Remove __clear_cache which is an internal function of GCC
3433 https://bugs.webkit.org/show_bug.cgi?id=28886
3435 Although __clear_cache is exported from GCC, this is an internal
3436 function. GCC makes no promises about it.
3438 * jit/ExecutableAllocator.h:
3439 (JSC::ExecutableAllocator::cacheFlush):
3441 2009-09-28 Sam Weinig <sam@webkit.org>
3443 Reviewed by Oliver Hunt.
3445 Fix an absolute path to somewhere in Oliver's machine to a relative path
3446 for derived JSONObject.lut.h.
3448 * JavaScriptCore.xcodeproj/project.pbxproj:
3450 2009-09-28 Joerg Bornemann <joerg.bornemann@nokia.com>
3452 Reviewed by Simon Hausmann.
3454 Add ARM version detection for Windows CE.
3458 2009-09-26 Yongjun Zhang <yongjun.zhang@nokia.com>
3460 Reviewed by Simon Hausmann.
3462 Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
3464 Re-use Windows shrinkAllocation implementation because Symbian doesn't
3465 support releasing part of memory region.
3467 Use fastMalloc and fastFree to implement allocateStack and releaseStack
3470 * JavaScriptCore.pri:
3471 * runtime/MarkStack.h:
3472 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
3473 * runtime/MarkStackSymbian.cpp: Added.
3474 (JSC::MarkStack::initializePagesize):
3475 (JSC::MarkStack::allocateStack):
3476 (JSC::MarkStack::releaseStack):
3478 2009-09-25 Gabor Loki <loki@inf.u-szeged.hu>
3480 Reviewed by Gavin Barraclough.
3482 Fix unaligned data access in YARR_JIT on ARMv5 and below.
3483 https://bugs.webkit.org/show_bug.cgi?id=29695
3485 On ARMv5 and below all data access should be naturally aligned.
3486 In the YARR_JIT there is a case when character pairs are
3487 loaded from the input string, but this data access is not
3488 naturally aligned. This fix introduces load32WithUnalignedHalfWords
3489 and branch32WithUnalignedHalfWords functions which contain
3490 naturally aligned memory loads - half word loads - on ARMv5 and below.
3492 * assembler/MacroAssemblerARM.cpp:
3493 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3494 * assembler/MacroAssemblerARM.h:
3495 (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3496 (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
3497 * assembler/MacroAssemblerARMv7.h:
3498 (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
3499 (JSC::MacroAssemblerARMv7::branch32):
3500 (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
3501 * assembler/MacroAssemblerX86Common.h:
3502 (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
3503 (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
3505 * yarr/RegexJIT.cpp:
3506 (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
3508 2009-09-25 Jeremy Orlow <jorlow@chromium.org>
3510 This is breaking Chromium try bots, so I'm counting this as a build fix.
3512 Add more svn:ignore exceptions. On different platforms, these files are
3513 generated with different case for JavaScriptCore. Also there are some
3514 wtf project files that get built apparently.
3516 * JavaScriptCore.gyp: Changed property svn:ignore.
3518 2009-09-25 Ada Chan <adachan@apple.com>
3522 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3523 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3525 2009-09-25 Geoffrey Garen <ggaren@apple.com>
3527 Reviewed by Darin Adler.
3529 Inlined some object creation code, including lexicalGlobalObject access
3530 https://bugs.webkit.org/show_bug.cgi?id=29750
3532 SunSpider says 0.5% faster.
3534 0.8% speedup on bench-alloc-nonretained.js.
3535 2.5% speedup on v8-splay.js.
3537 * interpreter/CachedCall.h:
3538 (JSC::CachedCall::CachedCall):
3539 * interpreter/CallFrame.h:
3540 (JSC::ExecState::lexicalGlobalObject):
3541 (JSC::ExecState::globalThisValue):
3542 * interpreter/Interpreter.cpp:
3543 (JSC::Interpreter::dumpRegisters):
3544 (JSC::Interpreter::execute):
3545 (JSC::Interpreter::privateExecute):
3547 (JSC::DEFINE_STUB_FUNCTION):
3548 * runtime/FunctionConstructor.cpp:
3549 (JSC::constructFunction):
3550 * runtime/ScopeChain.cpp:
3551 (JSC::ScopeChainNode::print):
3552 * runtime/ScopeChain.h:
3553 (JSC::ScopeChainNode::ScopeChainNode):
3554 (JSC::ScopeChainNode::~ScopeChainNode):
3555 (JSC::ScopeChainNode::push):
3556 (JSC::ScopeChain::ScopeChain):
3557 (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
3558 Replaced accessor function for globalObject() with data member. Replaced
3559 globalThisObject() accessor with direct access to globalThis, to match.
3561 * runtime/JSGlobalObject.cpp:
3562 (JSC::JSGlobalObject::init):
3563 * runtime/JSGlobalObject.h: Inlined array and object construction.
3565 2009-09-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3567 Reviewed by Gavin Barraclough.
3569 Add ARM version detection rules for Symbian
3570 https://bugs.webkit.org/show_bug.cgi?id=29715
3574 2009-09-24 Xan Lopez <xlopez@igalia.com>
3576 Reviewed by Mark "Do It!" Rowe.
3578 Some GCC versions don't like C++-style comments in preprocessor
3579 directives, change to C-style to shut them up.
3583 2009-09-24 Oliver Hunt <oliver@apple.com>
3585 Reviewed by Gavin Barraclough.
3587 Division is needlessly slow in 64-bit
3588 https://bugs.webkit.org/show_bug.cgi?id=29723
3590 Add codegen for op_div on x86-64
3593 (JSC::JIT::privateCompileMainPass):
3594 (JSC::JIT::privateCompileSlowCases):
3596 * jit/JITArithmetic.cpp:
3597 (JSC::JIT::compileBinaryArithOpSlowCase):
3598 (JSC::JIT::emit_op_div):
3599 (JSC::JIT::emitSlow_op_div):
3600 * jit/JITInlineMethods.h:
3601 (JSC::JIT::isOperandConstantImmediateDouble):
3602 (JSC::JIT::addressFor):
3603 (JSC::JIT::emitLoadDouble):
3604 (JSC::JIT::emitLoadInt32ToDouble):
3605 (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
3607 2009-09-24 Jeremy Orlow <jorlow@chromium.org>
3609 Reviewed by Dimitri Glazkov.
3611 Add GYP generated files to svn:ignore
3612 https://bugs.webkit.org/show_bug.cgi?id=29724
3614 Adding the following files to the svn:ignore list (all in the
3615 JavaScriptCore/JavaScriptCore.gyp directory)
3617 JavaScriptCore.xcodeproj
3619 JavaScriptCore.vcproj
3620 JavaScriptCore_Debug.rules
3621 JavaScriptCore_Release.rules
3622 JavaScriptCore_Release - no tcmalloc.rules
3623 JavaScriptCore_Purify.rules
3625 JavaScriptCore_Debug_rules.mk
3626 JavaScriptCore_Release_rules.mk
3627 JavaScriptCore_Release - no tcmalloc_rules.mk
3628 JavaScriptCore_Purify_rules.mk
3629 JavaScriptCore.scons
3630 JavaScriptCore_main.scons
3632 * JavaScriptCore.gyp: Changed property svn:ignore.
3634 2009-09-24 Yong Li <yong.li@torchmobile.com>
3636 Reviewed by Adam Barth.
3638 Replace platform-dependent code with WTF::currentTime()
3639 https://bugs.webkit.org/show_bug.cgi?id=29148
3644 (StopWatch::getElapsedMS):
3645 * runtime/TimeoutChecker.cpp:
3648 2009-09-24 Mark Rowe <mrowe@apple.com>
3650 Reviewed by Sam Weinig.
3652 <rdar://problem/7215058> FastMalloc scavenging thread should be named
3654 * wtf/FastMalloc.cpp:
3655 (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
3656 * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
3657 * wtf/ThreadingPthreads.cpp:
3658 (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
3660 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3662 Reviewed by Sam Weinig.
3664 Renamed clear to removeAll, as suggested by Darin Adler.
3666 * wtf/HashCountedSet.h:
3669 2009-09-24 Mark Rowe <mrowe@apple.com>
3671 Reviewed by Gavin Barraclough.
3673 Fix FastMalloc to build with assertions enabled.
3675 * wtf/FastMalloc.cpp:
3676 (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
3678 (TCMalloc_SpinLock::IsHeld):
3680 2009-09-24 Geoffrey Garen <ggaren@apple.com>
3682 Suggested by Darin Adler.
3684 Removed some unnecessary parameter names.
3686 * wtf/HashCountedSet.h:
3688 2009-09-24 Janne Koskinen <janne.p.koskinen@digia.com>
3690 Reviewed by Simon Hausmann.
3692 On Windows JSChar is typedef'ed to wchar_t.
3694 When building with WINSCW for Symbian we need to do the
3697 * API/JSStringRef.h:
3699 2009-09-23 Geoffrey Garen <ggaren@apple.com>
3701 A piece of my last patch that I forgot.
3703 * wtf/HashCountedSet.h:
3704 (WTF::::clear): Added HashCountedSet::clear.
3706 2009-09-24 Gabor Loki <loki@inf.u-szeged.hu>
3708 Reviewed by Gavin Barraclough.
3710 Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set
3711 https://bugs.webkit.org/show_bug.cgi?id=28886
3713 There are some GCC packages (for example GCC-2006q3 from CodeSourcery)
3714 which contain __clear_cache built-in function only for C while the C++
3715 version of __clear_cache is missing on ARM architectures.
3717 Fixed a small bug in the inline assembly of cacheFlush function on
3720 * jit/ExecutableAllocator.h:
3721 (JSC::ExecutableAllocator::cacheFlush):
3723 2009-09-23 Geoffrey Garen <ggaren@apple.com>
3725 Reviewed by Sam Weinig.
3727 Added the ability to swap vectors with inline capacities, so you can
3728 store a vector with inline capacity in a hash table.
3732 (WTF::VectorBuffer::swap):
3734 2009-09-23 David Kilzer <ddkilzer@apple.com>
3736 Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
3738 Reviewed by Mark Rowe.
3740 * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when
3741 building on 64-bit SnowLeopard. Define to 0 elsewhere.
3743 2009-09-22 Oliver Hunt <oliver@apple.com>
3745 Reviewed by Geoff Garen.
3747 Code sampling builds are broken.
3748 https://bugs.webkit.org/show_bug.cgi?id=29662
3752 * bytecode/EvalCodeCache.h:
3753 (JSC::EvalCodeCache::get):
3754 * bytecode/SamplingTool.cpp:
3755 (JSC::ScriptSampleRecord::sample):
3756 (JSC::SamplingTool::doRun):
3757 (JSC::SamplingTool::notifyOfScope):
3758 (JSC::compareScriptSampleRecords):
3759 (JSC::SamplingTool::dump):
3760 * bytecode/SamplingTool.h:
3761 (JSC::ScriptSampleRecord::ScriptSampleRecord):
3762 (JSC::ScriptSampleRecord::~ScriptSampleRecord):
3763 (JSC::SamplingTool::SamplingTool):
3764 * bytecompiler/BytecodeGenerator.cpp:
3765 (JSC::BytecodeGenerator::BytecodeGenerator):
3766 (JSC::BytecodeGenerator::emitNewFunction):
3767 (JSC::BytecodeGenerator::emitNewFunctionExpression):
3768 * bytecompiler/BytecodeGenerator.h:
3769 (JSC::BytecodeGenerator::makeFunction):
3770 * debugger/Debugger.cpp:
3771 (JSC::evaluateInGlobalCallFrame):
3772 * debugger/DebuggerCallFrame.cpp:
3773 (JSC::DebuggerCallFrame::evaluate):
3775 (JSC::ScopeNode::ScopeNode):
3776 * runtime/Completion.cpp:
3779 * runtime/Executable.cpp:
3780 (JSC::FunctionExecutable::fromGlobalCode):
3781 * runtime/Executable.h:
3782 (JSC::ScriptExecutable::ScriptExecutable):
3783 (JSC::EvalExecutable::EvalExecutable):
3784 (JSC::EvalExecutable::create):
3785 (JSC::ProgramExecutable::ProgramExecutable):
3786 (JSC::FunctionExecutable::create):
3787 (JSC::FunctionExecutable::FunctionExecutable):
3788 * runtime/JSGlobalObjectFunctions.cpp:
3789 (JSC::globalFuncEval):
3791 2009-09-22 Darin Adler <darin@apple.com>
3793 Reviewed by Sam Weinig.
3795 * wtf/Forward.h: Added PassOwnPtr.
3797 2009-09-22 Yaar Schnitman <yaar@chromium.org>
3799 Reviewed by David Levin.
3801 Ported chromium.org's javascriptcore.gyp for the webkit chromium port.
3803 https://bugs.webkit.org/show_bug.cgi?id=29617
3805 * JavaScriptCore.gyp/JavaScriptCore.gyp: Added.
3807 2009-09-22 Thiago Macieira <thiago.macieira@nokia.com>
3809 Reviewed by Simon Hausmann.
3811 Fix compilation with WINSCW: no varargs macros
3813 Disable variadic arguments for WINSCW just like we do
3818 2009-09-22 Kent Hansen <khansen@trolltech.com>
3820 Reviewed by Simon Hausmann.
3822 Disable variadic macros on MSVC7.
3824 This was originally added in r26589 but not extended
3825 when LOG_DISABLED/ASSERT_DISABLED was introduced.
3829 2009-09-22 Simon Hausmann <simon.hausmann@nokia.com>
3831 Unreviewed build fix for Windows CE < 5
3833 Define WINCEBASIC to disable the IsDebuggerPresent() code in
3836 * JavaScriptCore.pri:
3838 2009-09-22 Joerg Bornemann <joerg.bornemann@nokia.com>
3840 Reviewed by Simon Hausmann.
3842 Fix major memory leak in JavaScriptCore RegisterFile on Windows CE
3844 https://bugs.webkit.org/show_bug.cgi?id=29367
3846 On Widows CE we must decommit all committed pages before we release
3847 them. See VirtualFree documentation.
3848 Desktop Windows behaves much smoother in this situation.
3850 * interpreter/RegisterFile.cpp:
3851 (JSC::RegisterFile::~RegisterFile):
3853 2009-09-21 Greg Bolsinga <bolsinga@apple.com>
3855 Reviewed by Simon Fraser & Sam Weinig.
3857 Add ENABLE(ORIENTATION_EVENTS)
3858 https://bugs.webkit.org/show_bug.cgi?id=29508
3860 * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines.
3862 2009-09-21 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
3864 Reviewed by Eric Seidel.
3866 [Fix] SourceCode's uninitialized member
3868 Potential source of crashes and bugs was fixed. Default constructor
3869 didn't initialized m_provider member.
3871 https://bugs.webkit.org/show_bug.cgi?id=29364
3873 * parser/SourceCode.h:
3874 (JSC::SourceCode::SourceCode):
3876 2009-09-21 Oliver Hunt <oliver@apple.com>
3878 Reviewed by Geoff Garen.
3880 REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org
3881 https://bugs.webkit.org/show_bug.cgi?id=29599
3883 It is unsafe to attempt to cache new property transitions on
3884 dictionaries of any type.
3886 * interpreter/Interpreter.cpp:
3887 (JSC::Interpreter::tryCachePutByID):
3889 (JSC::JITThunks::tryCachePutByID):
3891 2009-09-21 Oliver Hunt <oliver@apple.com>
3893 RS=Maciej Stachowiak.
3895 Re-land SNES fix with corrected assertion.
3897 * interpreter/Interpreter.cpp:
3898 (JSC::Interpreter::resolveGlobal):
3899 (JSC::Interpreter::tryCachePutByID):
3900 (JSC::Interpreter::tryCacheGetByID):
3902 (JSC::JITThunks::tryCachePutByID):
3903 (JSC::JITThunks::tryCacheGetByID):
3904 (JSC::DEFINE_STUB_FUNCTION):
3905 * runtime/BatchedTransitionOptimizer.h:
3906 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3907 * runtime/JSObject.cpp:
3908 (JSC::JSObject::removeDirect):
3909 * runtime/Structure.cpp:
3910 (JSC::Structure::Structure):
3911 (JSC::Structure::getEnumerablePropertyNames):
3912 (JSC::Structure::despecifyDictionaryFunction):
3913 (JSC::Structure::addPropertyTransitionToExistingStructure):
3914 (JSC::Structure::addPropertyTransition):
3915 (JSC::Structure::removePropertyTransition):
3916 (JSC::Structure::toDictionaryTransition):
3917 (JSC::Structure::toCacheableDictionaryTransition):
3918 (JSC::Structure::toUncacheableDictionaryTransition):
3919 (JSC::Structure::fromDictionaryTransition):
3920 (JSC::Structure::removePropertyWithoutTransition):
3921 * runtime/Structure.h:
3922 (JSC::Structure::isDictionary):
3923 (JSC::Structure::isUncacheableDictionary):
3925 * runtime/StructureChain.cpp:
3926 (JSC::StructureChain::isCacheable):
3928 2009-09-21 Adam Roben <aroben@apple.com>
3930 Revert r48573, as it caused many assertion failures
3932 * interpreter/Interpreter.cpp:
3934 * runtime/BatchedTransitionOptimizer.h:
3935 * runtime/JSObject.cpp:
3936 * runtime/Structure.cpp:
3937 * runtime/Structure.h:
3938 * runtime/StructureChain.cpp:
3940 2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
3942 Unreviewed make dist build fix. Missing files.
3946 2009-09-19 Gavin Barraclough <barraclough@apple.com>
3948 Reviewed by Sam 'Cabin Boy' Weinig.
3950 Fix stack alignment with ARM THUMB2 JIT.
3951 https://bugs.webkit.org/show_bug.cgi?id=29526
3953 Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a
3954 multiple of 16 bytes.
3957 (JSC::JITThunks::JITThunks):
3960 2009-09-20 Oliver Hunt <oliver@apple.com>
3962 Reviewed by Maciej Stachowiak.
3965 https://bugs.webkit.org/show_bug.cgi?id=29534
3967 The problem was that the emulator used multiple classes with
3968 more properties than our dictionary cutoff allowed, this resulted
3969 in more or less all critical logic inside the emulator requiring
3970 uncached property access.
3972 Rather than simply bumping the dictionary cutoff, this patch
3973 recognises that there are two ways to create a "dictionary"
3974 structure. Either by adding a large number of properties, or
3975 by removing a property. In the case of adding properties we
3976 know all the existing properties will maintain their existing
3977 offsets, so we could cache access to those properties, if we
3978 know they won't be removed.
3980 To make this possible, this patch adds the logic required to
3981 distinguish a dictionary created by addition from one created
3982 by removal. With this logic in place we can now cache access
3983 to objects with large numbers of properties.
3985 SNES performance improved by more than 6x.
3987 * interpreter/Interpreter.cpp:
3988 (JSC::Interpreter::resolveGlobal):
3989 (JSC::Interpreter::tryCachePutByID):
3990 (JSC::Interpreter::tryCacheGetByID):
3992 (JSC::JITThunks::tryCachePutByID):
3993 (JSC::JITThunks::tryCacheGetByID):
3994 (JSC::DEFINE_STUB_FUNCTION):
3995 * runtime/BatchedTransitionOptimizer.h:
3996 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3997 * runtime/JSObject.cpp:
3998 (JSC::JSObject::removeDirect):
3999 * runtime/Structure.cpp:
4000 (JSC::Structure::Structure):
4001 (JSC::Structure::getEnumerablePropertyNames):
4002 (JSC::Structure::despecifyDictionaryFunction):
4003 (JSC::Structure::addPropertyTransitionToExistingStructure):
4004 (JSC::Structure::addPropertyTransition):
4005 (JSC::Structure::removePropertyTransition):
4006 (JSC::Structure::toDictionaryTransition):
4007 (JSC::Structure::toCacheableDictionaryTransition):
4008 (JSC::Structure::toUncacheableDictionaryTransition):
4009 (JSC::Structure::fromDictionaryTransition):
4010 (JSC::Structure::removePropertyWithoutTransition):
4011 * runtime/Structure.h:
4012 (JSC::Structure::isDictionary):
4013 (JSC::Structure::isUncacheableDictionary):
4015 * runtime/StructureChain.cpp:
4016 (JSC::StructureChain::isCacheable):
4018 2009-09-19 Oliver Hunt <oliver@apple.com>
4020 Reviewed by Maciej Stachowiak.
4022 Implement ES5 Object.create function
4023 https://bugs.webkit.org/show_bug.cgi?id=29524
4025 Implement Object.create. Very simple patch, effectively Object.defineProperties
4026 only creating the target object itself.
4028 * runtime/CommonIdentifiers.h:
4029 * runtime/ObjectConstructor.cpp:
4030 (JSC::ObjectConstructor::ObjectConstructor):
4031 (JSC::objectConstructorCreate):
4033 2009-09-19 Dan Bernstein <mitz@apple.com>
4035 Fix clean debug builds.
4037 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4039 2009-09-19 Joerg Bornemann <joerg.bornemann@nokia.com>
4041 Reviewed by George Staikos.
4043 QtWebKit Windows CE compile fix
4045 https://bugs.webkit.org/show_bug.cgi?id=29379
4047 There is no _aligned_alloc or _aligned_free on Windows CE.
4048 We just use the Windows code that was there before and use VirtualAlloc.
4049 But that also means that the BLOCK_SIZE must be 64K as this function
4050 allocates on 64K boundaries.
4052 * runtime/Collector.cpp:
4053 (JSC::Heap::allocateBlock):
4054 (JSC::Heap::freeBlock):
4055 * runtime/Collector.h:
4057 2009-09-19 Oliver Hunt <oliver@apple.com>
4059 Reviewed by Sam Weinig.
4061 Implement ES5 Object.defineProperties function
4062 https://bugs.webkit.org/show_bug.cgi?id=29522
4064 Implement Object.defineProperties. Fairly simple patch, simply makes use of
4065 existing functionality used for defineProperty.
4067 * runtime/CommonIdentifiers.h:
4068 * runtime/ObjectConstructor.cpp:
4069 (JSC::ObjectConstructor::ObjectConstructor):
4070 (JSC::defineProperties):
4071 (JSC::objectConstructorDefineProperties):
4073 2009-09-19 Oliver Hunt <oliver@apple.com>
4075 Reviewed by NOBODY (Build fix).
4077 Windows build fix part2
4079 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4080 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4082 2009-09-19 Oliver Hunt <oliver@apple.com>
4084 Reviewed by NOBODY (Buildfix).
4086 Windows build fix part 1.
4088 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4089 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4091 2009-09-18 Oliver Hunt <oliver@apple.com>
4093 Reviewed by Geoff Garen.
4095 Implement ES5 Object.defineProperty function
4096 https://bugs.webkit.org/show_bug.cgi?id=29503
4098 Implement Object.defineProperty. This requires adding the API to
4099 ObjectConstructor, along with a helper function that implements the
4100 ES5 internal [[ToPropertyDescriptor]] function. It then adds
4101 JSObject::defineOwnProperty that implements the appropriate ES5 semantics.
4102 Currently defineOwnProperty uses a delete followed by a put to redefine
4103 attributes of a property, clearly this is less efficient than it could be
4104 but we can improve this if it needs to be possible in future.
4106 * JavaScriptCore.exp:
4107 * debugger/DebuggerActivation.cpp:
4108 (JSC::DebuggerActivation::defineGetter):
4109 (JSC::DebuggerActivation::defineSetter):
4110 * debugger/DebuggerActivation.h:
4111 * interpreter/Interpreter.cpp:
4112 (JSC::Interpreter::privateExecute):
4114 Update defineGetter/Setter calls
4115 * runtime/CommonIdentifiers.h:
4116 * runtime/JSArray.cpp:
4117 (JSC::JSArray::getOwnPropertySlot):
4118 * runtime/JSGlobalObject.cpp:
4119 (JSC::JSGlobalObject::defineGetter):
4120 (JSC::JSGlobalObject::defineSetter):
4121 * runtime/JSGlobalObject.h:
4122 * runtime/JSObject.cpp:
4123 (JSC::JSObject::defineGetter):
4124 (JSC::JSObject::defineSetter):
4125 (JSC::putDescriptor):
4126 (JSC::JSObject::defineOwnProperty):
4127 * runtime/JSObject.h:
4128 * runtime/ObjectConstructor.cpp:
4129 (JSC::ObjectConstructor::ObjectConstructor):
4130 (JSC::objectConstructorGetOwnPropertyDescriptor):
4131 (JSC::toPropertyDescriptor):
4132 (JSC::objectConstructorDefineProperty):
4133 * runtime/ObjectPrototype.cpp:
4134 (JSC::objectProtoFuncDefineGetter):
4135 (JSC::objectProtoFuncDefineSetter):
4136 * runtime/PropertyDescriptor.cpp:
4137 (JSC::PropertyDescriptor::writable):
4138 (JSC::PropertyDescriptor::enumerable):
4139 (JSC::PropertyDescriptor::configurable):
4140 (JSC::PropertyDescriptor::isDataDescriptor):
4141 (JSC::PropertyDescriptor::isGenericDescriptor):
4142 (JSC::PropertyDescriptor::isAccessorDescriptor):
4143 (JSC::PropertyDescriptor::getter):
4144 (JSC::PropertyDescriptor::setter):
4145 (JSC::PropertyDescriptor::setDescriptor):
4146 (JSC::PropertyDescriptor::setAccessorDescriptor):
4147 (JSC::PropertyDescriptor::setWritable):
4148 (JSC::PropertyDescriptor::setEnumerable):
4149 (JSC::PropertyDescriptor::setConfigurable):
4150 (JSC::PropertyDescriptor::setSetter):
4151 (JSC::PropertyDescriptor::setGetter):
4152 (JSC::PropertyDescriptor::equalTo):
4153 (JSC::PropertyDescriptor::attributesEqual):
4154 (JSC::PropertyDescriptor::attributesWithOverride):
4155 * runtime/PropertyDescriptor.h:
4156 (JSC::PropertyDescriptor::PropertyDescriptor):
4157 (JSC::PropertyDescriptor::value):
4158 (JSC::PropertyDescriptor::setValue):
4159 (JSC::PropertyDescriptor::isEmpty):
4160 (JSC::PropertyDescriptor::writablePresent):
4161 (JSC::PropertyDescriptor::enumerablePresent):
4162 (JSC::PropertyDescriptor::configurablePresent):
4163 (JSC::PropertyDescriptor::setterPresent):
4164 (JSC::PropertyDescriptor::getterPresent):
4165 (JSC::PropertyDescriptor::operator==):
4166 (JSC::PropertyDescriptor::):
4168 2009-09-18 Gabor Loki <loki@inf.u-szeged.hu>
4170 Reviewed by Gavin Barraclough.
4172 Build fix to enable ARM_THUMB2 on Linux
4173 https://bugs.webkit.org/show_bug.cgi?id=
4175 * jit/ExecutableAllocator.h:
4176 (JSC::ExecutableAllocator::cacheFlush):
4180 2009-09-18 Gabor Loki <loki@inf.u-szeged.hu>
4182 Reviewed by Gavin Barraclough.
4184 Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
4185 https://bugs.webkit.org/show_bug.cgi?id=29122
4187 Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
4188 macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
4189 when Thumb-2 instruction set is the required target. The
4190 PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
4191 case where the code is common the PLATFORM(ARM) have to be used.
4193 * assembler/ARMAssembler.cpp:
4194 * assembler/ARMAssembler.h:
4195 * assembler/ARMv7Assembler.h:
4196 * assembler/MacroAssembler.h:
4197 * assembler/MacroAssemblerARM.cpp:
4198 * assembler/MacroAssemblerARM.h:
4199 * assembler/MacroAssemblerCodeRef.h:
4200 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
4201 * jit/ExecutableAllocator.h:
4203 * jit/JITInlineMethods.h:
4204 (JSC::JIT::beginUninterruptedSequence):
4205 (JSC::JIT::preserveReturnAddressAfterCall):
4206 (JSC::JIT::restoreReturnAddressBeforeReturn):
4207 (JSC::JIT::restoreArgumentReference):
4208 (JSC::JIT::restoreArgumentReferenceForTrampoline):
4209 * jit/JITOpcodes.cpp:
4211 (JSC::JITThunks::JITThunks):
4214 * yarr/RegexJIT.cpp:
4215 (JSC::Yarr::RegexGenerator::generateEnter):
4217 2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com>
4219 Reviewed by Simon Hausmann.
4221 Fix the Qt/Windows CE build.
4223 * JavaScriptCore.pri: Build the ce_time.cpp functions from
4224 within Qt externally.
4225 * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the
4226 Qt build these functions are no external, too.
4228 2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com>
4230 Reviewed by Simon Hausmann.
4232 Symbian/WINSCW build fox.
4234 Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to
4237 WINSCW defines wchar_t, thus UChar has to be wchar_t
4239 * wtf/unicode/qt4/UnicodeQt4.h:
4241 2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com>
4243 Reviewed by Simon Hausmann.
4245 Symbian/WINSCW build fix.
4247 https://bugs.webkit.org/show_bug.cgi?id=29186
4249 WINSCW Template specialisation name in declaration must the be the same as in implementation.
4251 * runtime/LiteralParser.h:
4253 2009-09-15 Norbert Leser <norbert.leser@nokia.com>