diff options
Diffstat (limited to 'JavaScriptCore/ChangeLog')
| -rw-r--r-- | JavaScriptCore/ChangeLog | 27958 |
1 files changed, 11775 insertions, 16183 deletions
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index 4257344..f5176f2 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,4727 +1,3292 @@ -2010-02-12 Janne Koskinen <janne.p.koskinen@digia.com> +2010-11-27 Gavin Barraclough <barraclough@apple.com> - Reviewed by Tor Arne Vestbø. - - Additional refptr/passrefptr workarounds for WINSCW compiler - https://bugs.webkit.org/show_bug.cgi?id=28054 - - * wtf/PassRefPtr.h: - (WTF::refIfNotNull): - (WTF::PassRefPtr::PassRefPtr): - (WTF::PassRefPtr::~PassRefPtr): - (WTF::PassRefPtr::clear): - (WTF::::operator): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::::operator): - -2010-02-12 Janne Koskinen <janne.p.koskinen@digia.com> - - Reviewed by Simon Hausmann. - - Don't import the cmath functions from std:: for WINSCW. - - * wtf/MathExtras.h: - -2010-02-12 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Adam Barth. - - Typedef both JSChar and UChar to wchar_t in RVCT. - https://bugs.webkit.org/show_bug.cgi?id=34560 - - Define both JSChar and UChar to wchar_t as the size - of wchar_t is 2 bytes in RVCT. - - * API/JSStringRef.h: - * wtf/unicode/qt4/UnicodeQt4.h: + Reviewed by Sam Weinig. -2010-02-11 Geoffrey Garen <ggaren@apple.com> + Bug 48101 - Yarr gives different results for /(?:a*?){2,}/ + + The test cases in the linked mozilla bug demostrate a couple of + problems in subpattern matching. These bugs lie in the optimized + cases - for matching parentheses with a quantity count of 1, and + for matching greedy quantified parentheses at the end of a regex + (which do not backtrack). + + In both of these cases we are failing to correctly handle empty + matches. In the case of parenthese-single matches (quantity count + one) we are failing to test for empty matches at all. In the case + of terminal subpattern matches we do currenty check, however there + is a subtler bug here too. In the case of an empty match we will + presently immediately fall through to the next alternative (or + complete the regex match), whereas upon a failed match we should + be backtracking into the failing alternative, to give it a chance + to match further (e.g. consider /a??b?|a/.exec("ab") - upon first + attempting to match the first alternative this will match the empty + string - since a?? is non-greedy, however rather than moving on to + the second alternative we should be re-matching the first one, at + which point the non-greedy a?? will match, and as such the result + should be "ab", not "a"). + + Terminal sunpattern matching contains a second bug, too. The frame + location values in the subpattern should be being allocated with + the outer disjunction's frame (as we do for the parentheses-single + optimization). Consider the following three regexes: + /a*(?:b*)*c*/ + /a*(?:b*)c*/ + /a*(?:b*)*/ + Considering only the frame location required by the atoms a,b, and + c, (ignoring space associated with the nested subpattern) the first + regex (a normal subpattern match) requires a frame size of 2 for + the outer disjunction, (to backtrack terms a & c), with each + iteration of the subpattern requiring a frame of size 1 (in order + to backtrack b). In the case of the second regex (where the + parentheses-single optimization will kick in) the outer frame must + be set up with a frame size of 3, since the outer frame will also + be used when running the nested subpattern. We will currently only + allocate a farme of size 1 for the outer disjuntion (to contain a), + howver the frame size should be 2 (since the subpattern will be + evaluated in the outer frame). In addition to failing to allocate + frame space the frame offsets are also presently invalid - in the + case of the last regex b's frame location will be set assuming it + to be the first term in the frame, whereas in this case b lies + after the term a, and should be taking a separate frame location. + + In order to correctly allocate the frame for terminal subpattern + matches we must move this optimization back up from the JIT into + the compiler (and thus interpreter too), since this is where the + frame allocation takes place. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): + (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses): + (JSC::Yarr::compileRegex): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchParenthesesOnceBegin): + (JSC::Yarr::Interpreter::matchParenthesesOnceEnd): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): + (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::RegexGenerator::generateTerm): + * yarr/RegexPattern.h: + (JSC::Yarr::PatternTerm::PatternTerm): - Reviewed by Oliver Hunt and Darin Adler. +2010-11-24 Patrick Gansterer <paroga@webkit.org> - The rest of the fix for - https://bugs.webkit.org/show_bug.cgi?id=34864 | <rdar://problem/7594198> - Many objects left uncollected after visiting mail.google.com and closing - window - - Don't unconditionally hang onto small strings. Instead, hang onto all - small strings as long as any small string is still referenced. - - SunSpider reports no change. + Reviewed by Csaba Osztrogonác. - * runtime/Collector.cpp: - (JSC::Heap::markRoots): Mark the small strings cache last, so it can - check if anything else has kept any strings alive. + Remove Bakefile build system files + https://bugs.webkit.org/show_bug.cgi?id=49983 - * runtime/SmallStrings.cpp: - (JSC::isMarked): - (JSC::SmallStrings::markChildren): Only keep our strings alive if some - other reference to at least one of them exists, too. + r53757 only removed the content, but not the files. + This patch removes that empty files. -2010-02-11 Geoffrey Garen <ggaren@apple.com> + * JavaScriptCoreSources.bkl: Removed. + * jscore.bkl: Removed. - Reviewed by Gavin Barraclough. +2010-11-24 Gabor Loki <loki@webkit.org> - Some progress toward fixing - https://bugs.webkit.org/show_bug.cgi?id=34864 | <rdar://problem/7594198> - Many objects left uncollected after visiting mail.google.com and closing - window - - SunSpider reports no change. - - Keep weak references, rather than protected references, to cached for-in - property name enumerators. - - One problem with protected references is that a chain like - [ gc object 1 ] => [ non-gc object ] => [ gc object 2 ] - takes two GC passes to break, since the first pass collects [ gc object 1 ], - releasing [ non-gc object ] and unprotecting [ gc object 2 ], and only - then can a second pass collect [ gc object 2 ]. - - Another problem with protected references is that they can keep a bunch - of strings alive long after they're useful. In SunSpider and a few popular - websites, the size-speed tradeoff seems to favor weak references. + Reviewed by Csaba Osztrogonác. - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Moved this constructor - into the .cpp file, since it's not used elsewhere. + Merge the usage of jumps and calls at ARM-JIT + https://bugs.webkit.org/show_bug.cgi?id=50008 - (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): Added a destructor - to support our weak reference. + Those JmpSrc objects which represent jumps (not calls) should point to + after the jump instruction. - * runtime/JSPropertyNameIterator.h: - (JSC::Structure::setEnumerationCache): - (JSC::Structure::clearEnumerationCache): - (JSC::Structure::enumerationCache): Added a function for clearing a - Structure's enumeration cache, used by our new destructor. Also fixed - indentation to match the rest of the file. - - * runtime/Structure.h: Changed from protected pointer to weak pointer. + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::blx): + (JSC::ARMAssembler::loadBranchTarget): + (JSC::ARMAssembler::getAbsoluteJumpAddress): + (JSC::ARMAssembler::linkJump): + (JSC::ARMAssembler::relinkJump): + (JSC::ARMAssembler::linkCall): + (JSC::ARMAssembler::relinkCall): + (JSC::ARMAssembler::getRelocatedAddress): + (JSC::ARMAssembler::getDifferenceBetweenLabels): + (JSC::ARMAssembler::getCallReturnOffset): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::call): -2010-02-11 Chris Rogers <crogers@google.com> +2010-11-24 Carlos Garcia Campos <cgarcia@igalia.com> - Reviewed by David Levin. + Reviewed by Xan Lopez. - audio engine: add Complex number class - https://bugs.webkit.org/show_bug.cgi?id=34538 + [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend + https://bugs.webkit.org/show_bug.cgi?id=48625 - * wtf/Complex.h: Added. - (WebCore::complexFromMagnitudePhase): + GLib methods use UTF-8 strings, so we have to convert from UTF-16 to + UTF-8 to perform the case operations and then convert back the result to + UTF-16. GLib conversion methods return a new allocated string, so we + have to memcpy the result into the destination buffer too. Using our + own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h + we don't need such memcpy, since they take an already allocated buffer + rather than returning a new one. There's another optimization for the + case when the destination buffer is not large enough. In that case, + methods should return the expected destination buffer size and are + called again with a new buffer. We can avoid the conversion to UTF-16 by + pre-calculating the required size for the destination buffer. -2010-02-10 Geoffrey Garen <ggaren@apple.com> + * wtf/unicode/glib/UnicodeGLib.cpp: + (WTF::Unicode::getUTF16LengthFromUTF8): + (WTF::Unicode::convertCase): + (WTF::Unicode::foldCase): + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): - Reviewed by Oliver Hunt. +2010-11-23 Patrick Gansterer <paroga@webkit.org> - Added an SPI for asking about all the different live objects on the heap. - Useful for memory debugging. + Reviewed by Sam Weinig. - * JavaScriptCore.exp: Export the new SPI. + Use WTF::StringHasher directly in JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=49893 - * runtime/Collector.cpp: - (JSC::typeName): Use a little capitalization. Don't crash in the case of - a non-object cell, since it might just be an uninitialized cell. + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::Hash::hash): + * runtime/Identifier.cpp: + (JSC::IdentifierCStringTranslator::hash): + (JSC::IdentifierUCharBufferTranslator::hash): - (JSC::Heap::objectTypeCounts): The new SPI. +2010-11-22 Patrick Gansterer <paroga@webkit.org> - * runtime/Collector.h: - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::advance): - (JSC::LiveObjectIterator::operator++): - (JSC::DeadObjectIterator::operator++): - (JSC::ObjectIterator::operator++): Made 2 tweaks to these iterators: - (1) Skip the last cell in the block, since it's a dummy sentinel, and - we don't want it to confuse the object count; (2) Fixed a logic error - in LiveObjectIterator that could cause it to iterate dead objects if - m_block were equal to m_heap.nextBlock and m_cell were less than - m_heap.nextCell. No test for this since I can't think of a way that this - could make WebKit behave badly. + Reviewed by Sam Weinig. -2010-02-11 Steve Block <steveblock@google.com> + Add WTF::FixedArray::size() + https://bugs.webkit.org/show_bug.cgi?id=49891 - Reviewed by Darin Adler. + Add a method to get the size of a FixedArray. - Guard cmath using declarations in MathExtras.h on Android - https://bugs.webkit.org/show_bug.cgi?id=34840 + * wtf/FixedArray.h: + (WTF::FixedArray::size): - Android does not provide these functions. +2010-11-22 Patrick Gansterer <paroga@webkit.org> - * wtf/MathExtras.h: + Reviewed by Adam Roben. -2010-02-08 Maciej Stachowiak <mjs@apple.com> + [WINCE] Set correct preprocessor definitions + https://bugs.webkit.org/show_bug.cgi?id=49887 - Reviewed by Cameron Zwarich. + * wtf/Platform.h: - Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose. - https://bugs.webkit.org/show_bug.cgi?id=34698 +2010-11-22 Adam Roben <aroben@apple.com> - * Configurations/FeatureDefines.xcconfig: + Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files -2010-02-10 Kevin Watters <kevinwatters@gmail.com> + Apple's Windows build allows placing header files and import libraries for WebKit's + dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the + $WebKitLibrariesDir environment variable. This is both required for production builds and + convenient for Apple-internal developer builds. Apple's production builds also require that + WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production + builds, the files are copied into that directory tree by the + WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the + copying is done by + JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make. - Reviewed by Kevin Ollivier. + This .vsprops copying is problematic in one very important case: when a developer updates + their source tree and then tries to build. Visual Studio only reads .vsprops files when a + project is first loaded. So, when Visual Studio is first opened after the .vsprops files are + updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a + build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into + $WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build + will proceed with out-of-date .vsprops files, which will likely result in a build failure. - [wx] Add Windows complex text support and Mac support for containsCharacters. + To fix this, we now use normal relative paths to access the .vsprops files in the source + tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment + variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is + unset, so the normal relative paths are used to read the .vsprops files out of the source + tree directly. In production builds, this environment variable is set to a fake directory + that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path + is resolved. - https://bugs.webkit.org/show_bug.cgi?id=34759 - - * wscript: + For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops: -2010-02-10 Alexey Proskuryakov <ap@apple.com> + $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops - Addressing issues found by style bot. + In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the + files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds, + JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to + "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for + FeatureDefines.vsprops becomes: - * wtf/ValueCheck.h: Renamed header guard to match final file name. + $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops - * wtf/Vector.h: (WTF::::checkConsistency): Remove braces around a one-line clause. + which resolves to: -2010-02-09 Alexey Proskuryakov <ap@apple.com> + $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops - Reviewed by Geoffrey Garen. - - https://bugs.webkit.org/show_bug.cgi?id=34490 - WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Added ValueCheck.h. - - * wtf/ValueCheck.h: Added. Moved code out of HashTraits, since it would be awkward to - include that from Vector.h. - (WTF::ValueCheck::checkConsistency): Allow null pointers, those are pretty consistent. - - * wtf/HashTraits.h: Moved value checking code out of here. - - * wtf/HashTable.h: (WTF::::checkTableConsistencyExceptSize): Updated for the above changes. - - * wtf/Vector.h: - (WTF::::checkConsistency): Check all vector elements. - (WTF::ValueCheck): Support checking a Vector as an element in other containers. Currently - unused. - -2010-02-10 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - Fix QScriptValue::toBool. - - Fix ECMA compliance in the QScriptValue for values like 0, NaN and - empty strings. - - [Qt] QScriptValue::toBool problem - https://bugs.webkit.org/show_bug.cgi?id=34793 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toBool): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::toBool_initData): - (tst_QScriptValue::toBool_makeData): - (tst_QScriptValue::toBool_test): - (tst_QScriptValue::toBoolean_initData): - (tst_QScriptValue::toBoolean_makeData): - (tst_QScriptValue::toBoolean_test): - -2009-10-06 Yongjun Zhang <yongjun.zhang@nokia.com> - - Reviewed by Simon Hausmann. - - Use derefIfNotNull() to work around WINSCW compiler forward declaration bug - - The compiler bug is reported at - https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812. - - The change should be reverted when the above bug is fixed in WINSCW compiler. - - https://bugs.webkit.org/show_bug.cgi?id=28054 - -2009-10-06 Yongjun Zhang <yongjun.zhang@nokia.com> - - Reviewed by Simon Hausmann. - - Get rid of WINSCW hack for UnSpecifiedBoolType - - Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW - compiler work with the default UnSpecifiedBoolType() operator. - - https://bugs.webkit.org/show_bug.cgi?id=28054 - - * wtf/RefPtr.h: - -2010-02-09 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - New functions nullValue() and undefinedValue(). - - [Qt] QScriptEngine should contain nullValue and undefinedValue methods - https://bugs.webkit.org/show_bug.cgi?id=34749 - - * qt/api/qscriptengine.cpp: - (QScriptEngine::nullValue): - (QScriptEngine::undefinedValue): - * qt/api/qscriptengine.h: - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::nullValue): - (tst_QScriptEngine::undefinedValue): - -2010-02-09 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - Fixes for QScriptValue::toNumber(). - - Fix ECMA compliance in QScriptValue for values unbound - to a QScriptEngine. - - [Qt] QScriptValue::toNumber() is broken - https://bugs.webkit.org/show_bug.cgi?id=34592 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::toNumber): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::toNumber_initData): - (tst_QScriptValue::toNumber_makeData): - (tst_QScriptValue::toNumber_test): - -2010-02-09 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - Fix QScriptValue::isNumber(). - - The isNumber() should return 'true' if the value is in the CNumber - state. - - [Qt] QScriptValue::isNumber() returns an incorrect value - https://bugs.webkit.org/show_bug.cgi?id=34575 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::isNumber): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: - (tst_QScriptValue::isNumber_initData): - (tst_QScriptValue::isNumber_makeData): - (tst_QScriptValue::isNumber_test): - -2010-02-09 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Small refactoring to the small strings cache to allow it to be cleared - dynamically. - - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::SmallStrings): - (JSC::SmallStrings::clear): - * runtime/SmallStrings.h: Moved initialization code into a shared function, - and changed the constructor to call it. - -2010-02-09 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Geoff Garen. - - Rename StringBuilder::release && JSStringBuilder::releaseJSString - to 'build()'. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::paramString): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - * runtime/JSONObject.cpp: - (JSC::Stringifier::stringify): - * runtime/JSStringBuilder.h: - (JSC::JSStringBuilder::build): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexString): - * runtime/NumberPrototype.cpp: - (JSC::integerPartNoExp): - (JSC::numberProtoFuncToFixed): - * runtime/StringBuilder.h: - (JSC::StringBuilder::build): + (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3" + actually exist since they are matched by an equal number of ".." path components.) -2010-02-09 John Sullivan <sullivan@apple.com> + Note that Visual Studio still won't pick up changes made to .vsprops files while Visual + Studio is open, but that problem hasn't seemed to cause developers many headaches so far. - https://bugs.webkit.org/show_bug.cgi?id=34772 - Overzealous new assertion in URStringImpl::adopt() + Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are + updated - Reviewed by Adam Barth. + Reviewed by Dave Hyatt. - * runtime/UStringImpl.h: - (JSC::UStringImpl::adopt): - Only assert that vector.data() is non-zero if vector.size() is non-zero. + * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that + production builds can find the .vsprops files. -2010-02-09 Nikolas Zimmermann <nzimmermann@rim.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the + .vsprops files. It isn't needed anymore. - Not reviewed. Try to fix build problem on SnowLeopard slaves to bring them back. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops + files. - * API/JSClassRef.cpp: - (tryCreateStringFromUTF8): Mark method as 'static inline' to suppress "warning: no previous prototype for ..." +2010-11-19 Peter Varga <pvarga@inf.u-szeged.hu> -2010-02-09 Gavin Barraclough <barraclough@apple.com> + Reviewed by Gavin Barraclough. - Reviewed by Oliver Hunt. + YARR JIT should fallback to YARR Interpreter instead of PCRE. + https://bugs.webkit.org/show_bug.cgi?id=46719 - Three small string fixes: - (1) StringBuilder::release should CRASH if the buffer allocation failed. - (2) Remove weird, dead code from JSString::tryGetValue, replace with an ASSERT. - (3) Move UString::createFromUTF8 out to the API, as tryCreateStringFromUTF8. - This is only used from the API, and (now) unlike other UString::create - methods may return UString::null() to indicate failure cases. Better - handle these in the API. + Remove the ENABLE_YARR macro and the option of matching regular + expressions with PCRE from JavaScriptCore. - * API/JSClassRef.cpp: - (tryCreateStringFromUTF8): - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * runtime/JSString.h: - (JSC::Fiber::tryGetValue): - * runtime/StringBuilder.h: - (JSC::StringBuilder::release): - * runtime/UString.cpp: - (JSC::UString::UString): - (JSC::UString::from): - (JSC::UString::find): - * runtime/UString.h: + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + (JSC::RegExp::match): + * tests/mozilla/expected.html: + * wtf/Platform.h: + * yarr/RegexCompiler.cpp: + * yarr/RegexCompiler.h: + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::byteCompileRegex): + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::getFallback): + (JSC::Yarr::RegexCodeBlock::isFallback): + (JSC::Yarr::RegexCodeBlock::setFallback): + (JSC::Yarr::executeRegex): + * yarr/RegexParser.h: + * yarr/RegexPattern.h: -2010-02-09 Janne Koskinen <janne.p.koskinen@digia.com> +2010-11-20 Kwang Yul Seo <skyul@company100.net> - Reviewed by Laszlo Gombos. + Reviewed by David Kilzer. - [Qt] use nanval() for Symbian as nonInlineNaN - https://bugs.webkit.org/show_bug.cgi?id=34170 + [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message + https://bugs.webkit.org/show_bug.cgi?id=49520 - numeric_limits<double>::quiet_NaN is broken in Symbian - causing NaN to be evaluated as a number. + DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead. - * runtime/JSValue.cpp: - (JSC::nonInlineNaN): + * wtf/Assertions.cpp: + * wtf/Assertions.h: -2010-02-09 Tamas Szirbucz <szirbucz@inf.u-szeged.hu> +2010-11-20 Gabor Loki <loki@webkit.org> Reviewed by Gavin Barraclough. - Add a soft modulo operation to ARM JIT using a trampoline function. - The performance progression is about ~1.8% on ARMv7 - https://bugs.webkit.org/show_bug.cgi?id=34424 + Support JIT_OPTIMIZE_MOD on Thumb-2 + https://bugs.webkit.org/show_bug.cgi?id=49432 - Developed in cooperation with Gabor Loki. + Rewrite the soft modulo operation into macroassembler form, and move it + to JSValue32_64 section. + Add support for soft modulo on Thumb-2 JIT also. - * jit/JIT.h: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::clz): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::countLeadingZeros32): + (JSC::MacroAssemblerARM::relativeTableJump): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::countLeadingZeros32): + (JSC::MacroAssemblerARMv7::relativeTableJump): * jit/JITArithmetic.cpp: (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: (JSC::JIT::softModulo): - * jit/JITStubs.h: - (JSC::JITThunks::ctiSoftModulo): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): * wtf/Platform.h: -2010-02-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (SL/win build fixes). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/StringPrototype.cpp: - -2010-02-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt - - Make String.replace throw an exception on out-of-memory, rather than - returning a null (err, empty-ish) string. Move String::replaceRange - and String::spliceSubstringsWithSeparators out to StringPrototype - - these were fairly specific use anyway, and we can better integrate - throwing the JS expcetion this way. - - Also removes redundant assignment operator from UString. - - * JavaScriptCore.exp: - * runtime/StringPrototype.cpp: - (JSC::StringRange::StringRange): - (JSC::jsSpliceSubstringsWithSeparators): - (JSC::jsReplaceRange): - (JSC::stringProtoFuncReplace): - * runtime/UString.cpp: - * runtime/UString.h: - -2010-02-08 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - [BREWMP] Undefine WTF_OS_WINDOWS and WTF_PLATFORM_WIN - https://bugs.webkit.org/show_bug.cgi?id=34561 - - As the binary for simulator is built with MSVC 2005, - WTF_OS_WINDOWS and WTF_PLATFORM_WIN are defined. - Undefine them as we don't target Windows. +2010-11-20 David Kilzer <ddkilzer@apple.com> - * wtf/Platform.h: - -2010-02-08 Chris Rogers <crogers@google.com> + <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured Reviewed by Darin Adler. - audio engine: add Vector3 class - https://bugs.webkit.org/show_bug.cgi?id=34548 - - * wtf/Vector3.h: Added. - (WebCore::Vector3::Vector3): - (WebCore::Vector3::abs): - (WebCore::Vector3::isZero): - (WebCore::Vector3::normalize): - (WebCore::Vector3::x): - (WebCore::Vector3::y): - (WebCore::Vector3::z): - (WebCore::operator+): - (WebCore::operator-): - (WebCore::operator*): - (WebCore::dot): - (WebCore::cross): - (WebCore::distance): - -2010-02-08 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Fix warning in clang++ - - * runtime/Structure.h: - (JSC::Structure::propertyStorageSize): - -2010-02-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Make makeString CRASH if we fail to allocate a string. - - (tryMakeString or jsMakeNontrivialString can be used where we - expect allocation may fail and want to handle the error). - - * runtime/JSStringBuilder.h: - (JSC::jsMakeNontrivialString): - * runtime/UString.h: - (JSC::tryMakeString): - (JSC::makeString): - -2010-02-08 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Oliver Hunt. - - Remove a couple of unnecesary C-style casts spotted by Darin. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::globalFuncEscape): - -2010-02-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Switch some more StringBuilder/jsNontrivialString code to use - JSStringBuilder/jsMakeNontrivialString - these methods will - throw an exception if we hit out-of-memory, rather than just - CRASHing. - - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEscape): - -2010-02-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Use an empty identifier instead of a null identifier for parse - tokens without an identifier. + * JavaScriptCore.exp: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::secure): Added argument that controls whether + the last character is obscured or not. Implemented behavior. + * wtf/text/StringImpl.h: + (WTF::StringImpl::LastCharacterBehavior): Added enum. + (WTF::StringImpl::secure): Updated method signature. - This helps encapsulate the null UStringImpl within UString. +2010-11-19 William Chan <willchan@chromium.org> - * parser/Grammar.y: - * parser/NodeConstructors.h: - (JSC::ContinueNode::ContinueNode): - (JSC::BreakNode::BreakNode): - (JSC::ForInNode::ForInNode): - * runtime/CommonIdentifiers.cpp: - (JSC::CommonIdentifiers::CommonIdentifiers): - * runtime/CommonIdentifiers.h: - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): + Reviewed by David Levin. -2010-02-08 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + Add USE(CHROMIUM_NET) - Build fix for make distcheck. + Indicates the use of Chromium's network stack. Chromium's network + stack performs better when it has full view of all resource requests, + so USE(CHROMIUM_NET) can be used to bypass throttles. - * GNUmakefile.am: + https://bugs.webkit.org/show_bug.cgi?id=49778 -2010-02-08 Simon Hausmann <simon.hausmann@nokia.com> + * wtf/Platform.h: - Unreviewed RVCT build fix. +2010-11-19 Steve Falkenburg <sfalken@apple.com> - Similar to r54391, don't import the cmath functions from std:: for RVCT. + Reviewed by Adam Roben. - * wtf/MathExtras.h: + Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files + https://bugs.webkit.org/show_bug.cgi?id=49819 -2010-02-05 Gavin Barraclough <barraclough@apple.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: - Reviewed by Geoff Garen. +2010-11-19 Oliver Hunt <oliver@apple.com> - Change UStringImpl::create to CRASH if the string cannot be allocated, - rather than returning a null string (which will behave like a zero-length - string if used). + Reviewed by Geoffrey Garen. - Also move createRep function from UString to become new overloaded - UStringImpl::create methods. In doing so, bring their behaviour closer to - being in line with WebCore::StringImpl, in removing the behaviour that they - can be used to produce null UStrings (ASSERT the char* provided is non-null). - This behaviour of converting null C-strings to null UStrings is inefficient - (cmompared to just using UString::null()), incompatible with WebCore::StringImpl's - behaviour, and may generate unexpected behaviour, since in many cases a null - UString can be used like an empty string. + Don't check for constant registers when we can guarantee that the register won't be in the constant pool + https://bugs.webkit.org/show_bug.cgi?id=49814 - With these changes UStringImpl need not have a concept of null impls, we can - start transitioning this to become an implementation detail of UString, that - internally it chooses to use a null-object rather than an actually zero impl - pointer. + Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR() + when we can guarantee that the register is not referring to a constant. + This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation + logic correct when we're using a faked callframe (as in the case of the globalExec). - * JavaScriptCore.exp: - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::createActivation): * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::calculatedFunctionName): - * parser/Parser.cpp: - (JSC::Parser::parse): - * profiler/Profile.cpp: - (JSC::Profile::Profile): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::stopProfiling): - * runtime/Error.cpp: - (JSC::Error::create): - (JSC::throwError): - * runtime/ExceptionHelpers.cpp: - (JSC::createError): - * runtime/Identifier.cpp: - (JSC::Identifier::add): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/UString.cpp: - (JSC::initializeUString): - (JSC::UString::UString): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::isNull): - (JSC::UString::null): - (JSC::UString::rep): - (JSC::UString::UString): - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::create): - * runtime/UStringImpl.h: - -2010-02-05 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. + (JSC::DebuggerCallFrame::thisObject): + * interpreter/CallFrame.h: + (JSC::ExecState::uncheckedR): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::callEval): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::createExceptionScope): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): - [BREWMP] Define SYSTEM_MALLOC 1 - https://bugs.webkit.org/show_bug.cgi?id=34640 +2010-11-19 Steve Falkenburg <sfalken@apple.com> - Make BREWMP use system malloc because FastMalloc is not ported. + Reviewed by Darin Adler. - * wtf/Platform.h: + Normalize Cairo/CFLite project/solution configuration names + https://bugs.webkit.org/show_bug.cgi?id=49818 -2010-02-05 Kwang Yul Seo <skyul@company100.net> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: - Reviewed by Alexey Proskuryakov. +2010-11-18 Steve Falkenburg <sfalken@apple.com> - Don't call CRASH() in fastMalloc and fastCalloc when the requested memory size is 0 - https://bugs.webkit.org/show_bug.cgi?id=34569 + Reviewed by Adam Roben. - With USE_SYSTEM_MALLOC=1, fastMalloc and fastCalloc call CRASH() - if the return value of malloc and calloc is 0. - - However, these functions can return 0 when the request size is 0. - Libc manual says, "If size is 0, then malloc() returns either NULL, - or a unique pointer value that can later be successfully passed to free()." - Though malloc returns a unique pointer in most systems, - 0 can be returned in some systems. For instance, BREW's MALLOC returns 0 - when size is 0. + Windows vcproj configuration names should be normalized across projects + https://bugs.webkit.org/show_bug.cgi?id=49776 - If malloc or calloc returns 0 due to allocation size, increase the size - to 1 and try again. + * JavaScriptCore.vcproj/JavaScriptCore.sln: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: - * wtf/FastMalloc.cpp: - (WTF::fastMalloc): - (WTF::fastCalloc): +2010-11-19 Patrick Gansterer <paroga@webkit.org> -2010-02-04 Mark Rowe <mrowe@apple.com> + Unreviewed, build fix after r72360. - Reviewed by Timothy Hatcher. + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): - Build fix. Remove a symbol corresponding to an inline function from the linker export - file to prevent a weak external failure. +2010-11-18 Gavin Barraclough <barraclough@apple.com> - * JavaScriptCore.xcodeproj/project.pbxproj: Accommodate rename of script. + Rubber stamped by Geoff Garen. -2010-02-04 Daniel Bates <dbates@webkit.org> + Bug 49577 - Function.prototype should be non-configurable - [Qt] Unreviewed, build fix for Qt bot. + Ooops, Function.prototype should not be enumerable! - * runtime/JSStringBuilder.h: Changed #include <X.h> notation #include "X.h". + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertySlot): -2010-02-04 Geoffrey Garen <ggaren@apple.com> +2010-11-18 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. - Clearing a WeakGCPtr is weird - https://bugs.webkit.org/show_bug.cgi?id=34627 - - Added a WeakGCPtr::clear interface. - - As discussed in https://bugs.webkit.org/show_bug.cgi?id=33383, the old - interface made it pretty weird for a client to conditionally clear a - WeakGCPtr, which is exactly what clients want to do when objects are - finalized. - - * API/JSClassRef.cpp: - (clearReferenceToPrototype): Use the new WeakGCPtr::clear() interface. - - * runtime/WeakGCPtr.h: - (JSC::WeakGCPtr::clear): Added an interface for clearing a WeakGCPtr, - iff its current value is the value passed in. It's cumbersome for the - client to do this test, since WeakGCPtr sometimes pretends to be null. - -2010-02-04 Geoffrey Garen <ggaren@apple.com> - - Build fix: export a header. + Bug 49708 - Stop recompiling functions to regenerate exception info. - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-02-04 Gavin Barraclough <barraclough@apple.com> + Instead only hold info as necessary – keep divot info is the inspector + is enabled, line number info is debugging or profiling, and handler + info for functions with try/catch. - Reviewed by Oliver Hunt. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpStatistics): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::lineNumberForBytecodeOffset): + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::addExpressionInfo): + (JSC::CodeBlock::addLineInfo): + (JSC::CodeBlock::hasExpressionInfo): + (JSC::CodeBlock::hasLineInfo): + (JSC::CodeBlock::needsCallReturnIndices): + (JSC::CodeBlock::callReturnIndexVector): + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::dump): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + (JSC::BytecodeGenerator::BytecodeGenerator): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + (JSC::BytecodeGenerator::emitNodeInConditionContext): + (JSC::BytecodeGenerator::emitExpressionInfo): + (JSC::BytecodeGenerator::addLineInfo): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveLastCaller): + * interpreter/Interpreter.h: + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JITStubs.cpp: + (JSC::jitThrow): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Collector.cpp: + (JSC::Heap::markRoots): + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + * runtime/Executable.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::usingAPI): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::supportsRichSourceInfo): + (JSC::JSGlobalObject::globalData): - Add a JSStringBuilder class (similar-to, and derived-from StringBuilder) to - construct JSStrings, throwing a JS exception should we run out of memory whilst - allocating storage for the string. +2010-11-18 Adam Roben <aroben@apple.com> - Similarly, add jsMakeNontrivialString methods to use in cases where previously - we were calling makeString & passing the result to jsNontrivialString. Again, - these new methods throw if we hit an out of memory condition. + Add a script to delete manifest-related files when they are older than + any .vsprops file - Move throwOutOfMemoryError into ExceptionHelpers, to make it more widely available. + Changes to .vsprops files can cause the manifest files to become + invalid, and Visual Studio doesn't always figure out that it needs to + rebuild them. - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - * runtime/DateConstructor.cpp: - (JSC::callDate): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToGMTString): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/ExceptionHelpers.cpp: - (JSC::throwOutOfMemoryError): - * runtime/ExceptionHelpers.h: - * runtime/JSStringBuilder.h: Added. - (JSC::JSStringBuilder::releaseJSString): - (JSC::jsMakeNontrivialString): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncToString): - * runtime/Operations.cpp: - * runtime/Operations.h: - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - * runtime/StringBuilder.h: - (JSC::StringBuilder::append): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): + Reviewed by Sam Weinig. -2010-02-04 Steve Falkenburg <sfalken@apple.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + Call the new script. - Windows build fix. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + Added the new script. - * wtf/MathExtras.h: + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added. + (file_modification_times): Generator to return the modification time of + each file in a directory hierarchy. + (main): Get the modification time of the newest vsprops file, then find + all manifest-related files in the obj directory. Delete all + manifest-related files that are older than the newest vsprops file. -2010-02-04 Darin Adler <darin@apple.com> +2010-11-18 Mark Rowe <mrowe@apple.com> - Reviewed by David Levin. + Rubber-stamped by Adam Roben. - Make MathExtras.h compatible with <cmath> - https://bugs.webkit.org/show_bug.cgi?id=34618 + <rdar://problem/8602509&8602717&8602724> Enable compaction support. - * wtf/MathExtras.h: Include <cmath> instead of <math.h>. - Use "using" as we do elsewhere in WTF for the four functions from <cmath> - we want to use without the prefix. Later we could consider making the std - explicit at call sites instead. + * Configurations/JavaScriptCore.xcconfig: -2010-02-04 Tamas Szirbucz <szirbucz@inf.u-szeged.hu> +2010-11-18 Gavin Barraclough <barraclough@apple.com> - Reviewed by Gavin Barraclough. + Reviewed by Oliver Hunt. - Use an easily appendable structure for trampolines instead of pointer parameters. - https://bugs.webkit.org/show_bug.cgi?id=34424 + Bug 49635 - Profiler implementation is fragile + + The profile presently requires the exception handling mechanism to explicitly + remove all stack frames that are exited during the exception unwind mechanism. + This is fragile in a number of ways: + * We have to change bytecode register allocation when compiling code to run + when profiling, to preserve the callee function (this is also required to + call did_call after the call has returned). + * In the JIT we have to maintain additional data structures + (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register + containing the callee. + * In the interpreter we use 'magic values' to offset into the instruction + stream to rediscover the register containing the function. + + Instead, move profiling into the head and tail of functions. + * This correctly accounts the cost of the call itself to the caller. + * This allows us to access the callee function object from the callframe. + * This means that at the point a call is made we can track the stack depth + on the ProfileNode. + * When unwinding we can simply report the depth at which the exception is + being handled - all call frames above this level are freed. - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::methodCallLinkInfo): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallVarargs): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: - (JSC::JITThunks::ctiStringLengthTrampoline): - (JSC::JITThunks::ctiVirtualCallLink): - (JSC::JITThunks::ctiVirtualCall): - (JSC::JITThunks::ctiNativeCallThunk): - -2010-02-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - Increase test coverage for the QScriptValue. - - https://bugs.webkit.org/show_bug.cgi?id=34533 - - * qt/tests/qscriptvalue/qscriptvalue.pro: - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: - (tst_QScriptValue::tst_QScriptValue): - (tst_QScriptValue::~tst_QScriptValue): - (tst_QScriptValue::dataHelper): - (tst_QScriptValue::newRow): - (tst_QScriptValue::testHelper): - (tst_QScriptValue::ctor): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: Added. - * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Added. - (tst_QScriptValue::initScriptValues): - (tst_QScriptValue::isValid_initData): - (tst_QScriptValue::isValid_makeData): - (tst_QScriptValue::isValid_test): - (tst_QScriptValue::isBool_initData): - (tst_QScriptValue::isBool_makeData): - (tst_QScriptValue::isBool_test): - (tst_QScriptValue::isBoolean_initData): - (tst_QScriptValue::isBoolean_makeData): - (tst_QScriptValue::isBoolean_test): - (tst_QScriptValue::isFunction_initData): - (tst_QScriptValue::isFunction_makeData): - (tst_QScriptValue::isFunction_test): - (tst_QScriptValue::isNull_initData): - (tst_QScriptValue::isNull_makeData): - (tst_QScriptValue::isNull_test): - (tst_QScriptValue::isString_initData): - (tst_QScriptValue::isString_makeData): - (tst_QScriptValue::isString_test): - (tst_QScriptValue::isUndefined_initData): - (tst_QScriptValue::isUndefined_makeData): - (tst_QScriptValue::isUndefined_test): - (tst_QScriptValue::isObject_initData): - (tst_QScriptValue::isObject_makeData): - (tst_QScriptValue::isObject_test): - -2010-02-03 Kwang Yul Seo <skyul@company100.net> + (JSC::DEFINE_STUB_FUNCTION): + * profiler/Profile.cpp: + (JSC::Profile::Profile): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + (JSC::ProfileGenerator::exceptionUnwind): + (JSC::ProfileGenerator::stopProfiling): + * profiler/ProfileGenerator.h: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::ProfileNode): + (JSC::ProfileNode::willExecute): + * profiler/ProfileNode.h: + (JSC::ProfileNode::create): + (JSC::ProfileNode::callerCallFrame): + * profiler/Profiler.cpp: + (JSC::dispatchFunctionToProfiles): + (JSC::Profiler::_willExecute): + (JSC::Profiler::_didExecute): + (JSC::Profiler::exceptionUnwind): + * profiler/Profiler.h: - Reviewed by Eric Seidel. +2010-11-18 Steve Falkenburg <sfalken@apple.com> - [BREWMP] Define WTF_PLATFORM_BREWMP_SIMULATOR when AEE_SIMULATOR is defined - https://bugs.webkit.org/show_bug.cgi?id=34514 + Reviewed by Adam Roben. - PLATFORM(BREWMP_SIMULATOR) guard is needed to make distinction between BREWMP - and BREWMP simulator. + Remove leftover Windows Debug_Internal configurations + https://bugs.webkit.org/show_bug.cgi?id=49758 - * wtf/Platform.h: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: -2010-02-03 Kwang Yul Seo <skyul@company100.net> +2010-11-18 Chao-ying Fu <fu@mips.com> - Reviewed by Eric Seidel. + Reviewed by Csaba Osztrogonác. - [BREWMP] Remove COMPILE_ASSERT conflict with the underlying PLATFORM - https://bugs.webkit.org/show_bug.cgi?id=34190 + Avoid increasing required alignment of target type warning + https://bugs.webkit.org/show_bug.cgi?id=43963 - COMPILE_ASSERT conflicts with the underlying PLATFORM because it is defined - both in WTF's Assertions.h and BREWMP's AEEClassIDs.h. Include AEEClassIDs.h - in Assertions.h and undef COMPILE_ASSERT to avoid redefining COMPILE_ASSERT. - - * wtf/Assertions.h: + * runtime/UString.h: + (JSC::UStringHash::equal): + * wtf/StdLibExtras.h: -2010-02-03 Kwang Yul Seo <skyul@company100.net> +2010-11-17 Sam Weinig <sam@webkit.org> - Reviewed by Eric Seidel. + Reviewed by Anders Carlsson. - [BREWMP] Implement OwnPtrBrew to make sure BREW instances are freed. - https://bugs.webkit.org/show_bug.cgi?id=34518 + Add stubbed out ScrollAnimator for the Mac + https://bugs.webkit.org/show_bug.cgi?id=49678 - Add OwnPtrBrew to release IFile, IFileMgr and IBitmap instances. + * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no + change in behavior at the moment. - * wtf/brew/OwnPtrBrew.cpp: Added. - (WTF::IFileMgr): - (WTF::IFile): - (WTF::IBitmap): - (WTF::freeOwnedPtrBrew): - * wtf/brew/OwnPtrBrew.h: Added. - (WTF::OwnPtrBrew::OwnPtrBrew): - (WTF::OwnPtrBrew::~OwnPtrBrew): - (WTF::OwnPtrBrew::get): - (WTF::OwnPtrBrew::release): - (WTF::OwnPtrBrew::outPtr): - (WTF::OwnPtrBrew::set): - (WTF::OwnPtrBrew::clear): - (WTF::OwnPtrBrew::operator*): - (WTF::OwnPtrBrew::operator->): - (WTF::OwnPtrBrew::operator!): - (WTF::OwnPtrBrew::operator UnspecifiedBoolType): - (WTF::OwnPtrBrew::swap): - (WTF::swap): - (WTF::operator==): - (WTF::operator!=): - (WTF::getPtr): +2010-11-17 David Kilzer <ddkilzer@apple.com> -2010-02-03 Kwang Yul Seo <skyul@company100.net> + <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit Reviewed by Darin Adler. - Export WTF::fastStrDup symbol - https://bugs.webkit.org/show_bug.cgi?id=34526 + Add an explicit overflow check prior to allocating our buffer, + rather than implicitly relying on the guard in convertUTF16ToUTF8. - * JavaScriptCore.exp: + * wtf/text/WTFString.cpp: + (WTF::String::utf8): -2010-02-03 Kevin Watters <kevinwatters@gmail.com> +2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> - Reviewed by Kevin Ollivier. + Unreviewed, rolling out r72197. + http://trac.webkit.org/changeset/72197 + https://bugs.webkit.org/show_bug.cgi?id=49661 - [wx] Enable JIT compilation for wx. - - https://bugs.webkit.org/show_bug.cgi?id=34536 + broke fast/regex/test1.html (Requested by stampho on #webkit). + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExpRepresentation::~RegExpRepresentation): + (JSC::RegExp::compile): + (JSC::RegExp::match): + * tests/mozilla/expected.html: * wtf/Platform.h: + * yarr/RegexCompiler.cpp: + * yarr/RegexCompiler.h: + * yarr/RegexInterpreter.cpp: + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::getFallback): + (JSC::Yarr::RegexCodeBlock::setFallback): + (JSC::Yarr::executeRegex): + * yarr/RegexParser.h: + * yarr/RegexPattern.h: -2010-02-02 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Crash in CollectorBitmap::get at nbcolympics.com - https://bugs.webkit.org/show_bug.cgi?id=34504 - - This was caused by the use of m_offset to determine the offset of - a new property into the property storage. This patch corrects - the effected cases by incorporating the anonymous slot count. It - also removes the duplicate copy of anonymous slot count from the - property table as keeping this up to date merely increased the - chance of a mismatch. Finally I've added a large number of - assertions in an attempt to prevent such a bug from happening - again. - - With the new assertions in place the existing anonymous slot tests - all fail without the m_offset fixes. +2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> - * runtime/PropertyMapHashTable.h: - * runtime/Structure.cpp: - (JSC::Structure::materializePropertyMap): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::removePropertyTransition): - (JSC::Structure::flattenDictionaryStructure): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::removePropertyWithoutTransition): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::get): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::insertIntoPropertyMapHashTable): - (JSC::Structure::createPropertyMapHashTable): - (JSC::Structure::rehashPropertyMapHashTable): - (JSC::Structure::checkConsistency): + Reviewed by Gavin Barraclough. -2010-02-02 Steve Falkenburg <sfalken@apple.com> + YARR JIT should fallback to YARR Interpreter instead of PCRE. + https://bugs.webkit.org/show_bug.cgi?id=46719 - Reviewed by Darin Adler. + Remove the ENABLE_YARR macro and the option of matching regular + expressions with PCRE from JavaScriptCore. - Copyright year updating for Windows version resources should be automatic - https://bugs.webkit.org/show_bug.cgi?id=34503 + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + (JSC::RegExp::match): + * tests/mozilla/expected.html: + * wtf/Platform.h: + * yarr/RegexCompiler.cpp: + * yarr/RegexCompiler.h: + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::byteCompileRegex): + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::getFallback): + (JSC::Yarr::RegexCodeBlock::isFallback): + (JSC::Yarr::RegexCodeBlock::setFallback): + (JSC::Yarr::executeRegex): + * yarr/RegexParser.h: + * yarr/RegexPattern.h: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: +2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> -2010-02-02 Kwang Yul Seo <skyul@company100.net> + Reviewed by Gavin Barraclough. - Reviewed by Eric Seidel. + Extend YARR Interpreter with beginning character look-up optimization + https://bugs.webkit.org/show_bug.cgi?id=45751 - [BREWMP] Add dummy main thread functions - https://bugs.webkit.org/show_bug.cgi?id=33569 + Add beginning character look-up optimization which sets the start + index to the first possible successful pattern match. + Extend YARR Interpreter with lookupForBeginChars function which + implements the beginning character look-up optimization. - Add dummy initializeMainThreadPlatform and - scheduleDispatchFunctionsOnMainThread. + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::InputStream::readPair): + (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput): + (JSC::Yarr::Interpreter::lookupForBeginChars): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::Interpreter::interpret): + * yarr/RegexInterpreter.h: + (JSC::Yarr::BytecodePattern::BytecodePattern): - * wtf/brew/MainThreadBrew.cpp: Added. - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): +2010-11-17 Alexis Menard <alexis.menard@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com> -2010-02-02 Kwang Yul Seo <skyul@company100.net> + Reviewed by Kenneth Christiansen, Tor Arne Vestbø. - Reviewed by Darin Adler. + [Qt] Add support for use GStreamer with the Qt build - Add using WTF::getLocalTime to CurrentTime.h - https://bugs.webkit.org/show_bug.cgi?id=34493 + Enable the build/inclusion of the wtf/QObject convenience classes. - * wtf/CurrentTime.h: + * JavaScriptCore.pri: + * wtf/wtf.pri: -2010-02-02 Kwang Yul Seo <skyul@company100.net> +2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> - Reviewed by Eric Seidel. + Reviewed by Gavin Barraclough. - [BREWMP] Add HAVE_XXX definitions - https://bugs.webkit.org/show_bug.cgi?id=34414 + Collect the beginning characters in a RegExp pattern for look-up + optimization + https://bugs.webkit.org/show_bug.cgi?id=45748 + + Extend the YARR's parser with an algorithm which collects the potential + beginning characters from a RegExp pattern for later look-up optimization. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::BeginCharHelper::BeginCharHelper): + (JSC::Yarr::BeginCharHelper::addBeginChar): + (JSC::Yarr::BeginCharHelper::merge): + (JSC::Yarr::BeginCharHelper::addCharacter): + (JSC::Yarr::BeginCharHelper::linkHotTerms): + (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor): + (JSC::Yarr::RegexPatternConstructor::addBeginTerm): + (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms): + (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms): + (JSC::Yarr::RegexPatternConstructor::setupBeginChars): + (JSC::Yarr::compileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::TermChain::TermChain): + (JSC::Yarr::BeginChar::BeginChar): + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): - Add HAVE_ERRNO_H=1 +2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> - * wtf/Platform.h: + Unreviewed, rolling out r72160. + http://trac.webkit.org/changeset/72160 + https://bugs.webkit.org/show_bug.cgi?id=49646 -2010-02-02 Kwang Yul Seo <skyul@company100.net> + Broke lots of fast/profiler tests, among others (Requested by + aroben on #webkit). - Reviewed by Eric Seidel. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::functionRegisterForBytecodeOffset): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addFunctionRegisterInfo): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallVarargs): + (JSC::BytecodeGenerator::emitReturn): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::CallArguments::profileHookRegister): + * bytecompiler/NodesCodegen.cpp: + (JSC::CallArguments::CallArguments): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_profile_will_call): + (JSC::JIT::emit_op_profile_did_call): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_profile_will_call): + (JSC::JIT::emit_op_profile_did_call): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * profiler/Profile.cpp: + (JSC::Profile::Profile): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + (JSC::ProfileGenerator::stopProfiling): + * profiler/ProfileGenerator.h: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::ProfileNode): + (JSC::ProfileNode::willExecute): + * profiler/ProfileNode.h: + (JSC::ProfileNode::create): + (JSC::ProfileNode::operator==): + * profiler/Profiler.cpp: + (JSC::dispatchFunctionToProfiles): + (JSC::Profiler::willExecute): + (JSC::Profiler::didExecute): + * profiler/Profiler.h: - [BREWMP] Don't define HAVE_TM_GMTOFF, HAVE_TM_ZONE and HAVE_TIMEGM - https://bugs.webkit.org/show_bug.cgi?id=34388 +2010-11-16 Gavin Barraclough <barraclough@apple.com> - BREWMP does not have these features. + Reviewed by Sam Weinig. - * wtf/Platform.h: + Bug 49635 - Profiler implementation is fragile + + The profile presently requires the exception handling mechanism to explicitly + remove all stack frames that are exited during the exception unwind mechanism. + This is fragile in a number of ways: + * We have to change bytecode register allocation when compiling code to run + when profiling, to preserve the callee function (this is also required to + call did_call after the call has returned). + * In the JIT we have to maintain additional data structures + (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register + containing the callee. + * In the interpreter we use 'magic values' to offset into the instruction + stream to rediscover the register containing the function. + + Instead, move profiling into the head and tail of functions. + * This correctly accounts the cost of the call itself to the caller. + * This allows us to access the callee function object from the callframe. + * This means that at the point a call is made we can track the stack depth + on the ProfileNode. + * When unwinding we can simply report the depth at which the exception is + being handled - all call frames above this level are freed. -2010-02-02 Kwang Yul Seo <skyul@company100.net> + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::methodCallLinkInfo): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallVarargs): + (JSC::BytecodeGenerator::emitReturn): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::CallArguments::count): + * bytecompiler/NodesCodegen.cpp: + (JSC::CallArguments::CallArguments): + * interpreter/Interpreter.cpp: + (JSC::ProfileHostCall::ProfileHostCall): + (JSC::ProfileHostCall::~ProfileHostCall): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_profile_has_called): + (JSC::JIT::emit_op_profile_will_return): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_profile_has_called): + (JSC::JIT::emit_op_profile_will_return): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * profiler/Profile.cpp: + (JSC::Profile::Profile): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + (JSC::ProfileGenerator::exceptionUnwind): + (JSC::ProfileGenerator::stopProfiling): + * profiler/ProfileGenerator.h: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::ProfileNode): + (JSC::ProfileNode::willExecute): + * profiler/ProfileNode.h: + (JSC::ProfileNode::create): + (JSC::ProfileNode::operator==): + (JSC::ProfileNode::exec): + * profiler/Profiler.cpp: + (JSC::dispatchFunctionToProfiles): + (JSC::Profiler::hasCalled): + (JSC::Profiler::willEvaluate): + (JSC::Profiler::willReturn): + (JSC::Profiler::didEvaluate): + (JSC::Profiler::exceptionUnwind): + * profiler/Profiler.h: - Reviewed by Eric Seidel. +2010-11-16 Brian Weinstein <bweinstein@apple.com> - [BREWMP] Define WTF_PLATFORM_BREWMP=1 when BUILDING_BREWMP is defined - https://bugs.webkit.org/show_bug.cgi?id=34386 + Reviewed by Adam Roben and Steve Falkenburg. - Define WTF_PLATFORM_BREWMP=1 so that PLATFORM(BREWMP) guard can be used. + Touch Platform.h to force a rebuild for Windows. * wtf/Platform.h: -2010-02-01 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Adler. - - Date.UTC() should apply TimeClip operation. - https://bugs.webkit.org/show_bug.cgi?id=34461 - - ECMAScript 5 15.9.4.3: - > 9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))). - - * runtime/DateConstructor.cpp: - (JSC::dateUTC): Calls WTF::timeClip(). - -2010-02-01 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Adler. - - Fix a bug that Math.round() retunrs incorrect results for huge integers - https://bugs.webkit.org/show_bug.cgi?id=34462 +2010-11-16 Steve Falkenburg <sfalken@apple.com> - * runtime/MathObject.cpp: - (JSC::mathProtoFuncRound): Avoid "arg + 0.5". - -2010-02-01 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - [BREWMP] Port WTF's currentTime - https://bugs.webkit.org/show_bug.cgi?id=33567 - - Combine GETUTCSECONDS and GETTIMEMS to calculate the number - of milliseconds since 1970/01/01 00:00:00 UTC. - - * wtf/CurrentTime.cpp: - (WTF::currentTime): - -2010-02-01 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Darin Adler. + Reviewed by Adam Roben. - [Qt] WinCE buildfix after r52729 and fix for Q_BIG_ENDIAN typo. - https://bugs.webkit.org/show_bug.cgi?id=34378 + Disable LTCG for Windows Release builds. Add new Release_LTCG configuration. + https://bugs.webkit.org/show_bug.cgi?id=49632 - * wtf/Platform.h: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: -2010-02-01 Oliver Hunt <oliver@apple.com> +2010-11-16 Peter Varga <pvarga@inf.u-szeged.hu> Reviewed by Gavin Barraclough. - Structure not accounting for anonymous slots when computing property storage size - https://bugs.webkit.org/show_bug.cgi?id=34441 + The number of recursive match calls isn't limited in YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=47906 - Previously any Structure with anonymous storage would have a property map, so we - were only including anonymous slot size if there was a property map. Given this - is no longer the case we should always include the anonymous slot count in the - property storage size. + Check the number of the matchDisjunction recursive calls to avoid unbounded + recursion. + Now the matchDisjunction function returns JSRegExpResult instead of bool. + The JSRegExpResult enum contains the result of matching or the error code + of the failure (like HitLimit) which terminates the matching. + The error codes are based on pcre's jsRegExpExecute error codes. - * runtime/Structure.h: - (JSC::Structure::propertyStorageSize): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::parenthesesDoBacktrack): + (JSC::Yarr::Interpreter::matchParentheses): + (JSC::Yarr::Interpreter::backtrackParentheses): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::Interpreter::matchNonZeroDisjunction): + (JSC::Yarr::Interpreter::interpret): + (JSC::Yarr::Interpreter::Interpreter): + * yarr/RegexInterpreter.h: -2010-02-01 Oliver Hunt <oliver@apple.com> +2010-11-16 Brian Weinstein <bweinstein@apple.com> - Windows build fix, update exports file (again) + Rest of the Windows build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2010-02-01 Oliver Hunt <oliver@apple.com> +2010-11-16 Gavin Barraclough <barraclough@apple.com> - Windows build fix, update exports file + Windows build fix pt 1. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2010-01-31 Oliver Hunt <oliver@apple.com> +2010-11-16 Gavin Barraclough <barraclough@apple.com> - Reviewed by Maciej Stachowiak. - - JSC is failing to propagate anonymous slot count on some transitions - https://bugs.webkit.org/show_bug.cgi?id=34321 + Reviewed by Oliver Hunt. - Remove secondary Structure constructor, and make Structure store a copy - of the number of anonymous slots directly so saving an immediate allocation - of a property map for all structures with anonymous storage, which also - avoids the leaked property map on new property transition in the original - version of this patch. + https://bugs.webkit.org/show_bug.cgi?id=49606 - We need to propagate the the anonymous slot count otherwise we can end up - with a structure recording incorrect information about the available and - needed space for property storage, or alternatively incorrectly reusing - some slots. + The bug here is that we read the prototype from the RHS argument using a regular + op_get_by_id before op_instanceof has checked that this is an object implementing + HasInstance. This incorrect behaviour gives rise to further unnecessary complexity + in the code base, since we have additional logic (implemented using the + GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors + from the get_by_id into invalid parameter errors. Having fixed this bug this code + is all redundant, since in these cases the get_by_id will never have been reached. - * JavaScriptCore.exp: - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::materializePropertyMap): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::despecifyFunctionTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::flattenDictionaryStructure): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::insertIntoPropertyMapHashTable): - (JSC::Structure::createPropertyMapHashTable): - * runtime/Structure.h: - (JSC::Structure::create): - (JSC::Structure::hasAnonymousSlots): - (JSC::Structure::anonymousSlotCount): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addExpressionInfo): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitCheckHasInstance): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::InstanceOfNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_check_has_instance): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_check_has_instance): + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_check_has_instance): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_check_has_instance): + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * runtime/ExceptionHelpers.cpp: + (JSC::createInterruptedExecutionException): + (JSC::createTerminatedExecutionException): + (JSC::createUndefinedVariableError): + (JSC::createNotAFunctionError): + (JSC::createNotAnObjectError): + * runtime/ExceptionHelpers.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::toPrimitive): + (JSC::JSNotAnObject::getPrimitiveNumber): + (JSC::JSNotAnObject::toBoolean): + (JSC::JSNotAnObject::toNumber): + (JSC::JSNotAnObject::toString): + (JSC::JSNotAnObject::toObject): + (JSC::JSNotAnObject::getOwnPropertySlot): + (JSC::JSNotAnObject::getOwnPropertyDescriptor): + (JSC::JSNotAnObject::put): + (JSC::JSNotAnObject::deleteProperty): + (JSC::JSNotAnObject::getOwnPropertyNames): + * runtime/JSNotAnObject.h: + (JSC::JSNotAnObject::JSNotAnObject): + * runtime/JSObject.h: + (JSC::JSObject::isActivationObject): + * runtime/JSValue.cpp: + (JSC::JSValue::toObjectSlowCase): + (JSC::JSValue::synthesizeObject): + (JSC::JSValue::synthesizePrototype): -2010-01-31 Patrick Gansterer <paroga@paroga.com> +2010-11-15 Darin Adler <darin@apple.com> - Reviewed by Darin Adler. + Reviewed by Sam Weinig. - Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined). - https://bugs.webkit.org/show_bug.cgi?id=34380 + Harden additional string functions against large lengths + https://bugs.webkit.org/show_bug.cgi?id=49574 - * wtf/ThreadSpecific.h: + * wtf/text/CString.cpp: + (WTF::CString::init): Check for length that is too large for CString. + (WTF::CString::newUninitialized): Ditto. + (WTF::CString::copyBufferIfNeeded): Fix types so the length stays + in a size_t. -2010-01-31 Kent Tamura <tkent@chromium.org> + * wtf/text/WTFString.cpp: + (WTF::String::append): Check for length that is too large. - Reviewed by Darin Adler. +2010-11-15 Gavin Barraclough <barraclough@apple.com> - [Windows] Fix a bug of round() with huge integral numbers - https://bugs.webkit.org/show_bug.cgi?id=34297 + Reviewed by Sam Weinig. - Fix a bug that round() for huge integral numbers returns incorrect - results. For example, round(8639999913600001) returns - 8639999913600002 without this change though the double type can - represent 8639999913600001 precisely. + Bug 49577 - Function.prototype should be non-configurable - Math.round() of JavaScript has a similar problem. But this change - doesn't fix it because Math.round() doesn't use round() of - MathExtra.h. + JSC lazily allocates the prototype property of Function objects. - * wtf/MathExtras.h: - (round): Avoid to do "num + 0.5" or "num - 0.5". - (roundf): Fixed similarly. - (llround): Calls round(). - (llroundf): Calls roundf(). - (lround): Calls round(). - (lroundf): Calls roundf(). + We check the prototype exists on 'get', but not on 'put'. + If you 'put' without having first done a 'get' you can end up with a configurable + prototype (prototype should only ever be non-configurable). -2010-01-29 Mark Rowe <mrowe@apple.com> + This is visible in a couple of ways: + * 'delete' on the property may succeed. (the next access will result in a new, + reset prototype object). + * the prototype may be set to a getter. - Sort Xcode projects. + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertyNames): + Reify the prototype property before allowing an enumerate including don't enum properties. + (JSC::JSFunction::put): + Reify the prototype property before any put to it. - * JavaScriptCore.xcodeproj/project.pbxproj: +2010-11-15 Gavin Barraclough <barraclough@apple.com> -2010-01-29 Mark Rowe <mrowe@apple.com> + Reviewed by Geoff Garen. - Fix the Mac build. + Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException - Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional". + Three types of source location information are added to errors. - As the comment in FeatureDefines.xcconfig notes, the list of feature defines - needs to be kept in sync across the various files. The default values also - need to be kept in sync between these files and build-webkit. + (1) Divot information. - * Configurations/FeatureDefines.xcconfig: + This was added with the intention of using it to provide better source highlighting in the inspector. + We may still want to do so, but we probably should not be exposing these values in a manner visible to + user scripts – only through an internal C++ interface. The code adding divot properties to objects has + been removed. -2010-01-29 Simon Hausmann <simon.hausmann@nokia.com> + (2) Line number information. - Rubber-stamped by Maciej Stachowiak. + Line number information is presently sometimes added at the point the exception is created, and sometimes + added at the point the exception passes through throwException. Change this so that throwException has + the sole responsibility for adding line number and source file information. - Fix the ARM build. + (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`). - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): Call the right Structure::create overload. + These messages are currently created at the point the exceptions is raised. Instead reformat the message + such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.` + becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at + the in throw Exception. This presents a number of advantages: + * we no longer need to have source location information to create these TypeErrors. + * we can chose to append source location information in other error messages, including those where + passing source location to the point of construction would be inconvenient. + * we can chose in future to omit to append source location information when running in a non-debug mode. -2010-01-28 Kevin Ollivier <kevino@theolliviers.com> + This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output, + removing double periods (..) at end of lines, and adding slightly more context to some errors. - [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation - implements pthread_t in a way that makes it impossible to check its validity, - which is needed by ThreadingPthreads.cpp. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + - Separated called to access line and range information. - * wscript: + * bytecode/CodeBlock.h: + - Separated called to access line and range information. -2010-01-28 Oliver Hunt <oliver@apple.com> + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::isInvalidParamForIn): + (JSC::isInvalidParamForInstanceOf): + - Update parameters passed to error constructors. + (JSC::appendSourceToError): + - Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers) + (JSC::Interpreter::throwException): + - Updated to call appendSourceToError. + (JSC::Interpreter::privateExecute): + - Update parameters passed to error constructors. - Reviewed by Gavin Barraclough. + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + - Update parameters passed to error constructors. - DOM Objects shouldn't all require custom mark functions - https://bugs.webkit.org/show_bug.cgi?id=34291 + * runtime/Error.cpp: + (JSC::addErrorInfo): + (JSC::hasErrorInfo): + - Removed divot properties. - Make getAnonymousValue const-friendly + * runtime/Error.h: + - Removed divot properties. - * runtime/JSObject.h: - (JSC::JSObject::getAnonymousValue): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + - Initialize new property. -2010-01-28 Oliver Hunt <oliver@apple.com> + * runtime/ErrorInstance.h: + (JSC::ErrorInstance::appendSourceToMessage): + (JSC::ErrorInstance::setAppendSourceToMessage): + (JSC::ErrorInstance::clearAppendSourceToMessage): + - Added flag to check for errors needing location information appending. + (JSC::ErrorInstance::isErrorInstance): + - Added virtual method to check for ErrorInstances. - Reviewed by Gavin Barraclough. + * runtime/ExceptionHelpers.cpp: + (JSC::createUndefinedVariableError): + (JSC::createInvalidParamError): + (JSC::createNotAConstructorError): + (JSC::createNotAFunctionError): + (JSC::createNotAnObjectError): + - Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages. - Simplify anonymous slot implementation - https://bugs.webkit.org/show_bug.cgi?id=34282 + * runtime/ExceptionHelpers.h: + - Updated function signatures. - A class must now specify the number of slots it needs at construction time - rather than later on with a transition. This makes many things simpler, - we no longer need to need an additional transition on object creation to - add the anonymous slots, and we remove the need for a number of transition - type checks. + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + - Update parameters passed to error constructors. - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * JavaScriptCore.exp: - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DateInstance.h: - (JSC::DateInstance::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GetterSetter.h: - (JSC::GetterSetter::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSCell.h: - (JSC::JSCell::createDummyStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): * runtime/JSObject.h: - (JSC::JSObject::createStructure): - (JSC::JSObject::putAnonymousValue): - (JSC::JSObject::getAnonymousValue): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.h: - (JSC::Fiber::createStructure): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - (JSC::JSWrapperObject::JSWrapperObject): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::materializePropertyMap): - * runtime/Structure.h: - (JSC::Structure::create): - (JSC::Structure::anonymousSlotCount): - * runtime/StructureTransitionTable.h: - -2010-01-27 Oliver Hunt <oliver@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-27 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. + (JSC::JSObject::isErrorInstance): + - Added virtual method to check for ErrorInstances. - MessageEvent.data should deserialize in the context of the MessageEvent's global object - https://bugs.webkit.org/show_bug.cgi?id=34227 +2010-11-12 Anders Carlsson <andersca@apple.com> - Add logic to allow us to create an Object, Array, or Date instance - so we can create them in the context of a specific global object, - rather than just using the current lexical global object. - - * JavaScriptCore.exp: - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: - * runtime/JSGlobalObject.h: - (JSC::constructEmptyObject): - (JSC::constructEmptyArray): - -2010-01-27 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=34150 - WebKit needs a mechanism to catch stale HashMap entries - - It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash - is just its value, it is very unlikely that any observable problem is reproducible. - - This extends hash table consistency checks to check that pointers are referencing allocated - memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible - to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much). - - * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can - add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems - with those yet. - - * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by - CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency(). - - * wtf/HashTable.h: - (WTF::HashTable::internalCheckTableConsistency): - (WTF::HashTable::internalCheckTableConsistencyExceptSize): - (WTF::HashTable::checkTableConsistencyExceptSize): - Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off. - (WTF::::add): Updated for checkTableConsistency renaming. - (WTF::::addPassingHashCode): Ditto. - (WTF::::removeAndInvalidate): Ditto. - (WTF::::remove): Ditto. - (WTF::::rehash): Ditto. - (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this - function returns true for tables with m_table == 0. - (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially, - we could do the same for values. - - * wtf/HashTraits.h: - (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden - to add checks. Currently, the only override is for pointer hashes. - - * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming. - -2010-01-27 Anton Muhin <antonm@chromium.org> - - Reviewed by Darin Adler. - - Remove trailing \ from inline function code - https://bugs.webkit.org/show_bug.cgi?id=34223 - - * assembler/ARMv7Assembler.h: - (JSC::ARMThumbImmediate::countLeadingZerosPartial): - -2010-01-27 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - [BREWMP] Port WTF's randomNumber - https://bugs.webkit.org/show_bug.cgi?id=33566 - - Use GETRAND to generate 4 byte random byte sequence to implement - weakRandomNumber. Create a secure random number generator with - AEECLSID_RANDOM to implement randomNumber. - - * wtf/RandomNumber.cpp: - (WTF::weakRandomNumber): - (WTF::randomNumber): - -2010-01-27 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - [BREWMP] Port getCPUTime - https://bugs.webkit.org/show_bug.cgi?id=33572 + Reviewed by Adam Roben. - Use GETUPTIMEMS which returns a continuously and - linearly increasing millisecond timer from the time the device - was powered on. This function is enough to implement getCPUTime. + CString(const char*) crashes when passed a null pointer + https://bugs.webkit.org/show_bug.cgi?id=49450 - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): + * wtf/text/CString.cpp: + (WTF::CString::CString): + Return early if str is null. -2010-01-27 Kwang Yul Seo <skyul@company100.net> +2010-11-11 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. - [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap. - https://bugs.webkit.org/show_bug.cgi?id=33582 + Bug 49420 - Clean up syntax/reference error throw. - Use fastMalloc and fastFree to implement MarkStack::allocateStack and - MarkStack::releaseStack for platforms without page level allocation. + Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair. + This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data + attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around + this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised. - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackNone.cpp: Added. - (JSC::MarkStack::initializePagesize): - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): - -2010-01-27 Kwang Yul Seo <skyul@company100.net> + We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an + Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false. - Reviewed by Eric Seidel. + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitThrowReferenceError): + (JSC::BytecodeGenerator::emitThrowSyntaxError): + (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNodeInConditionContext): + * bytecompiler/NodesCodegen.cpp: + (JSC::ThrowableExpressionData::emitThrowReferenceError): + (JSC::ThrowableExpressionData::emitThrowSyntaxError): + (JSC::RegExpNode::emitBytecode): + (JSC::PostfixErrorNode::emitBytecode): + (JSC::PrefixErrorNode::emitBytecode): + (JSC::AssignErrorNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + (JSC::LabelNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_throw_reference_error): + (JSC::JIT::emit_op_throw_syntax_error): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_throw_reference_error): + (JSC::JIT::emit_op_throw_syntax_error): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * parser/Nodes.h: - [BREWMP] Don't use time function - https://bugs.webkit.org/show_bug.cgi?id=33577 +2010-11-11 Darin Adler <darin@apple.com> - Calling time(0) in BREW devices causes a crash because time - is not properly ported in most devices. Cast currentTime() to - time_t to get the same result as time(0). + Reviewed by Sam Weinig. - * wtf/DateMath.cpp: - (WTF::calculateUTCOffset): + Harden some string functions against large lengths + https://bugs.webkit.org/show_bug.cgi?id=49293 -2010-01-27 Alexey Proskuryakov <ap@apple.com> + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for + strlen results that are too large for StringImpl. + (WTF::StringImpl::lower): Check for lengths that are too large for + int32_t. + (WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for + lengths that are too large for int32_t. + (WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned + rather than int and int32_t so we can handle any length. + (WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for + lengths that are too large for int32_t. + (WTF::StringImpl::find): Check for strlen results that are too large for + StringImpl. + (WTF::StringImpl::findIgnoringCase): Ditto. + (WTF::StringImpl::replace): Fix incorrect use of PassRefPtr. + (WTF::StringImpl::createWithTerminatingNullCharacter): Check before + incrementing length. - Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent build fixes, - because they make SVG tests crash in release builds. +2010-11-11 Dan Horák <dan@danny.cz> - * wtf/HashMap.h: - (WTF::::remove): - * wtf/HashSet.h: - (WTF::::remove): - * wtf/HashTable.h: - (WTF::::add): - (WTF::::addPassingHashCode): - (WTF::::removeAndInvalidate): - (WTF::::remove): - (WTF::::rehash): - (WTF::::checkTableConsistency): - (WTF::::checkTableConsistencyExceptSize): - * wtf/HashTraits.h: - (WTF::GenericHashTraits::emptyValue): - (WTF::): - * wtf/RefPtrHashMap.h: - (WTF::::remove): + Reviewed by Andreas Kling. -2010-01-26 Alexey Proskuryakov <ap@apple.com> + Add support for the s390/s390x architectures, it's big-endian + with s390 being 32-bit and s390x being 64-bit. - More Windows build fixing. + https://bugs.webkit.org/show_bug.cgi?id=34786 - * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type. + * wtf/Platform.h: -2010-01-26 Alexey Proskuryakov <ap@apple.com> +2010-11-10 Csaba Osztrogonác <ossy@webkit.org> - Windows build fix. + Reviewed by David Hyatt. - * wtf/HashTraits.h: Include malloc.h for _msize(). + HTML5 Ruby support should be mandatory feature + https://bugs.webkit.org/show_bug.cgi?id=49272 -2010-01-26 Alexey Proskuryakov <ap@apple.com> + Remove Ruby as optional feature. - Build fix. + * Configurations/FeatureDefines.xcconfig: + * JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows. - * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a - static (empty) version of this function. +2010-11-10 Peter Rybin <peter.rybin@gmail.com> -2010-01-26 Alexey Proskuryakov <ap@apple.com> + Reviewed by Adam Barth. - Reviewed by Darin Adler. + HTML parser should provide script column position within HTML document to JavaScript engine + https://bugs.webkit.org/show_bug.cgi?id=45271 - https://bugs.webkit.org/show_bug.cgi?id=34150 - WebKit needs a mechanism to catch stale HashMap entries + Adds TextPosition* classes -- a structure that stores line/column/generation + level coordinates inside text document. Adds *BasedNumber classes -- typesafe int + wrappers that emphasize whether int number is used as zero-based or + one-based. - It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash - is just its value, it is very unlikely that any observable problem is reproducible. + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Added. + (WTF::TextPosition::TextPosition): + (WTF::TextPosition::minimumPosition): + (WTF::TextPosition::belowRangePosition): + (WTF::ZeroBasedNumber::fromZeroBasedInt): + (WTF::ZeroBasedNumber::ZeroBasedNumber): + (WTF::ZeroBasedNumber::zeroBasedInt): + (WTF::ZeroBasedNumber::base): + (WTF::ZeroBasedNumber::belowBase): + (WTF::OneBasedNumber::fromOneBasedInt): + (WTF::OneBasedNumber::OneBasedNumber): + (WTF::OneBasedNumber::oneBasedInt): + (WTF::OneBasedNumber::convertAsZeroBasedInt): + (WTF::OneBasedNumber::convertToZeroBased): + (WTF::OneBasedNumber::base): + (WTF::OneBasedNumber::belowBase): + (WTF::toZeroBasedTextPosition): + (WTF::toOneBasedTextPosition): + (WTF::ZeroBasedNumber::convertToOneBased): + +2010-11-09 Gabor Loki <loki@webkit.org> - This extends hash table consistency checks to check that pointers are referencing allocated - memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible - to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much). + Reviewed by Gavin Barraclough. - * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can - add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems - with those yet. + ARM JIT asserts when loading http://reader.google.com in debug mode + https://bugs.webkit.org/show_bug.cgi?id=48912 - * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by - CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency(). + There are several cases when the uninterrupted sequence is larger than + maximum required offset for pathing the same sequence. Eg.: if in a + uninterrupted sequence the last macroassembler's instruction is a stub + call, it emits store instruction(s) which should not be included in the + calculation of length of uninterrupted sequence. So, the insnSpace and + constSpace should be upper limit instead of hard limit. - * wtf/HashTable.h: - (WTF::HashTable::internalCheckTableConsistency): - (WTF::HashTable::internalCheckTableConsistencyExceptSize): - (WTF::HashTable::checkTableConsistencyExceptSize): - Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off. - (WTF::::add): Updated for checkTableConsistency renaming. - (WTF::::addPassingHashCode): Ditto. - (WTF::::removeAndInvalidate): Ditto. - (WTF::::remove): Ditto. - (WTF::::rehash): Ditto. - (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this - function returns true for tables with m_table == 0. - (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially, - we could do the same for values. - - * wtf/HashTraits.h: - (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden - to add checks. Currently, the only override is for pointer hashes. - - * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming. - -2010-01-26 Lyon Chen <liachen@rim.com> + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::endUninterruptedSequence): - Reviewed by Maciej Stachowiak. +2010-11-09 David Kilzer <ddkilzer@apple.com> - Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler - https://bugs.webkit.org/show_bug.cgi?id=33902 + <http://webkit.org/b/49279> Fix include statements for local headers - * bytecode/Opcode.h: + Reviewed by Gavin Barraclough. -2010-01-26 Steve Falkenburg <sfalken@apple.com> + Use "Foo.h" instead of <Foo.h> for local headers. - Reviewed by Oliver Hunt. + * assembler/AbstractMacroAssembler.h: Also fixed sort order. + * assembler/CodeLocation.h: + * yarr/RegexJIT.h: + * yarr/RegexParser.h: - Windows build references non-existent include paths - https://bugs.webkit.org/show_bug.cgi?id=34175 +2010-11-08 Adam Roben <aroben@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + Roll out r71532 -2010-01-26 Oliver Hunt <oliver@apple.com> + It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default + .bashrc unsets %TEMP%, which broke copy-tools.cmd. - Reviewed by Geoffrey Garen. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed. + * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed. - Using JavaScriptCore API with a webkit vended context can result in slow script dialog - https://bugs.webkit.org/show_bug.cgi?id=34172 +2010-11-08 Martin Robinson <mrobinson@igalia.com> - Make the APIShim correctly increment and decrement the timeout - entry counter. + Reviewed by Xan Lopez. - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): + >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la' + https://bugs.webkit.org/show_bug.cgi?id=49128 -2010-01-26 Simon Hausmann <simon.hausmann@nokia.com> + r59042 introduced a C++-style comment in Platform.h, which is often + included in C source files. Change it to a C-style comment. - [Qt] Fix compilation of QtScript with non-gcc compilers + * wtf/Platform.h: Fix the C++-style comment. - Variable length stack arrays are a gcc extension. Use QVarLengthArray - as a more portable solution that still tries to allocate on the stack - first. +2010-11-08 Adam Roben <aroben@apple.com> - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::call): + Show a message and cause the build to immediately fail when any + .vsprops files are copied -2010-01-26 Simon Hausmann <simon.hausmann@nokia.com> + When $WebKitLibrariesDir is set to a non-standard location, the + .vsprops files have to be copied from WebKitLibraries/win to + $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up + changes to the .vsprops files until the next time it opens the solution + file. Before this patch, the build would soldier on with the old + .vsprops files, leading to strange build failures. Now we detect that + the .vsprops files have been updated, display a message to the user + telling them what to do, and make the build fail immediately. - Reviewed by Tor Arne Vestbø. + Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when + .vsprops files are updated - [Qt] Fix the build on platforms without JIT support. + Reviewed by Steve Falkenburg. - The JIT support should be determined at compile-time via wtf/Platform.h + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + Moved code to copy the tools directory to the new copy-tools.cmd + script. Moved that after the command that writes the buildfailed file + so the build will be considered a failure if copy-tools.cmd fails. + Changed to write the project name into buildfailed like all our other + projects do, so those other projects will know that the failure was due + to this project. - * qt/api/QtScript.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + Added new scripts. -2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies + the tools directory to $WebKitLibrariesDir. If any files were copied, + we display a message to the user and exit with error code 1 to cause + the build to fail. In non-interactive builds, we just print the message + to the build log. In interactive builds, we show the message in an + alert. - Reviewed by Simon Hausmann. + * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses + Windows Scripting Host to display a message in an alert. - First steps of the QtScript API. - - Two new classes were created; QScriptEngine and QScriptValue. - The first should encapsulate a javascript context and the second a script - value. - - This API is still in development, so it isn't compiled by default. - To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to - build-webkit. - - https://bugs.webkit.org/show_bug.cgi?id=32565 - - * qt/api/QtScript.pro: Added. - * qt/api/qscriptconverter_p.h: Added. - (QScriptConverter::toString): - * qt/api/qscriptengine.cpp: Added. - (QScriptEngine::QScriptEngine): - (QScriptEngine::~QScriptEngine): - (QScriptEngine::evaluate): - (QScriptEngine::collectGarbage): - * qt/api/qscriptengine.h: Added. - * qt/api/qscriptengine_p.cpp: Added. - (QScriptEnginePrivate::QScriptEnginePrivate): - (QScriptEnginePrivate::~QScriptEnginePrivate): - (QScriptEnginePrivate::evaluate): - * qt/api/qscriptengine_p.h: Added. - (QScriptEnginePrivate::get): - (QScriptEnginePrivate::collectGarbage): - (QScriptEnginePrivate::makeJSValue): - (QScriptEnginePrivate::context): - * qt/api/qscriptvalue.cpp: Added. - (QScriptValue::QScriptValue): - (QScriptValue::~QScriptValue): - (QScriptValue::isValid): - (QScriptValue::isBool): - (QScriptValue::isBoolean): - (QScriptValue::isNumber): - (QScriptValue::isNull): - (QScriptValue::isString): - (QScriptValue::isUndefined): - (QScriptValue::isError): - (QScriptValue::isObject): - (QScriptValue::isFunction): - (QScriptValue::toString): - (QScriptValue::toNumber): - (QScriptValue::toBool): - (QScriptValue::toBoolean): - (QScriptValue::toInteger): - (QScriptValue::toInt32): - (QScriptValue::toUInt32): - (QScriptValue::toUInt16): - (QScriptValue::call): - (QScriptValue::engine): - (QScriptValue::operator=): - (QScriptValue::equals): - (QScriptValue::strictlyEquals): - * qt/api/qscriptvalue.h: Added. - (QScriptValue::): - * qt/api/qscriptvalue_p.h: Added. - (QScriptValuePrivate::): - (QScriptValuePrivate::get): - (QScriptValuePrivate::QScriptValuePrivate): - (QScriptValuePrivate::isValid): - (QScriptValuePrivate::isBool): - (QScriptValuePrivate::isNumber): - (QScriptValuePrivate::isNull): - (QScriptValuePrivate::isString): - (QScriptValuePrivate::isUndefined): - (QScriptValuePrivate::isError): - (QScriptValuePrivate::isObject): - (QScriptValuePrivate::isFunction): - (QScriptValuePrivate::toString): - (QScriptValuePrivate::toNumber): - (QScriptValuePrivate::toBool): - (QScriptValuePrivate::toInteger): - (QScriptValuePrivate::toInt32): - (QScriptValuePrivate::toUInt32): - (QScriptValuePrivate::toUInt16): - (QScriptValuePrivate::equals): - (QScriptValuePrivate::strictlyEquals): - (QScriptValuePrivate::assignEngine): - (QScriptValuePrivate::call): - (QScriptValuePrivate::engine): - (QScriptValuePrivate::context): - (QScriptValuePrivate::value): - (QScriptValuePrivate::object): - (QScriptValuePrivate::inherits): - (QScriptValuePrivate::isJSBased): - (QScriptValuePrivate::isNumberBased): - (QScriptValuePrivate::isStringBased): - * qt/api/qtscriptglobal.h: Added. - * qt/tests/qscriptengine/qscriptengine.pro: Added. - * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added. - (tst_QScriptEngine::tst_QScriptEngine): - (tst_QScriptEngine::~tst_QScriptEngine): - (tst_QScriptEngine::init): - (tst_QScriptEngine::cleanup): - (tst_QScriptEngine::collectGarbage): - (tst_QScriptEngine::evaluate): - * qt/tests/qscriptvalue/qscriptvalue.pro: Added. - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added. - (tst_QScriptValue::tst_QScriptValue): - (tst_QScriptValue::~tst_QScriptValue): - (tst_QScriptValue::init): - (tst_QScriptValue::cleanup): - (tst_QScriptValue::ctor): - (tst_QScriptValue::toString_data): - (tst_QScriptValue::toString): - (tst_QScriptValue::copyConstructor_data): - (tst_QScriptValue::copyConstructor): - (tst_QScriptValue::assignOperator_data): - (tst_QScriptValue::assignOperator): - (tst_QScriptValue::dataSharing): - (tst_QScriptValue::constructors_data): - (tst_QScriptValue::constructors): - (tst_QScriptValue::call): - * qt/tests/tests.pri: Added. - * qt/tests/tests.pro: Added. - -2010-01-25 Dmitry Titov <dimich@chromium.org> +2010-11-07 Sam Magnuson <smagnuson@netflix.com> - Reviewed by David Levin. + Reviewed by Andreas Kling. - Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle. - After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads - were already terminated and their threadMap entries cleared. - Add a 0 check. + [Qt] make install does not cause JavaScriptCore to be built + https://bugs.webkit.org/show_bug.cgi?id=49114 - * wtf/ThreadingPthreads.cpp: - (WTF::waitForThreadCompletion): - (WTF::detachThread): + * JavaScriptCore.pro: -2010-01-24 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-11-05 Oliver Hunt <oliver@apple.com> - Reviewed by Maciej Stachowiak. + Reviewed by Gavin Barraclough. - Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function - https://bugs.webkit.org/show_bug.cgi?id=33866 + Website consistently crashing TOT in JIT::execute() on news.com.au + https://bugs.webkit.org/show_bug.cgi?id=48954 - Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION - macro for those functions that are always present. + The problem here was the strict pass of this conversion was loading the + this structure into one register but doing the flags check off a different + register. This is clearly wrong. I have been unable to trigger the crash + with a reduction, but I've added an assertion to the this conversion to + attempt to make it more readily catchable in future. + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_convert_this_strict): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_convert_this_strict): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): -2010-01-22 Kevin Watters <kevinwatters@gmail.com> - - Reviewed by Kevin Ollivier. - - [wx] Remove the Bakefile build system, which is no longer being used. - - https://bugs.webkit.org/show_bug.cgi?id=34022 - - * JavaScriptCoreSources.bkl: Removed. - * jscore.bkl: Removed. - -2010-01-22 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=34025 - Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets. - - * Configurations/FeatureDefines.xcconfig: - -2010-01-22 Dmitry Titov <dimich@chromium.org> - - Not reviewed, attempted Snow Leopard build fix. - - * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'. - -2009-01-22 Dmitry Titov <dimich@chromium.org> +2010-11-04 Xan Lopez <xlopez@igalia.com> - Reviewed by Maciej Stachowiak. - - Fix the leak of ThreadIdentifiers in threadMap across threads. - https://bugs.webkit.org/show_bug.cgi?id=32689 - - Test is added to DumpRenderTree.mm. + Reviewed by Adam Barth. - * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build. - * Android.v8.wtf.mk: Ditto. - * GNUmakefile.am: Ditto. - * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + Use leakRef instead of releaseRef + https://bugs.webkit.org/show_bug.cgi?id=48974 - * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor. - (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap. - (WTF::ThreadIdentifierData::identifier): - (WTF::ThreadIdentifierData::initialize): - (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke. - (WTF::ThreadIdentifierData::initializeKeyOnceHelper): - (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s). - * wtf/ThreadIdentifierDataPthreads.h: Added. - (WTF::ThreadIdentifierData::ThreadIdentifierData): - - * wtf/Threading.cpp: - (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make - sure it is invoked when ThreadIdentifier is already established. - - * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now. - * wtf/ThreadingNone.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. - * wtf/ThreadingWin.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. - (WTF::initializeThreading): Ditto. - * wtf/gtk/ThreadingGtk.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. - * wtf/qt/ThreadingQt.cpp: - (WTF::initializeCurrentThreadInternal): Ditto. + Use leakRef instead of the deprecated releaseRef. This was renamed + some time ago because 'releaseRef' is too close to 'release', + which does something completely different. - * wtf/ThreadingPthreads.cpp: - (WTF::establishIdentifierForPthreadHandle): - (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it. - (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread. - (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData(). - (WTF::detachThread): Ditto. - (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map. - Also, set the thread-specific data if called first time on the thread. +2010-11-04 Eric Seidel <eric@webkit.org> -2010-01-21 Kwang Yul Seo <skyul@company100.net> + Reviewed by Gavin Barraclough. - Reviewed by Alexey Proskuryakov. + REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute + https://bugs.webkit.org/show_bug.cgi?id=48789 - Add ThreadSpecific for ENABLE(SINGLE_THREADED) - https://bugs.webkit.org/show_bug.cgi?id=33878 + The contract for all String/AtomicString methods seems to be that it's + safe to call them, even when the String is null (impl() returns 0). + This contract was broken by r49798 (unintentionally) when optimizing + for dromeo. + This patch adds a null check to AtomicString::lower() fixing this + crash and preventing future confusion. - Implement ThreadSpecific with a simple getter/setter - when ENABLE(SINGLE_THREADED) is true. + * wtf/text/AtomicString.cpp: + (WTF::AtomicString::lower): - Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236, - an implementation of ThreadSpecific must be available to build WebKit. - This causes a build failure for platforms without a proper - ThreadSpecific implementation. +2010-11-04 Adam Barth <abarth@webkit.org> - * wtf/ThreadSpecific.h: - (WTF::::ThreadSpecific): - (WTF::::~ThreadSpecific): - (WTF::::get): - (WTF::::set): - (WTF::::destroy): + Enabled ICCJPEG on Chromium Mac + https://bugs.webkit.org/show_bug.cgi?id=48977 -2010-01-21 Kwang Yul Seo <skyul@company100.net> + * wtf/Platform.h: - Reviewed by Maciej Stachowiak. +2010-11-03 Oliver Hunt <oliver@apple.com> - Add fastStrDup to FastMalloc - https://bugs.webkit.org/show_bug.cgi?id=33937 + Reviewed by Gavin Barraclough. - The new string returned by fastStrDup is obtained with fastMalloc, - and can be freed with fastFree. This makes the memory management - more consistent because we don't need to keep strdup allocated pointers - and free them with free(). Instead we can use fastFree everywhere. + Crash in Function.prototype.call.apply + https://bugs.webkit.org/show_bug.cgi?id=48485 - * wtf/FastMalloc.cpp: - (WTF::fastStrDup): - * wtf/FastMalloc.h: + The problem here was op_load_varargs failing to ensure that + there was sufficient space for the entire callframe prior to + op_call_varargs. This meant that when we then re-entered the + VM it was possible to stomp over an earlier portion of the + stack, so causing sub-optimal behaviour. -2010-01-21 Brady Eidson <beidson@apple.com> + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoadVarargs): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::ApplyFunctionCallDotNode::emitBytecode): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_load_varargs): - Reviewed by Maciej Stachowiak. +2010-11-03 Kenneth Russell <kbr@google.com> - history.back() for same-document history traversals isn't synchronous as the specification states. - <rdar://problem/7535011> and https://bugs.webkit.org/show_bug.cgi?id=33538 + Reviewed by Chris Marrin. - * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium. + Redesign extension mechanism in GraphicsContext3D + https://bugs.webkit.org/show_bug.cgi?id=46894 -2010-01-21 Geoffrey Garen <ggaren@apple.com> + * JavaScriptCore.exp: + - Exposed String::split(const String&, Vector<String>). - Reviewed by Oliver Hunt. +2010-11-03 Adam Roben <aroben@apple.com> - Always create a prototype for automatically managed classes. - - This fixes some errors where prototype chains were not correctly hooked - up, and also ensures that API classes work correctly with features like - instanceof. + Bring WTF.vcproj up to date - * API/JSClassRef.cpp: - (OpaqueJSClass::create): Cleaned up some of this code. Also changed it - to always create a prototype class. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and + unicode directories, added new files, removed old files. - * API/tests/testapi.c: - (Derived2_class): - (main): Fixed a null value crash in the exception checking code. - * API/tests/testapi.js: Added some tests for the case where a prototype - chain would not be hooked up correctly. +2010-11-03 Gabor Loki <loki@webkit.org> -2010-01-21 Oliver Hunt <oliver@apple.com> + Reviewed by Andreas Kling. - Reviewed by Geoff Garen. + Remove unused initializeWeakRandomNumberGenerator + https://bugs.webkit.org/show_bug.cgi?id=48899 - Force JSC to create a prototype chain for API classes with a - parent class but no static functions. + WeakRandom class is used instead of weakRandomNumber and its initializer. - * API/JSClassRef.cpp: - (OpaqueJSClass::create): + * wtf/RandomNumberSeed.h: -2010-01-21 Kent Hansen <kent.hansen@nokia.com> +2010-11-03 Gabor Loki <loki@webkit.org> Reviewed by Geoffrey Garen. - Object.getOwnPropertyDescriptor always returns undefined for JS API objects - https://bugs.webkit.org/show_bug.cgi?id=33946 - - Ideally the getOwnPropertyDescriptor() reimplementation should return an - access descriptor that wraps the property getter and setter callbacks, but - that approach is much more involved than returning a value descriptor. - Keep it simple for now. - - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertyDescriptor): - * API/tests/testapi.js: - -2010-01-20 Mark Rowe <mrowe@apple.com> - - Build fix. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call. - -2010-01-20 Mark Rowe <mrowe@apple.com> + Unused class: JSFastMath with JSValue64 + https://bugs.webkit.org/show_bug.cgi?id=48835 - Reviewed by Oliver Hunt. - - Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes. - - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - -2010-01-20 Mark Rowe <mrowe@apple.com> - - Reviewed by Oliver Hunt. - - <rdar://problem/7215063> Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported - - Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms - where it is supported. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::init): - (WTF::TCMalloc_PageHeap::initializeScavenger): - (WTF::TCMalloc_PageHeap::signalScavenger): - (WTF::TCMalloc_PageHeap::shouldContinueScavenging): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::periodicScavenge): - * wtf/Platform.h: - -2010-01-20 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - <rdar://problem/7562708> REGRESSION(53460): Heap::destroy may not run - all destructors + Remove unused JSFastMath class. - * runtime/Collector.cpp: - (JSC::Heap::freeBlocks): Instead of fully marking protected objects, - just set their mark bits. This prevents protected objects from keeping - unprotected objects alive. Destructor order is not guaranteed, so it's - OK to destroy objects pointed to by protected objects before destroying - protected objects. + * runtime/JSImmediate.h: -2010-01-19 David Levin <levin@chromium.org> +2010-11-02 Adam Roben <aroben@apple.com> - Reviewed by Oliver Hunt. + Windows build fix after r71127 - CrossThreadCopier needs to support ThreadSafeShared better. - https://bugs.webkit.org/show_bug.cgi?id=33698 - - * wtf/TypeTraits.cpp: Added tests for the new type traits. - * wtf/TypeTraits.h: - (WTF::IsSubclass): Determines if a class is a derived from another class. - (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a - template class (with one parameter that is unknown). - (WTF::RemoveTemplate): Reveals the type for a template parameter. + MSVC isn't smart enough to figure out that the definition of the global + nullptr variable isn't needed, so we provide one for it. -2010-01-20 Steve Falkenburg <sfalken@apple.com> + Fixes <http://webkit.org/b/48862> Windows build is broken due to + undefined symbol nullptr - Reviewed by Darin Adler and Adam Roben. + Reviewed by Anders Carlsson. - Feature defines are difficult to maintain on Windows builds - https://bugs.webkit.org/show_bug.cgi?id=33883 + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr. - FeatureDefines.vsprops are now maintained in a way similar to - Configurations/FeatureDefines.xcconfig, with the added advantage - of having a single FeatureDefines file across all projects. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS + resort the files. - * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet. + * wtf/NullPtr.cpp: Added. -2010-01-20 Csaba Osztrogonác <ossy@webkit.org> +2010-11-02 Martin Robinson <mrobinson@igalia.com> - [Qt] Unreviewed buildfix for r53547. + Reviewed by Xan Lopez. - * DerivedSources.pro: + Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits + https://bugs.webkit.org/show_bug.cgi?id=48841 -2010-01-20 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + Remove special handling of HashTableDeletedValue in PlatformRefPtr. + This is better handled on a case-by-case basis, when HashTraits + cannot account for it. - Reviewed by Simon Hausmann. + * wtf/PlatformRefPtr.h: + (WTF::PlatformRefPtr::~PlatformRefPtr): + (WTF::PlatformRefPtr::clear): + (WTF::::operator): - [Qt] Make extraCompilers for generated sources depend on their scripts +2010-10-29 Oliver Hunt <oliver@apple.com> - * DerivedSources.pro: + Reviewed by Gavin Barraclough. -2010-01-19 Brian Weinstein <bweinstein@apple.com> + REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute + https://bugs.webkit.org/show_bug.cgi?id=47573 - Reviewed by Tim Hatcher. + I think the interpreter portion of this was introduced by + an incorrect but silent merge when I updated prior to committing. + The JIT change is basically just a correctness fix, but it is + needed to prevent the testcase from asserting in debug builds. - When JavaScriptCore calls Debugger::Exception, have it pass a - hasHandler variable that represents if exception is being handled - in the same function (not in a parent on the call stack). - - This just adds a new parameter, no behavior is changed. + The basic problem is incorrectly setting the activation object + on an arguments object. The crash was due to us setting a null + activation in the interpreter, in the jit we were setting the + activation of a strict mode arguments object. - * debugger/Debugger.h: * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - -2010-01-18 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Adam Barth. - - Inline functions that are hot in DOM manipulation - https://bugs.webkit.org/show_bug.cgi?id=33820 - - (3% speedup on Dromaeo DOM Core tests) - - * runtime/WeakGCMap.h: - (JSC::::get): inline - -2010-01-19 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Unreviewed build fix for JIT with RVCT. - - Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h. - Remove extra ')'. - + (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: - (JSC::ctiVMThrowTrampoline): - -2010-01-19 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/ - https://bugs.webkit.org/show_bug.cgi?id=33826 - - This bug was caused by a GC-protected object being destroyed early by - Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers - to GC-protected memory to be valid. - - The solution is to do two passes of tear-down in Heap::destroy. The first - pass tears down all unprotected objects. The second pass ASSERTs that all - previously protected objects are now unprotected, and then tears down - all perviously protected objects. These two passes simulate the two passes - that would have been required to free a protected object during normal GC. - - * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap. - - * runtime/Collector.cpp: - (JSC::Heap::destroy): Moved ASSERTs to here. - (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its - setter to the function that does the shrinking. - (JSC::Heap::freeBlocks): Implemented above algorithm. - (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink. - -2010-01-19 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (build fix). - - Reverting r53455, breaks 2 javascriptcore tests. - - * API/JSContextRef.cpp: - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::freeBlock): - (JSC::Heap::freeBlocks): - (JSC::Heap::shrinkBlocks): - -2010-01-18 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (build fix). - - Revert r53454, since it causes much sadness in this world. - - * runtime/UString.cpp: - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UntypedPtrAndBitfield::asPtr): - (JSC::UntypedPtrAndBitfield::operator&=): - (JSC::UntypedPtrAndBitfield::operator|=): - (JSC::UntypedPtrAndBitfield::operator&): - (JSC::UStringImpl::create): - (JSC::UStringImpl::cost): - (JSC::UStringImpl::isIdentifier): - (JSC::UStringImpl::setIsIdentifier): - (JSC::UStringImpl::ref): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::bufferOwnership): - (JSC::UStringImpl::isStatic): - * wtf/StringHashFunctions.h: - (WTF::stringHash): - -2010-01-18 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/ - https://bugs.webkit.org/show_bug.cgi?id=33826 - - This bug was caused by a GC-protected object being destroyed early by - Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers - to GC-protected memory to be valid. - - The solution is to do two passes of tear-down in Heap::destroy. The first - pass tears down all unprotected objects. The second pass ASSERTs that all - previously protected objects are now unprotected, and then tears down - all perviously protected objects. These two passes simulate the two passes - that would have been required to free a protected object during normal GC. - - * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap. - - * runtime/Collector.cpp: - (JSC::Heap::destroy): Moved ASSERTs to here. - (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its - setter to the function that does the shrinking. - (JSC::Heap::freeBlocks): Implemented above algorithm. - (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink. - -2010-01-18 Gavin Barraclough <barraclough@apple.com> + (JSC::DEFINE_STUB_FUNCTION): + * wtf/Platform.h: - Reviewed by Oliver Hunt. +2010-10-29 Csaba Osztrogonác <ossy@webkit.org> - https://bugs.webkit.org/show_bug.cgi?id=33731 - Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags). + Reviewed by Adam Roben and David Kilzer. - This break the OS X Leaks tool. Instead, free up some more bits from the refCount. + Fix and cleanup of build systems + https://bugs.webkit.org/show_bug.cgi?id=48342 - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::cost): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::): - * wtf/StringHashFunctions.h: - (WTF::stringHash): + * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API -2010-01-18 Kent Tamura <tkent@chromium.org> +2010-10-28 Kwang Yul Seo <skyul@company100.net> Reviewed by Darin Adler. - HTMLInputElement::valueAsDate setter support for type=month. - https://bugs.webkit.org/show_bug.cgi?id=33021 - - Expose the following functions to be used by WebCore: - - WTF::msToyear() - - WTF::dayInYear() - - WTF::monthFromDayInYear() - - WTF::dayInMonthFromDayInYear() - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DateMath.cpp: - (WTF::msToYear): Remove "static inline". - (WTF::dayInYear): Remove "static inline". - (WTF::monthFromDayInYear): Remove "static inline". - (WTF::dayInMonthFromDayInYear): Remove "static inline". - * wtf/DateMath.h: Declare the above functions. - -2010-01-18 Darin Adler <darin@apple.com> - - Fix build by reverting the previous change. - - * runtime/UString.h: Rolled out the FastAllocBase base class. - It was making UString larger, and therefore JSString larger, - and too big for a garbage collection cell. + Include stddef.h unconditionally in Assertions.h + https://bugs.webkit.org/show_bug.cgi?id=48573 - This raises the unpleasant possibility that many classes became - larger because we added the FastAllocBase base class. I am - worried about this, and it needs to be investigated. + There is no reason to have stddef.h include be MSVC-only. -2010-01-18 Zoltan Horvath <zoltan@webkit.org> - - Reviewed by Darin Adler. - - Allow custom memory allocation control for UString class - https://bugs.webkit.org/show_bug.cgi?id=27831 - - Inherits the following class from FastAllocBase because it is - instantiated by 'new' and no need to be copyable: + * wtf/Assertions.h: - class name - instantiated at: - classs UString - JavaScriptCore/runtime/UString.cpp:160 +2010-10-28 Herczeg Zoltan <zherczeg@webkit.org> - * runtime/UString.h: + Rubber stamped by Csaba Osztrogonác. -2010-01-18 Evan Cheng <evan.cheng@apple.com> + Try to fix interpreter build. - Reviewed by Darin Adler. + Needed parentheses around assignment to avoid GCC warning after + http://trac.webkit.org/changeset/70703 - Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC. - rdar://problem/7553780 + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): - * runtime/JSObject.h: - (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads. - * runtime/JSString.h: - (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString. - * runtime/UString.h: - (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects. +2010-10-28 Peter Varga <pvarga@inf.u-szeged.hu> -2010-01-18 Csaba Osztrogonác <ossy@webkit.org> + Reviewed by Csaba Osztrogonác. - Reviewed by Darin Adler. + resetAssertionMatches() is an unused function in YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=48503 - Delete dftables-xxxxxxxx.in files automatically. - https://bugs.webkit.org/show_bug.cgi?id=33796 + The resetAssertionMatches() function is removed from YARR Interpreter + because it's never called. - * pcre/dftables: unlink unnecessary temporary file. + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::resetMatches): -2010-01-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> +2010-10-28 Zoltan Herczeg <zherczeg@webkit.org> - Reviewed by Simon Hausmann. + Reviewed by Andreas Kling. - [Qt] Force qmake to generate a single makefile for DerivedSources.pro + Wrong instruction form for BKPT + https://bugs.webkit.org/show_bug.cgi?id=48427 - * DerivedSources.pro: + One '0' is missing from BKPT instruction. + Thanks for Jacob Bramley for reporting this error. -2010-01-18 Csaba Osztrogonác <ossy@webkit.org> + * assembler/ARMAssembler.h: - Rubber-stamped by Gustavo Noronha Silva. +2010-10-28 Xan Lopez <xlopez@igalia.com> - Rolling out r53391 and r53392 because of random crashes on buildbots. - https://bugs.webkit.org/show_bug.cgi?id=33731 + Try to fix Snow Leopard build. - * bytecode/CodeBlock.h: - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::MethodCallLinkInfo): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - * jit/JIT.cpp: - (JSC::JIT::unlinkCall): * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchMethodCallProto): - * runtime/UString.cpp: - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - * runtime/UString.h: - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UntypedPtrAndBitfield::asPtr): - (JSC::UntypedPtrAndBitfield::operator&=): - (JSC::UntypedPtrAndBitfield::operator|=): - (JSC::UntypedPtrAndBitfield::operator&): - (JSC::UStringImpl::create): - (JSC::UStringImpl::cost): - (JSC::UStringImpl::isIdentifier): - (JSC::UStringImpl::setIsIdentifier): - (JSC::UStringImpl::ref): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::bufferOwnership): - (JSC::UStringImpl::isStatic): - * wtf/StringHashFunctions.h: - (WTF::stringHash): - -2010-01-18 Simon Hausmann <simon.hausmann@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Fix the build with strict gcc and RVCT versions: It's not legal to cast a - pointer to a function to a void* without an intermediate cast to a non-pointer - type. A cast to a ptrdiff_t inbetween fixes it. - - * runtime/JSString.h: - (JSC::Fiber::JSString): + (JSC::JIT::testPrototype): -2010-01-15 Gavin Barraclough <barraclough@apple.com> +2010-10-28 Xan Lopez <xlopez@igalia.com> Reviewed by Oliver Hunt. - https://bugs.webkit.org/show_bug.cgi?id=33731 - Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags). + Do not have two different asCell APIs in JSValue + https://bugs.webkit.org/show_bug.cgi?id=47979 - This break the OS X Leaks tool. Instead, free up some more bits from the refCount. + Remove JSCell* asCell(JSValue) in favor of only using + JSValue::asCell(). - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::cost): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::): - * wtf/StringHashFunctions.h: - (WTF::stringHash): + * API/APICast.h: + (toRef): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::testPrototype): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/GetterSetter.h: + (JSC::asGetterSetter): + * runtime/JSByteArray.h: + (JSC::asByteArray): + * runtime/JSCell.h: + (JSC::JSCell::getCallData): + (JSC::JSCell::getConstructData): + * runtime/JSString.h: + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::asString): + * runtime/JSValue.h: + * runtime/Operations.cpp: + (JSC::jsIsObjectType): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + * runtime/Protect.h: + (JSC::gcProtect): + (JSC::gcUnprotect): -2010-01-15 Gavin Barraclough <barraclough@apple.com> +2010-10-27 Chao-ying Fu <fu@mips.com> Reviewed by Oliver Hunt. - https://bugs.webkit.org/show_bug.cgi?id=33731 - Remove uses of PtrAndFlags from JIT data stuctures. - - These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid - permutation of pointer states in MethodCallLinkInfo to represent the removed bits. - - * bytecode/CodeBlock.h: - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::MethodCallLinkInfo): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - * jit/JIT.cpp: - (JSC::JIT::unlinkCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchMethodCallProto): - * runtime/UString.h: - -2010-01-16 Maciej Stachowiak <mjs@apple.com> + Support emit_op_mod() for MIPS on JSVALUE32_64 + https://bugs.webkit.org/show_bug.cgi?id=46511 - Reviewed by Oliver Hunt. + This patch uses MIPS div instructions for op_mod to improve performance. - Cache JS string values made from DOM strings (Dromaeo speedup) - https://bugs.webkit.org/show_bug.cgi?id=33768 - <rdar://problem/7353576> + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): - * runtime/JSString.h: - (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional - finalizer callback, for the benefit of weak-referencing caches. - (JSC::): - (JSC::Fiber::JSString): - (JSC::Fiber::~JSString): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer. - * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself. +2010-10-27 Brent Fulgham <bfulgham@webkit.org> -2010-01-15 Sam Weinig <sam@webkit.org> + Unreviewed build correction. - Reviewed by Maciej Stachowiak. + * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is + turned off in the WinCairo port. This isn't supported (yet.) - Fix for <rdar://problem/7548432> - Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc. +2010-10-27 Chris Rogers <crogers@google.com> - * runtime/Operations.h: - (JSC::jsLess): + Reviewed by Chris Marrin. -2010-01-14 Geoffrey Garen <ggaren@apple.com> + Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit + https://bugs.webkit.org/show_bug.cgi?id=48279 - Reviewed by Oliver Hunt. + * Configurations/FeatureDefines.xcconfig: - REGRESISON: Google maps buttons not working properly - https://bugs.webkit.org/show_bug.cgi?id=31871 +2010-10-27 Brian Weinstein <bweinstein@apple.com> - REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when - getting directions for a second time - https://bugs.webkit.org/show_bug.cgi?id=33446 - - SunSpider and v8 report no change. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case - flattening the dictionary changed any of its offsets. + Windows build fix. * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): ditto + (JSC::jitThrow): -2010-01-14 Gavin Barraclough <barraclough@apple.com> +2010-10-27 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. - https://bugs.webkit.org/show_bug.cgi?id=33705 - UStringImpl::create() should use internal storage - - When creating a UStringImpl copying of a UChar*, we can use an internal buffer, - by calling UStringImpl::tryCreateUninitialized(). - - Also, remove duplicate of copyChars from JSString, call UStringImpl's version. - - Small (max 0.5%) progression on Sunspidey. - - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/UStringImpl.h: - (JSC::UStringImpl::create): + Bug 48365 - Remove output parameters from JITStackFrame -2010-01-14 Gavin Barraclough <barraclough@apple.com> + The JIT stub functions presently use the stackframe to provide a couple of additional return values. + * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property. + * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property. - Reviewed by Sam Weinig. + Change exception returns such that exceptions are always returned on JSGlobalData::exception. + Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0. - Make naming & behaviour of UString[Impl] methods more consistent. - https://bugs.webkit.org/show_bug.cgi?id=33702 - - UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes - that it should assume ownership of the provided buffer (with UString::createNonCopying() - and UStringImpl::createCopying() providing the alternate behaviours). Unify on create() - taking a copy of the provided buffer. For non-copying cases, use the name 'adopt', and - make this method take a Vector<UChar>&. For cases where non-copying construction was being - used, other than from a Vector<UChar>, change the code to allocate the storage along with - the UStringImpl using UStringImpl::createUninitialized(). (The adopt() method also more - closely matches that of WebCore::StringImpl). - - Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible - behaviours, in that the UString form sets the provided UChar* to a null or non-null value to - indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to - indicate when allocation has failed (potentially leaving the output Char* uninitialized). - This is also incompatible with WebCore::StringImpl's behaviour, in that - StringImpl::createUninitialized() will CRASH() if unable to allocate. Some uses of - createUninitialized() in JSC are unsafe, since they do not test the result for null. - UStringImpl's indication is preferable, since we may want a successful call to set the result - buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized() - returns the empty string, which seems reasonable to catch bugs early). UString's method - cannot support UStringImpl's behaviour directly, since it returns an object rather than a - pointer. - - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized() - - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(), - with current behaviour, make createUninitialized() crash on failure to allocate. - - make cases in JSC that do not check the result call createUninitialized(), and cases that do - check call tryCreateUninitialized(). - - Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl. - - * API/JSClassRef.cpp: - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + (JSC::CachedCall::call): + * interpreter/CallFrame.h: + (JSC::ExecState::exception): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + * interpreter/Interpreter.h: + * jit/JITCode.h: + (JSC::JITCode::execute): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_catch): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_catch): + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC::jitThrow): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/Identifier.cpp: - (JSC::CStringTranslator::translate): - (JSC::UCharBufferTranslator::translate): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/Lookup.cpp: - (JSC::HashTable::createTable): - * runtime/Lookup.h: - (JSC::HashTable::entry): - * runtime/StringBuilder.h: - (JSC::StringBuilder::release): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + * runtime/CallData.cpp: + (JSC::call): + * runtime/Completion.cpp: + (JSC::evaluate): + * runtime/ConstructData.cpp: + (JSC::construct): + * runtime/ExceptionHelpers.cpp: + (JSC::createErrorForInvalidGlobalAssignment): + (JSC::throwOutOfMemoryError): + (JSC::throwStackOverflowError): + * runtime/ExceptionHelpers.h: + * runtime/JSArray.cpp: + (JSC::JSArray::sort): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/Structure.cpp: - (JSC::Structure::despecifyDictionaryFunction): - (JSC::Structure::get): - (JSC::Structure::despecifyFunction): - (JSC::Structure::put): - (JSC::Structure::remove): - (JSC::Structure::insertIntoPropertyMapHashTable): - (JSC::Structure::checkConsistency): - * runtime/Structure.h: - (JSC::Structure::get): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTableHash::hash): - * runtime/UString.cpp: - (JSC::createRep): - (JSC::UString::UString): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::adopt): - (JSC::IdentifierRepHash::hash): - (JSC::makeString): - * runtime/UStringImpl.h: - (JSC::UStringImpl::adopt): - (JSC::UStringImpl::create): - (JSC::UStringImpl::createUninitialized): - (JSC::UStringImpl::tryCreateUninitialized): - (JSC::UStringImpl::existingHash): + (JSC::stringProtoFuncReplace): -2010-01-13 Kent Hansen <kent.hansen@nokia.com> +2010-10-27 Gabor Loki <loki@webkit.org> Reviewed by Oliver Hunt. - JSON.stringify and JSON.parse needlessly process properties in the prototype chain - https://bugs.webkit.org/show_bug.cgi?id=33053 - - * runtime/JSONObject.cpp: - (JSC::Stringifier::Holder::appendNextProperty): - (JSC::Walker::walk): - -2010-01-13 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (buildfix). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-13 Alexey Proskuryakov <ap@apple.com> + https://bugs.webkit.org/show_bug.cgi?id=48060 + Speed up op_jeq_null and op_jneq_null. - Reviewed by Darin Adler. + For both opcodes the NullTag and UndefinedTag are checked to control the + jump. These values can be simply checked by AboveOrEqual or Below + condition if they are the two highest unsigned integers from JSValue's + Tag field. - https://bugs.webkit.org/show_bug.cgi?id=33641 - Assertion failure in Lexer.cpp if input stream ends while in string escape + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + * runtime/JSValue.h: - Test: fast/js/end-in-string-escape.html +2010-10-25 Geoffrey Garen <ggaren@apple.com> - * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the - assertion a chance to fire. + Reviewed by Oliver Hunt. -2010-01-13 Gavin Barraclough <barraclough@apple.com> + https://bugs.webkit.org/show_bug.cgi?id=41948 + REGRESSION(r60392): Registerfile can be unwound too far following an exception + + SunSpider reports no change. - Reviewed by NOBODY (buildfix). + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): Walk the stack to calculate the high + water mark currently in use. It's not safe to assume that the current + CallFrame's high water mark is the highest high water mark because + calls do not always set up at the end of a CallFrame. A large caller + CallFrame can encompass a small callee CallFrame. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock + in the CallFrame of a host call, like the Interpreter does, instead of + leaving the CodeBlock field uninitialized. The backtracing code requires + a valid CodeBlock field in each CallFrame. -2010-01-13 Gavin Barraclough <barraclough@apple.com> +2010-10-27 Gabor Loki <loki@webkit.org> - Rubber stamped by Sam Weinig & Darin Adler. + Reviewed by Csaba Osztrogonác. - Three quick fixes to UStringImpl. - - The destroy() method can be switched back to a normal destructor; since we've switched - the way we protect static strings to be using an odd ref-count the destroy() won't abort. - - The cost() calculation logic was wrong. If you have multiple JSStrings wrapping substrings - of a base string, they would each report the full cost of the base string to the heap. - Instead we should only be reporting once for the base string. - - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick - up the implementation from the parent class. + Add cmn to branch32(reg, imm) on ARM + https://bugs.webkit.org/show_bug.cgi?id=48062 - * JavaScriptCore.exp: - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::~UStringImpl): - * runtime/UStringImpl.h: - (JSC::UStringImpl::cost): - (JSC::UStringImpl::deref): + The conditional comparison can be done with cmn if the imm value is + negative and can fit into the cmn instruction. -2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::branch32): - Reviewed by Simon Hausmann. +2010-10-26 Oliver Hunt <oliver@apple.com> - [Qt] Split the build process in two different .pro files. - This allows qmake to be run once all source files are available. + Interpreter build fix. - * DerivedSources.pro: Added. - * JavaScriptCore.pri: Moved source generation to DerivedSources.pro - * pcre/pcre.pri: Moved source generation to DerivedSources.pro + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): -2010-01-12 Kent Hansen <kent.hansen@nokia.com> +2010-10-25 Oliver Hunt <oliver@apple.com> - Reviewed by Geoffrey Garen. + Reviewed by Gavin Barraclough. - [ES5] Implement Object.getOwnPropertyNames - https://bugs.webkit.org/show_bug.cgi?id=32242 + Remove exec and globalData arguments from jsNumber + https://bugs.webkit.org/show_bug.cgi?id=48270 - Add an extra argument to getPropertyNames() and getOwnPropertyNames() - (and all reimplementations thereof) that indicates whether non-enumerable - properties should be added. + Remove the now unused exec and globalData arguments from jsNumber + and mechanically update all users of jsNumber. - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertyNames): - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::getOwnPropertyNames): - * debugger/DebuggerActivation.h: + * API/JSValueRef.cpp: + (JSValueMakeNumber): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoad): + * bytecompiler/NodesCodegen.cpp: + (JSC::ArrayNode::emitBytecode): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (functionRun): * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertyNames): - * runtime/Arguments.h: - * runtime/CommonIdentifiers.h: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + * runtime/CachedTranscendentalFunction.h: + (JSC::CachedTranscendentalFunction::operator()): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + * runtime/Error.cpp: + (JSC::addErrorSourceInfo): + (JSC::addErrorDivotInfo): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertyNames): - * runtime/JSArray.h: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertyNames): + (JSC::JSByteArray::JSByteArray): * runtime/JSByteArray.h: + (JSC::JSByteArray::getIndex): * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertyNames): - * runtime/JSFunction.h: - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::getOwnPropertyNames): - * runtime/JSNotAnObject.h: - * runtime/JSObject.cpp: - (JSC::getClassPropertyNames): - (JSC::JSObject::getPropertyNames): - (JSC::JSObject::getOwnPropertyNames): - * runtime/JSObject.h: - * runtime/JSVariableObject.cpp: - (JSC::JSVariableObject::getOwnPropertyNames): - * runtime/JSVariableObject.h: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::lengthGetter): + (JSC::JSFunction::getOwnPropertyDescriptor): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + * runtime/JSNumberCell.h: + (JSC::JSValue::JSValue): + (JSC::jsNaN): + (JSC::JSValue::toJSNumber): + * runtime/JSONObject.cpp: + (JSC::unwrapBoxedPrimitive): + (JSC::PropertyNameForFunctionCall::value): + (JSC::JSONStringify): + * runtime/JSString.cpp: + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::JSString::getStringPropertySlot): + * runtime/JSValue.h: + (JSC::jsDoubleNumber): + (JSC::jsNumber): + (JSC::jsNaN): + (JSC::JSValue::JSValue): + (JSC::JSValue::toJSNumber): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + (JSC::numberConstructorNaNValue): + (JSC::numberConstructorNegInfinity): + (JSC::numberConstructorPosInfinity): + (JSC::numberConstructorMaxValue): + (JSC::numberConstructorMinValue): + (JSC::constructWithNumberConstructor): + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): * runtime/ObjectConstructor.cpp: (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyNames): - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertyNames): - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyNames): - * runtime/StringObject.h: - * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument. - (JSC::Structure::getPropertyNames): - * runtime/Structure.h: - (JSC::): - -2010-01-12 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. + * runtime/Operations.cpp: + (JSC::jsAddSlowCase): + * runtime/Operations.h: + (JSC::jsAdd): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + (JSC::RegExpMatchesArray::fillArrayInstance): + * runtime/RegExpObject.cpp: + (JSC::regExpObjectLastIndex): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncLocaleCompare): - https://bugs.webkit.org/show_bug.cgi?id=33540 - Make it possible to build in debug mode with assertions disabled +2010-10-25 David Tapuska <dtapuska@rim.com> - * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): - * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable): - * wtf/FastMalloc.cpp: - * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity): - * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex): + Reviewed by David Kilzer. -2009-11-23 Yong Li <yoli@rim.com> + Enable VFP if our compiler settings indicated we had a hardware + VFP. - Reviewed by Adam Treat. + https://bugs.webkit.org/show_bug.cgi?id=46096 - Make GIF decoder support down-sampling - https://bugs.webkit.org/show_bug.cgi?id=31806 - - * platform/image-decoders/ImageDecoder.cpp: - (WebCore::ImageDecoder::upperBoundScaledY): - (WebCore::ImageDecoder::lowerBoundScaledY): - * platform/image-decoders/ImageDecoder.h: - (WebCore::RGBA32Buffer::scaledRect): - (WebCore::RGBA32Buffer::setScaledRect): - (WebCore::ImageDecoder::scaledSize): - * platform/image-decoders/gif/GIFImageDecoder.cpp: - (WebCore::GIFImageDecoder::sizeNowAvailable): - (WebCore::GIFImageDecoder::initFrameBuffer): - (WebCore::copyOnePixel): - (WebCore::GIFImageDecoder::haveDecodedRow): - (WebCore::GIFImageDecoder::frameComplete): - -2010-01-12 Adam Barth <abarth@webkit.org> + * assembler/MacroAssemblerARM.cpp: + (JSC::isVFPPresent): - Reviewed by Eric Seidel. +2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com> - ecma/Date/15.9.5.12-1.js fails every night at midnight - https://bugs.webkit.org/show_bug.cgi?id=28041 + Unreviewed, rolling out r70451. + http://trac.webkit.org/changeset/70451 + https://bugs.webkit.org/show_bug.cgi?id=48249 - Change the test to use a concrete time instead of "now". + Broke set-unloaded-frame-location.html under Qt (Requested by + caseq on #webkit). - * tests/mozilla/ecma/Date/15.9.5.10-1.js: - * tests/mozilla/ecma/Date/15.9.5.12-1.js: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Removed. -2010-01-11 Csaba Osztrogonác <ossy@webkit.org> +2010-10-25 Patrick Gansterer <paroga@webkit.org> - Reviewed by Ariya Hidayat. + Reviewed by David Kilzer. - [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) + Replace _countof with WTF_ARRAY_LENGTH + https://bugs.webkit.org/show_bug.cgi?id=48229 * wtf/Platform.h: -2010-01-11 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=33481 - Uninitialized data members in ArrayStorage - - SunSpider reports no change. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Initialize missing data members in the two cases - where we don't use fastZeroedMalloc, so it doesn't happen automatically. - -2010-01-11 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=33480 - - Improve debugging reliability for WTF on Windows. - Store WTF static library's PDB file into a better location. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2010-01-11 Steve Falkenburg <sfalken@apple.com> - - Windows build fix. - Remove extraneous entries from def file causing build warning. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-01-10 Kent Hansen <kent.hansen@nokia.com> - - Reviewed by Darin Adler. - - RegExp.prototype.toString returns "//" for empty regular expressions - https://bugs.webkit.org/show_bug.cgi?id=33319 - - "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA. - - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - - * tests/mozilla/ecma_2/RegExp/properties-001.js: - (AddRegExpCases): - * tests/mozilla/js1_2/regexp/toString.js: - Update relevant Mozilla tests (Mozilla has had this behavior since November 2003). - -2010-01-10 Darin Adler <darin@apple.com> - - * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs. - * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs. - * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs. - * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs. - * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs. - * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs. - * tests/mozilla/ecma/jsref.js: Modified property allow-tabs. - * tests/mozilla/ecma/shell.js: Modified property allow-tabs. - * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs. - * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs. - * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs. - * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs. - * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs. - * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs. - * tests/mozilla/ecma_2/shell.js: Added property allow-tabs. - * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs. - * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs. - * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs. - * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs. - * tests/mozilla/importList.html: Added property allow-tabs. - * tests/mozilla/js1_1/shell.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs. - * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs. - * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs. - * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs. - * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs. - * tests/mozilla/js1_2/String/match.js: Added property allow-tabs. - * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs. - * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs. - * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs. - * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs. - * tests/mozilla/js1_2/jsref.js: Added property allow-tabs. - * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs. - * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs. - * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs. - * tests/mozilla/js1_2/shell.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs. - * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs. - * tests/mozilla/js1_3/shell.js: Added property allow-tabs. - * tests/mozilla/js1_4/shell.js: Added property allow-tabs. - * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs. - * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs. - * tests/mozilla/menuhead.html: Added property allow-tabs. - * tests/mozilla/mklistpage.pl: Added property allow-tabs. - * tests/mozilla/runtests.pl: Added property allow-tabs. - -2010-01-08 Daniel Bates <dbates@webkit.org> +2010-10-25 Peter Rybin <peter.rybin@gmail.com> Reviewed by Adam Barth. - https://bugs.webkit.org/show_bug.cgi?id=33417 - - Cleans up style errors exposed by the patch for bug #33198. - Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?" - errors reported by check-webkit-style. - - No functionality was changed. So, no new tests. + HTML parser should provide script column position within HTML document to JavaScript engine + https://bugs.webkit.org/show_bug.cgi?id=45271 - * wtf/Platform.h: - -2010-01-08 Kent Hansen <kent.hansen@nokia.com> - - Reviewed by Eric Seidel. - - Don't store RegExp flags string representation - https://bugs.webkit.org/show_bug.cgi?id=33321 - - It's unused; the string representation is reconstructed from flags. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: + Adds TextPosition* classes -- a structure that stores line/column/generation + level coordinates inside text document. Adds *BasedNumber classes -- typesafe int + wrappers that emphasize whether int number is used as zero-based or + one-based. -2010-01-08 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Memory use grows grows possibly unbounded in this JavaScript Array test case - https://bugs.webkit.org/show_bug.cgi?id=31675 - - This fixes one observed bug in this test case, which is that - arrays don't report extra cost for the sparse value maps. - - SunSpider reports a small speedup. - - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): Report extra memory cost for - the sparse value map. - * runtime/JSArray.h: - -2010-01-08 Yong Li <yoli@rim.com> - - Reviewed by Darin Adler. - - Remove unnecessary #include from FastMalloc.cpp - https://bugs.webkit.org/show_bug.cgi?id=33393 - - * wtf/FastMalloc.cpp: - -2010-01-08 Eric Seidel <eric@webkit.org> - - No review, rolling out r52983. - http://trac.webkit.org/changeset/52983 - https://bugs.webkit.org/show_bug.cgi?id=33321 - - Broke 59 JavaScriptCore tests. I don't think Kent knew about - run-javascriptcore-tests. Sadly neither does the commit-bot, - yet. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - (JSC::RegExp::flags): - -2010-01-08 Eric Seidel <eric@webkit.org> - - No review, rolling out r52981. - http://trac.webkit.org/changeset/52981 - https://bugs.webkit.org/show_bug.cgi?id=33319 - - Caused two JS tests to start failing: - ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js - - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - -2010-01-08 Kent Hansen <kent.hansen@nokia.com> - - Reviewed by Darin Adler. - - Don't store RegExp flags string representation - https://bugs.webkit.org/show_bug.cgi?id=33321 - - It's unused; the string representation is reconstructed from flags. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - -2010-01-08 Kent Hansen <kent.hansen@nokia.com> - - Reviewed by Darin Adler. - - RegExp.prototype.toString returns "//" for empty regular expressions - https://bugs.webkit.org/show_bug.cgi?id=33319 - - "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA. - - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - -2010-01-08 Norbert Leser <norbert.leser@nokia.com> - - Reviewed by Darin Adler. - - RVCT compiler with "-Otime -O3" optimization tries to optimize out - inline new'ed pointers that are passed as arguments. - Proposed patch assigns new'ed pointer explicitly outside function call. - - https://bugs.webkit.org/show_bug.cgi?id=33084 - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - -2010-01-08 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT - https://bugs.webkit.org/show_bug.cgi?id=33203 - - * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function. - (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code. - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::getLdrImmAddress): Use inline function. - (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto. - (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush. - (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch. - (JSC::ARMAssembler::linkCall): Ditto. - (JSC::ARMAssembler::relinkCall): Ditto. - -2010-01-07 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled - https://bugs.webkit.org/show_bug.cgi?id=33311 - - Move compileGetDirectOffset function to common part of JSVALUE32 - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - -2010-01-07 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Maciej Stachowiak. - - Allow call sites to determine if ASSERT_* and LOG_* macros are operational - https://bugs.webkit.org/show_bug.cgi?id=33020 + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Added. + (WTF::TextPosition::TextPosition): + (WTF::TextPosition::minimumPosition): + (WTF::TextPosition::belowRangePosition): + (WTF::ZeroBasedNumber::fromZeroBasedInt): + (WTF::ZeroBasedNumber::ZeroBasedNumber): + (WTF::ZeroBasedNumber::zeroBasedInt): + (WTF::ZeroBasedNumber::base): + (WTF::ZeroBasedNumber::belowBase): + (WTF::OneBasedNumber::fromOneBasedInt): + (WTF::OneBasedNumber::OneBasedNumber): + (WTF::OneBasedNumber::oneBasedInt): + (WTF::OneBasedNumber::convertAsZeroBasedInt): + (WTF::OneBasedNumber::convertToZeroBased): + (WTF::OneBasedNumber::base): + (WTF::OneBasedNumber::belowBase): + (WTF::toZeroBasedTextPosition): + (WTF::toOneBasedTextPosition): + (WTF::ZeroBasedNumber::convertToOneBased): + +2010-10-24 Kwang Yul Seo <skyul@company100.net> - * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED, - ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support - variadic macros. Refactor for better readibility. + Reviewed by David Kilzer. -2010-01-07 Daniel Bates <dbates@rim.com> + Check endianness with __BIG_ENDIAN in RVCT. + https://bugs.webkit.org/show_bug.cgi?id=46122 - Reviewed by Eric Seidel. + RVCT defines __BIG_ENDIAN if compiling for a big-endian target. - https://bugs.webkit.org/show_bug.cgi?id=32987 + * wtf/Platform.h: - Added ENABLE_XHTMLMP flag. Disabled by default. +2010-10-24 Dan Bernstein <mitz@apple.com> - * Configurations/FeatureDefines.xcconfig: + Rubber-stamped by Dave Kilzer. -2010-01-07 Laszlo Gombos <laszlo.1.gombos@nokia.com> + Removed empty directories. - Reviewed by Gavin Barraclough. + * JavaScriptCore: Removed. + * JavaScriptCore/runtime: Removed. - [Symbian] Port ARM traditional JIT Trampolines to RVCT - https://bugs.webkit.org/show_bug.cgi?id=30552 +2010-10-24 Patrick Gansterer <paroga@webkit.org> - Take the GCC implementation and mechanically convert - it to RVCT syntax. + Unreviewed, fix typo of last build fix. - Use 'bx rX' instead of 'mov pc, rX' when it is available. + * wtf/DateMath.cpp: - Developed in cooperation with Iain Campbell and Gabor Loki. +2010-10-24 Patrick Gansterer <paroga@webkit.org> - * JavaScriptCore.pri: Extra step to generate RVCT stubs. The - script generation intentionally executed all the time not just - for RVCT targets. + Unreviewed build fix for chromium. - * create_rvct_stubs: Added. Perl script to expand precompiler macros - for RVCT assembler - the template is defined in JITStubs.cpp. + * wtf/DateMath.cpp: Added missing include. - * jit/JITStubs.cpp: - (JSC::ctiTrampoline): - (JSC::ctiVMThrowTrampoline): - (JSC::ctiOpThrowNotCaught): +2010-10-24 Patrick Gansterer <paroga@webkit.org> -2010-01-07 Geoffrey Garen <ggaren@apple.com> + Reviewed by David Kilzer. - Reviewed by Sam Weinig. + Add WTF_ARRAY_LENGTH macro to WTF + https://bugs.webkit.org/show_bug.cgi?id=32828 - Fix a crash seen on the buildbots. + Unify the different implementations and usages. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): Disable specific function tracking here, - instead of in WebCore, to ensure that the disabling happens before a - specific function can be registered. - -2010-01-07 Alexey Proskuryakov <ap@apple.com> + (JSC::JSGlobalObject::reset): + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendQuotedString): + (JSC::Stringifier::toJSON): + (JSC::Stringifier::appendStringifiedValue): + * runtime/UString.cpp: + (JSC::UString::number): + * wtf/DateMath.cpp: + (WTF::parseDateFromNullTerminatedCharacters): + * wtf/StdLibExtras.h: - Mac build fix. +2010-10-24 Dirk Schulze <krit@webkit.org> - * JavaScriptCore.exp: Export new JSGlobalData static data members. + Reviewed by Nikolas Zimmermann. -2010-01-07 Alexey Proskuryakov <ap@apple.com> + Filter example Chiseled from SVG Wow! is slow + https://bugs.webkit.org/show_bug.cgi?id=48174 - Reviewed by Geoffrey Garen. + Added 'using WTF::ByteArray;' at the end of ByteArray.h - https://bugs.webkit.org/show_bug.cgi?id=33057 - REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows + * wtf/ByteArray.h: - <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark +2010-10-24 Patrick Gansterer <paroga@webkit.org> - Test: fast/js/webcore-string-comparison.html + Reviewed by David Kilzer. - In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore - got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was - not exported, objects created from WebCore got a different vptr, and JavaScriptCore - optimizations that relied on vptr of all JSString objects being equal failed. + Inline WTF::bitwise_cast and fix style + https://bugs.webkit.org/show_bug.cgi?id=48208 - * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as - JS_EXPORTDATA, but it clearly needed a new name. + * wtf/StdLibExtras.h: + (WTF::bitwise_cast): + (WTF::bitCount): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::storeVPtrs): - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::createNonDefault): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::sharedInstance): - * runtime/JSGlobalData.h: - Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to - assert vptr correctness in object destructors (which don't have access to JSGlobalData, - and even Heap::heap(this) will fail for fake objects created from storeVPtrs()). - - * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be. - It's important to assert in destructor, because MSVC changes the vptr after constructor - is invoked. - * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto. - * runtime/JSByteArray.h: Ditto. - * runtime/JSFunction.h: Ditto. - * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto. - - * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another - one. - - * runtime/JSString.h: Export JSString class together with its vftable, and tell other - libraries tp import it. This is needed on platforms that have a separate JavaScriptCore - dynamic library - and on Mac, we already did the export via JavaScriptCore.exp. - (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be. - (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building - JavaScriptCore itself). - (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary. - (JSC::jsSingleCharacterSubstring): Ditto. - (JSC::jsNontrivialString): Ditto. - (JSC::jsString): Ditto. - (JSC::jsSubstring): Ditto. - (JSC::jsOwnedString): Ditto. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static - JSGlobalData members that are used in WebCore via inline functions. - -2010-01-07 Geoffrey Garen <ggaren@apple.com> +2010-10-23 Xan Lopez <xlopez@igalia.com> Reviewed by Sam Weinig. - Safari memory usage skyrockets using new Google AdWords interface - https://bugs.webkit.org/show_bug.cgi?id=33343 - - The memory use was caused by the global object creating too many structures - as it thrashed between different specific functions. - - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::despecifyFunctionTransition): - (JSC::Structure::addAnonymousSlotsTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::despecifyAllFunctions): - * runtime/Structure.h: - (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count - for specific functions. Disable specific function tracking once the - thrash count has been hit. - -2010-01-07 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Simon Hausmann. - - [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes. - - * JavaScriptCore.pri: - -2010-01-07 Zoltan Horvath <zoltan@webkit.org> + Unify globalData APIs + https://bugs.webkit.org/show_bug.cgi?id=47969 - Reviewed by Holger Freyther. + Make JSGlobalObject::globalData return a reference and adapt + callers. This unifies the API with the existing + CallFrame::globalData, which also returns a reference. - [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1 - https://bugs.webkit.org/show_bug.cgi?id=33312 - - Using of operator += cause compile error on Mac, so it is changed to - "= static_cast<AllocAlignmentInteger*>(old_ptr) + 1". - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::realloc): - -2010-01-07 Zoltan Horvath <zoltan@webkit.org> - - Reviewed by Holger Freyther. - - [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1 - https://bugs.webkit.org/show_bug.cgi?id=33312 + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * interpreter/CallFrame.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + * jsc.cpp: + (runWithScripts): + * parser/JSParser.cpp: + (JSC::jsParse): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + * runtime/Error.cpp: + (JSC::createError): + (JSC::createEvalError): + (JSC::createRangeError): + (JSC::createReferenceError): + (JSC::createSyntaxError): + (JSC::createTypeError): + (JSC::createURIError): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::globalData): - Remove pByte (committed in r42344 from #20422), because pByte doesn't - exist and it is unnecessary. +2010-10-23 Dimitri Glazkov <dglazkov@chromium.org> - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::realloc): + Unreviewed, rolling out r70369. + http://trac.webkit.org/changeset/70369 + https://bugs.webkit.org/show_bug.cgi?id=47974 -2010-01-06 Gavin Barraclough <barraclough@apple.com> + Caused weird artifacts in expected results. - QT build fix. + * wtf/Platform.h: - * runtime/Identifier.cpp: - (JSC::createIdentifierTableSpecific): +2010-10-23 Martin Robinson <mrobinson@igalia.com> -2010-01-06 Gavin Barraclough <barraclough@apple.com> + Reviewed by Xan Lopez. - Windows build fix part I. + Crashes randomly in cairo_scaled_font_destroy + https://bugs.webkit.org/show_bug.cgi?id=46794 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr + goes away this should probably be handled in the future via some special + hooks in RefCounted (or its contained type). -2010-01-06 Dan Bernstein <mitz@apple.com> + * wtf/PlatformRefPtr.h: + (WTF::PlatformRefPtr::~PlatformRefPtr): + (WTF::PlatformRefPtr::clear): + (WTF::::operator): - Build fix +2010-10-22 Adam Roben <aroben@apple.com> - * runtime/Identifier.cpp: - (JSC::createIdentifierTableSpecificCallback): + Remove the QuartzCorePresent.h mechanism -2010-01-05 Gavin Barraclough <barraclough@apple.com> + This header was used to detect whether QuartzCore headers were present + on the system. Everyone should have these headers now so we no longer + need to detect. Reviewed by Sam Weinig. - https://bugs.webkit.org/show_bug.cgi?id=33236 - Remove m_identifierTable pointer from UString - - Currently every string holds a pointer so that during destruction, - if a string has been used as an identifier, it can remove itself - from the table. By instead accessing the identifierTable via a - thread specific tracking the table associated with the current - globaldata, we can save the memory cost of this pointer. - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - - - change the API shims to track the identifierTable of the current JSGlobalData. - - * API/JSContextRef.cpp: - (JSContextGroupCreate): - - - update creation of JSGlobalData for API usage to use new create method. - - fix shim instanciation bug in JSGlobalContextCreateInGroup. - - * JavaScriptCore.exp: - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - - - add asserts to check the identifierTable is being tracked correctly. - - * runtime/Identifier.cpp: - (JSC::IdentifierTable::~IdentifierTable): - (JSC::IdentifierTable::add): - (JSC::Identifier::remove): - (JSC::Identifier::checkSameIdentifierTable): - (JSC::createIdentifierTableSpecificCallback): - (JSC::createIdentifierTableSpecific): - (JSC::createDefaultDataSpecific): - - - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable. - - Define methods to access the thread specific identifier tables. - - * runtime/Identifier.h: - (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData): - (JSC::defaultIdentifierTable): - (JSC::setDefaultIdentifierTable): - (JSC::currentIdentifierTable): - (JSC::setCurrentIdentifierTable): - (JSC::resetCurrentIdentifierTable): - - - Declare methods to access the thread specific identifier tables. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::createNonDefault): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::sharedInstance): + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove + code to generate QuartzCorePresent.h. - - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread. + * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and + collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef. - * runtime/JSGlobalData.h: - * runtime/UStringImpl.cpp: - (JSC::UStringImpl::destroy): +2010-10-22 Adam Barth <abarth@webkit.org> - - destroy() method should be using isIdentifier(). + Unreviewed, rolling out r70290. + http://trac.webkit.org/changeset/70290 + https://bugs.webkit.org/show_bug.cgi?id=48111 - * runtime/UStringImpl.h: - (JSC::UStringImpl::isIdentifier): - (JSC::UStringImpl::setIsIdentifier): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::UStringImpl): + Undelete Android build files. - - replace m_identifierTable with a single m_isIdentifier bit. + * Android.mk: Added. - * wtf/StringHashFunctions.h: - (WTF::stringHash): +2010-10-22 Zoltan Herczeg <zherczeg@webkit.org> - - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier. + Reviewed by Csaba Osztrogonác. -2009-12-25 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Eric Seidel. + JSC interpreter regressions after r69940 + https://bugs.webkit.org/show_bug.cgi?id=47839 - Buildfix for WinCE + style fixes. - https://bugs.webkit.org/show_bug.cgi?id=32939 + Wrong "if": It should test whether the result exists, + and not the opposite. It is an interpreter bug, hence + the bots does not capture it. - * jsc.cpp: - (functionPrint): - (functionQuit): - (parseArguments): - (fillBufferWithContentsOfFile): - -2010-01-05 Patrick Gansterer <paroga@paroga.com> + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): - Reviewed by Eric Seidel. +2010-10-21 Adam Barth <abarth@webkit.org> - WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)). - https://bugs.webkit.org/show_bug.cgi?id=33205 + Reviewed by David Levin. - * jit/ExecutableAllocator.h: + Remove Android build system + https://bugs.webkit.org/show_bug.cgi?id=48111 -2010-01-05 Patrick Gansterer <paroga@paroga.com> + * Android.mk: Removed. - Reviewed by Darin Adler. +2010-10-21 Kwang Yul Seo <skyul@company100.net> - Added compiler error for unsupported platforms. - https://bugs.webkit.org/show_bug.cgi?id=33112 + Reviewed by Kent Tamura. - * jit/JITStubs.cpp: + [BREWMP] Add a String constructor which takes AECHAR* + https://bugs.webkit.org/show_bug.cgi?id=45043 -2010-01-05 Gabor Loki <loki@webkit.org> + Add String(const AECHAR*) constructor for convenience. - Reviewed by Maciej Stachowiak. + * wtf/text/WTFString.h: - Follow r52729 in ARMAssembler. - https://bugs.webkit.org/show_bug.cgi?id=33208 +2010-10-21 Carlos Garcia Campos <cgarcia@igalia.com> - Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION + Reviewed by Martin Robinson. - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7 - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::bkpt): + [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk + https://bugs.webkit.org/show_bug.cgi?id=47896 -2010-01-05 Maciej Stachowiak <mjs@apple.com> + * wtf/gobject/GTypedefs.h: - Unreviewed build fix for Gtk+ +2010-10-21 Adam Barth <abarth@webkit.org> - Don't use // comments in Platform.h, at least some of them seem to make the version of GCC - used on the Gtk buildbot unhappy. + Unreviewed, rolling out r70174. + http://trac.webkit.org/changeset/70174 + https://bugs.webkit.org/show_bug.cgi?id=41948 - * wtf/Platform.h: + This patch reverts a change that causes + http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash. -2010-01-04 Maciej Stachowiak <mjs@apple.com> + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): - Reviewed by Darin Fisher. +2010-10-20 Simon Fraser <simon.fraser@apple.com> - Reorganize, document and rename OS() platform macros. - https://bugs.webkit.org/show_bug.cgi?id=33198 + Fix the EFL build. - * wtf/Platform.h: Rename, reorganize and document OS() macros. + * wtf/CMakeLists.txt: - Adapt to name changes. Also fixed a few incorrect OS checks. +2010-10-20 Simon Fraser <simon.fraser@apple.com> - * API/JSContextRef.cpp: - * assembler/MacroAssemblerARM.cpp: - (JSC::isVFPPresent): - * assembler/MacroAssemblerX86Common.h: - * bytecode/SamplingTool.cpp: - * config.h: - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::grow): - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorFixedVMPool.cpp: - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorSymbian.cpp: - * jit/ExecutableAllocatorWin.cpp: - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - * jsc.cpp: - (main): - * parser/Grammar.y: - * profiler/ProfileNode.cpp: - (JSC::getCount): - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlockPtr): - (JSC::currentThreadStackBase): - (JSC::getCurrentPlatformThread): - (JSC::suspendThread): - (JSC::resumeThread): - (JSC::getPlatformThreadRegisters): - (JSC::otherThreadStackPointer): - * runtime/Collector.h: - * runtime/DateConstructor.cpp: - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreading): - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackPosix.cpp: - * runtime/MarkStackSymbian.cpp: - * runtime/MarkStackWin.cpp: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncLastIndexOf): - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): - * runtime/UString.cpp: - (JSC::UString::from): - * wtf/Assertions.cpp: - * wtf/Assertions.h: - * wtf/CurrentTime.cpp: - (WTF::lowResUTCTime): - * wtf/CurrentTime.h: - (WTF::getLocalTime): - * wtf/DateMath.cpp: - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_ThreadCache::InitModule): - (WTF::TCMallocStats::): - * wtf/FastMalloc.h: - * wtf/MathExtras.h: - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - * wtf/StringExtras.h: - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - * wtf/TCSystemAlloc.cpp: - * wtf/ThreadSpecific.h: - (WTF::::destroy): - * wtf/Threading.h: - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): - (WTF::isMainThread): - * wtf/ThreadingWin.cpp: - (WTF::wtfThreadEntryPoint): - (WTF::createThreadInternal): - * wtf/VMTags.h: - * wtf/unicode/icu/CollatorICU.cpp: - (WTF::Collator::userDefault): - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): + Fix Windows build: export needed symbols. -2010-01-04 Gustavo Noronha Silva <gns@gnome.org> - - Add missing files to the build system - make distcheck build fix. - - * GNUmakefile.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2010-01-04 Gavin Barraclough <barraclough@apple.com> +2010-10-19 Simon Fraser <simon.fraser@apple.com> - Reviewed by Sam Weinig, additional coding by Mark Rowe. + Reviewed by Gavin Barraclough. - https://bugs.webkit.org/show_bug.cgi?id=33163 - Add string hashing functions to WTF. - Use WTF's string hashing functions from UStringImpl. + https://bugs.webkit.org/show_bug.cgi?id=47851 + + Add methods to DecimalNumber to return the buffer length + required for decimal and exponential output. + + Make some of the DecimalNumber code non-inline (no + effect on Sunspider), adding DecimalNumber.cpp to various + build systems. + + Make some DecimalNumber methods 'const'. + * Android.mk: + * Android.v8.wtf.mk: * GNUmakefile.am: * JavaScriptCore.exp: * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/UStringImpl.cpp: - * runtime/UStringImpl.h: - (JSC::UStringImpl::computeHash): - * wtf/HashFunctions.h: - * wtf/StringHashFunctions.h: Added. - (WTF::stringHash): - -2010-01-04 Dmitry Titov <dimich@chromium.org> - - Not reviewed, attempt to fix ARM bulid. - - * wtf/Platform.h: + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * wtf/DecimalNumber.cpp: Added. + (WTF::DecimalNumber::bufferLengthForStringDecimal): + (WTF::DecimalNumber::bufferLengthForStringExponential): + (WTF::DecimalNumber::toStringDecimal): + (WTF::DecimalNumber::toStringExponential): + * wtf/DecimalNumber.h: + (WTF::DecimalNumber::sign): + (WTF::DecimalNumber::exponent): + (WTF::DecimalNumber::significand): + (WTF::DecimalNumber::precision): + * wtf/dtoa.cpp: + (WTF::dtoa): + * wtf/dtoa.h: + * wtf/wtf.pri: -2010-01-04 Gavin Barraclough <barraclough@apple.com> +2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com> - Rubber stamped by Geoff Garen. + Unreviewed, rolling out r70165. + http://trac.webkit.org/changeset/70165 + https://bugs.webkit.org/show_bug.cgi?id=48007 - Add an 'isIdentifier' to UStringImpl, use this where appropriate - (where previously 'identifierTable' was being tested). + It broke tests on Qt bot (Requested by Ossy on #webkit). - * API/JSClassRef.cpp: - (OpaqueJSClass::~OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * runtime/Identifier.cpp: - (JSC::Identifier::addSlowCase): - * runtime/Identifier.h: - (JSC::Identifier::add): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/UStringImpl.h: - (JSC::UStringImpl::isIdentifier): - -2010-01-04 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam "Shimmey Shimmey" Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=33158 - Refactor JSC API entry/exit to use RAII instead of copy/pasting code. - Make it easier to change set of actions taken when passing across the API boundary. - - * API/APIShims.h: Added. - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): - (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): - (JSC::APIEntryShim::APIEntryShim): - (JSC::APICallbackShim::APICallbackShim): - (JSC::APICallbackShim::~APICallbackShim): - * API/JSBase.cpp: - (JSEvaluateScript): - (JSCheckScriptSyntax): - (JSGarbageCollect): - (JSReportExtraMemoryCost): - * API/JSCallbackConstructor.cpp: - (JSC::constructJSCallback): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (JSC::::init): - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::construct): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::getOwnPropertyNames): - (JSC::::toNumber): - (JSC::::toString): - (JSC::::staticValueGetter): - (JSC::::callbackGetter): - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - (JSObjectMake): - (JSObjectMakeFunctionWithCallback): - (JSObjectMakeConstructor): - (JSObjectMakeFunction): - (JSObjectMakeArray): - (JSObjectMakeDate): - (JSObjectMakeError): - (JSObjectMakeRegExp): - (JSObjectGetPrototype): - (JSObjectSetPrototype): - (JSObjectHasProperty): - (JSObjectGetProperty): - (JSObjectSetProperty): - (JSObjectGetPropertyAtIndex): - (JSObjectSetPropertyAtIndex): - (JSObjectDeleteProperty): - (JSObjectCallAsFunction): - (JSObjectCallAsConstructor): - (JSObjectCopyPropertyNames): - (JSPropertyNameArrayRelease): - (JSPropertyNameAccumulatorAddName): - * API/JSValueRef.cpp: - (JSValueGetType): - (JSValueIsUndefined): - (JSValueIsNull): - (JSValueIsBoolean): - (JSValueIsNumber): - (JSValueIsString): - (JSValueIsObject): - (JSValueIsObjectOfClass): - (JSValueIsEqual): - (JSValueIsStrictEqual): - (JSValueIsInstanceOfConstructor): - (JSValueMakeUndefined): - (JSValueMakeNull): - (JSValueMakeBoolean): - (JSValueMakeNumber): - (JSValueMakeString): - (JSValueToBoolean): - (JSValueToNumber): - (JSValueToStringCopy): - (JSValueToObject): - (JSValueProtect): - (JSValueUnprotect): + * GNUmakefile.am: + * JavaScriptCore.gypi: * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Removed. -2010-01-04 Dan Bernstein <mitz@apple.com> +2010-10-20 Brian Weinstein <bweinstein@apple.com> - Reviewed by Ada Chan and Mark Rowe. + Reviewed by Adam Roben. - Updated copyright string + Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build + step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed. - * Info.plist: - * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: -2010-01-04 Adam Roben <aroben@apple.com> +2010-10-20 Dumitru Daniliuc <dumi@chromium.org> - No review, rolling out r52741. - http://trac.webkit.org/changeset/52741 - https://bugs.webkit.org/show_bug.cgi?id=33056 + Unreviewed, fixing the Win build. - * wtf/AlwaysInline.h: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: -2010-01-04 Patrick Gansterer <paroga@paroga.com> +2010-10-20 Geoffrey Garen <ggaren@apple.com> Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=41948 + REGRESSION(r60392): Registerfile can be unwound too far following an exception - Add cacheFlush support for WinCE - https://bugs.webkit.org/show_bug.cgi?id=33110 - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2010-01-04 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Adam Roben. - - Implement NO_RETURN for COMPILER(MSVC). - https://bugs.webkit.org/show_bug.cgi?id=33056 + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): Walk the stack to calculate the high + water mark currently in use. It's not safe to assume that the current + CallFrame's high water mark is the highest high water mark because + calls do not always set up at the end of a CallFrame. A large caller + CallFrame can encompass a small callee CallFrame. - * wtf/AlwaysInline.h: +2010-10-20 Peter Rybin <peter.rybin@gmail.com> -2010-01-04 Maciej Stachowiak <mjs@apple.com> + Reviewed by Adam Barth. - Reviewed by Simon Hausmann. + HTML parser should provide script column position within HTML document to JavaScript engine + https://bugs.webkit.org/show_bug.cgi?id=45271 - Fix some PLATFORM(*_ENDIAN) uses to CPU() - https://bugs.webkit.org/show_bug.cgi?id=33148 + Adds TextPosition* classes -- a structure that stores line/column/generation + level coordinates inside text document. Adds *BasedNumber classes -- typesafe int + wrappers that emphasize whether int number is used as zero-based or + one-based. - * runtime/JSCell.cpp: - (JSC::): - * runtime/JSValue.h: - (JSC::JSValue::): + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Added. + (WTF::TextPosition::TextPosition): + (WTF::TextPosition::minimumPosition): + (WTF::TextPosition::belowRangePosition): + (WTF::ZeroBasedNumber::fromZeroBasedInt): + (WTF::ZeroBasedNumber::ZeroBasedNumber): + (WTF::ZeroBasedNumber::zeroBasedInt): + (WTF::ZeroBasedNumber::base): + (WTF::ZeroBasedNumber::belowBase): + (WTF::OneBasedNumber::fromOneBasedInt): + (WTF::OneBasedNumber::OneBasedNumber): + (WTF::OneBasedNumber::oneBasedInt): + (WTF::OneBasedNumber::convertAsZeroBasedInt): + (WTF::OneBasedNumber::convertToZeroBased): + (WTF::OneBasedNumber::base): + (WTF::OneBasedNumber::belowBase): + (WTF::toZeroBasedTextPosition): + (WTF::toOneBasedTextPosition): + (WTF::ZeroBasedNumber::convertToOneBased): + +2010-10-19 Kwang Yul Seo <skyul@company100.net> -2010-01-04 Maciej Stachowiak <mjs@apple.com> + Reviewed by David Kilzer. - Reviewed by Adam Barth. + [BREWMP] Turn off JIT for simulator build + https://bugs.webkit.org/show_bug.cgi?id=47937 - Document CPU() macros in comments. - https://bugs.webkit.org/show_bug.cgi?id=33147 + We don't need to test x86 JIT. * wtf/Platform.h: -2010-01-04 Maciej Stachowiak <mjs@apple.com> +2010-10-19 Oliver Hunt <oliver@apple.com> - Reviewed by Adam Barth. + Reviewed by Geoffrey Garen. - Reorganize, document and rename CPU() platform macros. - https://bugs.webkit.org/show_bug.cgi?id=33145 - ExecutableAllocatorSymbian appears to have buggy ARM version check - https://bugs.webkit.org/show_bug.cgi?id=33138 - - * wtf/Platform.h: - Rename all macros related to detection of particular CPUs or - classes of CPUs to CPU(), reorganize and document them. + Remove support for JSVALUE32 from JSC + https://bugs.webkit.org/show_bug.cgi?id=47948 + + Remove all the code for supporting JSVALUE32 from JSC. - All remaining changes are adapting to the renames, plus fixing the - second bug cited above. - - * assembler/ARMAssembler.cpp: - * assembler/ARMAssembler.h: - * assembler/ARMv7Assembler.h: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Imm32::Imm32): - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.cpp: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): - * assembler/MacroAssemblerX86.h: - * assembler/MacroAssemblerX86Common.h: - * assembler/MacroAssemblerX86_64.h: - * assembler/X86Assembler.h: - (JSC::X86Registers::): - (JSC::X86Assembler::): - (JSC::X86Assembler::movl_mEAX): - (JSC::X86Assembler::movl_EAXm): - (JSC::X86Assembler::repatchLoadPtrToLEA): - (JSC::X86Assembler::X86InstructionFormatter::memoryModRM): - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorFixedVMPool.cpp: - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorSymbian.cpp: - (JSC::ExecutableAllocator::intializePageSize): * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): * jit/JIT.h: * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emitSlow_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emit_op_urshift): + (JSC::JIT::emitSlow_op_urshift): + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jless): + (JSC::JIT::emitSlow_op_jless): + (JSC::JIT::emit_op_jlesseq): + (JSC::JIT::emitSlow_op_jlesseq): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITCall.cpp: * jit/JITInlineMethods.h: - (JSC::JIT::beginUninterruptedSequence): - (JSC::JIT::restoreArgumentReferenceForTrampoline): - (JSC::JIT::emitCount): + (JSC::JIT::emitGetFromCallFrameHeaderPtr): + (JSC::JIT::emitGetFromCallFrameHeader32): * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_next_pname): * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): * jit/JITStubs.h: + * jit/JSInterfaceJIT.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::tagReturnAsInt32): + * jit/ThunkGenerators.cpp: + (JSC::sqrtThunkGenerator): + (JSC::powThunkGenerator): * runtime/Collector.cpp: - (JSC::currentThreadStackBase): - (JSC::getPlatformThreadRegisters): - (JSC::otherThreadStackPointer): - * wrec/WREC.h: - * wrec/WRECGenerator.cpp: - (JSC::WREC::Generator::generateEnter): - (JSC::WREC::Generator::generateReturnSuccess): - (JSC::WREC::Generator::generateReturnFailure): - * wrec/WRECGenerator.h: - * wtf/FastMalloc.cpp: - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SlowLock): - * wtf/Threading.h: - * wtf/dtoa.cpp: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): - * yarr/RegexJIT.h: - -2010-01-04 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Adam Barth. - - Clean up COMPILER macros and remove unused ones. - https://bugs.webkit.org/show_bug.cgi?id=33132 - - Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were - not used anywhere. - - * wtf/Platform.h: - -2010-01-03 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Eric Seidel. - - Update wtf/Platform.h to document the new system for porting macros. - https://bugs.webkit.org/show_bug.cgi?id=33130 - + (JSC::isPossibleCell): + (JSC::typeName): + * runtime/JSCell.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.h: + (JSC::Structure::prototypeForLookup): + * runtime/JSImmediate.h: + (JSC::reinterpretIntptrToDouble): + (JSC::JSImmediate::isIntegerNumber): + (JSC::JSImmediate::isDouble): + (JSC::JSImmediate::areBothImmediateIntegerNumbers): + (JSC::JSImmediate::makeDouble): + (JSC::JSImmediate::doubleValue): + (JSC::JSImmediate::toBoolean): + (JSC::JSImmediate::fromNumberOutsideIntegerRange): + (JSC::JSImmediate::from): + (JSC::JSImmediate::toDouble): + (JSC::JSFastMath::rightShiftImmediateNumbers): + * runtime/JSNumberCell.cpp: + * runtime/JSNumberCell.h: + * runtime/JSObject.h: + (JSC::JSObject::JSObject): + * runtime/JSValue.h: + * runtime/NumberObject.h: * wtf/Platform.h: -2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Maciej Stachowiak. - - PLATFORM(CAIRO) should be defined by WIN_CAIRO define - https://bugs.webkit.org/show_bug.cgi?id=22250 - - * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only - For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h +2010-10-19 Csaba Osztrogonác <ossy@webkit.org> -2009-12-28 Shu Chang <Chang.Shu@nokia.com> - - Reviewed by Laszlo Gombos. - - [Qt] Delete ThreadPrivate instance after it is finished. - https://bugs.webkit.org/show_bug.cgi?id=32614 - - * wtf/qt/ThreadingQt.cpp: - (WTF::ThreadMonitor::instance): - (WTF::ThreadMonitor::threadFinished): - (WTF::createThreadInternal): - (WTF::detachThread): - -2009-12-28 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Maciej Stachowiak. - - Cleanup of #define JS_EXPORT. - - * API/JSBase.h: - -2009-12-27 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Adam Barth. + Reviewed by Geoffrey Garen. - WinCE buildfix (HWND_MESSAGE isn't supported there) + BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors + https://bugs.webkit.org/show_bug.cgi?id=47920 - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization. -2009-12-27 Patrick Gansterer <paroga@paroga.com> +2010-10-19 Kwang Yul Seo <skyul@company100.net> - Reviewed by Adam Barth. + Reviewed by David Kilzer. - Added a file with WinMain function to link agains in WinCE. + RVCT fails to compile DateMath.cpp due to overloaded function pow + https://bugs.webkit.org/show_bug.cgi?id=47844 - * os-win32/WinMain.cpp: Added. - (convertToUtf8): - (WinMain): + Choose std::pow(double, double) among multiple overloaded pow functions + to fix build for RVCT. -2009-12-24 Laszlo Gombos <laszlo.1.gombos@nokia.com> + * wtf/DateMath.cpp: + (WTF::parseES5DateFromNullTerminatedCharacters): - Unreviewed; revert of r52550. +2010-10-19 Patrick Gansterer <paroga@webkit.org> - The change regressed the following LayoutTests for QtWebKit. + Reviewed by David Kilzer. - fast/workers/worker-call.html -> crashed - fast/workers/worker-close.html -> crashed + Use UChar instead of wchar_t in UnicodeWinCE + https://bugs.webkit.org/show_bug.cgi?id=47904 - * wtf/qt/ThreadingQt.cpp: - (WTF::waitForThreadCompletion): - (WTF::detachThread): + Make UnicodeWinCE more portable, so we can use it for other ports too. -2009-12-24 Shu Chang <Chang.Shu@nokia.com> + * wtf/unicode/wince/UnicodeWinCE.cpp: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isSpace): + (WTF::Unicode::isLetter): + (WTF::Unicode::isUpper): + (WTF::Unicode::isLower): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::isAlphanumeric): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::digitValue): + * wtf/unicode/wince/UnicodeWinCE.h: + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isHighSurrogate): + (WTF::Unicode::isLowSurrogate): + (WTF::Unicode::umemcasecmp): + (WTF::Unicode::surrogateToUcs4): - Reviewed by Laszlo Gombos. +2010-10-19 Patrick Gansterer <paroga@webkit.org> - [Qt] Fix memory leak by deleting instance of ThreadPrivate - in function waitForThreadCompletion(), synchronously, or in - detachThread(), asynchronously. - https://bugs.webkit.org/show_bug.cgi?id=32614 + Reviewed by Andreas Kling. - * wtf/qt/ThreadingQt.cpp: - (WTF::waitForThreadCompletion): - (WTF::detachThread): + Fix style of UnicodeWinCE + https://bugs.webkit.org/show_bug.cgi?id=47818 -2009-12-23 Kwang Yul Seo <skyul@company100.net> + * wtf/unicode/wince/UnicodeWinCE.cpp: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + * wtf/unicode/wince/UnicodeWinCE.h: - Reviewed by Laszlo Gombos. +2010-10-18 Xan Lopez <xlopez@igalia.com> - Include stddef.h for ptrdiff_t - https://bugs.webkit.org/show_bug.cgi?id=32891 + Reviewed by Martin Robinson. - ptrdiff_t is typedef-ed in stddef.h. - Include stddef.h in jit/ExecutableAllocator.h. + * GNUmakefile.am: add missing file. - * jit/ExecutableAllocator.h: +2010-10-18 Oliver Hunt <oliver@apple.com> -2009-12-23 Patrick Gansterer <paroga@paroga.com> + Reviewed by Sam Weinig. - Reviewed by Eric Seidel. + Strict mode: Functions created with the function constructor don't implement strict mode semantics + https://bugs.webkit.org/show_bug.cgi?id=47860 - Buildfix after r47092. + When creating the FunctionExecutable for a new function the function constructor + was always passing false for whether or not a function was strict, rather than + using the information from the freshly parsed function itself. - * wtf/wince/MemoryManager.cpp: - (WTF::tryFastMalloc): - (WTF::tryFastZeroedMalloc): - (WTF::tryFastCalloc): - (WTF::tryFastRealloc): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::fromGlobalCode): -2009-12-23 Kent Tamura <tkent@chromium.org> +2010-10-18 Oliver Hunt <oliver@apple.com> Reviewed by Darin Adler. - HTMLInputElement::valueAsDate getter support. - https://bugs.webkit.org/show_bug.cgi?id=32876 - - Expose dateToDaysFrom1970(). + Strict mode: |this| should be undefined if it is not explicitly provided + https://bugs.webkit.org/show_bug.cgi?id=47833 - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DateMath.cpp: - (WTF::dateToDaysFrom1970): - * wtf/DateMath.h: - -2009-12-22 Darin Adler <darin@apple.com> + To make strict mode behave correctly we want to pass undefined instead of null + as the default this value. This has no impact on behaviour outside of strict + mode as both values are replaced with the global object if necessary. - Reviewed by Mark Rowe. + * bytecompiler/NodesCodegen.cpp: + (JSC::FunctionCallValueNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::CallFunctionCallDotNode::emitBytecode): + (JSC::ApplyFunctionCallDotNode::emitBytecode): - Turn off datagrid by default, at least for all platforms Apple ships. - The datagrid implementation isn't ready for general web use yet. - * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default. +2010-10-18 Darin Adler <darin@apple.com> -2009-12-22 Steve Block <steveblock@google.com> + Reviewed by Anders Carlsson. - Reviewed by David Levin. + Make a nullptr that works with OwnPtr and RefPtr + https://bugs.webkit.org/show_bug.cgi?id=47756 - Updates Android's scheduleDispatchFunctionsOnMainThread() to use new - AndroidThreading class, rather than using JavaSharedClient directly. - This fixes the current layering violation. - https://bugs.webkit.org/show_bug.cgi?id=32651 + * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h. - The pattern is copied from Chromium, which uses the ChromiumThreading - class. This patch also fixes the style in ChromiumThreading.h. + * wtf/NullPtr.h: Added. - * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading. - * wtf/android/MainThreadAndroid.cpp: Modified - (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading. - * wtf/chromium/ChromiumThreading.h: Modified. Fixes style. + * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr. + * wtf/OwnPtr.h: Ditto. + * wtf/PassOwnArrayPtr.h: Ditto. + * wtf/PassOwnPtr.h: Ditto. + * wtf/PassRefPtr.h: Ditto. + * wtf/RefPtr.h: Ditto. + * wtf/RetainPtr.h: Ditto. -2009-12-22 Gavin Barraclough <barraclough@apple.com> +2010-10-18 Oliver Hunt <oliver@apple.com> Reviewed by Sam Weinig. - Fix a couple of problems with UntypedPtrAndBitfield. + Strict mode: JIT doesn't check for |this| being an immediate before dereferencing + https://bugs.webkit.org/show_bug.cgi?id=47826 - Add a m_leaksPtr to reduce false positives from leaks in debug builds - (this isn't perfect because we'd like a solution for release builds, - but this is now at least as good as a PtrAndFlags would be). + There's no guarantee that |this| will be a cell in a strict mode function, so + don't claim that it is. - Switch SmallStringsto use a regular string for the base, rather than - a static one. UntypedPtrAndBitfield assumes all strings are at least - 8 byte aligned; this migt not be true of static strings. Shared buffers - are heap allocated, as are all UStringImpls other than static strings. - Static strings cannot end up being the owner string of substrings, - since the only static strings are length 0. - - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::SmallStringsStorage): - * runtime/UStringImpl.h: - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UStringImpl::UStringImpl): - -2009-12-22 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Darin Adler. - - RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp - https://bugs.webkit.org/show_bug.cgi?id=32857 - - Add implementation of strcasecmp and strncasecmp for RVCT < 4.0 - because earlier versions of RVCT 4.0 does not provide these functions. - - * wtf/StringExtras.cpp: Added. - (strcasecmp): - (strncasecmp): - * wtf/StringExtras.h: - -2009-12-22 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Darin Adler. + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isKnownNotImmediate): - Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT - https://bugs.webkit.org/show_bug.cgi?id=32853 +2010-10-18 Zoltan Herczeg <zherczeg@webkit.org> - Use __forceinline forces RVCT to compile a C or C++ function - inline. The compiler attempts to inline the function, regardless of - the characteristics of the function. + Reviewed by Oliver Hunt. - * wtf/AlwaysInline.h: - * wtf/FastMalloc.h: + if (0) throw "x" ; else { } throws parse error after r69906 + https://bugs.webkit.org/show_bug.cgi?id=47807 -2009-12-21 Simon Hausmann <simon.hausmann@nokia.com> + r69906 introduced a bug: the semicolon is not parsed after a throw + expression anymore. Thus, the semicolon terminates the "if" parsing + in the example above, and the else token results a parse error. - Prospective GTK build fix: Add UStringImpl.cpp/h to the build. + * parser/JSParser.cpp: + (JSC::JSParser::parseThrowStatement): - * GNUmakefile.am: +2010-10-18 Peter Varga <pvarga@inf.u-szeged.hu> -2009-12-21 Simon Hausmann <simon.hausmann@nokia.com> + Reviewed by Andreas Kling. - Fix the Qt build, add UStringImpl.cpp to the build. + Remove some unnecessary lines of code from Parser.cpp + https://bugs.webkit.org/show_bug.cgi?id=47816 - * JavaScriptCore.pri: + * parser/Parser.cpp: -2009-12-21 Gavin Barraclough <barraclough@apple.com> +2010-10-18 Xan Lopez <xlopez@igalia.com> - Windows Build fix part 5. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + Reviewed by Csaba Osztrogonác. -2009-12-21 Gavin Barraclough <barraclough@apple.com> + Build broken with JIT disabled + https://bugs.webkit.org/show_bug.cgi?id=47801 - Reviewed by NOBODY (build fix). - Fix breakage of world introduced in build fix to r52463. + This is a regression caused by r69940. - * runtime/UStringImpl.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): -2009-12-21 Gavin Barraclough <barraclough@apple.com> +2010-10-18 Zoltan Horvath <zoltan@webkit.org> Reviewed by Darin Adler. - https://bugs.webkit.org/show_bug.cgi?id=32831 - Replace UString::Rep implementation, following introduction of ropes to JSC. - - * Remove redundant overcapacity mechanisms. - * Reduce memory cost of Rep's. - * Add an inline storage mechanism akin to that in WebCore's StringImpl. - - ~1% Sunspider progression. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::SmallStringsStorage): - * runtime/UString.cpp: - (JSC::initializeUString): - (JSC::createRep): - (JSC::UString::createFromUTF8): - (JSC::UString::createUninitialized): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::ascii): - (JSC::UString::operator=): - (JSC::UString::toStrictUInt32): - (JSC::equal): - * runtime/UString.h: - (JSC::UString::isEmpty): - (JSC::UString::cost): - (JSC::makeString): - * runtime/UStringImpl.cpp: Added. - (JSC::UStringImpl::baseSharedBuffer): - (JSC::UStringImpl::sharedBuffer): - (JSC::UStringImpl::destroy): - (JSC::UStringImpl::computeHash): - * runtime/UStringImpl.h: Added. - (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): - (JSC::UntypedPtrAndBitfield::asPtr): - (JSC::UntypedPtrAndBitfield::operator&=): - (JSC::UntypedPtrAndBitfield::operator|=): - (JSC::UntypedPtrAndBitfield::operator&): - (JSC::UStringImpl::create): - (JSC::UStringImpl::createCopying): - (JSC::UStringImpl::createUninitialized): - (JSC::UStringImpl::data): - (JSC::UStringImpl::size): - (JSC::UStringImpl::cost): - (JSC::UStringImpl::hash): - (JSC::UStringImpl::computedHash): - (JSC::UStringImpl::setHash): - (JSC::UStringImpl::identifierTable): - (JSC::UStringImpl::setIdentifierTable): - (JSC::UStringImpl::ref): - (JSC::UStringImpl::deref): - (JSC::UStringImpl::allocChars): - (JSC::UStringImpl::copyChars): - (JSC::UStringImpl::computeHash): - (JSC::UStringImpl::null): - (JSC::UStringImpl::empty): - (JSC::UStringImpl::checkConsistency): - (JSC::UStringImpl::): - (JSC::UStringImpl::UStringImpl): - (JSC::UStringImpl::operator new): - (JSC::UStringImpl::bufferOwnerString): - (JSC::UStringImpl::bufferOwnership): - (JSC::UStringImpl::isStatic): - -2009-12-18 Laszlo Gombos <laszlo.1.gombos@nokia.com> + Change FastAllocBase implementation into a macro + https://bugs.webkit.org/show_bug.cgi?id=42998 - Reviewed by Kenneth Rohde Christiansen. + It was investigated in bug #33896 that inheriting classes from FastAllocBase + can result in objects getting larger which leads to memory regressions. + Using a macro instead of inheriting classes from FastAllocBase would solve the issue. - Move some build decisions from Qt build system into source files - https://bugs.webkit.org/show_bug.cgi?id=31956 + * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro - * JavaScriptCore.pri: Compile files unconditionally - * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN) - * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS) - * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN) - * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN) - * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS) - * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port - * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED) - * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED) - -2009-12-18 Gavin Barraclough <barraclough@apple.com> +2010-10-17 Oliver Hunt <oliver@apple.com> Reviewed by Sam Weinig. - Add createNonCopying method to UString to make replace constructor passed bool, - to make behaviour more explicit. Add createFromUTF8 to UString (wrapping method - on UString::Rep), since other cases of transliteration (e.g. from ascii) are - performed in UString constructors. Add/use setHash & size() accessors on Rep, - rather than accessing _hash/len directly. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - * API/OpaqueJSString.cpp: - (OpaqueJSString::ustring): - * JavaScriptCore.exp: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/Identifier.cpp: - (JSC::Identifier::equal): - (JSC::CStringTranslator::translate): - (JSC::UCharBufferTranslator::translate): - (JSC::Identifier::addSlowCase): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - * runtime/JSString.h: - (JSC::JSString::Rope::Fiber::refAndGetLength): - (JSC::JSString::Rope::append): - * runtime/StringBuilder.h: - (JSC::StringBuilder::release): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/UString.cpp: - (JSC::UString::UString): - (JSC::UString::createNonCopying): - (JSC::UString::createFromUTF8): - * runtime/UString.h: - (JSC::UString::Rep::setHash): - (JSC::UString::~UString): - (JSC::makeString): - -2009-12-18 Geoffrey Garen <ggaren@apple.com> + Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions + https://bugs.webkit.org/show_bug.cgi?id=47791 - Reviewed by Cameron Zwarich and Gavin Barraclough. - - Changed Register constructors to assignment operators, to streamline - moving values into registers. (In theory, there's no difference between - the two, since the constructor should just inline away, but there seems - to be a big difference in the addled mind of the GCC optimizer.) - - In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K - reduction in stack usage per privateExecute stack frame. - - * interpreter/CallFrame.h: - (JSC::ExecState::setCalleeArguments): - (JSC::ExecState::setCallerFrame): - (JSC::ExecState::setScopeChain): - (JSC::ExecState::init): - (JSC::ExecState::setArgumentCount): - (JSC::ExecState::setCallee): - (JSC::ExecState::setCodeBlock): Added a little bit of casting so these - functions could use the new Register assignment operators. + Simple fix, check for arguments in addition to eval. - * interpreter/Register.h: - (JSC::Register::withInt): - (JSC::Register::Register): - (JSC::Register::operator=): Swapped in assignment operators for constructors. + * parser/JSParser.cpp: + (JSC::JSParser::parseUnaryExpression): -2009-12-18 Yongjun Zhang <yongjun.zhang@nokia.com> +2010-10-17 Oliver Hunt <oliver@apple.com> - Reviewed by Simon Hausmann. + Reviewed by Sam Weinig. - https://bugs.webkit.org/show_bug.cgi?id=32713 - [Qt] make wtf/Assertions.h compile in winscw compiler. + Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure + https://bugs.webkit.org/show_bug.cgi?id=47788 - Add string arg before ellipsis to help winscw compiler resolve variadic - macro definitions in wtf/Assertions.h. + Fixing this required a couple of changes: + * resolve_base now has a flag to indicate whether it is being used for a put in strict mode. + this allows us to throw an exception when we're doing a completely generic resolve for + assignment, and that assignment would create a new global. + * There is a new opcode 'op_ensure_property_exists' that is used to determine whether + the property being assigned to already exists on the global object. This currently + has no caching, but such caching could be added relatively trivially. It is only used + in the case where we know that a property will be placed on the global object, and + we cannot verify that the property already exists. - * wtf/Assertions.h: + In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather + than making op_resolve_base have an additional runtime branch. -2009-12-18 Geoffrey Garen <ggaren@apple.com> + There's also a new helper function to create the exception for the invalid assignment. - Reviewed by Adam Roben. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::AssignResolveNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * parser/JSParser.cpp: + (JSC::JSParser::parseProgram): + * runtime/ExceptionHelpers.cpp: + (JSC::createErrorForInvalidGlobalAssignment): + * runtime/ExceptionHelpers.h: + * runtime/Operations.h: + (JSC::resolveBase): - Fixed intermittent failure seen on Windows buildbot, and in other JSC - API clients. - - Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to - use it, to avoid vending a stale object as a prototype. +2010-10-17 Simon Fraser <simon.fraser@apple.com> - * API/JSClassRef.cpp: - (OpaqueJSClassContextData::OpaqueJSClassContextData): - (OpaqueJSClass::prototype): - * API/JSClassRef.h: Use WeakGCPtr. + First part of fix for Windows build failure. Will wait for the + next set of link errors to determine the mangled forms for dtoaRoundSF + and dtoaRoundDP. - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/WeakGCPtr.h: Added. - (JSC::WeakGCPtr::WeakGCPtr): - (JSC::WeakGCPtr::get): - (JSC::WeakGCPtr::clear): - (JSC::WeakGCPtr::operator*): - (JSC::WeakGCPtr::operator->): - (JSC::WeakGCPtr::operator!): - (JSC::WeakGCPtr::operator bool): - (JSC::WeakGCPtr::operator UnspecifiedBoolType): - (JSC::WeakGCPtr::assign): - (JSC::::operator): - (JSC::operator==): - (JSC::operator!=): - (JSC::static_pointer_cast): - (JSC::const_pointer_cast): - (JSC::getPtr): Added WeakGCPtr to the project. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-12-18 Gavin Barraclough <barraclough@apple.com> +2010-10-17 Simon Fraser <simon.fraser@apple.com> - Reviewed by Sam Weinig. + Reviewed by Nikolas Zimmermann. - https://bugs.webkit.org/show_bug.cgi?id=32720 + Very large and small numbers fail to round-trip through CSS + https://bugs.webkit.org/show_bug.cgi?id=20674 + + New exports required to use DecimalNumber in WebCore. * JavaScriptCore.exp: - - Remove exports for UString::append * JavaScriptCore.xcodeproj/project.pbxproj: - - Make StringBuilder a private header (was project). - -2009-12-18 Martin Robinson <martin.james.robinson@gmail.com> - - Reviewed by Gustavo Noronha Silva. - - [GTK] GRefPtr does not take a reference when assigned a raw pointer - https://bugs.webkit.org/show_bug.cgi?id=32709 - - Ensure that when assigning a raw pointer to a GRefPtr, the reference - count is incremented. Also remove the GRefPtr conversion overload as - GRefPtr types have necessarily incompatible reference counting. - * wtf/gtk/GRefPtr.h: - (WTF::GRefPtr::operator=): +2010-10-16 Kyusun Kim <maniagoon@company100.net> -2009-12-18 Simon Hausmann <simon.hausmann@nokia.com> - - Reviewed by Tor Arne Vestbø. - - [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds - - https://bugs.webkit.org/show_bug.cgi?id=32716 - - * pcre/pcre.pri: Use standalone_package instead of QTDIR_build - -2009-12-18 Martin Robinson <martin.james.robinson@gmail.com> - - Reviewed by Gustavo Noronha Silva. - - [GTK] Compile warning from line 29 of GRefPtr.cpp - https://bugs.webkit.org/show_bug.cgi?id=32703 - - Fix memory leak and compiler warning in GRefPtr GHashTable template - specialization. - - * wtf/gtk/GRefPtr.cpp: - (WTF::refGPtr): - -2009-12-17 Sam Weinig <sam@webkit.org> - - Reviewed by Mark Rowe. - - Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines. - - * wtf/Platform.h: - -2009-12-17 Adam Roben <aroben@apple.com> - - Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the - source tree - - Fixes <http://webkit.org/b/32665>. - - Reviewed by Ada Chan. + Reviewed by Alexey Proskuryakov. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved - around files and filters so that the structure matches - JavaScriptCore.xcodeproj and the source tree. A few headers that were - previously omitted have been added, as well as JSZombie.{cpp,h}. + Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters() + https://bugs.webkit.org/show_bug.cgi?id=47758 -2009-12-17 Adam Roben <aroben@apple.com> + * wtf/CurrentTime.h: + * wtf/DateMath.h: - Remove HeavyProfile and TreeProfile completely +2010-10-16 Patrick Gansterer <paroga@webkit.org> - These were mostly removed in r42808, but the empty files were left in - place. + Reviewed by Adam Barth. - Fixes <http://webkit.org/b/32664>. + Rename StringHasherFunctions.h to StringHasher.h + https://bugs.webkit.org/show_bug.cgi?id=47200 - Reviewed by John Sullivan. + Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name. - * Android.mk: * GNUmakefile.am: * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: - Removed HeavyProfile/TreeProfile source files. - - * profiler/HeavyProfile.cpp: Removed. - * profiler/HeavyProfile.h: Removed. - * profiler/TreeProfile.cpp: Removed. - * profiler/TreeProfile.h: Removed. - -2009-12-17 Martin Robinson <martin.james.robinson@gmail.com> - - Reviewed by Gustavo Noronha Silva. - - [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs - https://bugs.webkit.org/show_bug.cgi?id=21599 - - Implement GRefPtr, a smart pointer for reference counted GObject types. - - * GNUmakefile.am: - * wtf/gtk/GOwnPtr.cpp: - (WTF::GDir): - * wtf/gtk/GRefPtr.h: Added. - (WTF::): - (WTF::GRefPtr::GRefPtr): - (WTF::GRefPtr::~GRefPtr): - (WTF::GRefPtr::clear): - (WTF::GRefPtr::get): - (WTF::GRefPtr::operator*): - (WTF::GRefPtr::operator->): - (WTF::GRefPtr::operator!): - (WTF::GRefPtr::operator UnspecifiedBoolType): - (WTF::GRefPtr::hashTableDeletedValue): - (WTF::::operator): - (WTF::::swap): - (WTF::swap): - (WTF::operator==): - (WTF::operator!=): - (WTF::static_pointer_cast): - (WTF::const_pointer_cast): - (WTF::getPtr): - (WTF::adoptGRef): - (WTF::refGPtr): - (WTF::derefGPtr): - -2009-12-17 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - - Unreviewed. Build fixes for make distcheck. - - * GNUmakefile.am: - -2009-12-16 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Fixed <rdar://problem/7355025> Interpreter::privateExecute macro generates - bloated code - - This patch cuts Interpreter stack use by about a third. - - * bytecode/Opcode.h: Changed Opcode to const void* to work with the - const static initiliazation we want to do in Interpreter::privateExecute. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): Moved hashtable initialization here to - avoid polluting Interpreter::privateExecute's stack, and changed it from a - series of add() calls to one add() call in a loop, to cut down on code size. - - (JSC::Interpreter::privateExecute): Changed a series of label computations - to a copy of a compile-time constant array to cut down on code size. - -2009-12-16 Mark Rowe <mrowe@apple.com> - - Build fix. Disable debug variants of WebKit frameworks. - * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/StringHashFunctions.h: Removed. + * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h. + * wtf/text/StringHash.h: + * wtf/text/StringImpl.h: -2009-12-15 Geoffrey Garen <ggaren@apple.com> +2010-10-15 Oliver Hunt <oliver@apple.com> - Reviewed by Sam "r=me" Weinig. + Reviewed by Sam Weinig. - https://bugs.webkit.org/show_bug.cgi?id=32498 - <rdar://problem/7471495> - REGRESSION(r51978-r52039): AJAX "Mark This Forum Read" function no longer - works - - Fixed a tyop. + Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline + https://bugs.webkit.org/show_bug.cgi?id=47762 - * runtime/Operations.h: - (JSC::jsAdd): Use the '&&' operator, not the ',' operator. + The old YACC parser depended on the lexer for some classes of semicolon insertion. + The new parser handles ASI entirely on its own so when the lexer inserts a semicolon + on its own the net result is a spurious semicolon in the input stream. This can result + in incorrect parsing in some cases: -2009-12-15 Geoffrey Garen <ggaren@apple.com> + if (0) + break + ;else {} - Try to fix the windows build: don't export this inlined function. + Would result in a parse failure as the output from the lexer is essentially - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + if (0) + break + ;;else -2009-12-15 Geoffrey Garen <ggaren@apple.com> + So the second semicolon is interpreted as a empty statement, which terminates the if, + making the else an error. - Reviewed by Beth Dakin. - Inlined JSCell's operator new. - - 3.7% speedup on bench-allocate-nonretained.js. + * parser/JSParser.cpp: + (JSC::JSParser::parseThrowStatement): + Parsing of throw statement was wrong, and only worked due to the weird behaviour + in the lexer + * parser/Lexer.cpp: + (JSC::Lexer::lex): + Remove bogus semicolon insertion from the newline handling - * JavaScriptCore.exp: - * runtime/JSCell.cpp: - * runtime/JSCell.h: - (JSC::JSCell::operator new): +2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com> -2009-12-15 Geoffrey Garen <ggaren@apple.com> + Reviewed by Dirk Schulze. - Reviewed by Oliver Hunt. + Replace some String::format() usages by StringConcatenate in WebKit + https://bugs.webkit.org/show_bug.cgi?id=47714 - Removed the number heap, replacing it with a one-item free list for - numbers, taking advantage of the fact that two number cells fit inside - the space for one regular cell, and number cells don't require destruction. - - SunSpider says 1.6% faster in JSVALUE32 mode (the only mode that - heap-allocates numbers). - - SunSpider says 1.1% faster in JSVALUE32_64 mode. v8 says 0.8% faster - in JSVALUE32_64 mode. 10% speedup on bench-alloc-nonretained.js. 6% - speedup on bench-alloc-retained.js. - - There's a lot of formulaic change in this patch, but not much substance. + * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString(). - * JavaScriptCore.exp: - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - (JSC::Heap::freeBlockPtr): - (JSC::Heap::freeBlocks): - (JSC::Heap::recordExtraCost): - (JSC::Heap::allocate): - (JSC::Heap::resizeBlocks): - (JSC::Heap::growBlocks): - (JSC::Heap::shrinkBlocks): - (JSC::Heap::markConservatively): - (JSC::Heap::clearMarkBits): - (JSC::Heap::markedCells): - (JSC::Heap::sweep): - (JSC::Heap::markRoots): - (JSC::Heap::objectCount): - (JSC::Heap::addToStatistics): - (JSC::Heap::statistics): - (JSC::Heap::isBusy): - (JSC::Heap::reset): - (JSC::Heap::collectAllGarbage): - (JSC::Heap::primaryHeapBegin): - (JSC::Heap::primaryHeapEnd): - * runtime/Collector.h: - (JSC::): Removed all code pertaining to the number heap, and changed all - heap template functions and classes to non-template functions and classes. +2010-10-15 Ilya Tikhonovsky <loislo@chromium.org> - (JSC::Heap::allocateNumber): A new optimization to replace the number - heap: allocate half-sized number cells in pairs, returning the first - cell and caching the second cell for the next allocation. + Unreviewed build fix for Debug Leopard which is failng to compile after r69842. - * runtime/CollectorHeapIterator.h: - (JSC::LiveObjectIterator::LiveObjectIterator): - (JSC::LiveObjectIterator::operator++): - (JSC::DeadObjectIterator::DeadObjectIterator): - (JSC::DeadObjectIterator::operator++): - (JSC::ObjectIterator::ObjectIterator): - (JSC::ObjectIterator::operator++): - * runtime/JSCell.h: - (JSC::JSCell::isNumber): Removed all code pertaining to the number heap, - and changed all heap template functions and classes to non-template functions - and classes. + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): -2009-12-15 Zoltan Horvath <zoltan@webkit.org> +2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu> - Reviewed by Darin Adler. + Reviewed by Gavin Barraclough. - Allow custom memory allocation control for WeakGCMap class - https://bugs.webkit.org/show_bug.cgi?id=32547 + The parenthetical assertion checking isn't working in some cases with YARR + Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46893 - Inherits WeakGCMap from FastAllocBase because it is instantiated by - 'new' at: WebCore/dom/Document.cpp:512. + Calculate the countToCheck value of a TypeParentheticalAssertion by + subtracting the number of characters which follows + a TypeParentheticalAssertion term with the number of characters which should + be matched by terms which are contained + in the TypeParentheticalAssertion term (minimumSize). - * runtime/WeakGCMap.h: + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): -2009-12-15 Zoltan Horvath <zoltan@webkit.org> +2010-10-14 Nathan Vander Wilt <nate@andyet.net> Reviewed by Darin Adler. - Allow custom memory allocation control for dtoa's P5Node struct - https://bugs.webkit.org/show_bug.cgi?id=32544 + Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632 - Inherits P5Node struct from Noncopyable because it is instantiated by - 'new' at wtf/dtoa.cpp:588 and don't need to be copyable. - - * wtf/dtoa.cpp: - -2009-12-14 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Simon Fraser. - - https://bugs.webkit.org/show_bug.cgi?id=32524 - REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests - - * wtf/StdLibExtras.h: - (WTF::bitCount): The original patch put the parentheses in the wrong - place, completely changing the calculation and making it almost always - wrong. Moved the parentheses around the '+' operation, like the original - compiler warning suggested. - -2009-12-14 Gabor Loki <loki@inf.u-szeged.hu> - - Unreviewed trivial buildfix. + * runtime/DateConversion.cpp: + (JSC::parseDate): + * wtf/DateMath.cpp: + (WTF::ymdhmsToSeconds): + (WTF::parseES5DateFromNullTerminatedCharacters): + * wtf/DateMath.h: - Fix crosses initialization of usedPrimaryBlocks for JSValue32 +2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com> - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): + Reviewed by Gavin Barraclough. -2009-12-14 Csaba Osztrogonác <ossy@webkit.org> + Replace lots of String::format() usages by StringConcatenate + https://bugs.webkit.org/show_bug.cgi?id=47664 - Reviewed by Simon Hausmann. + Add StringTypeAdapter<char> to accept single characters for makeString(). - GCC 4.3.x warning fixed. Suggested parantheses added. - warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of & + * wtf/text/StringConcatenate.h: + (WTF::makeString): - * wtf/StdLibExtras.h: - (WTF::bitCount): +2010-10-14 David Goodwin <david_goodwin@apple.com> -2009-12-13 Geoffrey Garen <ggaren@apple.com> + Reviewed by Darin Adler. - Reviewed by Sam Weinig. - - Changed GC from mark-sweep to mark-allocate. - - Added WeakGCMap to keep WebCore blissfully ignorant about objects that - have become garbage but haven't run their destructors yet. - - 1% SunSpider speedup. - 7.6% v8 speedup (37% splay speedup). - 17% speedup on bench-alloc-nonretained.js. - 18% speedup on bench-alloc-retained.js. - - * API/JSBase.cpp: - (JSGarbageCollect): - * API/JSContextRef.cpp: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new - files. + need way to measure size of JITed ARM code + https://bugs.webkit.org/show_bug.cgi?id=47121 - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector - iterator abstraction. + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::linkCode): + (JSC::LinkBuffer::dumpLinkStats): + (JSC::LinkBuffer::dumpCode): - * jsc.cpp: - (functionGC): Updated for rename. +2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu> - * runtime/Collector.cpp: Slightly reduced the number of allocations per - collection, so that small workloads only allocate on collector block, - rather than two. + Reviewed by Gavin Barraclough. - (JSC::Heap::Heap): Updated to use the new allocateBlock function. + The backreference checking isn't working in some cases with YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46904 - (JSC::Heap::destroy): Updated to use the new freeBlocks function. + The Interpreter::matchBackReference() function returns true without matching + when a backreference points to the same parentheses where it is. - (JSC::Heap::allocateBlock): New function to initialize a block when - allocating it. + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchBackReference): - (JSC::Heap::freeBlock): Consolidated the responsibility for running - destructors into this function. +2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com> - (JSC::Heap::freeBlocks): Updated to use freeBlock. + Reviewed by Andreas Kling. - (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function, - so that allocation, which is more common, doesn't have to check extraCost. + [Qt] Text breaking is slow: enable ICU as an opt-in + https://bugs.webkit.org/show_bug.cgi?id=40332 - (JSC::Heap::heapAllocate): Run destructors right before recycling a - garbage cell. This has better cache utilization than a separate sweep phase. + Added a config flag that enables ICU as an opt-in instead of the Qt specific code. + Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h - (JSC::Heap::resizeBlocks): - (JSC::Heap::growBlocks): - (JSC::Heap::shrinkBlocks): New set of functions for managing the size of - the heap, now that the heap doesn't maintain any information about its - size. + * JavaScriptCore.pri: + * wtf/unicode/qt4/UnicodeQt4.h: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isPunct): + (WTF::Unicode::isLower): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::combiningClass): + (WTF::Unicode::direction): + (WTF::Unicode::category): - (JSC::isPointerAligned): - (JSC::isHalfCellAligned): - (JSC::isPossibleCell): - (JSC::isCellAligned): - (JSC::Heap::markConservatively): Cleaned up this code a bit. +2010-10-14 Anton Faern <anton@bladehawke.com> - (JSC::Heap::clearMarkBits): - (JSC::Heap::markedCells): Some helper functions for examining the the mark - bitmap. + Reviewed by Csaba Osztrogonác. - (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator. + https://bugs.webkit.org/show_bug.cgi?id=47658 + NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO + change. This means that OS(NETBSD) is also undefined. - (JSC::Heap::markRoots): Reordered some operations for clarity. + * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD - (JSC::Heap::objectCount): - (JSC::Heap::addToStatistics): - (JSC::Heap::statistics): Rewrote these functions to calculate an object - count on demand, since the heap doesn't maintain this information by - itself. +2010-10-13 David Goodwin <david_goodwin@apple.com> - (JSC::Heap::reset): New function for resetting the heap once we've - exhausted heap space. + Reviewed by Oliver Hunt. - (JSC::Heap::collectAllGarbage): This function matches the old collect() - behavior, but it's now an uncommon function used only by API. + ARMv7 JIT should generated conditional branches when possible + https://bugs.webkit.org/show_bug.cgi?id=47384 - * runtime/Collector.h: - (JSC::CollectorBitmap::count): - (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing - the collector mark bitmap. + Use different jump padding sizes for conditional and unconditional + jumps (12 bytes and 10 bytes respectively). This allows the JIT to + include the IT instruction as part of the conditional jump sequence + which in turn allows it to optimize away the IT using an ARMv7 + conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for + conditional branches when displacement is in range. Also use IT/B(T4) + for conditional branch when displacement does not fit in B(T3). - (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents - to bytes, so it's easier to understand. - - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::CollectorHeapIterator): - (JSC::CollectorHeapIterator::operator!=): - (JSC::CollectorHeapIterator::operator*): - (JSC::CollectorHeapIterator::advance): - (JSC::::LiveObjectIterator): - (JSC::::operator): - (JSC::::DeadObjectIterator): - (JSC::::ObjectIterator): New iterators for encapsulating details about - heap layout, and what's live and dead on the heap. + For unconditional jump, instruction selection options are: + B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection + options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX. - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until - we're fully constructed, so the heap mark phase won't visit us in an - invalid state. + * assembler/ARMv7Assembler.cpp: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::JmpSrc::JmpSrc): + (JSC::ARMv7Assembler::ifThenElse): + (JSC::ARMv7Assembler::jumpSizeDelta): + (JSC::ARMv7Assembler::canCompact): + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::canBeJumpT1): + (JSC::ARMv7Assembler::canBeJumpT3): + (JSC::ARMv7Assembler::canBeJumpT4): + (JSC::ARMv7Assembler::linkJumpT1): + (JSC::ARMv7Assembler::linkJumpT3): + (JSC::ARMv7Assembler::linkJumpT4): + (JSC::ARMv7Assembler::linkConditionalJumpT4): + (JSC::ARMv7Assembler::linkBX): + (JSC::ARMv7Assembler::linkConditionalBX): + (JSC::ARMv7Assembler::linkJumpAbsolute): + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::linkCode): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::canCompact): + (JSC::MacroAssemblerARMv7::computeJumpType): + (JSC::MacroAssemblerARMv7::jumpSizeDelta): + (JSC::MacroAssemblerARMv7::jump): + (JSC::MacroAssemblerARMv7::nearCall): + (JSC::MacroAssemblerARMv7::call): + (JSC::MacroAssemblerARMv7::ret): + (JSC::MacroAssemblerARMv7::tailRecursiveCall): + (JSC::MacroAssemblerARMv7::makeJump): + (JSC::MacroAssemblerARMv7::makeBranch): - * runtime/JSCell.h: - (JSC::JSCell::): - (JSC::JSCell::createDummyStructure): - (JSC::JSCell::JSCell): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic. +2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch> - * runtime/JSString.h: - (JSC::jsSubstring): Don't report extra cost for substrings, since they - share a buffer that's already reported extra cost. + Reviewed by Darin Adler. - * runtime/Tracing.d: - * runtime/Tracing.h: Changed these dtrace hooks not to report object - counts, since they're no longer cheap to compute. + Don't depend on Windows on sched_yield and sched.h + https://bugs.webkit.org/show_bug.cgi?id=45543 - * runtime/UString.h: Updated for renames. + sched.h is part of pthreads and sched_yield is implemented + in pthreads-win32 as Sleep(0). This patch avoids a gratuitous + dependency on pthreads-win32 in this file. - * runtime/WeakGCMap.h: Added. - (JSC::WeakGCMap::isEmpty): - (JSC::WeakGCMap::uncheckedGet): - (JSC::WeakGCMap::uncheckedBegin): - (JSC::WeakGCMap::uncheckedEnd): - (JSC::::get): - (JSC::::take): - (JSC::::set): - (JSC::::uncheckedRemove): Mentioned above. + * wtf/TCSpinLock.h: + (TCMalloc_SlowLock): - * wtf/StdLibExtras.h: - (WTF::bitCount): Added a bit population count function, so the heap can - count live objects to fulfill statistics questions. +2010-10-13 Kwang Yul Seo <skyul@company100.net> -The very last cell in the block is not allocated -- should not be marked. + Reviewed by Kent Tamura. -2009-12-13 Geoffrey Garen <ggaren@apple.com> + [BREWMP] Port unicode + https://bugs.webkit.org/show_bug.cgi?id=45716 - Windows build fix: Export some new symbols. + Brew MP port uses only the subset of ICU library to reduce the binary size. + Follow the WinCE's implementation. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Platform.h: + * wtf/unicode/Unicode.h: + * wtf/unicode/brew/UnicodeBrew.cpp: Added. + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isUpper): + (WTF::Unicode::isLower): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::isAlphanumeric): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::direction): + (WTF::Unicode::category): + (WTF::Unicode::decompositionType): + (WTF::Unicode::combiningClass): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::digitValue): + (WTF::Unicode::isSpace): + (WTF::Unicode::isLetter): + * wtf/unicode/brew/UnicodeBrew.h: Added. + (WTF::Unicode::isArabicChar): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::hasLineBreakingPropertyComplexContext): + (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic): + (WTF::Unicode::umemcasecmp): -2009-12-13 Geoffrey Garen <ggaren@apple.com> +2010-10-13 Gavin Barraclough <barraclough@apple.com> - Windows build fix: Removed some old exports. + Windows build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-12-13 Geoffrey Garen <ggaren@apple.com> +2010-10-13 Adam Barth <abarth@webkit.org> - Windows build fix: Use unsigned instead of uint32_t to avoid dependencies. + Reviewed by Maciej Stachowiak. - * wtf/StdLibExtras.h: - (WTF::bitCount): + [WTFURL] Add URLQueryCanonicalizer + https://bugs.webkit.org/show_bug.cgi?id=45088 -2009-12-13 Gavin Barraclough <barraclough@apple.com> + This class canonicalizes the query component of URLs. The main tricky + bit there is the convertCharset function, which I've moved to a + templated dependency. There'll likely be more about that in future + patches. - Reviewed by NOBODY (speculative Windows build fix). + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/src/URLEscape.cpp: Added. + * wtf/url/src/URLEscape.h: Added. + (WTF::appendEscapedCharacter): + * wtf/url/src/URLQueryCanonicalizer.h: Added. + (WTF::URLQueryCanonicalizer::canonicalize): + (WTF::URLQueryCanonicalizer::isAllASCII): + (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString): + (WTF::URLQueryCanonicalizer::convertToQueryEncoding): - * runtime/JSGlobalObjectFunctions.cpp: +2010-10-13 Gavin Barraclough <barraclough@apple.com> -2009-12-13 Gavin Barraclough <barraclough@apple.com> + Reviewed by Oliver Hunt. - Reviewed by Sam Weinig. + Bug 43987 - Downloading using XHR is much slower than before + Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector. + Fundamentally this should be the same (copies current contents to expand capacity, + rather than using a rope), but this approach allows the intermadiate state of the + String to be inspected in the buffer without copying to resolve. - https://bugs.webkit.org/show_bug.cgi?id=32496 - Switch remaining cases of string construction to use StringBuilder. - Builds strings using a vector rather than using string append / addition. + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendQuotedString): + (JSC::Stringifier::Holder::appendNextProperty): + Renamed StringBuilder::size() -> length() (to match other String types). + + * runtime/UStringBuilder.h: + (JSC::UStringBuilder::append): + (JSC::UStringBuilder::toUString): + Update for changes in parent class, can just 'using' the append methods. + + * wtf/text/StringBuilder.cpp: Added. + (WTF::StringBuilder::reifyString): + (WTF::StringBuilder::resize): + (WTF::StringBuilder::reserveCapacity): + (WTF::StringBuilder::allocateBuffer): + (WTF::StringBuilder::appendUninitialized): + (WTF::StringBuilder::append): + (WTF::StringBuilder::shrinkToFit): + * wtf/text/StringBuilder.h: + (WTF::StringBuilder::StringBuilder): + (WTF::StringBuilder::append): + (WTF::StringBuilder::toString): + (WTF::StringBuilder::toStringPreserveCapacity): + (WTF::StringBuilder::length): + (WTF::StringBuilder::isEmpty): + (WTF::StringBuilder::operator[]): + (WTF::StringBuilder::clear): + Class updated to use overcapacity in a StringImpl, rather than a Vector. + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Executable.cpp: - (JSC::FunctionExecutable::paramString): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - * runtime/JSONObject.cpp: - (JSC::Stringifier::stringify): - (JSC::Stringifier::indent): - * runtime/JSString.h: - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexString): - * runtime/NumberPrototype.cpp: - (JSC::integerPartNoExp): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToPrecision): - * runtime/Operations.h: - (JSC::jsString): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::substituteBackreferences): - (JSC::stringProtoFuncConcat): + * wtf/CMakeLists.txt: + * wtf/wtf.pri: -2009-12-08 Jeremy Moskovich <jeremy@chromium.org> +2010-10-13 Adam Roben <aroben@apple.com> - Reviewed by Eric Seidel. + Export tryFastRealloc for WebKit2's benefit - Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController. - https://bugs.webkit.org/show_bug.cgi?id=31802 + Rubber-stamped by Anders Carlsson. - The goal here is to allow for a zero runtime hit for ports that decide to select - the API at compile time. - When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled - at runtime. Core Text is used for OS Versions >= 10.6. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added + tryFastRealloc. Removed RegExpObject::info, which is now exported via + JS_EXPORTDATA. - * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac. +2010-10-13 Adam Barth <abarth@webkit.org> -2009-12-11 Maciej Stachowiak <mjs@apple.com> + Reviewed by Maciej Stachowiak. - Reviewed by Oliver Hunt. + [WTFURL] Add a mechanism for classifying types of characters + https://bugs.webkit.org/show_bug.cgi?id=45085 - Unify codegen for forward and backward variants of branches - https://bugs.webkit.org/show_bug.cgi?id=32463 + Various characters have different escaping rules depending on where + they are in URLs. This patch adds a table containing that information. - * jit/JIT.h: - (JSC::JIT::emit_op_loop): Implemented in terms of forward variant. - (JSC::JIT::emit_op_loop_if_true): ditto - (JSC::JIT::emitSlow_op_loop_if_true): ditto - (JSC::JIT::emit_op_loop_if_false): ditto - (JSC::JIT::emitSlow_op_loop_if_false): ditto - (JSC::JIT::emit_op_loop_if_less): ditto - (JSC::JIT::emitSlow_op_loop_if_less): ditto - * jit/JITOpcodes.cpp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/src/URLCharacterTypes.cpp: Added. + * wtf/url/src/URLCharacterTypes.h: Added. + (WTF::URLCharacterTypes::isQueryChar): + (WTF::URLCharacterTypes::isIPv4Char): + (WTF::URLCharacterTypes::isHexChar): + (WTF::URLCharacterTypes::isCharOfType): -2009-12-11 Sam Weinig <sam@webkit.org> +2010-10-13 Xan Lopez <xlopez@igalia.com> - Reviewed by Anders Carlsson. + Reviewed by Csaba Osztrogonác. - Allow WTFs concept of the main thread to differ from pthreads when necessary. + Missing parameters for bytecode dump of next_pname + https://bugs.webkit.org/show_bug.cgi?id=47590 - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): - (WTF::isMainThread): - * wtf/mac/MainThreadMac.mm: - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): add missing parameters to the dump. -2009-12-11 Gavin Barraclough <barraclough@apple.com> +2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com> - Reviewed by Oliver Hunt. + Reviewed by Dirk Schulze. - https://bugs.webkit.org/show_bug.cgi?id=32454 - Refactor construction of simple strings to avoid string concatenation. + Add wtf/text/StringConcatenate + https://bugs.webkit.org/show_bug.cgi?id=47584 - Building strings through concatenation has a memory and performance cost - - a memory cost since we must over-allocate the buffer to leave space to append - into, and performance in that the string may still require reallocation (and - thus copying during construction). Instead move the full construction to - within a single function call (makeString), so that the arguments' lengths - can be calculated and an appropriate sized buffer allocated before copying - any characters. + Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too. + Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString. + Exactly the same design that has been followed while refactoring StringBuilder. - ~No performance change (~2% progression on date tests). + The UString variants can all be removed as soon as WTF::String & JSC::UString converge. - * bytecode/CodeBlock.cpp: + * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * bytecode/CodeBlock.cpp: s/makeString/makeUString/ (JSC::escapeQuotes): (JSC::valueToSourceString): (JSC::constantName): @@ -4729,15175 +3294,12202 @@ The very last cell in the block is not allocated -- should not be marked. (JSC::CodeBlock::registerName): (JSC::regexpToSourceString): (JSC::regexpName): - * bytecompiler/NodesCodegen.cpp: + * bytecompiler/NodesCodegen.cpp: Ditto. (JSC::substitute): - * profiler/Profiler.cpp: + * profiler/Profiler.cpp: Ditto. (JSC::Profiler::createCallIdentifier): - * runtime/DateConstructor.cpp: - (JSC::callDate): - * runtime/DateConversion.cpp: - (JSC::formatDate): - (JSC::formatDateUTCVariant): - (JSC::formatTime): - (JSC::formatTimeUTC): - * runtime/DateConversion.h: - (JSC::): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToGMTString): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/ExceptionHelpers.cpp: + * runtime/ExceptionHelpers.cpp: Ditto. (JSC::createUndefinedVariableError): (JSC::createErrorMessage): (JSC::createInvalidParamError): - * runtime/FunctionPrototype.cpp: + * runtime/FunctionConstructor.cpp: Ditto. + (JSC::constructFunction): + * runtime/FunctionPrototype.cpp: Ditto. (JSC::insertSemicolonIfNeeded): - (JSC::functionProtoFuncToString): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncToString): - * runtime/RegExpConstructor.cpp: + * runtime/JSONObject.cpp: Ditto. + (JSC::Stringifier::indent): + * runtime/JSStringBuilder.h: + (JSC::jsMakeNontrivialString): + * runtime/RegExpConstructor.cpp: Ditto. (JSC::constructRegExp): - * runtime/RegExpObject.cpp: + * runtime/RegExpObject.cpp: Ditto. (JSC::RegExpObject::match): - * runtime/RegExpPrototype.cpp: + * runtime/RegExpPrototype.cpp: Ditto. (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - * runtime/UString.h: - (JSC::): - (JSC::makeString): - -2009-12-10 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32400 - Switch remaining cases of string addition to use ropes. - - Re-landing r51975 - added toPrimitiveString method, - performs toPrimitive then subsequent toString operations. - - ~1% progression on Sunspidey. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::appendStringInConstruct): - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): - -2009-12-11 Adam Roben <aroben@apple.com> - - Windows build fix - - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added - $(WebKitOutputDir)/include/private to the include path. - -2009-12-11 Adam Roben <aroben@apple.com> - - Move QuartzCorePresent.h to include/private - - This fixes other projects that use wtf/Platform.h - - Rubber-stamped by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang. - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write - QuartzCorePresent.h to $(WebKitOutputDir)/include/private. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - Added $(WebKitOutputDir)/include/private to the include path. - -2009-12-11 Adam Roben <aroben@apple.com> - - Fix clean builds and everything rebuilding on every build - - Reviewed by Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't - write out QuartzCorePresent.h if it exists but is older than - QuartzCore.h. Also, create the directory we write QuartzCorePresent.h - into first. - -2009-12-11 Adam Roben <aroben@apple.com> - - Windows build fix for systems with spaces in their paths + * runtime/StringConcatenate.h: Removed. + * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h + (JSC::makeUString): + * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h. + (WTF::makeString): - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths. +2010-10-12 Gavin Barraclough <barraclough@apple.com> -2009-12-11 Chris Marrin <cmarrin@apple.com> + Windows build fix. - Reviewed by Adam Roben. + * wtf/text/StringBuilder.h: + (WTF::StringBuilder::length): - Add check for presence of QuartzCore headers - https://bugs.webkit.org/show_bug.cgi?id=31856 - - The script now checks for the presence of QuartzCore.h. If present - it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable - HW compositing on Windows. The script writes QuartzCorePresent.h to - the build directory which has a define telling whether QuartzCore is - present. +2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com> - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - * wtf/Platform.h: + Reviewed by Gavin Barraclough. -2009-12-11 Kent Tamura <tkent@chromium.org> + Unify JSC::StringBuilder & WebCore::StringBuilder + https://bugs.webkit.org/show_bug.cgi?id=47538 - Reviewed by Darin Adler. + Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String(). + Move the append(const JSC::UString&) method into runtime/UStringBuilder.h. + UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality. - Fix a problem that JSC::gregorianDateTimeToMS() returns a negative - value for a huge year value. - https://bugs.webkit.org/show_bug.cgi?id=32304 + No new code, just move code around. - * wtf/DateMath.cpp: - (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double. - (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change. - (WTF::timeClip): Use maxECMAScriptTime. - (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change. + * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * runtime/Executable.cpp: + (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString(). + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): Ditto. + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncUnescape): Ditto. + * runtime/JSONObject.cpp: + (JSC::Stringifier::stringify): Ditto. + (JSC::Stringifier::appendQuotedString): Ditto. + (JSC::Stringifier::appendStringifiedValue): Ditto. + (JSC::Stringifier::startNewLine): Ditto. + (JSC::Stringifier::Holder::appendNextProperty): Ditto. + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::Lexer::lexString): Ditto. + * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include. + * runtime/StringBuilder.h: Removed. + * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods. + (JSC::UStringBuilder::append): append(const JSC::UString&) + (JSC::UStringBuilder::toUString): + * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h + (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere. + (WTF::StringBuilder::isEmpty): Ditto (+ constify method). + (WTF::StringBuilder::reserveCapacity): Ditto. + (WTF::StringBuilder::resize): Ditto. + (WTF::StringBuilder::size): Ditto. + (WTF::StringBuilder::operator[]): Ditto. + (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder. + +2010-10-12 Michael Saboff <msaboff@apple.com> -2009-12-10 Adam Barth <abarth@webkit.org> + Reviewed by Oliver Hunt. - No review, rolling out r51975. - http://trac.webkit.org/changeset/51975 + Cleaned up the processing of replacements after regular expression + processing, especially the case where there wasn't a match. + Changed to use empty strings instead of computing a zero length sub + string. + https://bugs.webkit.org/show_bug.cgi?id=47506 - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::appendStringInConstruct): - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncReplace): -2009-12-10 Oliver Hunt <oliver@apple.com> +2010-10-11 Patrick Gansterer <paroga@webkit.org> - Reviewed by Gavin Barraclough. + Unreviewed. - Incorrect caching of prototype lookup with dictionary base - https://bugs.webkit.org/show_bug.cgi?id=32402 + Clang build fix after r69472. + https://bugs.webkit.org/show_bug.cgi?id=46523 - Make sure we don't add cached prototype lookup to the proto_list - lookup chain if the top level object is a dictionary. + * wtf/text/StringHash.h: - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): +2010-10-11 Oliver Hunt <oliver@apple.com> -2009-12-10 Gavin Barraclough <barraclough@apple.com> + Undo last minute change to 32bit build. - Reviewed by Oliver Hunt. + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_convert_this_strict): - https://bugs.webkit.org/show_bug.cgi?id=32400 - Switch remaining cases of string addition to use ropes. +2010-10-11 Brian Weinstein <bweinstein@apple.com> - ~1% progression on Sunspidey. + Build fix for Windows. Add a necessary export from r69516. - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.h: - (JSC::JSString::JSString): - (JSC::JSString::appendStringInConstruct): - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): - -2009-12-10 Kent Hansen <kent.hansen@nokia.com> - - Reviewed by Geoffrey Garen. - - Remove JSObject::getPropertyAttributes() and all usage of it. - https://bugs.webkit.org/show_bug.cgi?id=31933 - - getOwnPropertyDescriptor() should be used instead. - - * JavaScriptCore.exp: - * JavaScriptCore.order: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::getOwnPropertyDescriptor): - * debugger/DebuggerActivation.h: - * runtime/JSObject.cpp: - (JSC::JSObject::propertyIsEnumerable): - * runtime/JSObject.h: - * runtime/JSVariableObject.cpp: - * runtime/JSVariableObject.h: - -2009-12-10 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt & Mark Rowe. - https://bugs.webkit.org/show_bug.cgi?id=32367 - Add support for short Ropes (up to 3 entries) inline within JSString. - (rather than externally allocating an object to hold the rope). - Switch jsAdd of (JSString* + JSString*) to now make use of Ropes. +2010-10-11 Oliver Hunt <oliver@apple.com> - ~1% progression on Sunspidey. + Fix interpreter build -- was broken by incorrect merge. * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - (JSC::JSString::toBoolean): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::Rope::Fiber::deref): - (JSC::JSString::Rope::Fiber::ref): - (JSC::JSString::Rope::Fiber::refAndGetLength): - (JSC::JSString::Rope::append): - (JSC::JSString::JSString): - (JSC::JSString::~JSString): - (JSC::JSString::value): - (JSC::JSString::tryGetValue): - (JSC::JSString::length): - (JSC::JSString::canGetIndex): - (JSC::JSString::appendStringInConstruct): - (JSC::JSString::appendValueInConstructAndIncrementLength): - (JSC::JSString::isRope): - (JSC::JSString::string): - (JSC::JSString::ropeLength): - (JSC::JSString::getStringPropertySlot): - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsAdd): - (JSC::resolveBase): - -2009-12-09 Anders Carlsson <andersca@apple.com> - - Reviewed by Geoffrey Garen. - - Fix three more things found by compiling with clang++. - - * runtime/Structure.h: - (JSC::StructureTransitionTable::reifySingleTransition): - Add the 'std' qualifier to the call to make_pair. - - * wtf/DateMath.cpp: - (WTF::initializeDates): - Incrementing a bool is deprecated according to the C++ specification. - - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - Name lookup should not be done in dependent bases, so explicitly qualify the call to set. - -2009-12-09 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Oliver Hunt. - - Google reader gets stuck in the "Loading..." state and does not complete - https://bugs.webkit.org/show_bug.cgi?id=32256 - <rdar://problem/7456388> - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jless): Fix some backward branches. - -2009-12-09 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32228 - Make destruction of ropes non-recursive to prevent stack exhaustion. - Also, pass a UString& into initializeFiber rather than a Ustring::Rep*, - since the Rep is not being ref counted this could result in usage of a - Rep with refcount zero (where the Rep comes from a temporary UString - returned from a function). - - * runtime/JSString.cpp: - (JSC::JSString::Rope::destructNonRecursive): - (JSC::JSString::Rope::~Rope): - * runtime/JSString.h: - (JSC::JSString::Rope::initializeFiber): - * runtime/Operations.h: - (JSC::concatenateStrings): - -2009-12-09 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=31930 - - Update to r51457. ASSERTs changed to COMPILE_ASSERTs. - The speedup is 25%. - - * runtime/JSGlobalData.cpp: - (JSC::VPtrSet::VPtrSet): - -2009-12-09 Steve Block <steveblock@google.com> - - Reviewed by Adam Barth. - Updates Android Makefiles with latest additions. - https://bugs.webkit.org/show_bug.cgi?id=32278 - - * Android.mk: Modified. - * Android.v8.wtf.mk: Modified. - -2009-12-09 Sam Weinig <sam@webkit.org> +2010-10-01 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. - Fix a bug found while trying to compile JavaScriptCore with clang++. - - * yarr/RegexPattern.h: - (JSC::Yarr::PatternTerm::PatternTerm): Don't self assign here. Use false instead. - -2009-12-09 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Attempt to fix the Windows build. - - * wtf/FastMalloc.h: - -2009-12-09 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Fix some things found while trying to compile JavaScriptCore with clang++. - - * wtf/FastMalloc.h: - Add correct exception specifications for the allocation/deallocation operators. - - * wtf/Vector.h: - * wtf/VectorTraits.h: - Fix a bunch of struct/class mismatches. - -2009-12-08 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Darin Adler. - - move code generation portions of Nodes.cpp to bytecompiler directory - https://bugs.webkit.org/show_bug.cgi?id=32284 - - * bytecompiler/NodesCodegen.cpp: Copied from parser/Nodes.cpp. Removed parts that - are not about codegen. - * parser/Nodes.cpp: Removed everything that is about codegen. - - Update build systems: - - * Android.mk: + [ES5] Implement strict mode + https://bugs.webkit.org/show_bug.cgi?id=10701 + + Initial strict mode implementation. This is the simplest + implementation that could possibly work and adds (hopefully) + all of the restrictions required by strict mode. There are + a number of inefficiencies, especially in the handling of + arguments and eval as smart implementations would make this + patch more complicated. + + The SyntaxChecker AST builder has become somewhat more complex + as strict mode does require more parse tree information to + validate the syntax. + + Summary of major changes to the parser: + * We track when we enter strict mode (this may come as a surprise) + * Strict mode actually requires a degree of AST knowledge to validate + so the SyntaxChecker now produces values that can be used to distinguish + "node" types. + * We now track variables that are written to. We do this to + statically identify writes to global properties that don't exist + and abort at that point. This should actually make it possible + to optimise some other cases in the future but for now it's + purely for validity checking. Currently writes are only tracked + in strict mode code. + * Labels are now tracked as it is now a syntax error to jump to a label + that does not exist (or to use break, continue, or return in a context + where they would be invalid). + + Runtime changes: + * In order to get correct hanlding of the Arguments object all + strict mode functions that reference arguments create and tearoff + the arguments object on entry. This is not strictly necessary + but was the least work necessary to get the correct behaviour. + * PutPropertySlot now tracks whether it is being used for a strict + mode write, and if so Object::put will throw when a write can't be + completed. + * StrictEvalActivation was added as an "activation" object for strict + mode eval (so that strict eval does not introduce new variables into + the containing scope). + + * CMakeLists.txt: * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: + * JavaScriptCore.exp: + * JavaScriptCore.pro: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: - * JavaScriptCoreSources.bkl: - -2009-12-08 Kevin Watters <kevinwatters@gmail.com> - - Reviewed by Kevin Ollivier. - - [wx] Mac plugins support. - - https://bugs.webkit.org/show_bug.cgi?id=32236 - - * wtf/Platform.h: - -2009-12-08 Dmitry Titov <dimich@chromium.org> - - Rubber-stamped by David Levin. - - Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread." - It may have caused massive increase of reported leaks on the bots. - https://bugs.webkit.org/show_bug.cgi?id=31639 - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Structure.cpp: - (JSC::Structure::Structure): - * wtf/RefCounted.h: - (WTF::RefCountedBase::ref): - (WTF::RefCountedBase::hasOneRef): - (WTF::RefCountedBase::refCount): - (WTF::RefCountedBase::derefBase): - * wtf/ThreadVerifier.h: Removed. - -2009-12-08 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - - Reviewed by Darin Adler. - - Make WebKit build correctly on FreeBSD, IA64, and Alpha. - Based on work by Petr Salinger <Petr.Salinger@seznam.cz>, - and Colin Watson <cjwatson@ubuntu.com>. - - * wtf/Platform.h: - -2009-12-08 Dmitry Titov <dimich@chromium.org> - - Reviewed by Darin Adler. - - Add asserts to RefCounted to make sure ref/deref happens on the right thread. - https://bugs.webkit.org/show_bug.cgi?id=31639 - - * runtime/Structure.cpp: - (JSC::Structure::Structure): Disable thread verification on this class since it uses addressOfCount(). - * wtf/RefCounted.h: - (WTF::RefCountedBase::ref): Add ASSERT. - (WTF::RefCountedBase::hasOneRef): Ditto. - (WTF::RefCountedBase::refCount): Ditto. - (WTF::RefCountedBase::derefBase): Ditto. - (WTF::RefCountedBase::disableThreadVerification): delegate to ThreadVerifier method. - * wtf/ThreadVerifier.h: Added. - (WTF::ThreadVerifier::ThreadVerifier): New Debug-only class to verify that ref/deref of RefCounted is done on the same thread. - (WTF::ThreadVerifier::activate): Activates checks. Called when ref count becomes above 2. - (WTF::ThreadVerifier::deactivate): Deactivates checks. Called when ref count drops below 2. - (WTF::ThreadVerifier::disableThreadVerification): used on objects that should not be checked (StringImpl etc) - (WTF::ThreadVerifier::verifyThread): - * GNUmakefile.am: Add ThreadVerifier.h to the build file. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - -2009-12-08 Steve Block <steveblock@google.com> - - Reviewed by Adam Barth. - - [Android] Adds Makefiles for Android port. - https://bugs.webkit.org/show_bug.cgi?id=31325 - - * Android.mk: Added. - * Android.v8.wtf.mk: Added. - -2009-12-07 Dmitry Titov <dimich@chromium.org> - - Rubber-stamped by Darin Adler. - - Remove ENABLE_SHARED_SCRIPT flags - https://bugs.webkit.org/show_bug.cgi?id=32245 - This patch was obtained by "git revert" command and then un-reverting of ChangeLog files. - - * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: - -2009-12-07 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (Windows build fixage part I). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-12-05 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32184 - Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing. - Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on. - - * API/JSCallbackObjectFunctions.h: - (JSC::::toString): - * API/JSValueRef.cpp: - (JSValueIsStrictEqual): - * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isStrictMode): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecode/Opcode.h: * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitEqualityOp): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::createArgumentsIfNecessary): + (JSC::BytecodeGenerator::emitReturn): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::isStrictMode): + (JSC::BytecodeGenerator::makeFunction): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): - (JSC::DebuggerCallFrame::calculatedFunctionName): + (JSC::DebuggerCallFrame::evaluate): * interpreter/Interpreter.cpp: (JSC::Interpreter::callEval): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::execute): (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - * profiler/Profiler.cpp: - (JSC::Profiler::willExecute): - (JSC::Profiler::didExecute): - (JSC::Profiler::createCallIdentifier): - (JSC::createCallIdentifierFromFunctionImp): - * profiler/Profiler.h: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/DateConstructor.cpp: - (JSC::constructDate): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::name): - (JSC::InternalFunction::displayName): - (JSC::InternalFunction::calculatedDisplayName): - * runtime/InternalFunction.h: - * runtime/JSCell.cpp: - (JSC::JSCell::getString): - * runtime/JSCell.h: - (JSC::JSValue::getString): - * runtime/JSONObject.cpp: - (JSC::gap): - (JSC::Stringifier::Stringifier): - (JSC::Stringifier::appendStringifiedValue): - * runtime/JSObject.cpp: - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::get): - * runtime/JSString.cpp: - (JSC::JSString::Rope::~Rope): - (JSC::JSString::resolveRope): - (JSC::JSString::getPrimitiveNumber): - (JSC::JSString::toNumber): - (JSC::JSString::toString): - (JSC::JSString::toThisString): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::Rope::createOrNull): - (JSC::JSString::Rope::operator new): - (JSC::JSString::value): - (JSC::JSString::tryGetValue): - (JSC::JSString::getIndex): - (JSC::JSString::getStringPropertySlot): - (JSC::JSValue::toString): - * runtime/JSValue.h: - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/Operations.cpp: - (JSC::JSValue::strictEqualSlowCase): - * runtime/Operations.h: - (JSC::JSValue::equalSlowCaseInline): - (JSC::JSValue::strictEqualSlowCaseInline): - (JSC::JSValue::strictEqual): - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAdd): - (JSC::concatenateStrings): - * runtime/PropertyDescriptor.cpp: - (JSC::PropertyDescriptor::equalTo): - * runtime/PropertyDescriptor.h: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - -2009-12-07 Nikolas Zimmermann <nzimmermann@rim.com> - - Reviewed by Holger Freyther. - - Turn on (SVG) Filters support, by default. - https://bugs.webkit.org/show_bug.cgi?id=32224 - - * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag. - -2009-12-07 Steve Falkenburg <sfalken@apple.com> - - Build fix. Be flexible about which version of ICU is used on Windows. - - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Add optional xcopy commands to copy ICU 4.2. - -2009-12-07 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Oliver Hunt. - - op_loop_if_less JIT codegen is broken for 64-bit - https://bugs.webkit.org/show_bug.cgi?id=32221 - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards. - -2009-12-07 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Object.create fails if properties on the descriptor are getters - https://bugs.webkit.org/show_bug.cgi?id=32219 - - Correctly initialise the PropertySlots with the descriptor object. - - * runtime/ObjectConstructor.cpp: - (JSC::toPropertyDescriptor): - -2009-12-06 Maciej Stachowiak <mjs@apple.com> - - Not reviewed, build fix. - - Actually tested 64-bit *and* 32-bit build this time. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_false): - -2009-12-06 Maciej Stachowiak <mjs@apple.com> - - Not reviewed, build fix. - - Really really fix 64-bit build for prior patch (actually tested this time). - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_false): - (JSC::JIT::emitSlow_op_loop_if_false): - -2009-12-06 Maciej Stachowiak <mjs@apple.com> - - Not reviewed, build fix. - - Really fix 64-bit build for prior patch. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jless): - -2009-12-06 Maciej Stachowiak <mjs@apple.com> - - Not reviewed, build fix. - - Fix 64-bit build for prior patch. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_loop_if_less): - -2009-12-05 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Oliver Hunt. - - conway benchmark spends half it's time in op_less (jump fusion fails) - https://bugs.webkit.org/show_bug.cgi?id=32190 - - <1% speedup on SunSpider and V8 - 2x speedup on "conway" benchmark - - Two optimizations: - 1) Improve codegen for logical operators &&, || and ! in a condition context - - When generating code for combinations of &&, || and !, in a - condition context (i.e. in an if statement or loop condition), we - used to produce a value, and then separately jump based on its - truthiness. Now we pass the false and true targets in, and let the - logical operators generate jumps directly. This helps in four - ways: - - a) Individual clauses of a short-circuit logical operator can now - jump directly to the then or else clause of an if statement (or to - the top or exit of a loop) instead of jumping to a jump. - - b) It used to be that jump fusion with the condition of the first - clause of a logical operator was inhibited, because the register - was ref'd to be used later, in the actual condition jump; this no - longer happens since a jump straight to the final target is - generated directly. - - c) It used to be that jump fusion with the condition of the second - clause of a logical operator was inhibited, because there was a - jump target right after the second clause and before the actual - condition jump. But now it's no longer necessary for the first - clause to jump there so jump fusion is not blocked. - - d) We avoid generating excess mov statements in some cases. - - As a concrete example this source: - - if (!((x < q && y < q) || (t < q && z < q))) { - // ... - } - - Used to generate this bytecode: - - [ 34] less r1, r-15, r-19 - [ 38] jfalse r1, 7(->45) - [ 41] less r1, r-16, r-19 - [ 45] jtrue r1, 14(->59) - [ 48] less r1, r-17, r-19 - [ 52] jfalse r1, 7(->59) - [ 55] less r1, r-18, r-19 - [ 59] jtrue r1, 17(->76) - - And now generates this bytecode (also taking advantage of the second optimization below): - - [ 34] jnless r-15, r-19, 8(->42) - [ 38] jless r-16, r-19, 26(->64) - [ 42] jnless r-17, r-19, 8(->50) - [ 46] jless r-18, r-19, 18(->64) - - Note the jump fusion and the fact that there's less jump - indirection - three of the four jumps go straight to the target - clause instead of indirecting through another jump. - - 2) Implement jless opcode to take advantage of the above, since we'll now often generate - a less followed by a jtrue where fusion is not forbidden. - - * parser/Nodes.h: - (JSC::ExpressionNode::hasConditionContextCodegen): Helper function to determine - whether a node supports special conditional codegen. Return false as this is the default. - (JSC::ExpressionNode::emitBytecodeInConditionContext): Assert not reached - only really - defined for nodes that do have conditional codegen. - (JSC::UnaryOpNode::expr): Add const version. - (JSC::LogicalNotNode::hasConditionContextCodegen): Returne true only if subexpression - supports it. - (JSC::LogicalOpNode::hasConditionContextCodegen): Return true. - * parser/Nodes.cpp: - (JSC::LogicalNotNode::emitBytecodeInConditionContext): Implemented - just swap - the true and false targets for the child node. - (JSC::LogicalOpNode::emitBytecodeInConditionContext): Implemented - handle jumps - directly, improving codegen quality. Also handles further nested conditional codegen. - (JSC::ConditionalNode::emitBytecode): Use condition context codegen when available. - (JSC::IfNode::emitBytecode): ditto - (JSC::IfElseNode::emitBytecode): ditto - (JSC::DoWhileNode::emitBytecode): ditto - (JSC::WhileNode::emitBytecode): ditto - (JSC::ForNode::emitBytecode): ditto - - * bytecode/Opcode.h: - - Added loop_if_false opcode - needed now that falsey jumps can be backwards. - - Added jless opcode to take advantage of new fusion opportunities. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): Handle above. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpIfTrue): Add peephole for less + jtrue ==> jless. - (JSC::BytecodeGenerator::emitJumpIfFalse): Add handling of backwrds falsey jumps. - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNodeInConditionContext): Wrapper to handle tracking of - overly deep expressions etc. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Implement the two new opcodes (loop_if_false, jless). * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): Implement JIT support for the two new opcodes. - (JSC::JIT::privateCompileSlowCases): ditto + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jless): - (JSC::JIT::emitSlow_op_jless): ditto - (JSC::JIT::emitBinaryDoubleOp): ditto * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_loop_if_less): ditto - (JSC::JIT::emit_op_loop_if_false): ditto - (JSC::JIT::emitSlow_op_loop_if_false): ditto - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JSC::): - -2009-12-04 Kent Hansen <kent.hansen@nokia.com> - - Reviewed by Darin Adler. - - JavaScript delete operator should return false for string properties - https://bugs.webkit.org/show_bug.cgi?id=32012 - - * runtime/StringObject.cpp: - (JSC::StringObject::deleteProperty): - -2009-12-03 Drew Wilson <atwilson@chromium.org> - - Rolled back r51633 because it causes a perf regression in Chromium. - - * wtf/Platform.h: - -2009-12-03 Gavin Barraclough <barraclough@apple.com> - - Try and fix the Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a symbol that should be exported. - -2009-12-03 Mark Rowe <mrowe@apple.com> - - Try and fix the Mac build. - - * JavaScriptCore.exp: Export a symbol that should be exported. - -2009-12-03 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?) - https://bugs.webkit.org/show_bug.cgi?id=32133 - - Work around odd GCC-ism and correct the scopechain for use by - calls made while a cachedcall is active on the callstack. - - * interpreter/CachedCall.h: - (JSC::CachedCall::newCallFrame): - * runtime/JSArray.cpp: - (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2009-12-03 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver "Brraaaaiiiinnnnnzzzzzzzz" Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=32136 - Add a rope representation to JSString. Presently JSString always holds its data in UString form. - Instead, allow the result of a string concatenation to be represented in a tree form - with a - variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes). - - Strings must still currently be resolved down to a flat UString representation before being used, - but by holding the string in a rope representation during construction we can avoid copying data - until we know the final size of the string. - - ~2% progression on SunSpider (~25% on date-format-xparb, ~20% on string-validate-input). - - * JavaScriptCore.exp: - - - Update exports. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - - - Make use of new JSString::length() method to avoid prematurely resolving ropes. - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - - - Switch the string length trampoline to read the length directly from JSString::m_length, - rather than from the JSString's UString::Rep's 'len' property. - + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_convert_this_strict): + (JSC::JIT::emitSlow_op_convert_this_strict): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_pnames): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): - - - Modify op_add such that addition of two strings, where either or both strings are already - in rope representation, produces a rope as a result. - - * runtime/JSString.cpp: - (JSC::JSString::Rope::~Rope): - (JSC::copyChars): - (JSC::JSString::resolveRope): - (JSC::JSString::getPrimitiveNumber): - (JSC::JSString::toBoolean): - (JSC::JSString::toNumber): - (JSC::JSString::toString): - (JSC::JSString::toThisString): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::Rope::Fiber::Fiber): - (JSC::JSString::Rope::Fiber::destroy): - (JSC::JSString::Rope::Fiber::isRope): - (JSC::JSString::Rope::Fiber::rope): - (JSC::JSString::Rope::Fiber::string): - (JSC::JSString::Rope::create): - (JSC::JSString::Rope::initializeFiber): - (JSC::JSString::Rope::ropeLength): - (JSC::JSString::Rope::stringLength): - (JSC::JSString::Rope::fibers): - (JSC::JSString::Rope::Rope): - (JSC::JSString::Rope::operator new): - (JSC::JSString::JSString): - (JSC::JSString::value): - (JSC::JSString::length): - (JSC::JSString::isRope): - (JSC::JSString::rope): - (JSC::JSString::string): - (JSC::JSString::canGetIndex): - (JSC::jsSingleCharacterSubstring): - (JSC::JSString::getIndex): - (JSC::jsSubstring): - (JSC::JSString::getStringPropertySlot): - - - Add rope form. - - * runtime/Operations.h: - (JSC::jsAdd): - (JSC::concatenateStrings): - - - Update string concatenation, and addition of ropes, to produce ropes. - - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyNames): - - - Make use of new JSString::length() method to avoid prematurely resolving ropes. - -2009-11-23 Jeremy Moskovich <jeremy@chromium.org> - - Reviewed by Eric Seidel. - - Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs. - https://bugs.webkit.org/show_bug.cgi?id=31802 - - No test since this is already covered by existing pixel tests. - - * wtf/Platform.h: #define USE_CORE_TEXT for Chrome/Mac. - -2009-12-02 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Add files missed in prior patch. - - * runtime/JSZombie.cpp: - (JSC::): - (JSC::JSZombie::leakedZombieStructure): - * runtime/JSZombie.h: Added. - (JSC::JSZombie::JSZombie): - (JSC::JSZombie::isZombie): - (JSC::JSZombie::classInfo): - (JSC::JSZombie::isGetterSetter): - (JSC::JSZombie::isAPIValueWrapper): - (JSC::JSZombie::isPropertyNameIterator): - (JSC::JSZombie::getCallData): - (JSC::JSZombie::getConstructData): - (JSC::JSZombie::getUInt32): - (JSC::JSZombie::toPrimitive): - (JSC::JSZombie::getPrimitiveNumber): - (JSC::JSZombie::toBoolean): - (JSC::JSZombie::toNumber): - (JSC::JSZombie::toString): - (JSC::JSZombie::toObject): - (JSC::JSZombie::markChildren): - (JSC::JSZombie::put): - (JSC::JSZombie::deleteProperty): - (JSC::JSZombie::toThisObject): - (JSC::JSZombie::toThisString): - (JSC::JSZombie::toThisJSString): - (JSC::JSZombie::getJSNumber): - (JSC::JSZombie::getOwnPropertySlot): - -2009-12-02 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Add zombies to JSC - https://bugs.webkit.org/show_bug.cgi?id=32103 - - Add a compile time flag to make the JSC collector replace "unreachable" - objects with zombie objects. The zombie object is a JSCell subclass that - ASSERTs on any attempt to use the JSCell methods. In addition there are - a number of additional assertions in bottleneck code to catch zombie usage - as quickly as possible. - - Grrr. Argh. Brains. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Register.h: - (JSC::Register::Register): - * runtime/ArgList.h: - (JSC::MarkedArgumentBuffer::append): - (JSC::ArgList::ArgList): - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::sweep): - * runtime/Collector.h: - * runtime/JSCell.h: - (JSC::JSCell::isZombie): - (JSC::JSValue::isZombie): - * runtime/JSValue.h: - (JSC::JSValue::decode): - (JSC::JSValue::JSValue): - * wtf/Platform.h: - -2009-12-01 Jens Alfke <snej@chromium.org> - - Reviewed by Darin Adler. - - Added variants of find/contains/add that allow a foreign key type to be used. - This will allow AtomicString-keyed maps to be queried by C string without - having to create a temporary AtomicString (see HTTPHeaderMap.) - The code for this is adapted from the equivalent in HashSet.h. - - * wtf/HashMap.h: - (WTF::HashMap::find): - (WTF::HashMap::contains): - (WTF::HashMap::add): - * wtf/HashSet.h: Changed "method" to "function member" in a comment. - -2009-12-01 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - - Revert 51551 because it broke GTK+. - - * wtf/Platform.h: - -2009-11-30 Gavin Barraclough <barraclough@apple.com> - - Windows Build fix. Reviewed by NOBODY. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2009-11-24 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Bug 31859 - Make world selection for JSC IsolatedWorlds automagical. - - WebCore presently has to explicitly specify the world before entering into JSC, - which is a little fragile (particularly since property access via a - getter/setter might invoke execution). Instead derive the current world from - the lexical global object. - - Remove the temporary duct tape of willExecute/didExecute virtual hooks on the JSGlobalData::ClientData - these are no longer necessary. - - * API/JSBase.cpp: - (JSEvaluateScript): - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): - * JavaScriptCore.exp: + * jit/JITStubs.h: + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createFunctionBody): + (JSC::ASTBuilder::isResolve): + * parser/JSParser.cpp: + (JSC::JSParser::next): + (JSC::JSParser::startLoop): + (JSC::JSParser::endLoop): + (JSC::JSParser::startSwitch): + (JSC::JSParser::endSwitch): + (JSC::JSParser::setStrictMode): + (JSC::JSParser::strictMode): + (JSC::JSParser::isValidStrictMode): + (JSC::JSParser::declareParameter): + (JSC::JSParser::breakIsValid): + (JSC::JSParser::pushLabel): + (JSC::JSParser::popLabel): + (JSC::JSParser::hasLabel): + (JSC::JSParser::DepthManager::DepthManager): + (JSC::JSParser::DepthManager::~DepthManager): + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::startSwitch): + (JSC::JSParser::Scope::endSwitch): + (JSC::JSParser::Scope::startLoop): + (JSC::JSParser::Scope::endLoop): + (JSC::JSParser::Scope::inLoop): + (JSC::JSParser::Scope::breakIsValid): + (JSC::JSParser::Scope::pushLabel): + (JSC::JSParser::Scope::popLabel): + (JSC::JSParser::Scope::hasLabel): + (JSC::JSParser::Scope::isFunction): + (JSC::JSParser::Scope::declareVariable): + (JSC::JSParser::Scope::declareWrite): + (JSC::JSParser::Scope::deleteProperty): + (JSC::JSParser::Scope::declareParameter): + (JSC::JSParser::Scope::setNeedsFullActivation): + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::JSParser::Scope::getUncapturedWrittenVariables): + (JSC::JSParser::Scope::getDeletedVariables): + (JSC::JSParser::Scope::setStrictMode): + (JSC::JSParser::Scope::strictMode): + (JSC::JSParser::Scope::isValidStrictMode): + (JSC::JSParser::pushScope): + (JSC::JSParser::popScope): + (JSC::JSParser::declareVariable): + (JSC::JSParser::declareWrite): + (JSC::JSParser::deleteProperty): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseSourceElements): + (JSC::JSParser::parseDoWhileStatement): + (JSC::JSParser::parseWhileStatement): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseForStatement): + (JSC::JSParser::parseBreakStatement): + (JSC::JSParser::parseContinueStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseSwitchStatement): + (JSC::JSParser::parseSwitchClauses): + (JSC::JSParser::parseSwitchDefaultClause): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseBlockStatement): + (JSC::JSParser::parseStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionBody): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parseIfStatement): + (JSC::JSParser::parseExpression): + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseConditionalExpression): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseStrictObjectLiteral): + (JSC::JSParser::parsePrimaryExpression): + (JSC::JSParser::parseMemberExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: + * parser/Lexer.cpp: + (JSC::Lexer::parseString): + (JSC::Lexer::lex): + * parser/Lexer.h: + (JSC::Lexer::isReparsing): + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (JSC::ScopeNode::isStrictMode): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::makeFunctionCallNode): + (JSC::SyntaxChecker::appendToComma): + (JSC::SyntaxChecker::createCommaExpr): + (JSC::SyntaxChecker::makeAssignNode): + (JSC::SyntaxChecker::makePrefixNode): + (JSC::SyntaxChecker::makePostfixNode): + (JSC::SyntaxChecker::makeTypeOfNode): + (JSC::SyntaxChecker::makeDeleteNode): + (JSC::SyntaxChecker::makeNegateNode): + (JSC::SyntaxChecker::makeBitwiseNotNode): + (JSC::SyntaxChecker::createLogicalNot): + (JSC::SyntaxChecker::createUnaryPlus): + (JSC::SyntaxChecker::createVoid): + (JSC::SyntaxChecker::thisExpr): + (JSC::SyntaxChecker::createResolve): + (JSC::SyntaxChecker::createObjectLiteral): + (JSC::SyntaxChecker::createArray): + (JSC::SyntaxChecker::createNumberExpr): + (JSC::SyntaxChecker::createString): + (JSC::SyntaxChecker::createBoolean): + (JSC::SyntaxChecker::createNull): + (JSC::SyntaxChecker::createBracketAccess): + (JSC::SyntaxChecker::createDotAccess): + (JSC::SyntaxChecker::createRegex): + (JSC::SyntaxChecker::createNewExpr): + (JSC::SyntaxChecker::createConditionalExpr): + (JSC::SyntaxChecker::createAssignResolve): + (JSC::SyntaxChecker::createFunctionExpr): + (JSC::SyntaxChecker::createFunctionBody): + (JSC::SyntaxChecker::appendBinaryExpressionInfo): + (JSC::SyntaxChecker::operatorStackPop): + * runtime/Arguments.cpp: + (JSC::Arguments::createStrictModeCallerIfNecessary): + (JSC::Arguments::createStrictModeCalleeIfNecessary): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/Arguments.h: + (JSC::Arguments::Arguments): + * runtime/CommonIdentifiers.cpp: + (JSC::CommonIdentifiers::CommonIdentifiers): + * runtime/CommonIdentifiers.h: + * runtime/Error.cpp: + (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction): + (JSC::StrictModeTypeErrorFunction::constructThrowTypeError): + (JSC::StrictModeTypeErrorFunction::getConstructData): + (JSC::StrictModeTypeErrorFunction::callThrowTypeError): + (JSC::StrictModeTypeErrorFunction::getCallData): + (JSC::createTypeErrorFunction): + * runtime/Error.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + (JSC::ProgramExecutable::reparseExceptionInfo): + * runtime/Executable.h: + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::ScriptExecutable::isStrictMode): + (JSC::EvalExecutable::create): + (JSC::FunctionExecutable::create): + * runtime/JSActivation.cpp: + (JSC::JSActivation::toStrictThisObject): + * runtime/JSActivation.h: + * runtime/JSFunction.cpp: + (JSC::createDescriptorForThrowingProperty): + (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSFunction::getOwnPropertyDescriptor): + (JSC::JSFunction::put): * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): * runtime/JSGlobalData.h: - -2009-11-30 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Remove obsolete PLATFORM(KDE) code - https://bugs.webkit.org/show_bug.cgi?id=31958 - - KDE is now using unpatched QtWebKit. - - * parser/Lexer.cpp: Remove obsolete KDE_USE_FINAL guard - * wtf/Platform.h: Remove PLATFORM(KDE) definition and code - section that is guarded with it. - -2009-11-30 Jan-Arve Sæther <jan-arve.saether@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Fix compilation with win32-icc - - The Intel compiler does not support the __has_trivial_constructor type - trait. The Intel Compiler can report itself as _MSC_VER >= 1400. The - reason for that is that the Intel Compiler depends on the Microsoft - Platform SDK, and in order to try to be "fully" MS compatible it will - "pretend" to be the same MS compiler as was shipped with the MS PSDK. - (Thus, compiling with win32-icc with VC8 SDK will make the source code - "think" the compiler at hand supports this type trait). - - * wtf/TypeTraits.h: - -2009-11-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Eric Seidel. - - [Qt] Mac build has JIT disabled - https://bugs.webkit.org/show_bug.cgi?id=31828 - - * wtf/Platform.h: Enable JIT for Qt Mac builds - -2009-11-28 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Eric Seidel. - - Apply workaround for the limitation of VirtualFree with MEM_RELEASE to all ports running on Windows - https://bugs.webkit.org/show_bug.cgi?id=31943 - - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - -2009-11-28 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=31930 - - Seems a typo. We don't need ~270k memory to determine the vptrs. - - * runtime/JSGlobalData.cpp: - (JSC::VPtrSet::VPtrSet): - -2009-11-27 Shinichiro Hamaji <hamaji@chromium.org> - - Unreviewed. - - Move GOwnPtr* from wtf to wtf/gtk - https://bugs.webkit.org/show_bug.cgi?id=31793 - - Build fix for chromium after r51423. - Exclude gtk directory from chromium build. - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2009-11-25 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Incorrect behaviour of jneq_null in the interpreter - https://bugs.webkit.org/show_bug.cgi?id=31901 - - Correct the logic of jneq_null. This is already covered by existing tests. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2009-11-26 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Oliver Hunt. - - Move GOwnPtr* from wtf to wtf/gtk - https://bugs.webkit.org/show_bug.cgi?id=31793 - - * GNUmakefile.am: Change the path for GOwnPtr.*. - * JavaScriptCore.gyp/JavaScriptCore.gyp: Remove - GOwnPtr.cpp from the exclude list. - * JavaScriptCore.gypi: Change the path for GOwnPtr.*. - * wscript: Remove GOwnPtr.cpp from the exclude list. - * wtf/GOwnPtr.cpp: Removed. - * wtf/GOwnPtr.h: Removed. - * wtf/Threading.h: Change the path for GOwnPtr.h. - * wtf/gtk/GOwnPtr.cpp: Copied from JavaScriptCore/wtf/GOwnPtr.cpp. - * wtf/gtk/GOwnPtr.h: Copied from JavaScriptCore/wtf/GOwnPtr.h. - * wtf/unicode/glib/UnicodeGLib.h: Change the path for GOwnPtr.h. - -2009-11-24 Dmitry Titov <dimich@chromium.org> - - Reviewed by Eric Seidel. - - Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit - https://bugs.webkit.org/show_bug.cgi?id=31444 - - * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: - -2009-11-24 Chris Marrin <cmarrin@apple.com> - - Reviewed by Simon Fraser. - - Add ability to enable ACCELERATED_COMPOSITING on Windows (currently disabled) - https://bugs.webkit.org/show_bug.cgi?id=27314 - - * wtf/Platform.h: - -2009-11-24 Jason Smith <dark.panda@gmail.com> - - Reviewed by Alexey Proskuryakov. - - RegExp#exec's returned Array-like object behaves differently from - regular Arrays - https://bugs.webkit.org/show_bug.cgi?id=31689 - - * JavaScriptCore/runtime/RegExpConstructor.cpp: ensure that undefined - values are added to the returned RegExpMatchesArray - -2009-11-24 Oliver Hunt <oliver@apple.com> - - Reviewed by Alexey Proskuryakov. - - JSON.stringify performance on undefined is very poor - https://bugs.webkit.org/show_bug.cgi?id=31839 - - Switch from a UString to a Vector<UChar> when building - the JSON string, allowing us to safely remove the substr-copy - we otherwise did when unwinding an undefined property. - - Also turns out to be a ~5% speedup on stringification. - - * runtime/JSONObject.cpp: - (JSC::Stringifier::StringBuilder::append): - (JSC::Stringifier::stringify): - (JSC::Stringifier::Holder::appendNextProperty): - -2009-11-24 Mark Rowe <mrowe@apple.com> - - Fix production builds where the source tree may be read-only. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Include "config.h" to meet Coding Style Guidelines - https://bugs.webkit.org/show_bug.cgi?id=31792 - - * wtf/unicode/UTF8.cpp: - * wtf/unicode/glib/UnicodeGLib.cpp: - * wtf/unicode/wince/UnicodeWince.cpp: - -2009-11-23 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Streamlined some Math functions where we expect or know the result not - to be representable as an int. - - SunSpider says 0.6% faster. - - * runtime/JSNumberCell.h: - (JSC::JSValue::JSValue): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::internalFunctionStructure): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + * runtime/JSObject.cpp: + (JSC::JSObject::put): + (JSC::JSObject::toStrictThisObject): + (JSC::throwTypeError): + * runtime/JSObject.h: + (JSC::JSObject::isStrictModeFunction): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSValue::putDirect): + (JSC::JSValue::toStrictThisObject): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::toStrictThisObject): + * runtime/JSStaticScopeObject.h: * runtime/JSValue.h: - (JSC::JSValue::): - (JSC::jsDoubleNumber): - (JSC::JSValue::JSValue): Added a function for making a numeric JSValue - and skipping the "can I encode this as an int?" check, avoiding the - overhead of int <-> double roundtripping and double <-> double comparison - and branching. - - * runtime/MathObject.cpp: - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): For these functions, which we expect or know - to produce results not representable as ints, call jsDoubleNumber instead - of jsNumber. - -2009-11-23 Mark Rowe <mrowe@apple.com> - - Unreviewed. Unbreak the regression tests after r51329. - - * API/JSBase.cpp: - (JSEvaluateScript): Null-check clientData before dereferencing it. - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): Ditto. - -2009-11-23 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Part 1/3 of <rdar://problem/7377477> REGRESSION: Many web pages fail to render after interesting script runs in isolated world - - Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API, - and for this to automagically cause execution to take place in the world associated with the - global object associated with the ExecState (JSContextRef) passed. However this is not how - things work - the world must be explicitly set within WebCore. - - Making this work just for API calls to evaluate & call will be a far from perfect solution, - since direct (non-API) use of JSC still relies on WebCore setting the current world correctly. - A better solution would be to make this all work automagically all throughout WebCore, but this - will require more refactoring. - - Since the API is in JSC but worlds only exist in WebCore, add callbacks on the JSGlobalData::ClientData - to allow it to update the current world on entry/exit via the JSC API. This is temporary duck - tape, and should be removed once the current world no longer needs to be explicitly tracked. - - * API/JSBase.cpp: - (JSEvaluateScript): - * API/JSObjectRef.cpp: - (JSObjectCallAsFunction): - * JavaScriptCore.exp: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::ClientData::beginningExecution): - (JSC::JSGlobalData::ClientData::completedExecution): - * runtime/JSGlobalData.h: - -2009-11-23 Steve Block <steveblock@google.com> - - Reviewed by Dmitry Titov. - - Adds MainThreadAndroid.cpp with Android-specific WTF threading functions. - https://bugs.webkit.org/show_bug.cgi?id=31807 - - * wtf/android: Added. - * wtf/android/MainThreadAndroid.cpp: Added. - (WTF::timeoutFired): - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): - -2009-11-23 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Brady Eidson. - - https://bugs.webkit.org/show_bug.cgi?id=31748 - Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport - - * JavaScriptCore.exp: Export callOnMainThreadAndWait. - -2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - [Symbian] Fix lastIndexOf() for Symbian - https://bugs.webkit.org/show_bug.cgi?id=31773 - - Symbian soft floating point library has problems with operators - comparing NaN to numbers. Without a workaround lastIndexOf() - function does not work. - - Patch developed by David Leong. - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncLastIndexOf):Add an extra test - to check for NaN for Symbian. - -2009-11-23 Steve Block <steveblock@google.com> - - Reviewed by Eric Seidel. - - Android port lacks implementation of atomicIncrement and atomicDecrement. - https://bugs.webkit.org/show_bug.cgi?id=31715 - - * wtf/Threading.h: Modified. - (WTF::atomicIncrement): Added Android implementation. - (WTF::atomicDecrement): Added Android implementation. - -2009-11-22 Laszlo Gombos <laszlo.1.gombos@nokia.com> + * runtime/JSZombie.h: + (JSC::JSZombie::toStrictThisObject): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::PutPropertySlot): + (JSC::PutPropertySlot::isStrictMode): + * runtime/StrictEvalActivation.cpp: Added. + (JSC::StrictEvalActivation::StrictEvalActivation): + (JSC::StrictEvalActivation::deleteProperty): + (JSC::StrictEvalActivation::toThisObject): + (JSC::StrictEvalActivation::toStrictThisObject): + * runtime/StrictEvalActivation.h: Added. + +2010-10-10 Patrick Gansterer <paroga@webkit.org> Unreviewed. - [Qt] Sort source lists and remove obsolete comments - from the build system. - - * JavaScriptCore.pri: - -2009-11-21 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Eric Seidel. - - [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac - https://bugs.webkit.org/show_bug.cgi?id=31753 - - * wtf/Platform.h: - -2009-11-19 Steve Block <steveblock@google.com> - - Android port lacks configuration in Platform.h and config.h. - https://bugs.webkit.org/show_bug.cgi?id=31671 - - * wtf/Platform.h: Modified. Added Android-specific configuration. - -2009-11-19 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=31690 - Make SocketStreamHandleCFNet work on Windows - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/MainThread.cpp: - (WTF::FunctionWithContext::FunctionWithContext): - (WTF::dispatchFunctionsFromMainThread): - (WTF::callOnMainThreadAndWait): - * wtf/MainThread.h: - Re-add callOnMainThreadAndWait(), which was removed in bug 23926. - -2009-11-19 Dmitry Titov <dimich@chromium.org> - - Reviewed by David Levin. - - isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests.. - https://bugs.webkit.org/show_bug.cgi?id=31693 - - * wtf/ThreadingPthreads.cpp: - (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier. - (WTF::isMainThread): Ditto. + Windows build fix after r69472. -2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com> + * wtf/text/StringHash.h: + (WTF::CaseFoldingHash::hash): - Reviewed by Darin Adler. +2010-10-10 Patrick Gansterer <paroga@webkit.org> - Remove HAVE(STRING_H) guard from JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=31668 + Reviewed by Adam Barth. - * config.h: - * runtime/UString.cpp: + Use WTF::StringHasher in WTF::CaseFoldingHash + https://bugs.webkit.org/show_bug.cgi?id=46523 -2009-11-19 Dumitru Daniliuc <dumi@chromium.org> + * wtf/text/StringHash.h: + (WTF::CaseFoldingHash::foldCase): + (WTF::CaseFoldingHash::hash): - Reviewed by Dmitry Titov. +2010-10-09 Pratik Solanki <psolanki@apple.com> - Fixing a bug in MessageQueue::removeIf() that leads to an - assertion failure. + Reviewed by Xan Lopez. - https://bugs.webkit.org/show_bug.cgi?id=31657 + https://bugs.webkit.org/show_bug.cgi?id=47445 + Remove unused function WTFThreadData::initializeIdentifierTable() - * wtf/MessageQueue.h: - (WTF::MessageQueue::removeIf): + * wtf/WTFThreadData.h: -2009-11-19 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-10-08 Michael Saboff <msaboff@apple.com> Reviewed by Darin Adler. - Remove HAVE(FLOAT_H) guard - https://bugs.webkit.org/show_bug.cgi?id=31661 - - JavaScriptCore has a dependency on float.h, there is - no need to guard float.h. + Added check to start of subexpression being positive before using + subexpression in replacement. + https://bugs.webkit.org/show_bug.cgi?id=47324 - * runtime/DatePrototype.cpp: Remove include directive - for float.h as it is included in MathExtras.h already. - * runtime/Operations.cpp: Ditto. - * runtime/UString.cpp: Ditto. - * wtf/dtoa.cpp: Ditto. - * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard. - * wtf/Platform.h: Ditto. + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): -2009-11-19 Thiago Macieira <thiago.macieira@nokia.com> +2010-10-08 Chris Evans <cevans@google.com> - Reviewed by Simon Hausmann. + Reviewed by David Levin. - Build fix for 32-bit Sparc machines: these machines are big-endian. + https://bugs.webkit.org/show_bug.cgi?id=47393 - * wtf/Platform.h: + Use unsigned consistently to check for max StringImpl length. + Add a few integer overflow checks. + Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request. -2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com> + * wtf/text/WTFString.cpp: + * wtf/text/StringImpl.h: + * wtf/text/StringImpl.cpp: + Better use of size_t vs. unsigned; check for integer overflows. - Reviewed by Kenneth Rohde Christiansen. +2010-10-07 David Goodwin <david_goodwin@apple.com> - [Qt] Remove support for Qt v4.3 or older versions - https://bugs.webkit.org/show_bug.cgi?id=29469 + Reviewed by Oliver Hunt. - * JavaScriptCore.pro: - * jsc.pro: - * wtf/unicode/qt4/UnicodeQt4.h: + ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount + https://bugs.webkit.org/show_bug.cgi?id=47356 -2009-11-18 Kent Tamura <tkent@chromium.org> + * assembler/ARMv7Assembler.h: - Reviewed by Darin Adler. +2010-10-06 Chris Evans <cevans@google.com> - Move UString::from(double) implementation to new - WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore - code will use it. - https://bugs.webkit.org/show_bug.cgi?id=31330 + Reviewed by David Levin. - - Introduce new function createRep(const char*, unsigned) and - UString::UString(const char*, unsigned) to reduce 2 calls to strlen(). - - Fix a bug that dtoa() doesn't update *rve if the input value is NaN - or Infinity. + https://bugs.webkit.org/show_bug.cgi?id=47248 - No new tests because this doesn't change the behavior. + Use size_t consistently in CString, to prevent theoretical trouble + with > 4GB strings on 64-bit platforms. + * wtf/text/CString.h: + * wtf/text/CString.cpp: + Use size_t for string lengths. + * wtf/MD5.cpp: + (WTF::expectMD5): use suitable format string + cast for size_t. * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/UString.cpp: - (JSC::createRep): - (JSC::UString::UString): - (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat(). - * runtime/UString.h: - * wtf/dtoa.cpp: - (WTF::dtoa): Fix a bug about rve. - (WTF::append): A helper for doubleToStringInJavaScriptFormat(). - (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double). - * wtf/dtoa.h: + Update symbol name. -2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-10-06 Anders Carlsson <andersca@apple.com> - Reviewed by Kenneth Rohde Christiansen. + Reviewed by Sam Weinig. - [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used - https://bugs.webkit.org/show_bug.cgi?id=31643 + Start cleaning up Arguments.h + https://bugs.webkit.org/show_bug.cgi?id=47304 - * JavaScriptCore.pro: + * wtf/TypeTraits.h: + * wtf/TypeTraits.cpp: + Add RemoveReference type trait. -2009-11-18 Nate Chapin <japhet@chromium.org> +2010-10-06 Rafael Antognolli <antognolli@profusion.mobi> - Reviewed by Darin Fisher. + Unreviewed build fix. - Remove Chromium's unnecessary dependency on wtf's tcmalloc files. + [EFL] Build fix for glib support. + https://bugs.webkit.org/show_bug.cgi?id=47221 - https://bugs.webkit.org/show_bug.cgi?id=31648 + If compiling with GLib support enabled, we also need to link wtf against + glib library. - * JavaScriptCore.gyp/JavaScriptCore.gyp: + * wtf/CMakeListsEfl.txt: -2009-11-18 Thiago Macieira <thiago.macieira@nokia.com> +2010-10-05 Kwang Yul Seo <skyul@company100.net> Reviewed by Gavin Barraclough. - [Qt] Implement symbol hiding for JSC's JIT functions. - - These functions are implemented directly in assembly, so they need the - proper directives to enable/disable visibility. On ELF systems, it's - .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On - Windows, it's not necessary since you have to explicitly export. I - also implemented the AIX idiom, though it's unlikely anyone will - implement AIX/POWER JIT. - https://bugs.webkit.org/show_bug.cgi?id=30864 - - * jit/JITStubs.cpp: - -2009-11-18 Oliver Hunt <oliver@apple.com> - - Reviewed by Alexey Proskuryakov. - - Interpreter may do an out of range access when throwing an exception in the profiler. - https://bugs.webkit.org/show_bug.cgi?id=31635 - - Add bounds check. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - -2009-11-18 Gabor Loki <loki@inf.u-szeged.hu> - - Reviewed by Darin Adler. + [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT + https://bugs.webkit.org/show_bug.cgi?id=47117 - Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux - https://bugs.webkit.org/show_bug.cgi?id=31631 + Use IMemCache1 to flush data cache and invalidate instruction cache. * jit/ExecutableAllocator.h: (JSC::ExecutableAllocator::cacheFlush): -2009-11-18 Harald Fernengel <harald.fernengel@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Fix detection of linux-g++ - - Never use "linux-g++*" to check for linux-g++, since this will break embedded - builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any - g++ on linux mkspec. - - * JavaScriptCore.pri: - -2009-11-17 Jon Honeycutt <jhoneycutt@apple.com> - - Add JSContextRefPrivate.h to list of copied files. - - Reviewed by Mark Rowe. +2010-10-05 Leandro Pereira <leandro@profusion.mobi> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + Unreviewed. Build fix. -2009-11-17 Martin Robinson <martin.james.robinson@gmail.com> + Moved "jsc" directory to "shell", so that the name does not clash with the + JavaScriptCore shell in some build systems. + http://webkit.org/b/47049 - Reviewed by Adam Barth. + * CMakeLists.txt: Changed reference from "jsc" to "shell". + * jsc: Removed. + * jsc/CMakeLists.txt: Removed. + * jsc/CMakeListsEfl.txt: Removed. + * shell: Copied from JavaScriptCore/jsc. - [GTK] Style cleanup for GOwnPtr - https://bugs.webkit.org/show_bug.cgi?id=31506 - - Remove forward declaration in GOwnPtr and do some style cleanup. - - * wtf/GOwnPtr.cpp: - * wtf/GOwnPtr.h: - (WTF::GOwnPtr::GOwnPtr): - (WTF::GOwnPtr::~GOwnPtr): - (WTF::GOwnPtr::get): - (WTF::GOwnPtr::release): - (WTF::GOwnPtr::outPtr): - (WTF::GOwnPtr::set): - (WTF::GOwnPtr::clear): - (WTF::GOwnPtr::operator*): - (WTF::GOwnPtr::operator->): - (WTF::GOwnPtr::operator!): - (WTF::GOwnPtr::operator UnspecifiedBoolType): - (WTF::GOwnPtr::swap): - (WTF::swap): - (WTF::operator==): - (WTF::operator!=): - (WTF::getPtr): - (WTF::freeOwnedGPtr): +2010-10-05 Kwang Yul Seo <skyul@company100.net> -2009-11-17 Oliver Hunt <oliver@apple.com> + Reviewed by Kent Tamura. - Reviewed by Maciej Stachowiak. + [BREWMP] Use PlatformRefPtr in randomNumber + https://bugs.webkit.org/show_bug.cgi?id=46989 - Incorrect use of JavaScriptCore API in DumpRenderTree - https://bugs.webkit.org/show_bug.cgi?id=31577 + Use PlatformRefPtr to free memory automatically. - Add assertions to the 'toJS' functions to catch mistakes like - this early. Restructure existing code which blindly passed potentially - null values to toJS when forwarding exceptions so that a null check is - performed first. + * wtf/RandomNumber.cpp: + (WTF::randomNumber): - * API/APICast.h: - (toJS): - (toJSForGC): - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::construct): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::toNumber): - (JSC::::toString): - (JSC::::staticValueGetter): - (JSC::::callbackGetter): - * API/tests/testapi.c: Fix errors in the API tester. - (MyObject_getProperty): - (MyObject_convertToType): - (EvilExceptionObject_convertToType): +2010-10-05 Oliver Hunt <oliver@apple.com> -2009-11-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + Reviewed by Darin Adler. - Reviewed by Gavin Barraclough. + REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64) + https://bugs.webkit.org/show_bug.cgi?id=46690 - https://bugs.webkit.org/show_bug.cgi?id=31050 + Use the correct register value when initialising the arguments + object in the interpreter. This is covered by existing tests. - Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32 - failed on a CortexA8 CPU, but not on a simulator; and - JITCall.cpp modifications was somehow not committed to mainline. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::fmrs_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): +2010-10-04 David Goodwin <david_goodwin@apple.com> -2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com> + Reviewed by Oliver Hunt. - Reviewed by Simon Hausmann. + ARMv7 JIT should take advantage of 2-byte branches to reduce code size + https://bugs.webkit.org/show_bug.cgi?id=47007 - Fix Qt build on Windows CE 6. + * assembler/ARMv7Assembler.cpp: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::canBeJumpT2): + (JSC::ARMv7Assembler::canBeJumpT4): + (JSC::ARMv7Assembler::linkBX): + (JSC::ARMv7Assembler::linkJumpT4): + (JSC::ARMv7Assembler::linkJumpT2): + (JSC::ARMv7Assembler::linkJumpAbsolute): - * JavaScriptCore.pri: Add missing include path. - * wtf/Platform.h: Include ce_time.h for Windows CE 6. +2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com> -2009-11-13 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + Reviewed by Antonio Gomes. - Reviewed by Gavin Barraclough. + [EFL] Use fast malloc for WebKit EFL + https://bugs.webkit.org/show_bug.cgi?id=46691 - https://bugs.webkit.org/show_bug.cgi?id=31050 + Use fast malloc for WebKit EFL because the fast malloc is to allocate + memory quickly. - Adding optimization support for mode JSVALUE32_64 - on ARM systems. + * wtf/CMakeListsEfl.txt: - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::emit_op_put_by_id): +2010-10-04 Oliver Hunt <oliver@apple.com> -2009-11-14 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + Reviewed by Geoff Garen. - Reviewed by Gavin Barraclough. + Lazily create activation objects + https://bugs.webkit.org/show_bug.cgi?id=47107 - https://bugs.webkit.org/show_bug.cgi?id=31050 + Make it possible to lazily create the activation object + for a function that needs one. This allows us to reduce + the overhead of entering a function that may require + an activation in some cases, but not always. - Adding JSVALUE32_64 support for ARM (but not turning it - on by default). All optimizations must be disabled, since - this patch is only the first of a series of patches. + This does make exception handling a little more complex as + it's now necessary to verify that a callframes activation + has been created, and create it if not, in all of the + paths used in exception handling. - During the work, a lot of x86 specific code revealed and - made platform independent. - See revisions: 50531 50541 50593 50594 50595 + We also need to add logic to check for the existence of + the activation in the scoped_var opcodes, as well as + op_ret, op_ret_object_or_this and op_tearoff_activation + so that we can avoid creating an activation unnecesarily + on function exit. - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::fdivd_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::lshift32): - (JSC::MacroAssemblerARM::neg32): - (JSC::MacroAssemblerARM::rshift32): - (JSC::MacroAssemblerARM::branchOr32): - (JSC::MacroAssemblerARM::set8): - (JSC::MacroAssemblerARM::setTest8): - (JSC::MacroAssemblerARM::loadDouble): - (JSC::MacroAssemblerARM::divDouble): - (JSC::MacroAssemblerARM::convertInt32ToDouble): - (JSC::MacroAssemblerARM::zeroDouble): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::createActivation): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::setActivationRegister): + (JSC::CodeBlock::activationRegister): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitNewFunctionInternal): + (JSC::BytecodeGenerator::emitNewFunctionExpression): + (JSC::BytecodeGenerator::createActivationIfNecessary): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): * jit/JIT.h: + * jit/JITCall32_64.cpp: + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_tear_off_activation): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::emit_op_create_activation): + (JSC::JIT::emit_op_resolve_global_dynamic): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_tear_off_activation): + (JSC::JIT::emit_op_create_activation): * jit/JITStubs.cpp: - * wtf/StdLibExtras.h: - -2009-11-13 Dominik Röttsches <dominik.roettsches@access-company.com> - - Reviewed by Eric Seidel. - - Unify TextBoundaries implementations by only relying on WTF Unicode abstractions - https://bugs.webkit.org/show_bug.cgi?id=31468 + (JSC::DEFINE_STUB_FUNCTION): - Adding isAlphanumeric abstraction, required - by TextBoundaries.cpp. +2010-10-04 Adam Barth <abarth@webkit.org> - * wtf/unicode/glib/UnicodeGLib.h: - (WTF::Unicode::isAlphanumeric): - * wtf/unicode/icu/UnicodeIcu.h: - (WTF::Unicode::isAlphanumeric): + Reviewed by Sam Weinig. -2009-11-13 Norbert Leser <norbert.leser&nokia.com> + Remove ENABLE_SANDBOX + https://bugs.webkit.org/show_bug.cgi?id=47032 - Reviewed by Eric Seidel. + * Configurations/FeatureDefines.xcconfig: - Added macros for USERINCLUDE paths within symbian blocks - to guarantee inclusion of respective header files from local path - first (to avoid clashes with same names of header files in system include path). +2010-10-01 Pratik Solanki <psolanki@apple.com> - * JavaScriptCore.pri: + Reviewed by Geoffrey Garen. + Specify ALWAYS_INLINE at function declaration not function definition + https://bugs.webkit.org/show_bug.cgi?id=46960 -2009-11-13 Oliver Hunt <oliver@apple.com> + For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well. - Reviewed by Geoff Garen. + * bytecompiler/BytecodeGenerator.h: + * wtf/FastMalloc.cpp: - JSValueProtect and JSValueUnprotect don't protect API wrapper values - https://bugs.webkit.org/show_bug.cgi?id=31485 +2010-10-01 Kwang Yul Seo <skyul@company100.net> - Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that - does not attempt to to strip out API wrapper objects. + Unreviewed. - * API/APICast.h: - (toJSForGC): - * API/JSValueRef.cpp: - (JSValueProtect): - (JSValueUnprotect): - * API/tests/testapi.c: - (makeGlobalNumberValue): - (main): + [BREWMP] Change Collector BLOCK_SIZE to 64KB + https://bugs.webkit.org/show_bug.cgi?id=46436 -2009-11-13 İsmail Dönmez <ismail@namtrac.org> + Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices. - Reviewed by Antti Koivisto. + * runtime/Collector.h: - Fix typo, ce_time.cpp should be ce_time.c +2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> - * JavaScriptCore.pri: + Reviewed by Andreas Kling. -2009-11-12 Steve VanDeBogart <vandebo@chromium.org> + [Qt] Stack overflow on symbian platform. + https://bugs.webkit.org/show_bug.cgi?id=40598 + + Move big allocation in arrayProtoFuncToString from stack to heap. + JSC::arrayProtoFuncToString function can be called recursivly and + 1K allocation on stack cahse stack overflow. + Can be useful for other platforms with limited stack size. - Reviewed by Adam Barth. + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): - Calculate the time offset only if we were able to parse - the date string. This saves an IPC in Chromium for - invalid date strings. - https://bugs.webkit.org/show_bug.cgi?id=31416 +2010-09-30 Kwang Yul Seo <skyul@company100.net> - * wtf/DateMath.cpp: - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::parseDateFromNullTerminatedCharacters): + Reviewed by Kent Tamura. -2009-11-12 Oliver Hunt <oliver@apple.com> + [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr. + https://bugs.webkit.org/show_bug.cgi?id=46373 - Rollout r50896 until i can work out why it causes failures. + A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef + to wrap the instance in PlatformRefPtr. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitReturn): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * parser/Nodes.cpp: - (JSC::EvalNode::emitBytecode): + * wtf/brew/ShellBrew.h: + (WTF::createRefPtrInstance): -2009-11-12 Steve Falkenburg <sfalken@apple.com> +2010-09-30 Kwang Yul Seo <skyul@company100.net> - Reviewed by Stephanie Lewis. + Reviewed by Kent Tamura. - Remove LIBRARY directive from def file to fix Debug_All target. + [BREWMP] Port PlatformRefPtr + https://bugs.webkit.org/show_bug.cgi?id=46370 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP. -2009-11-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + * wtf/brew/RefPtrBrew.h: Added. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): - Rubber-stamped by Holger Freyther. +2010-09-29 Sam Weinig <sam@webkit.org> - Revert r50204, since it makes DRT crash on 32 bits release builds - for GTK+. + Reviewed by Darin Adler. - * wtf/FastMalloc.h: + Add additional checks to StringBuffer. + <rdar://problem/7756381> -2009-11-12 Oliver Hunt <oliver@apple.com> + * wtf/text/StringBuffer.h: + (WTF::StringBuffer::StringBuffer): + (WTF::StringBuffer::resize): - Reviewed by Gavin Barraclough. +2010-09-30 Chris Marrin <cmarrin@apple.com> - Start unifying entry logic for function and eval code. + Reviewed by Simon Fraser. - Eval now uses a ret instruction to end execution, and sets up - a callframe more in line with what we do for function entry. + Make 2D accelerated canvas rendering build on Mac + https://bugs.webkit.org/show_bug.cgi?id=46007 + + Added ACCELERATED_2D_CANVAS to FeatureDefines - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitReturn): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * parser/Nodes.cpp: - (JSC::EvalNode::emitBytecode): + * Configurations/FeatureDefines.xcconfig: -2009-11-12 Richard Moe Gustavsen <richard.gustavsen@nokia.com> +2010-09-30 Kevin Ollivier <kevino@theolliviers.com> - Reviewed by Kenneth Rohde Christiansen. + [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from + the copy so as not to alter global settings. - [Qt] Disable pthread_setname_np. + * wscript: - This allows Qt builds on Mac from 10.6 to run on earlier version - where this symbol is not present. - https://bugs.webkit.org/show_bug.cgi?id=31403 +2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu> - * wtf/Platform.h: + Reviewed by Gavin Barraclough. -2009-11-12 Thiago Macieira <thiago.macieira@nokia.com> + The case-insensitivity backreference checking isn't working with YARR + Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46882 - Reviewed by Kenneth Rohde Christiansen. + Add ignorecase checking to the Interpreter::tryConsumeBackReference() function. - [Qt] Fix linking on Linux 32-bit. + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::tryConsumeBackReference): - It was missing the ".text" directive at the top of the file, - indicating that code would follow. Without it, the assembler created - "NOTYPE" symbols, which would result in linker errors. - https://bugs.webkit.org/show_bug.cgi?id=30863 +2010-09-30 Kwang Yul Seo <skyul@company100.net> - * jit/JITStubs.cpp: + Reviewed by Andreas Kling. -2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com> + [BREWMP] Leave initializeRandomNumberGenerator empty. + https://bugs.webkit.org/show_bug.cgi?id=46851 - Reviewed by Alexey Proskuryakov. + On Brew MP, AEECLSID_RANDOM initializes itself. - Refactor multiple JavaScriptCore threads - https://bugs.webkit.org/show_bug.cgi?id=31328 + * wtf/RandomNumberSeed.h: + (WTF::initializeRandomNumberGenerator): - Remove the id field from the PlatformThread structure - as it is not used. +2010-09-30 Gabor Loki <loki@webkit.org> - * runtime/Collector.cpp: - (JSC::getCurrentPlatformThread): - (JSC::suspendThread): - (JSC::resumeThread): - (JSC::getPlatformThreadRegisters): + Reviewed by Csaba Osztrogonác. -2009-11-10 Geoffrey Garen <ggaren@apple.com> + Remove unnecessary cacheFlush calls from Thumb-2 + https://bugs.webkit.org/show_bug.cgi?id=46702 - Linux build fix: Added an #include for UINT_MAX. + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::relinkCall): + (JSC::ARMv7Assembler::repatchInt32): + (JSC::ARMv7Assembler::repatchPointer): - * runtime/WeakRandom.h: +2010-09-29 Patrick Gansterer <paroga@webkit.org> -2009-11-10 Geoffrey Garen <ggaren@apple.com> + Unreviewed. - JavaScriptGlue build fix: Marked a file 'private' instead of 'project'. + Next try to fix cygwin build. - * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Assertions.cpp: -2009-11-10 Geoffrey Garen <ggaren@apple.com> +2010-09-29 Patrick Gansterer <paroga@webkit.org> - Reviewed by Gavin "avGni arBalroguch" Barraclough. + Unreviewed. - Faster Math.random, based on GameRand. - - SunSpider says 1.4% faster. + Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN). - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project. + * wtf/Assertions.cpp: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: Use an object to track random number generation - state, initialized to the current time. +2010-09-29 Patrick Gansterer <paroga@webkit.org> - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - (JSC::mathProtoFuncRandom): Use the new hotness. + Unreviewed. - * runtime/WeakRandom.h: Added. - (JSC::WeakRandom::WeakRandom): - (JSC::WeakRandom::get): - (JSC::WeakRandom::advance): The new hotness. + Build fix for cygwin. -2009-11-09 Geoffrey Garen <ggaren@apple.com> + * wtf/Assertions.cpp: - Reviewed by Oliver Hunt. +2010-09-29 Patrick Gansterer <paroga@webkit.org> - Imported the v8 DST cache. - - SunSpider says 1.5% faster. + Reviewed by Andreas Kling. - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting - other date data. + [WINCE] Buildfix for Assertions.cpp after r68511. + https://bugs.webkit.org/show_bug.cgi?id=46807 - * runtime/JSGlobalData.h: - (JSC::DSTOffsetCache::DSTOffsetCache): - (JSC::DSTOffsetCache::reset): Added a struct for the DST cache. + Some, but not all WinCE environments have support for IsDebuggerPresent(). + Add HAVE(ISDEBUGGERPRESENT) to make this a build option. + HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default. - * wtf/DateMath.cpp: - (WTF::calculateDSTOffsetSimple): - (WTF::calculateDSTOffset): - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::getDSTOffset): - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: The imported code for probing and updating the cache. + * wtf/Assertions.cpp: + * wtf/Platform.h: -2009-11-09 Geoffrey Garen <ggaren@apple.com> +2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu> - Reviewed by Oliver Hunt. + Reviewed by Csaba Osztrogonác. - Fixed an edge case that could cause the engine not to notice a timezone - change. - - No test because this case would require manual intervention to change - the timezone during the test. - - SunSpider reports no change. + JSC compile fails on 32bit platform when Regexp Tracing is enabled + https://bugs.webkit.org/show_bug.cgi?id=46713 - * runtime/DateInstanceCache.h: - (JSC::DateInstanceCache::DateInstanceCache): - (JSC::DateInstanceCache::reset): Added a helper function for resetting - this cache. Also, shrank the cache, since we'll be resetting it often. + Fix the cast of pointer in regexp tracing to avoid the warning. - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache - in resetting Date data. (Otherwise, a cache hit could bypass a necessary - timezone update check.) + * runtime/RegExp.cpp: + (JSC::RegExp::match): -2009-11-09 Geoffrey Garen <ggaren@apple.com> +2010-09-28 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. - Some manual inlining and constant propogation in Date code. - - SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark - says some previously evident stalls are now gone. - - * runtime/DateConstructor.cpp: - (JSC::callDate): - * runtime/DateConversion.cpp: - (JSC::formatTime): - (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants. - - * runtime/DateConversion.h: - * runtime/DateInstance.cpp: - (JSC::DateInstance::calculateGregorianDateTime): - (JSC::DateInstance::calculateGregorianDateTimeUTC): - * runtime/DateInstance.h: - (JSC::DateInstance::gregorianDateTime): - (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into - a UTC and non-UTC variant, and split each variant into a fast inline - case and a slow out-of-line case. - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above. - -2009-11-09 Geoffrey Garen <ggaren@apple.com> - - Build fix: export a new symbol. + Begin hooking up painting in the plug-in process + https://bugs.webkit.org/show_bug.cgi?id=46766 * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Add tryFastRealloc, used by WebKit2. -2009-11-09 Geoffrey Garen <ggaren@apple.com> +2010-09-28 Philippe Normand <pnormand@igalia.com> - Reviewed by Sam "Home Wrecker" Weinig. + Reviewed by Martin Robinson. - Added a tiny cache for Date parsing. - - SunSpider says 1.2% faster. + Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT) + https://bugs.webkit.org/show_bug.cgi?id=46721 - * runtime/DateConversion.cpp: - (JSC::parseDate): Try to reuse the last parsed Date, if present. + Enable GOwnPtr/GRefPtr build only if glib support has been + explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro. - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::resetDateCache): - * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored - this code to make resetting the date cache easier. + * wtf/gobject/GOwnPtr.cpp: + * wtf/gobject/GOwnPtr.h: + * wtf/gobject/GRefPtr.cpp: + * wtf/gobject/GRefPtr.h: - * runtime/JSGlobalObject.h: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for - refactoring. - - * wtf/DateMath.cpp: - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom. - -2009-11-09 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Can cache prototype lookups on uncacheable dictionaries. - https://bugs.webkit.org/show_bug.cgi?id=31198 - - Replace fromDictionaryTransition with flattenDictionaryObject and - flattenDictionaryStructure. This change is necessary as we need to - guarantee that our attempt to convert away from a dictionary structure - will definitely succeed, and in some cases this requires mutating the - object storage itself. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/JSObject.h: - (JSC::JSObject::flattenDictionaryObject): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - * runtime/Structure.cpp: - (JSC::Structure::flattenDictionaryStructure): - (JSC::comparePropertyMapEntryIndices): - * runtime/Structure.h: - -2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Not reviewed, build fix. +2010-09-28 İsmail Dönmez <ismail@namtrac.org> - Remove extra character from r50701. + Reviewed by Andreas Kling. - * JavaScriptCore.pri: - -2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Not reviewed, build fix. - - Revert r50695 because it broke QtWebKit (clean builds). + Test for WINCE instead of WINCEBASIC, compiler always defines WINCE. + Remove reference to unexisting path JavaScriptCore/os-wince. * JavaScriptCore.pri: + * wtf/Assertions.cpp: -2009-11-09 Norbert Leser <norbert.leser@nokia.com> +2010-09-27 Michael Saboff <msaboff@apple.com> - Reviewed by Kenneth Rohde Christiansen. + Reviewed by Geoffrey Garen. - Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro. - Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore), - and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/). + Changed the initialization of JSArray objects to have space for + 3 elements for the constructor that takes a ArgList argument. + This improves v8-deltablue performance by about 2.8% by reducing + the number of realloc() calls. + https://bugs.webkit.org/show_bug.cgi?id=46664 - * JavaScriptCore.pri: + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): -2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-09-27 Gavin Barraclough <barraclough@apple.com> - Reviewed by Kenneth Rohde Christiansen. + Reviewed by Darin Adler. - Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings - https://bugs.webkit.org/show_bug.cgi?id=31040 + Bug 46680 - Inlining string concatenation can regress interpreter performance + <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter + Do not inline calls to string concatenation in the interpret loop. * interpreter/Interpreter.cpp: + (JSC::concatenateStrings): (JSC::Interpreter::privateExecute): -2009-11-08 David Levin <levin@chromium.org> - - Reviewed by NOBODY (speculative snow leopard and windows build fixes). - - * wtf/DateMath.cpp: - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: - (JSC::GregorianDateTime::GregorianDateTime): - -2009-11-08 David Levin <levin@chromium.org> - - Reviewed by NOBODY (chromium build fix). - - Hopefully, the last build fix. - - Create better separation in DateMath about the JSC - and non-JSC portions. Also, only expose the non-JSC - version in the exports. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DateMath.cpp: - (WTF::parseDateFromNullTerminatedCharacters): - (JSC::getUTCOffset): - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::parseDateFromNullTerminatedCharacters): - * wtf/DateMath.h: - (JSC::gmtoffset): +2010-09-27 Anders Carlsson <andersca@apple.com> -2009-11-08 David Levin <levin@chromium.org> + Fix thinko. - Reviewed by NOBODY (chromium build fix). - - For the change in DateMath. + * runtime/JSCell.h: - * config.h: - * wtf/DateMath.cpp: +2010-09-27 Anders Carlsson <andersca@apple.com> -2009-11-06 Geoffrey Garen <ggaren@apple.com> + Reviewed by Adam Roben. - Windows build fix: export some symbols. + Try to fix Windows build. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/JSCell.h: + (JSC::MSVCBugWorkaround::MSVCBugWorkaround): + (JSC::MSVCBugWorkaround::~MSVCBugWorkaround): -2009-11-06 Geoffrey Garen <ggaren@apple.com> +2010-09-27 Erik Arvidsson <arv@chromium.org> - Build fix: updated export file. + Reviewed by Darin Adler. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Add operator == for AtomicString and Vector<Uchar> + https://bugs.webkit.org/show_bug.cgi?id=46509 -2009-11-06 Geoffrey Garen <ggaren@apple.com> + * JavaScriptCore.exp: + * wtf/text/AtomicString.cpp: + (WTF::operator==): + * wtf/text/AtomicString.h: + (WTF::operator==): + (WTF::operator!=): - Build fix: added some #includes. +2010-09-27 Anders Carlsson <andersca@apple.com> - * wtf/CurrentTime.h: - * wtf/DateMath.h: + Try to fix the Windows build. -2009-11-06 Geoffrey Garen <ggaren@apple.com> + * wtf/Noncopyable.h: - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=31197 - Implemented a timezone cache not based on Mac OS X's notify_check API. - - If the VM calculates the local timezone offset from UTC, it caches the - result until the end of the current VM invocation. (We don't want to cache - forever, because the user's timezone may change over time.) - - This removes notify_* overhead on Mac, and, more significantly, removes - OS time and date call overhead on non-Mac platforms. +2010-09-26 Anders Carlsson <andersca@apple.com> - ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny - speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.) + Reviewed by Alexey Proskuryakov and Adam Barth. - * JavaScriptCore.exp: + Add WTF_MAKE_NONCOPYABLE macro + https://bugs.webkit.org/show_bug.cgi?id=46589 - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * runtime/JSGlobalObject.h: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the - DynamicGlobalObjectScope constructor responsible for checking whether a - dynamicGlobalObject has already been set. This eliminated some duplicate - client code, and allowed me to avoid adding even more duplicate client - code. Made DynamicGlobalObjectScope responsible for resetting the - local timezone cache upon first entry to the VM. + Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The + reason for this is that the Itanium C++ ABI states that no empty classes of the same type + can be laid out at the same offset in the class. This can result in objects getting larger + which leads to memory regressions. (One example of this is the String class which grew by + sizeof(void*) when both its base class and its first member variable inherited indirectly + from FastAllocBase). - * runtime/DateConstructor.cpp: - (JSC::constructDate): - (JSC::callDate): - (JSC::dateParse): - (JSC::dateUTC): - * runtime/DateConversion.cpp: - (JSC::parseDate): - * runtime/DateConversion.h: - * runtime/DateInstance.cpp: - (JSC::DateInstance::gregorianDateTime): - * runtime/DateInstance.h: - * runtime/DateInstanceCache.h: - * runtime/DatePrototype.cpp: - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * wtf/DateMath.cpp: - (WTF::getCurrentUTCTime): - (WTF::getCurrentUTCTimeWithMicroseconds): - (WTF::getLocalTime): - (JSC::getUTCOffset): Use the new cache. Also, see below. - (JSC::gregorianDateTimeToMS): - (JSC::msToGregorianDateTime): - (JSC::initializeDates): - (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function - accounts for the local timezone offset, to accomodate our new caching API, - and a (possibly misguided) caller in WebCore. Also, see below. - * wtf/DateMath.h: - (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in - DateMath.* into the JSC namespace. The code needed to move so it could - naturally interact with ExecState and JSGlobalData to support caching. - Logically, it seemed right to move it, too, since this code is not really - as low-level as the WTF namespace might imply -- it implements a set of - date parsing and conversion quirks that are finely tuned to the JavaScript - language. Also removed the Mac OS X notify_* infrastructure. + * wtf/Noncopyable.h: + Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated. - * wtf/CurrentTime.h: - (WTF::currentTimeMS): - (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed - it to make it consistent with WTF's currentTime function. - -2009-11-06 Gabor Loki <loki@inf.u-szeged.hu> - - Unreviewed trivial buildfix after r50595. - - Rename the remaining rshiftPtr calls to rshift32 + * runtime/JSCell.h: + * wtf/RefCounted.h: + Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_rshift): - * jit/JITInlineMethods.h: - (JSC::JIT::emitFastArithImmToInt): +2010-09-27 Philippe Normand <pnormand@igalia.com> -2009-11-06 Gavin Barraclough <barraclough@apple.com> + Reviewed by Martin Robinson. - Reviewed by Oliver Hunt. + [GTK] use ENABLE(GLIB_SUPPORT) + https://bugs.webkit.org/show_bug.cgi?id=46630 - Tidy up the shift methods on the macro-assembler interface. + * wtf/Platform.h: Include GTypedefs.h only if glib support + is explicitly enabled. - Currently behaviour of shifts of a magnitude > 0x1f is undefined. - Instead defined that all shifts are masked to this range. This makes a lot of - practical sense, both since having undefined behaviour is not particularly - desirable, and because this behaviour is commonly required (particularly since - it is required bt ECMA-262 for shifts). +2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com> - Update the ARM assemblers to provide this behaviour. Remove (now) redundant - masks from JITArithmetic, and remove rshiftPtr (this was used in case that - could be rewritten in a simpler form using rshift32, only optimized JSVALUE32 - on x86-64, which uses JSVALUE64!) + Reviewed by Adam Barth. - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::lshift32): - (JSC::MacroAssemblerARM::rshift32): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::lshift32): - (JSC::MacroAssemblerARMv7::rshift32): - * assembler/MacroAssemblerX86_64.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): + jsc: Document the strcat opcode. + https://bugs.webkit.org/show_bug.cgi?id=46571 -2009-11-05 Gavin Barraclough <barraclough@apple.com> + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): - Rubber Stamped by Oliver Hunt. +2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com> - Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET. + Reviewed by Adam Barth. - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArg): - (JSC::JIT::emitPutJITStubArgConstant): - (JSC::JIT::emitGetJITStubArg): - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::getArgument): - * jit/JITStubs.h: + make-bytecode-docs.pl: Add a comment to the generated HTML + https://bugs.webkit.org/show_bug.cgi?id=46570 -2009-11-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + Generate an HTML Comment that this file was generated from + Interpreter.cpp with the make-bytecode-docs.pl script. - Reviewed by Gavin Barraclough. + * docs/make-bytecode-docs.pl: - https://bugs.webkit.org/show_bug.cgi?id=31159 - Fix branchDouble behaviour on ARM THUMB2 JIT. +2010-09-27 Patrick Gansterer <paroga@webkit.org> - The x86 branchDouble behaviour is reworked, and all JIT - ports should follow the x86 port. See bug 31104 and 31151 + Reviewed by Adam Barth. - This patch contains a fix for the traditional ARM port + Remove WTF::stringHash functions + https://bugs.webkit.org/show_bug.cgi?id=46520 - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::fmrs_r): - (JSC::ARMAssembler::ftosid_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::): - (JSC::MacroAssemblerARM::branchDouble): - (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): + Since r68289 the stringHash functions are only wrappers around StringHasher::createHash. + So use StringHasher::createHash directly and remove stringHash. -2009-11-05 Chris Jerdonek <chris.jerdonek@gmail.com> + * wtf/StringHashFunctions.h: + * wtf/text/StringImpl.h: + (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly. - Reviewed by Eric Seidel. +2010-09-26 Patrick Gansterer <paroga@webkit.org> - Removed the "this is part of the KDE project" comments from - all *.h, *.cpp, *.idl, and *.pm files. - - https://bugs.webkit.org/show_bug.cgi?id=31167 - - The maintenance and architecture page in the project wiki lists - this as a task. - - This change includes no changes or additions to test cases - since the change affects only comments. - - * wtf/wince/FastMallocWince.h: + Reviewed by Adam Barth. -2009-11-05 Gabor Loki <loki@inf.u-szeged.hu> + Add WTF::StringHasher::createBlobHash + https://bugs.webkit.org/show_bug.cgi?id=46514 - Reviewed by Gavin Barraclough. + Add this function for hashing FormElementKey and QualifiedNameComponents. - Use ARMv7 specific encoding for immediate constants on ARMv7 target - https://bugs.webkit.org/show_bug.cgi?id=31060 + * wtf/StringHashFunctions.h: + (WTF::StringHasher::createBlobHash): - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::getOp2): Use INVALID_IMM - (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate - (JSC::ARMAssembler::moveImm): Ditto. - (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two - instructions or a PC relative load. - * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be - encoded as an immediate constant. - (JSC::ARMAssembler::): - (JSC::ARMAssembler::movw_r): 16-bit immediate load - (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load - (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for - movw_r and mowt_r +2010-09-26 Patrick Gansterer <paroga@webkit.org> -2009-11-04 Mark Mentovai <mark@chromium.org> + Reviewed by Adam Barth. - Reviewed by Mark Rowe. + REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue) + running websocket/tests/bad-sub-protocol-non-ascii.html + https://bugs.webkit.org/show_bug.cgi?id=46553 - Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to - BUILDING_ON_TIGER and BUILDING_ON_LEOPARD. The TARGETING_ macros - consider the deployment target; the BUILDING_ON_ macros consider the - headers being built against. + Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong. + Add an additional member variable to indicate if we have an pending character + instead of only using an invalid character for this purpose. - * wtf/Platform.h: + * wtf/StringHashFunctions.h: + (WTF::StringHasher::StringHasher): + (WTF::StringHasher::addCharacters): + (WTF::StringHasher::addCharacter): + (WTF::StringHasher::hash): -2009-11-04 Gavin Barraclough <barraclough@apple.com> +2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com> Reviewed by Oliver Hunt. - https://bugs.webkit.org/show_bug.cgi?id=31151 - Fix branchDouble behaviour on ARM THUMB2 JIT. - - The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch - for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't - branch on unordered operands. Similarly, DoubleLessThanOrUnordered & - DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO & - ARMv7Assembler::ConditionLS, whereas they should be using - ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE. + valueOf called in wrong order in atan2 and date constructors. + https://bugs.webkit.org/show_bug.cgi?id=26978 - Fix these, and fill out the missing DoubleConditions. + Fixed the bug where the arguments to atan2 were being evaluated + out of order. - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::): - (JSC::MacroAssemblerARMv7::branchDouble): - -2009-11-04 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Oliver Hunt. - - Enable native call optimizations on ARMv7. (Existing ARM_TRADITIONAL - implementation was generic, worked perfectly, just needed turning on). - - * jit/JITOpcodes.cpp: - * wtf/Platform.h: - -2009-11-04 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig. - - Add a missing assert to the ARMv7 JIT. - - * assembler/ARMv7Assembler.h: - (JSC::ARMThumbImmediate::ARMThumbImmediate): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncATan2): -2009-11-04 Mark Rowe <mrowe@apple.com> +2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com> - Rubber-stamped by Oliver Hunt. + Reviewed by Oliver Hunt. - Remove bogus op_ prefix on dumped version of three opcodes. + valueOf called in wrong order in atan2 and date constructors. + https://bugs.webkit.org/show_bug.cgi?id=26978 - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): + Fixed the issue where the parameters to the Date constructor + were being evaluated to numbers more than once. -2009-11-04 Mark Rowe <mrowe@apple.com> + * runtime/DateConstructor.cpp: + (JSC::constructDate): + (JSC::dateUTC): - Reviewed by Sam Weinig. +2010-09-25 Oliver Hunt <oliver@apple.com> - Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers. + Fix various builds - We do this by having the registerName function return information about the constant if the register - number corresponds to a constant. This requires that registerName, and several functions that call it, - be converted to member functions of CodeBlock so that the constant value can be retrieved. The - ExecState also needs to be threaded down through these functions so that it can be passed on to - constantName when needed. + Relearning the lesson that last minute changes are bad. * bytecode/CodeBlock.cpp: - (JSC::constantName): - (JSC::CodeBlock::registerName): - (JSC::CodeBlock::printUnaryOp): - (JSC::CodeBlock::printBinaryOp): - (JSC::CodeBlock::printConditionalJump): - (JSC::CodeBlock::printGetByIdOp): - (JSC::CodeBlock::printPutByIdOp): (JSC::CodeBlock::dump): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isConstantRegisterIndex): - -2009-11-04 Pavel Heimlich <tropikhajma@gmail.com> - - Reviewed by Alexey Proskuryakov. - - https://bugs.webkit.org/show_bug.cgi?id=30647 - Solaris build failure due to strnstr. - - * wtf/StringExtras.h: Enable strnstr on Solaris, too. - -2009-11-04 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=31104 - Refactor x86-specific behaviour out of the JIT. - - - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix). - - Refactor double to int conversion out into the MacroAssembler. - - 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. - - 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. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::): - (JSC::MacroAssemblerX86Common::convertInt32ToDouble): - (JSC::MacroAssemblerX86Common::branchDouble): - (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32): - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitGetArgumentsLength): * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emitSlow_op_get_argument_by_val): -2009-11-04 Mark Mentovai <mark@chromium.org> - - Reviewed by Eric Seidel. - - Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp. This is supposed - to be set as needed only in wtf/Platform.h. - - * JavaScriptCore.gyp/JavaScriptCore.gyp: +2010-09-25 Oliver Hunt <oliver@apple.com> -2009-11-02 Oliver Hunt <oliver@apple.com> + Reviewed by Cameron Zwarich. - Reviewed by Gavin Barraclough. + Avoid constructing arguments object when accessing length and index properties + https://bugs.webkit.org/show_bug.cgi?id=46572 - REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain - https://bugs.webkit.org/show_bug.cgi?id=31045 + Add opcodes to read argument length and properties, and then implement them. + Much like other lazy opcodes these opcodes take a fast path when the arguments + object has not been instantiated, and fall back on generic access mechanisms + if they are acting on an instantiated object. - Add guards to prevent caching of prototype chain lookups with dictionaries at the - head of the chain. Also add a few tighter assertions to cached prototype lookups - to catch this in future. + 3% win on v8-earleyboyer, no change elsewhere. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitGetArgumentsLength): + (JSC::BytecodeGenerator::emitGetArgumentByVal): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::BracketAccessorNode::emitBytecode): + (JSC::DotAccessorNode::emitBytecode): * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - -2009-11-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Darin Adler. - - PLATFORM(CF) should be set when building for Qt on Darwin - https://bugs.webkit.org/show_bug.cgi?id=23671 - - * wtf/Platform.h: Turn on CF support if both QT and DARWIN - platforms are defined. - -2009-11-02 Dmitry Titov <dimich@chromium.org> - - Reviewed by David Levin. - - Remove threadsafe refcounting from tasks used with WTF::MessageQueue. - https://bugs.webkit.org/show_bug.cgi?id=30612 - - * wtf/MessageQueue.h: - (WTF::MessageQueue::alwaysTruePredicate): - (WTF::MessageQueue::~MessageQueue): - (WTF::MessageQueue::append): - (WTF::MessageQueue::appendAndCheckEmpty): - (WTF::MessageQueue::prepend): - (WTF::MessageQueue::waitForMessage): - (WTF::MessageQueue::waitForMessageFilteredWithTimeout): - (WTF::MessageQueue::tryGetMessage): - (WTF::MessageQueue::removeIf): - The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership - of posted tasks and passes it to the new owner (in another thread) when the task is fetched. - All methods have arguments of type PassOwnPtr<DataType> and return the same type. - - * wtf/Threading.cpp: - (WTF::createThread): - Superficial change to trigger rebuild of JSC project on Windows, - workaround for https://bugs.webkit.org/show_bug.cgi?id=30890 - -2009-10-30 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Fixed failing layout test: restore a special case I accidentally deleted. - - * runtime/DatePrototype.cpp: - (JSC::setNewValueFromDateArgs): In the case of applying a change to a date - that is NaN, reset the date to 0 *and* then apply the change; don't just - reset the date to 0. - -2009-10-30 Geoffrey Garen <ggaren@apple.com> - - Windows build fix: update for object-to-pointer change. - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - -2009-10-29 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=30942 - Use pointers instead of copies to pass GregorianDateTime objects around. - - SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3% - speedup on date-format-tofte. - - * runtime/DateInstance.cpp: - (JSC::DateInstance::gregorianDateTime): - * runtime/DateInstance.h: - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime, - since it no longer has an out parameter. Uses 0 to indicate invalid dates. - -2009-10-30 Zoltan Horvath <zoltan@webkit.org> - - Reviewed by Darin Adler. + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emitSlow_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::emitSlow_op_get_argument_by_val): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emitSlow_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::emitSlow_op_get_argument_by_val): + +2010-09-25 Patrick Gansterer <paroga@webkit.org> - Allow custom memory allocation control for JavaScriptCore's ListHashSet - https://bugs.webkit.org/show_bug.cgi?id=30853 + Unreviewed. - Inherits ListHashSet class from FastAllocBase because it is - instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813. + Fix typo in StringHasher class + https://bugs.webkit.org/show_bug.cgi?id=45970 - * wtf/ListHashSet.h: + * wtf/StringHashFunctions.h: + (WTF::StringHasher::createHash): -2009-10-30 Oliver Hunt <oliver@apple.com> +2010-09-24 Patrick Gansterer <paroga@paroga.com> Reviewed by Gavin Barraclough. - Regression: crash enumerating properties of an object with getters or setters - https://bugs.webkit.org/show_bug.cgi?id=30948 - - Add a guard to prevent us trying to cache property enumeration on - objects with getters or setters. + Add WTF::StringHasher + https://bugs.webkit.org/show_bug.cgi?id=45970 - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::create): + StringHasher is a class for calculation stringHash out of character string. + This class will unify the different usages of the same algorithm. -2009-10-30 Roland Steiner <rolandsteiner@chromium.org> + * wtf/StringHashFunctions.h: + (WTF::StringHasher::StringHasher): + (WTF::StringHasher::addCharacters): + (WTF::StringHasher::addCharacter): + (WTF::StringHasher::hash): + (WTF::StringHasher::createHash): + (WTF::StringHasher::defaultCoverter): + (WTF::StringHasher::addCharactersToHash): + (WTF::stringHash): - Reviewed by Eric Seidel. +2010-09-24 Oliver Hunt <oliver@apple.com> - Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak. + Reviewed by Geoffrey Garen. - Bug 28420 - Implement HTML5 <ruby> rendering - (https://bugs.webkit.org/show_bug.cgi?id=28420) - - No new tests (no functional change). + Variable declarations inside a catch scope don't get propogated to the parent scope + https://bugs.webkit.org/show_bug.cgi?id=46501 - * Configurations/FeatureDefines.xcconfig: + Add logic to make variable declaration look for a scope for the + new variable. This allows us to create a scope (eg. for catch) + and then seal it, so that additional variable declarations + contained are propogated to the correct target. Strangely this + comes out as a performance win, but I think it's mostly cache + effects. -2009-10-29 Oliver Hunt <oliver@apple.com> + * parser/JSParser.cpp: + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::preventNewDecls): + (JSC::JSParser::Scope::allowsNewDecls): + (JSC::JSParser::declareVariable): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionDeclaration): - Reviewed by Maciej Stachowiak. +2010-09-24 İsmail Dönmez <ismail@namtrac.org> - REGRESSION (r50218-r50262): E*TRADE accounts page is missing content - https://bugs.webkit.org/show_bug.cgi?id=30947 - <rdar://problem/7348833> + Reviewed by Csaba Osztrogonác. - The logic for flagging that a structure has non-enumerable properties - was in addPropertyWithoutTransition, rather than in the core Structure::put - method. Despite this I was unable to produce a testcase that caused - the failure that etrade was experiencing, but the new assertion in - getEnumerablePropertyNames triggers on numerous layout tests without - the fix, so in effecti all for..in enumeration in any test ends up - doing the required consistency check. + Add a Windows compatible inttypes.h header to fix WinCE build. + https://bugs.webkit.org/show_bug.cgi?id=46463 - * runtime/Structure.cpp: - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::put): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::checkConsistency): + * os-win32/inttypes.h: Added. -2009-10-29 Gabor Loki <loki@inf.u-szeged.hu> +2010-09-24 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. - Add cacheFlush support for Thumb-2 on Linux - https://bugs.webkit.org/show_bug.cgi?id=30865 + REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit). + https://bugs.webkit.org/show_bug.cgi?id=46448 - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2009-10-28 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - JSC JIT on ARMv7 cannot link jumps >16Mb range - https://bugs.webkit.org/show_bug.cgi?id=30891 - - Start planing all relative jumps as move-32-bit-immediate-to-register-BX. - In the cases where the jump would fall within a relative jump range, use a relative jump. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::~ARMv7Assembler): - (JSC::ARMv7Assembler::LinkRecord::LinkRecord): - (JSC::ARMv7Assembler::): - (JSC::ARMv7Assembler::executableCopy): - (JSC::ARMv7Assembler::linkJump): - (JSC::ARMv7Assembler::relinkJump): - (JSC::ARMv7Assembler::setInt32): - (JSC::ARMv7Assembler::isB): - (JSC::ARMv7Assembler::isBX): - (JSC::ARMv7Assembler::isMOV_imm_T3): - (JSC::ARMv7Assembler::isMOVT): - (JSC::ARMv7Assembler::isNOP_T1): - (JSC::ARMv7Assembler::isNOP_T2): - (JSC::ARMv7Assembler::linkJumpAbsolute): - (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst): - (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond): - (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::makeJump): - (JSC::MacroAssemblerARMv7::makeBranch): - * jit/JIT.h: - * wtf/Platform.h: - -2009-10-28 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Improve for..in enumeration performance - https://bugs.webkit.org/show_bug.cgi?id=30887 - - Improve indexing of an object with a for..in iterator by - identifying cases where get_by_val is being used with a iterator - as the subscript and replace it with a new get_by_pname - bytecode. get_by_pname then optimizes lookups that directly access - the base object. + Roll this back in, with additional logic to prevent us from delaying construction + of functions named "arguments" * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): * bytecode/Opcode.h: * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetByVal): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitInitLazyRegister): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::createLazyRegisterIfNecessary): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitLazyNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionInternal): * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::pushOptimisedForIn): - (JSC::BytecodeGenerator::popOptimisedForIn): * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): * jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::emit_op_get_by_pname): - (JSC::JIT::emitSlow_op_get_by_pname): - * parser/Nodes.cpp: - (JSC::ForInNode::emitBytecode): - * runtime/JSObject.h: - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::create): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::getOffset): - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - * runtime/JSValue.h: - (JSC::JSValue::): - * runtime/Structure.cpp: - (JSC::Structure::addPropertyTransition): - (JSC::Structure::changePrototypeTransition): - (JSC::Structure::despecifyFunctionTransition): - (JSC::Structure::addAnonymousSlotsTransition): - (JSC::Structure::getterSetterTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::addPropertyWithoutTransition): - Track the existence (or not) of non-enumerable properties. - * runtime/Structure.h: - (JSC::Structure::propertyStorageCapacity): - (JSC::Structure::propertyStorageSize): - (JSC::Structure::hasNonEnumerableProperties): - (JSC::Structure::hasAnonymousSlots): - -2009-10-28 Dmitry Titov <dimich@chromium.org> - - Not reviewed, attemp to fix Windows build. - - Touch the cpp file to cause recompile. - - * wtf/Threading.cpp: - (WTF::threadEntryPoint): - -2009-10-28 Dmitry Titov <dimich@chromium.org> - - Reviewed by David Levin. - - https://bugs.webkit.org/show_bug.cgi?id=30805 - Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue. - Existing Database tests cover this since Database removes tasks when it is stopped. - - * wtf/MessageQueue.h: - (WTF::::removeIf): - -2009-10-28 Afonso R. Costa Jr. <afonso.costa@openbossa.org> - - Reviewed by Oliver Hunt. - - [Qt] Enable YARR when YARR_JIT is enabled - https://bugs.webkit.org/show_bug.cgi?id=30730 - - When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should - be toggled also. - - * JavaScriptCore.pri: - -2009-10-24 Martin Robinson <martin.james.robinson@gmail.com> - - Reviewed by Oliver Hunt. - - Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast. - - strict-aliasing warnings in JSFunction.h - https://bugs.webkit.org/show_bug.cgi?id=27869 - - * runtime/JSFunction.h: - (JSC::JSFunction::nativeFunction): - (JSC::JSFunction::scopeChain): - (JSC::JSFunction::setScopeChain): - (JSC::JSFunction::setNativeFunction): - -2009-10-28 Jan-Arve Sæther <jan-arve.saether@nokia.com> - - Reviewed by Tor Arne Vestbø. - - Build-fix for 64-bit Windows + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + (JSC::JIT::emit_op_new_func): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + * parser/Nodes.h: + (JSC::ScopeNode::needsActivationForMoreThanVariables): - * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64 +2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com> -2009-10-28 Gavin Barraclough <barraclough@apple.com> + Unreviewed, rolling out r68223. + http://trac.webkit.org/changeset/68223 + https://bugs.webkit.org/show_bug.cgi?id=46448 - Reviewed by NOBODY (build fix!). + It broke 2-3 tests on bots (Requested by Ossy on #webkit). + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::emitNewFunction): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_func): + (JSC::JIT::emit_op_init_arguments): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_new_func): + (JSC::JIT::emit_op_init_arguments): + * parser/Nodes.h: -2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org> - - Rubber-stamped by Darin Adler. - - Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix - https://bugs.webkit.org/show_bug.cgi?id=30769 - - When using -fvisibility=hidden to hide all internal symbols by default - the malloc symbols will be hidden as well. For memory instrumentation - it is needed to provide an instrumented version of these symbols and - override the normal routines and by changing the visibility back to - default this becomes possible. - - The only other solution would be to use system malloc instead of the - TCmalloc implementation but this will not allow to analyze memory - behavior with the default allocator. - - * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin +2010-09-23 Oliver Hunt <oliver@apple.com> -2009-10-27 Gavin Barraclough <barraclough@apple.com> + Reviewed by Geoffrey Garen. - Rubber Stamped by Samuel Q. Weinig. + Delay construction of functions that aren't captured + https://bugs.webkit.org/show_bug.cgi?id=46433 - Make the asserts protecting the offsets in the JIT more descriptive. + If a function isn't captured by an activation there's no + way it can be accessed indirectly, so we can delay the + construction until it's used (similar to what we do with + arguments). We rename the existing op_init_arguments to + op_init_lazy_reg and removed its implicit handling of + the anonymous argument register, and make op_new_function + take a parameter to indicate whether it should null check + the target slot before creating the function object. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitInitLazyRegister): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::createLazyRegisterIfNecessary): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitLazyNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionInternal): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::emit_op_put_by_id): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + (JSC::JIT::emit_op_new_func): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + * parser/Nodes.h: + (JSC::ScopeNode::needsActivationForMoreThanVariables): -2009-10-27 Geoffrey Garen <ggaren@apple.com> +2010-09-23 David Kilzer <ddkilzer@apple.com> - Reviewed by Sam Weinig. + <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2 + https://bugs.webkit.org/show_bug.cgi?id=46423 - A little bit of refactoring in the date code. + Reviewed by Oliver Hunt. - * JavaScriptCore.exp: Don't export this unused symbol. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Disable the gcc computed + goto hacks added in r55564 when compiling with llvm-gcc-4.2. - * runtime/DateConstructor.cpp: - (JSC::constructDate): +2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi> - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: Removed some unused functions. Changed the default - constructor to ensure that a DateInstance is always initialized. + Reviewed by Darin Adler. - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor, - since it now requires one. + Fix usage of enum as if it was a define + https://bugs.webkit.org/show_bug.cgi?id=46355 - * wtf/DateMath.cpp: - (WTF::msToGregorianDateTime): Only compute our offset from UTC if our - output will require it. Otherwise, our offset is 0. + pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an + enum. Hence, it cannot be used by the preprocessor which always + evaluates that condition as true. This was giving a warning when + compiling with gcc and "-Wundef" flag. -2009-10-27 Geoffrey Garen <ggaren@apple.com> + The second path, when PTHREAD_MUTEX_DEFAULT is not the same of + PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path + and get rid of that #if. - Build fix: Mark DateInstaceCache.h private, so other frameworks can see it. + * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to + set mutex type to PTHREAD_MUTEX_NORMAL. + (WTF::Mutex::Mutex): - * JavaScriptCore.xcodeproj/project.pbxproj: +2010-09-23 Michael Saboff <msaboff@apple.com> -2009-10-27 Geoffrey Garen <ggaren@apple.com> + Reviewed by Geoffrey Garen. - Build fix: re-readded this file. + Removed extraneous truncation of ovector on entry and error exit. + Changed the initialization to -1 of vector to only initialize + the start indecies, which is sufficient for the pattern/subpatterns. + Changed the JIT code to not clear the end index for subpatterns + as it isn't needed. These changes are worth ~2.7% on v8-regexp. + https://bugs.webkit.org/show_bug.cgi?id=46404 - * runtime/DateInstanceCache.h: Added. - (JSC::DateInstanceData::create): - (JSC::DateInstanceData::DateInstanceData): - (JSC::DateInstanceCache::DateInstanceCache): - (JSC::DateInstanceCache::add): - (JSC::DateInstanceCache::lookup): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): -2009-10-27 Geoffrey Garen <ggaren@apple.com> +2010-09-22 Oliver Hunt <oliver@apple.com> - Reviewed by Darin Adler and Oliver Hunt. + Reviewed by Geoff Garen. - https://bugs.webkit.org/show_bug.cgi?id=30800 - Cache recently computed date data. - - SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js. + Only copy captured variables into activation + https://bugs.webkit.org/show_bug.cgi?id=46330 - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Added new file. + We now track free variable information which means that + we no longer need to copy every variable defined in a + function. With this patch activations only retain those + variables needed for correctness. In order to interact + safely with the inspector this means that JSActivation + now provides its own lookup functions so it can avoid + trying to read or write to variables that have been + optimised out. - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - (JSC::DateInstance::getGregorianDateTime): Use the shared cache. + * bytecode/CodeBlock.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * parser/Nodes.h: + (JSC::ScopeNode::capturedVariableCount): + (JSC::ScopeNode::captures): + * runtime/Arguments.h: + (JSC::JSActivation::copyRegisters): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + * runtime/Executable.h: + (JSC::FunctionExecutable::capturedVariableCount): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + (JSC::JSActivation::symbolTableGet): + (JSC::JSActivation::symbolTablePut): + (JSC::JSActivation::getOwnPropertyNames): + (JSC::JSActivation::symbolTablePutWithAttributes): + * runtime/JSActivation.h: - * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion - of a "cache cache". +2010-09-23 Ismail Donmez <ismail@namtrac.org> - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they - can access the DateInstanceCache. + Reviewed by Andreas Kling. - * runtime/JSGlobalData.h: Keep a DateInstanceCache. + Fix jsc.exe build for Windows CE -2009-10-27 James Robinson <jamesr@chromium.org> + * jsc.pro: Add mmtimer.lib for Windows CE. - Reviewed by Darin Fisher. +2010-09-23 Ismail Donmez <ismail@namtrac.org> - Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds. + Unreviewed. - Chromium uses a different method to calculate the current time than is used in - JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time - function are mixed. In particular, timers can get scheduled in the past which leads to 100% CPU use. - See http://code.google.com/p/chromium/issues/detail?id=25892 for an example. + JIT should be disabled on Windows CE. Broken in r64176. - https://bugs.webkit.org/show_bug.cgi?id=30833 + * wtf/Platform.h: - * JavaScriptCore.gyp/JavaScriptCore.gyp: - * wtf/CurrentTime.cpp: +2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu> -2009-10-27 Peter Varga <pvarga@inf.u-szeged.hu> + Reviewed by Gavin Barraclough. - Rubber-stamped by Tor Arne Vestbø. + Reduce the number of BOL checks in YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46260 - Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to - alternative. + Extend the YARR Interpreter with an optimization which reduces the number of + BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a + "TypeAssertionBOL" byteTerm it will be checked just one time. * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::ByteCompiler::compile): + (JSC::Yarr::ByteCompiler::regexBegin): (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction): - (JSC::Yarr::ByteCompiler::alternativeDisjunction): (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateDisjunction): - -2009-10-26 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Darin Adler. - - Make .rc files compile on Windows without depending on MFC headers - https://bugs.webkit.org/show_bug.cgi?id=30750 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use - winresrc.h because it exists even when MFC is not installed, and is - all that's needed here. + * yarr/RegexInterpreter.h: + (JSC::Yarr::ByteTerm::BodyAlternativeBegin): + (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction): + (JSC::Yarr::ByteTerm::BodyAlternativeEnd): + (JSC::Yarr::ByteTerm::AlternativeBegin): + (JSC::Yarr::ByteTerm::AlternativeDisjunction): + (JSC::Yarr::ByteTerm::AlternativeEnd): -2009-10-26 Gabor Loki <loki@inf.u-szeged.hu> +2010-09-22 Michael Saboff <msaboff@apple.com> Reviewed by Gavin Barraclough. - The thunkReturnAddress is on JITStackFrame on ARM JIT as well - https://bugs.webkit.org/show_bug.cgi?id=30782 - - Move the thunkReturnAddress from top of the stack into the JITStackFrame - structure. This is a requirement for JSValue32_64 support on ARM. + Fixed the cross over from alternatives executed once and + those that loop. This fixed the problem where the index + was getting messed up for looping alternatives causing an + infinite loop. + https://bugs.webkit.org/show_bug.cgi?id=46189 - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::ret): Return with link register - (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register - * jit/JIT.h: Remove unused ctiReturnRegister - * jit/JITInlineMethods.h: Same as ARMv7 - (JSC::JIT::restoreArgumentReference): Ditto. - (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto. - * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction - * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use - small trampoline functions which handle return addresses for each - CTI_STUB_FUNCTION. - * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame - (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction - -2009-10-26 Steve Block <steveblock@google.com> - - Reviewed by Darin Adler. - - Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock. - https://bugs.webkit.org/show_bug.cgi?id=30713 - - * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads. - * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined. - * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined. - -2009-10-24 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Holger Freyther. - - [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian - https://bugs.webkit.org/show_bug.cgi?id=30476 - - Assign ReadUserData WriteUserData NetworkServices Symbian capabilities - to jsc.exe. - - * jsc.pro: - -2009-10-23 Steve Block <steveblock@google.com> - - Reviewed by Dmitry Titov. - - Fixes a leak in createThreadInternal on Android. - https://bugs.webkit.org/show_bug.cgi?id=30698 - - * wtf/ThreadingPthreads.cpp: Modified. - (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure. - -2009-10-22 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Alexey Proskuryakov. - - Fixed ASSERT when opening Safari's Caches window while the Web Inspector - is open. - - * runtime/Collector.cpp: - (JSC::typeName): Added two new types to the type name list in the Collector. - These types have been around for a while, but nobody remembered to consider them here. - - * runtime/JSCell.h: - (JSC::JSCell::isPropertyNameIterator): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector - a way to tell if a cell is a JSPropertyNameIterator. - -2009-10-22 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Jon Honeycutt. - - https://bugs.webkit.org/show_bug.cgi?id=30686 - Remove debug-specific def file. - Only Debug_All target uses JavaScriptCore_debug.dll naming, and since - that target is only used internally, maintaining two files just to - suppress a single link warning isn't worthwhile. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed. - -2009-10-21 Jon Honeycutt <jhoneycutt@apple.com> - - <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank - <rdar://problem/7270314> After halting a transparent PluginView on - Windows, the transparency is applied twice - - Reviewed by Dan Bernstein. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Export WTF::deleteOwnedPtr(HDC). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Ditto. - -2009-10-20 Geoffrey Garen <ggaren@apple.com> - - Windows build fix: updated variable name. - - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - -2009-10-20 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Mark Rowe. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the - size of a JSValue because m_jsStrings is an array of JSValues. - -2009-10-20 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Mark Rowe. - - Fixed a 64-bit regression caused by the fix for - https://bugs.webkit.org/show_bug.cgi?id=30570. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since - 64-bit pointers are eight bytes long. - -2009-10-20 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Refactored DateInstance::msToGregorianDateTime so that a DateInstance's - caller doesn't need to supply the DateInstance's own internal value to - the DateInstance. - - * runtime/DateInstance.cpp: - (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime". - - * runtime/DateInstance.h: - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity. - -2009-10-20 Gabor Loki <loki@inf.u-szeged.hu> - - Reviewed by Geoffrey Garen. + (JSC::Yarr::RegexGenerator::generateDisjunction): - The op_next_pname should use 4 bytes addressing mode in case of JSValue32 - https://bugs.webkit.org/show_bug.cgi?id=30570 +2010-09-22 Steve Falkenburg <sfalken@apple.com> - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_next_pname): + Rubber stamped by Jon Honeycutt. -2009-10-20 Gabor Loki <loki@inf.u-szeged.hu> - - Reviewed by Oliver Hunt. + Allow jsc.exe to be run against unversioned ICU. - Move OverridesMarkChildren flag from DatePrototype to its parent class - https://bugs.webkit.org/show_bug.cgi?id=30372 + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * runtime/DateInstance.h: - (JSC::DateInstance::createStructure): - * runtime/DatePrototype.h: +2010-09-22 Kwang Yul Seo <skyul@company100.net> -2009-10-19 Geoffrey Garen <ggaren@apple.com> + Reviewed by Laszlo Gombos. - Reviewed by Oliver Hunt. + Use "typedef wchar_t JSChar" when compiled with RVCT + https://bugs.webkit.org/show_bug.cgi?id=40651 - Tightened up some put_by_id_transition code generation. - https://bugs.webkit.org/show_bug.cgi?id=30539 + Use wchar_t for JSChar and UChar when compiled with RVCT. + Linux is the exception for this rule. - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): No need to do object type - checks or read Structures and prototypes from objects: they're all known - constants at compile time. + * API/JSStringRef.h: + * wtf/unicode/qt4/UnicodeQt4.h: -2009-10-19 Geoffrey Garen <ggaren@apple.com> +2010-09-22 Oliver Hunt <oliver@apple.com> - Reviewed by Sam Weinig. + Reviewed by Gavin Barraclough. - Added a private API for getting a global context from a context, for - clients who want to preserve a context for a later callback. + [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown + https://bugs.webkit.org/show_bug.cgi?id=44245 - * API/APICast.h: - (toGlobalRef): Added an ASSERT, since this function is used more often - than before. + Remove incorrect code from op_load_varargs in the interpreter. - * API/JSContextRef.cpp: - * API/JSContextRefPrivate.h: Added. The new API. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): - * API/tests/testapi.c: - (print_callAsFunction): - (main): Test the new API. +2010-09-22 Oliver Hunt <oliver@apple.com> - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API. + Reviewed by Gavin Barraclough. -2009-10-17 Geoffrey Garen <ggaren@apple.com> + [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails + https://bugs.webkit.org/show_bug.cgi?id=44246 - Reviewed by Oliver Hunt. - - Tightened up some instanceof code generation. - https://bugs.webkit.org/show_bug.cgi?id=30488 + JIT code generated for instanceof was not checking to ensure that the prototype property was + an object, this patch ensures that it does. * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks - - cell type checks and ImplementsDefaultHasIntance checks implicitly - supersede object type checks. + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_instanceof): -2009-10-18 Kwang Yul Seo <skyul@company100.net> +2010-09-22 Patrick Gansterer <paroga@webkit.org> Reviewed by Darin Adler. - Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp. - https://bugs.webkit.org/show_bug.cgi?id=30474 + Inline UTF8SequenceLength + https://bugs.webkit.org/show_bug.cgi?id=45589 - stricmp and strnicmp are deprecated beginning in Visual - C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h. - - * wtf/StringExtras.h: - (strncasecmp): - (strcasecmp): - -2009-10-16 Geoffrey Garen <ggaren@apple.com> - - Build fix: apparently we shouldn't export those symbols? - - * JavaScriptCore.exp: - -2009-10-16 Geoffrey Garen <ggaren@apple.com> - - Build fix: export some symbols. - - * JavaScriptCore.exp: - -2009-10-16 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - structure typeinfo flags should be inherited. - https://bugs.webkit.org/show_bug.cgi?id=30468 - - Add StructureFlag constant to the various JSC classes and use - it for the TypeInfo construction. This allows us to simply - accumulate flags by basing each classes StructureInfo on its parents. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSByteArray.h: - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance. -2009-10-16 Geoffrey Garen <ggaren@apple.com> +2010-09-21 Oliver Hunt <oliver@apple.com> - Reviewed by Oliver Hunt. - - Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings - in JSPropertyNameIterator; inline more code. + RS=Gavin Barraclough. - 1.024x as fast on SunSpider (fasta: 1.43x as fast). + Fix codeblock dumping * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetPropertyNames): - (JSC::BytecodeGenerator::emitNextPropertyName): - * bytecompiler/BytecodeGenerator.h: Added a few extra operands to - op_get_pnames and op_next_pname so that we can track iteration state - in the register file instead of in the JSPropertyNameIterator. (To be - cacheable, the JSPropertyNameIterator must be stateless.) - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): Updated for rename to - "normalizePrototypeChain" and removal of "isCacheable". - - (JSC::Interpreter::privateExecute): Updated for in-RegisterFile - iteration state tracking. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile - iteration state tracking. - - (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname. - - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): Updated for rename to - "normalizePrototypeChain" and removal of "isCacheable". - - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): Added has_property and to_object stubs. Removed op_next_pname - stub, since has_property is all we need anymore. - - * parser/Nodes.cpp: - (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile - iteration state tracking. - - * runtime/JSCell.h: - * runtime/JSObject.cpp: - (JSC::JSObject::getPropertyNames): Don't do caching at this layer - anymore, since we don't create a JSPropertyNameIterator at this layer. - - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::create): Do do caching at this layer. - (JSC::JSPropertyNameIterator::get): Updated for in-RegisterFile - iteration state tracking. - (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings. - - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::size): - (JSC::JSPropertyNameIterator::setCachedStructure): - (JSC::JSPropertyNameIterator::cachedStructure): - (JSC::JSPropertyNameIterator::setCachedPrototypeChain): - (JSC::JSPropertyNameIterator::cachedPrototypeChain): - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::Structure::setEnumerationCache): Don't store iteration state in - a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a - Structure. - - * runtime/JSValue.h: - (JSC::asCell): - * runtime/MarkStack.h: Make those mischievous #include gods happy. - - * runtime/ObjectConstructor.cpp: - - * runtime/Operations.h: - (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies - to normalizePrototypeChain, since it changes dictionary prototypes to - non-dictionary objects. - - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/PropertyNameArray.h: - (JSC::PropertyNameArrayData::PropertyNameArrayData): - (JSC::PropertyNameArray::data): - (JSC::PropertyNameArray::size): - (JSC::PropertyNameArray::begin): - (JSC::PropertyNameArray::end): Simplified some code here to help with - current and future refactoring. - - * runtime/Protect.h: - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::removePropertyWithoutTransition): No need to clear - the enumeration cache with adding / removing properties without - transition. It is an error to add / remove properties without transition - once an object has been observed, and we can ASSERT to catch that. - - * runtime/Structure.h: - (JSC::Structure::enumerationCache): Changed the enumeration cache to - hold a JSPropertyNameIterator. - - * runtime/StructureChain.cpp: - * runtime/StructureChain.h: - (JSC::StructureChain::head): Removed StructureChain::isCacheable because - it was wrong-headed in two ways: (1) It gave up when a prototype was a - dictionary, but instead we want un-dictionary heavily accessed - prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into - a generic test for "cacheable-ness", but hasDefaultGetPropertyNames() - is only releavant to for-in caching. - -2009-10-16 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Adam Roben. - - Add a Debug_All configuration to build entire stack as debug. - Change Debug_Internal to: - - stop using _debug suffix for all WebKit/Safari binaries - - not use _debug as a DLL naming suffix - - use non-debug C runtime lib. - - * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All. - * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all". - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration. - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration. - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration. - -2009-10-16 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Make typeinfo flags default to false - https://bugs.webkit.org/show_bug.cgi?id=30372 - - Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames - flag. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::overridesGetPropertyNames): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): - -2009-10-16 Kevin Ollivier <kevino@theolliviers.com> - - wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion - structure differs. - - * wtf/Platform.h: - -2009-10-16 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Implement ExecutableAllocator for Symbian - https://bugs.webkit.org/show_bug.cgi?id=29946 - - Tested with YARR JIT enabled for Symbian; - This patch does not (yet) enable YARR JIT by default. - - * JavaScriptCore.pri: - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorSymbian.cpp: Added. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - -2009-10-15 Oliver Hunt <oliver@apple.com> - - Reviewed by Darin Adler. - - Make typeinfo flags default to false - https://bugs.webkit.org/show_bug.cgi?id=30372 - - Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GetterSetter.h: - (JSC::GetterSetter::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - (JSC::MarkStack::markChildren): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::createStructure): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::createStructure): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.h: - (JSC::JSString::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::overridesMarkChildren): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - -2009-10-14 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Make typeinfo flags default to false - https://bugs.webkit.org/show_bug.cgi?id=30372 - - Part 1. Reverse the HasStandardGetOwnPropertySlot flag. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * API/JSCallbackObject.h: - (JSC::JSCallbackObject::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/Arguments.h: - (JSC::Arguments::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSActivation.h: - (JSC::JSActivation::createStructure): - * runtime/JSArray.h: - (JSC::JSArray::createStructure): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): - * runtime/JSFunction.h: - (JSC::JSFunction::createStructure): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::createStructure): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - (JSC::JSCell::fastGetOwnPropertySlot): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::createStructure): - * runtime/JSString.h: - (JSC::JSString::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::overridesGetOwnPropertySlot): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObject.h: - (JSC::StringObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - -2009-10-14 Kevin Ollivier <kevino@theolliviers.com> -2009-10-14 Darin Adler <darin@apple.com> - - Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994 - can build on Windows. - - * wtf/MathExtras.h: Added llround and llroundf for Windows. - -2009-10-14 Kevin Ollivier <kevino@theolliviers.com> - - wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs. - - * wtf/Platform.h: - -2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Simon Hausmann. - - Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH - https://bugs.webkit.org/show_bug.cgi?id=30278 - - Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH - from the make system into common code. - - * wtf/Platform.h: - -2009-10-13 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Darin Adler. - - ARM compiler does not understand reinterpret_cast<void*> - https://bugs.webkit.org/show_bug.cgi?id=29034 - - Change reinterpret_cast<void*> to regular C style (void*) cast - for the ARM RVCT compiler. - - * assembler/MacroAssemblerCodeRef.h: - (JSC::FunctionPtr::FunctionPtr): - * jit/JITOpcodes.cpp: Cast to FunctionPtr first - instead of directly casting to reinterpret_cast - * jit/JITStubCall.h: Ditto + change the type of m_stub - from void* to FunctionPtr. - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::call): - * jit/JITStubs.cpp: Ditto. - (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)): - -2009-10-11 Oliver Hunt <oliver@apple.com> - - Re-enable the JIT. - - * wtf/Platform.h: - -2009-10-10 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Support for String.trim(), String.trimLeft() and String.trimRight() methods - https://bugs.webkit.org/show_bug.cgi?id=26590 - - Implement trim, trimLeft, and trimRight - - * runtime/StringPrototype.cpp: - (JSC::isTrimWhitespace): - Our normal string whitespace function does not include U+200B which - is needed for compatibility with mozilla's implementation of trim. - U+200B does not appear to be expected according to spec, however I am - choosing to be lax, and match mozilla behavior so have added this - exception. - (JSC::trimString): + * runtime/Executable.h: + (JSC::ScriptExecutable::ScriptExecutable): -2009-10-09 Geoffrey Garen <ggaren@apple.com> +2010-09-21 Oliver Hunt <oliver@apple.com> - Reviewed by Oliver Hunt. + Reviewed by Geoffrey Garen. - Eliminated some legacy bytecode weirdness. - - Use vPC[x] subscripting instead of ++vPC to access instruction operands. - This is simpler, and often more efficient. + Speed up function.apply(..., arguments) + https://bugs.webkit.org/show_bug.cgi?id=46207 - To support this, and to remove use of hard-coded offsets in bytecode and - JIT code generation and dumping, calculate jump offsets from the beginning - of an instruction, rather than the middle or end. - - Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of - opcodes. - - SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter - mode. + Add code to do argument copying inline in the case + where we're using Function.apply to forward our arguments + directly. - * bytecode/CodeBlock.cpp: - (JSC::printConditionalJump): - (JSC::CodeBlock::dump): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJump): - (JSC::BytecodeGenerator::emitJumpIfTrue): - (JSC::BytecodeGenerator::emitJumpIfFalse): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::emitComplexJumpScopes): - (JSC::BytecodeGenerator::emitJumpScopes): - (JSC::BytecodeGenerator::emitNextPropertyName): - (JSC::BytecodeGenerator::emitCatch): - (JSC::BytecodeGenerator::emitJumpSubroutine): - (JSC::prepareJumpTableForImmediateSwitch): - (JSC::prepareJumpTableForCharacterSwitch): - (JSC::prepareJumpTableForStringSwitch): - (JSC::BytecodeGenerator::endSwitch): - * bytecompiler/Label.h: - (JSC::Label::setLocation): - (JSC::Label::bind): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::createExceptionScope): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::privateCompileSlowCases): + Splitted op_load_varargs into fast and slow paths, so add the call + to the slow path generator. + * jit/JIT.h: + * jit/JITCall32_64.cpp: + Remove 32bit specific emit_op_load_varargs as the logic is the + same for all value representations * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_loop): - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emitSlow_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emitSlow_op_loop_if_lesseq): - (JSC::JIT::emit_op_loop_if_true): - (JSC::JIT::emitSlow_op_loop_if_true): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emitSlow_op_jfalse): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emitSlow_op_jtrue): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_jsr): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::emit_op_jmp_scopes): + (JSC::JIT::emit_op_load_varargs): + Copy arguments inline + (JSC::JIT::emitSlow_op_load_varargs): -2009-10-09 Geoffrey Garen <ggaren@apple.com> +2010-09-21 Geoffrey Garen <ggaren@apple.com> - Reviewed by Sam Weinig. + Reviewed by Oliver Hunt. - Migrated some code that didn't belong out of Structure. + <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in + interpreter due to 54724 and 54596 - SunSpider says maybe 1.03x faster. - - * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of - a Structure's prototype the direct responsility of the object using it. - (Giving Structure a mark function was misleading because it implied that - all live structures get marked during GC, when they don't.) + Fixed a typo (using "UNLIKELY" instead of "LIKELY"). - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored - on the global object. Maybe this wasn't necessary, but now we don't have - to wonder. - - * runtime/JSObject.cpp: - (JSC::JSObject::getPropertyNames): - (JSC::JSObject::getOwnPropertyNames): - (JSC::JSObject::getEnumerableNamesFromClassInfoTable): - * runtime/JSObject.h: - (JSC::JSObject::markChildrenDirect): - * runtime/PropertyNameArray.h: - * runtime/Structure.cpp: - * runtime/Structure.h: - (JSC::Structure::setEnumerationCache): - (JSC::Structure::enumerationCache): Moved property name gathering code - from Structure to JSObject because having a Structure iterate its JSObject - was a layering violation. A JSObject is implemented using a Structure; not - the other way around. - -2009-10-09 Mark Rowe <mrowe@apple.com> + * wtf/PassRefPtr.h: + (WTF::refIfNotNull): + (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs + hold real data. Also, in cases where they do not hold real data, the + compiler usually sees a call to release() right before the call to the + destructor, so it can probably optimize out the test completely. - Attempt to fix the GTK release build. +2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch> - * GNUmakefile.am: Include Grammar.cpp in release builds now that - AllInOneFile.cpp is gone. + Reviewed by Martin Robinson. -2009-10-09 Gabor Loki <loki@inf.u-szeged.hu> + Build issues with Windows versions of the GTK+ port + https://bugs.webkit.org/show_bug.cgi?id=45844 - Rubber-stamped by Eric Seidel. + Link with winmm.dll when necessary and specify the executable extension + explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@ + rule actually works. - Add ARM JIT support for Gtk port (disabled by default) - https://bugs.webkit.org/show_bug.cgi?id=30228 + Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses + a section in ThreadSpecific.cpp * GNUmakefile.am: -2009-10-08 Geoffrey Garen <ggaren@apple.com> - - Tiger build fix: added a few more variable initializations. +2010-09-21 Martin Robinson <mrobinson@igalia.com> - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncSearch): + Reviewed by Xan Lopez. -2009-10-08 Geoffrey Garen <ggaren@apple.com> + [GTK] 'make dist' should be fixed in preparation for the next release + https://bugs.webkit.org/show_bug.cgi?id=46129 - Qt build fix: added missing #include. + * GNUmakefile.am: Update the sources list to include missing headers. - * jsc.cpp: +2010-09-21 Dave Tapuska <dtapuska@rim.com> -2009-10-08 Geoffrey Garen <ggaren@apple.com> + Reviewed by Csaba Osztrogonác. - Tiger build fix: initialize variable whose initialization the compiler - can't otherwise figure out. + https://bugs.webkit.org/show_bug.cgi?id=45673 - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): + r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be + 8 byte aligned. A non 8 byte divisible value for this will + cause the sp to become non 8 byte aligned. -2009-10-08 Geoffrey Garen <ggaren@apple.com> + Verify and correct offset values that r65596 effected that + weren't updated. - Windows build fix: updated exports. + * jit/JITStubs.cpp: + * jit/JITStubs.h: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: +2010-09-21 Xan Lopez <xlopez@igalia.com> -2009-10-08 Geoffrey Garen <ggaren@apple.com> + Reviewed by Martin Robinson. - Tiger build fix: fixed file name case. + Fix Opcode stats compilation + https://bugs.webkit.org/show_bug.cgi?id=46079 - * JavaScriptCore.xcodeproj/project.pbxproj: + The FixedArray API had changed, and <stdio.h> was not included for + printf. -2009-10-08 Geoffrey Garen <ggaren@apple.com> + * bytecode/Opcode.cpp: + (JSC::OpcodeStats::~OpcodeStats): - Reviewed by Maciej Stachowiak. +2010-09-20 Michael Saboff <msaboff@apple.com> - At long last, I pronounce the death of AllInOneFile.cpp. - - SunSpider reports a 1.01x speedup. + Reviewed by Gavin Barraclough. - * AllInOneFile.cpp: Removed. - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files - to compilation stages. + Fixed detection of alternative smaller than the first alternative + to only check looping alternatives. + https://bugs.webkit.org/show_bug.cgi?id=46049 - * parser/Grammar.y: - * parser/Lexer.cpp: - * parser/Lexer.h: - (JSC::jscyylex): - * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): - * runtime/Collector.h: - * runtime/JSCell.cpp: - (JSC::JSCell::operator new): - * runtime/JSCell.h: - (JSC::JSCell::operator new): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::operator new): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::operator new): - * runtime/JSString.cpp: - * runtime/JSString.h: - (JSC::jsString): - (JSC::jsSubstring): - (JSC::jsOwnedString): - * runtime/RegExpConstructor.cpp: - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate): - (JSC::RegExpConstructorPrivate::lastOvector): - (JSC::RegExpConstructorPrivate::tempOvector): - (JSC::RegExpConstructorPrivate::changeLastOvector): - (JSC::RegExpConstructor::performMatch): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): * yarr/RegexJIT.cpp: - * yarr/RegexJIT.h: - (JSC::Yarr::executeRegex): Inlined a few things that Shark said - were hot, on the presumption that AllInOneFile.cpp used to inline them - automatically. - -2009-10-08 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Fix for JIT'ed op_call instructions (evals, constructs, etc.) - when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64) + (JSC::Yarr::RegexGenerator::generateDisjunction): - https://bugs.webkit.org/show_bug.cgi?id=30201 +2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu> - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): + Reviewed by Geoffrey Garen. -2009-10-07 Geoffrey Garen <ggaren@apple.com> + REGRESSION(67790): jsc tests are failed with YARR interpreter + https://bugs.webkit.org/show_bug.cgi?id=46083 - Windows build fix: removed no longer exported symbol. + Fix the initializing of the lastSubpatternId member of + parentheses. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): -2009-10-07 Geoffrey Garen <ggaren@apple.com> +2010-09-20 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. - Fixed <rdar://problem/5751979> Database code takes JSLock on secondary - thread, permanently slowing down JavaScript - - Removed the optional lock from Heap::protect, Heap::unprotect, and friends, - since WebCore no longer uses it. + Bug 46077 - ASSERT failure in YARR JIT - * JavaScriptCore.exp: - * runtime/Collector.cpp: - (JSC::Heap::protect): - (JSC::Heap::unprotect): - (JSC::Heap::markProtectedObjects): - (JSC::Heap::protectedGlobalObjectCount): - (JSC::Heap::protectedObjectCount): - (JSC::Heap::protectedObjectTypeCounts): - * runtime/Collector.h: + We will currently attempt to loop if there are multiple alternatives, they are all + BOL predicated, and the last alternative is longer then the first - however if all + alternatives are BOL predicated the head of loop label will not have been set, and + we'll try to link a jump to an undefined label. Stop doing so. -2009-10-07 Zoltan Horvath <zoltan@webkit.org> + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): - Reviewed by Darin Adler. +2010-09-20 Adam Roben <aroben@apple.com> - Allow custom memory allocation control for JavaScriptCore's IdentifierArena - https://bugs.webkit.org/show_bug.cgi?id=30158 + Export RegExpObject::info from JavaScriptCore - Inherits IdentifierArena class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36. + This allows obj->inherits(&RegExpObject::info) to work correctly from + outside JavaScriptCore.dll on Windows. - * parser/ParserArena.h: + Fixes <http://webkit.org/b/46098> + fast/loader/stateobjects/pushstate-object-types.html fails on Windows -2009-10-07 Adam Roben <aroben@apple.com> + Reviewed by John Sullivan. - Export DateInstance::info in a way that works on Windows + * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as + we already have for some other classes whose info members have to be + used from outside the DLL. - Fixes <http://webkit.org/b/30171> - fast/dom/Window/window-postmessage-clone.html fails on Windows +2010-09-19 Gavin Barraclough <barraclough@apple.com> - Reviewed by Anders Carlsson. + Windows build fix pt 2. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Removed the export of DateInstance::info from here. - - * runtime/DateInstance.h: Use JS_EXPORTDATA to export - DateInstance::info, which is the required way of exporting data on - Windows. -2009-10-07 Jørgen Lind <jorgen.lind@nokia.com> +2010-09-19 Gavin Barraclough <barraclough@apple.com> - Reviewed by Simon Hausmann. + Windows build fix pt 1. - When enabling or disabling the JIT through .qmake.cache, make sure - to also toggle ENABLE_YARR_JIT. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.pri: +2010-09-19 Gavin Barraclough <barraclough@apple.com> -2009-10-06 Priit Laes <plaes@plaes.org> + Build fix - implicit double-to-int conversion invalid on 32-bit. - Reviewed by Gavin Barraclough. + * runtime/DatePrototype.cpp: + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncSetYear): - Linking fails with "relocation R_X86_64_PC32 against symbol - `cti_vm_throw'" - https://bugs.webkit.org/show_bug.cgi?id=28422 +2010-09-19 Gavin Barraclough <barraclough@apple.com> - * jit/JITStubs.cpp: - Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up - in text segment causing relocation errors on amd64 architecture. - Introduced new define SYMBOL_STRING_RELOCATION for such symbols. + Reviewed by Oliver Hunt. -2009-10-06 Oliver Hunt <oliver@apple.com> + Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod. - Windows linking fix + These methods implement the same conversion (see discussion in the notes + of sections of 9.5 and 9.6 of the spec), only differing in how the result + is interpretted. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Date prototype is incorrectly using toInt32, and this is causing us to + provide an output value indicating whether the input to ToInt32 was finite + (the corresponding methods on Date are actually spec'ed to use ToInteger, + not ToInt32). This patch partially fixes this in order to remove this + bogus output value, hoewever more work will be require to bring Date + fully up to spec compliance (the constructor is still performing ToInt32 + conversions). -2009-10-06 Oliver Hunt <oliver@apple.com> + * JavaScriptCore.exp: + * runtime/DatePrototype.cpp: + (JSC::fillStructuresUsingTimeArgs): + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/JSValue.cpp: + (JSC::toInt32): + * runtime/JSValue.h: + (JSC::toUInt32): + (JSC::JSValue::toInt32): + (JSC::JSValue::toUInt32): - Reviewed by NOBODY (build fix). +2010-09-18 Darin Adler <darin@apple.com> - Windows build fix. + First step in fixing Windows build. - * runtime/DateInstance.cpp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Removed incorrect symbol. The build will probably still fail, + but the failure will tell us what symbol to add. -2009-10-05 Oliver Hunt <oliver@apple.com> +2010-09-18 Michael Saboff <msaboff@apple.com> Reviewed by Gavin Barraclough. - It should be possible to post (clone) built-in JS objects to Workers - https://bugs.webkit.org/show_bug.cgi?id=22878 + Added code to unroll regular expressions containing ^. + Alternatives that begin with ^ are tagged during parsing + and rolled up in containing sub expression structs. + After parsing, a regular expression flagged as containing + a ^ (a.k.a. BOL) is processed further in optimizeBOL(). + A copy of the disjunction is made excluding alternatives that + are rooted with BOL. The original alternatives are flagged + to only be executed once. The copy of the other alternatives are + added to the original expression. + In the case that all original alternatives are flagged, there + won't be any looping alternatives. + The JIT generator will emit code accordingly, executing the + original alternatives once and then looping over the + alternatives that aren't anchored with a BOL (if any). + https://bugs.webkit.org/show_bug.cgi?id=45787 + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::assertionBOL): + (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): + (JSC::Yarr::RegexPatternConstructor::copyDisjunction): + (JSC::Yarr::RegexPatternConstructor::copyTerm): + (JSC::Yarr::RegexPatternConstructor::optimizeBOL): + (JSC::Yarr::compileRegex): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + * yarr/RegexPattern.h: + (JSC::Yarr::PatternAlternative::PatternAlternative): + (JSC::Yarr::PatternAlternative::setOnceThrough): + (JSC::Yarr::PatternAlternative::onceThrough): + (JSC::Yarr::PatternDisjunction::PatternDisjunction): + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): - Expose helpers to throw correct exceptions during object graph walk - used for cloning and add a helper function to create Date instances - without going through the JS Date constructor function. +2010-09-18 Patrick Gansterer <paroga@paroga.com> - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: - * runtime/ExceptionHelpers.cpp: - (JSC::createTypeError): - * runtime/ExceptionHelpers.h: + Reviewed by Darin Adler. -2009-10-06 David Levin <levin@chromium.org> + Rename Wince files to WinCE + https://bugs.webkit.org/show_bug.cgi?id=37287 - Reviewed by Oliver Hunt. + * wtf/unicode/Unicode.h: + * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp. + * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h. + * wtf/unicode/wince/UnicodeWince.cpp: Removed. + * wtf/unicode/wince/UnicodeWince.h: Removed. + * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h. + * wtf/wince/FastMallocWince.h: Removed. - StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer. - https://bugs.webkit.org/show_bug.cgi?id=30095 +2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org> - * wtf/CrossThreadRefCounted.h: - Removed an unused function and assert improvement. - (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts. - (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method. - (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method. - (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially - non-threadsafe operation, add an assert that the class is owned by the current thread. + Reviewed by Kenneth Rohde Christiansen. -2009-10-05 Kevin Ollivier <kevino@theolliviers.com> + Enable Platform Strategies on Qt - wx build fix. Add Symbian files to the list of excludes. + [Qt] Turn on PLATFORM_STRATEGIES + https://bugs.webkit.org/show_bug.cgi?id=45831 - * wscript: + * wtf/Platform.h: Enable Platform Strategies when building QtWebkit -2009-10-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> +2010-09-17 Oliver Hunt <oliver@apple.com> - Reviewed by Simon Hausmann. + Reviewed by Gavin Barraclough. - [Qt] Remove precompiled header from JavaScriptCore compilation to - prevent qmake warning during autonomous compilation. - https://bugs.webkit.org/show_bug.cgi?id=30069 + Imprecise tracking of variable capture leads to overly pessimistic creation of activations + https://bugs.webkit.org/show_bug.cgi?id=46020 - * JavaScriptCore.pro: + The old logic for track free and captured variables would cause us + to decide we needed an activation in every function along the scope + chain between a variable capture and its declaration. We now track + captured variables precisely which requires a bit of additional work -2009-10-02 Geoffrey Garen <ggaren@apple.com> + The most substantial change is that the parsing routine needs to + be passed the list of function parameters when reparsing a function + as when reparsing we don't parse the function declaration itself only + its body. - Reviewed by Sam Weinig. + * JavaScriptCore.exp: + * parser/JSParser.cpp: + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::needsFullActivation): + We need to distinguish between use of a feature that requires + an activation and eval so we now get this additional flag. + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::JSParser::Scope::getCapturedVariables): + We can't simply return the list of "capturedVariables" now as + is insufficiently precise, so we compute them instead. + (JSC::JSParser::popScope): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseMemberExpression): + * parser/JSParser.h: + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + Pass function parameters (if available) to the parser. - Removed the concept of a "fast access cutoff" in arrays, because it - punished some patterns of array access too much, and made things too - complex for inlining in some cases. - - 1.3% speedup on SunSpider. +2010-09-17 Anders Carlsson <andersca@apple.com> - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when - getting / putting from / to an array. Inline putting past the end of - the array. + Reviewed by Sam Weinig. - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::getOwnPropertyNames): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::checkConsistency): - * runtime/JSArray.h: - (JSC::JSArray::canGetIndex): - (JSC::JSArray::canSetIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and - replaced with checks for JSValue() to detect reads and writes from / to - uninitialized parts of the array. + Add IsFloatingPoint and IsArithmetic type traits + https://bugs.webkit.org/show_bug.cgi?id=46018 -2009-10-02 Jonni Rainisto <jonni.rainisto@nokia.com> + * wtf/TypeTraits.h: + * wtf/TypeTraits.cpp: - Reviewed by Darin Adler. +2010-09-17 Martin Robinson <mrobinson@igalia.com> - Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined - https://bugs.webkit.org/show_bug.cgi?id=29956 + Reviewed by Oliver Hunt. - * wtf/RandomNumber.cpp: - (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand() + [GTK] FontPlatformDataFreeType should use smart pointers to hold its members + https://bugs.webkit.org/show_bug.cgi?id=45917 -2009-10-02 Geoffrey Garen <ggaren@apple.com> + Added support to PlatformRefPtr for handling HashTableDeletedValue. - Reviewed by Sam Weinig. + * wtf/PlatformRefPtr.h: + (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue. + (WTF::PlatformRefPtr::isHashTableDeletedValue): Added. - Take one branch instead of two to test for JSValue(). - - 1.1% SunSpider speedup. +2010-09-16 Oliver Hunt <oliver@apple.com> - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_create_arguments): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead - of testing for the cell tag with a 0 payload. - - * runtime/JSValue.cpp: - (JSC::JSValue::description): Added support for dumping the new empty value, - and deleted values, in debug builds. + Reviewed by Geoffrey Garen. - * runtime/JSValue.h: - (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag. + Crash due to timer triggered GC on one heap while another heap is active + https://bugs.webkit.org/show_bug.cgi?id=45932 + <rdar://problem/8318446> - (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value - tag, to avoid having two different c++ versions of null / empty. + The GC timer may trigger for one heap while another heap is active. This + is safe, but requires us to ensure that we have temporarily associated the + thread's identifierTable with the heap we're collecting on. Otherwise we + may end up with the identifier tables in an inconsistent state leading to + an eventual crash. - (JSC::JSValue::operator bool): Test for the empty value tag, instead - of testing for the cell tag with a 0 payload. + * runtime/Collector.cpp: + (JSC::Heap::allocate): + (JSC::Heap::reset): + (JSC::Heap::collectAllGarbage): + Add assertions to ensure we have the correct identifierTable active + while collecting. + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallbackPlatformData::trigger): + Temporarily make the expected IdentifierTable active + * wtf/WTFThreadData.h: + (JSC::IdentifierTable::remove): + Make it possible to see when IdentifierTable::remove has succeeded + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::~StringImpl): + CRASH if an StringImpl is an Identifier but isn't present in the + active IdentifierTable. If we get to this state something has + gone wrong and we should just crash immediately. -2009-10-02 Steve Falkenburg <sfalken@apple.com> +2010-09-16 Martin Robinson <mrobinson@igalia.com> - Reviewed by Mark Rowe. + Reviewed by Xan Lopez. - <https://bugs.webkit.org/show_bug.cgi?id=29989> - Safari version number shouldn't be exposed in WebKit code - - For a WebKit version of 532.3.4: - Product version is: 5.32.3.4 (was 4.0.3.0) - File version is: 5.32.3.4 (was 4.532.3.4) + [GTK] Implement dissolveDragImageToFraction + https://bugs.webkit.org/show_bug.cgi?id=45826 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: + * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose. -2009-10-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> +2010-09-16 Eric Uhrhane <ericu@chromium.org> - Rubber-stamped by Simon Hausmann. + Reviewed by Jian Li. - Fix the Qt on Mac OS X build. + Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM. + https://bugs.webkit.org/show_bug.cgi?id=45798 - * wtf/FastMalloc.cpp: + * Configurations/FeatureDefines.xcconfig: -2009-10-02 Jørgen Lind <jorgen.lind@nokia.com> +2010-09-15 Oliver Hunt <oliver@apple.com> - Reviewed by Simon Hausmann. + Reviewed by Geoffrey Garen. - Allow enabling and disabling of the JIT through a qmake variable. + Use free variable analysis to improve activation performance + https://bugs.webkit.org/show_bug.cgi?id=45837 + + Adds free and captured variable tracking to the JS parser. This + allows us to avoid construction of an activation object in some + cases. Future patches will make more use of this information to + improve those cases where activations are still needed. + + * parser/ASTBuilder.h: + * parser/JSParser.cpp: + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::declareVariable): + (JSC::JSParser::Scope::useVariable): + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::JSParser::Scope::capturedVariables): + (JSC::JSParser::ScopeRef::ScopeRef): + (JSC::JSParser::ScopeRef::operator->): + (JSC::JSParser::ScopeRef::index): + (JSC::JSParser::currentScope): + (JSC::JSParser::pushScope): + (JSC::JSParser::popScope): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parsePrimaryExpression): + * parser/Nodes.cpp: + (JSC::ScopeNodeData::ScopeNodeData): + (JSC::ScopeNode::ScopeNode): + (JSC::ProgramNode::ProgramNode): + (JSC::ProgramNode::create): + (JSC::EvalNode::EvalNode): + (JSC::EvalNode::create): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (JSC::ScopeNode::needsActivation): + (JSC::ScopeNode::hasCapturedVariables): + * parser/Parser.cpp: + (JSC::Parser::didFinishParsing): + * parser/Parser.h: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + * runtime/Executable.h: + (JSC::ScriptExecutable::needsActivation): + (JSC::ScriptExecutable::recordParse): - Qt's configure may set this variable through .qmake.cache if a - commandline option is given and/or the compile test for hwcap.h - failed/succeeded. +2010-09-14 Hyung Song <beergun@company100.net> - * JavaScriptCore.pri: + Reviewed by Kent Tamura. -2009-10-01 Mark Rowe <mrowe@apple.com> + [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type. + https://bugs.webkit.org/show_bug.cgi?id=44764 - Fix the Tiger build. Don't unconditionally enable 3D canvas as it is not supported on Tiger. + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.cpp: + (WTF::deleteOwnedPtr): - * Configurations/FeatureDefines.xcconfig: +2010-09-14 Darin Adler <darin@apple.com> -2009-10-01 Yongjun Zhang <yongjun.zhang@nokia.com> + Reviewed by Geoffrey Garen. - Reviewed by Darin Adler. + Sort with non-numeric custom sort function fails on array with length but no values + https://bugs.webkit.org/show_bug.cgi?id=45781 - https://bugs.webkit.org/show_bug.cgi?id=29187 + * runtime/JSArray.cpp: + (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead + exit for any array without values, even if it has a non-0 length. - Don't inline ~ListRefPtr() to work around winscw compiler forward declaration - bug regarding templated classes. +2010-09-14 Steve Falkenburg <sfalken@apple.com> - The compiler bug is reported at: - https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812 + Windows production build fix. + Roll out r65143. - The change will be reverted when the above bug is fixed in winscw compiler. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * wtf/ListRefPtr.h: - (WTF::::~ListRefPtr): +2010-09-14 Kwang Yul Seo <skyul@company100.net> -2009-10-01 Zoltan Horvath <zoltan@webkit.org> + Reviewed by Darin Adler. - Reviewed by Simon Hausmann. + Share UnicodeMacrosFromICU.h + https://bugs.webkit.org/show_bug.cgi?id=45710 - [Qt] Allow custom memory allocation control for the whole JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=27029 + glib, qt4 and wince use the same macros from ICU. + Remove the code duplication and use the same header file. - Since in JavaScriptCore almost every class which has been instantiated by operator new is - inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port - when USE_SYSTEM_MALLOC=0. + * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h. + * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed. + * wtf/unicode/qt4/UnicodeQt4.h: + * wtf/unicode/wince/UnicodeWince.h: - Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread(). - (It's needed for the functionality of TCmalloc.) +2010-09-13 Darin Adler <darin@apple.com> - Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled. + Reviewed by Adam Barth. - * JavaScriptCore.pri: - * wtf/FastMalloc.cpp: - (WTF::sleep): - * wtf/FastMalloc.h: + Preparation for eliminating deprecatedParseURL + https://bugs.webkit.org/show_bug.cgi?id=45695 -2009-09-30 Gabor Loki <loki@inf.u-szeged.hu> + * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from + the HTML tree builder. - Reviewed by George Staikos. +2010-09-13 Darin Fisher <darin@chromium.org> - Defines two pseudo-platforms for ARM and Thumb-2 instruction set. - https://bugs.webkit.org/show_bug.cgi?id=29122 + Reviewed by David Levin. - Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 - macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used - when Thumb-2 instruction set is the required target. The - PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In - case where the code is common the PLATFORM(ARM) have to be used. + Add option to conditionally compile smooth scrolling support. + https://bugs.webkit.org/show_bug.cgi?id=45689 - Modified by George Wright <gwright@rim.com> to correctly work - with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB - compiler macros, as well as adding readability changes. + ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms. * wtf/Platform.h: -2009-09-30 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Devirtualise array toString conversion - - Tweak the implementation of Array.prototype.toString to have a fast path - when acting on a true JSArray. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): +2010-09-13 Adam Roben <aroben@apple.com> -2009-09-30 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + Copy JavaScriptCore's generated sources to the right directory - Reviewed by Geoffrey Garen. + * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo. - Buildfix for platforms using JSVALUE32. - https://bugs.webkit.org/show_bug.cgi?id=29915 +2010-09-13 Kwang Yul Seo <skyul@company100.net> - After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case. - Also removed unreachable code. + Reviewed by Kent Tamura. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - - Declaration of "OperandTypes types" moved before first use. - - Typos fixed: dst modified to result, regT2 added. - - Unreachable code removed. - (JSC::JIT::emitSlow_op_add): - - Missing declaration of "OperandTypes types" added. + [BREWMP] Don't call _msize + https://bugs.webkit.org/show_bug.cgi?id=45556 -2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com> + Because Brew MP uses its own memory allocator, it is not correct to use + _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard. - Reviewed by Simon Hausmann. + * wtf/FastMalloc.cpp: + (WTF::fastMallocSize): - Reduce heap size on Symbian from 64MB to 8MB. +2010-09-11 Simon Hausmann <simon.hausmann@nokia.com> - This is not a perfect fix, it requires more fine tuning. - But this makes it possible again to debug in the emulator, - which is more important in order to be able to fix other - run-time issues. + Reviewed by Andreas Kling. - * runtime/Collector.h: + [Qt] V8 port: webcore project files changes + https://bugs.webkit.org/show_bug.cgi?id=45141 -2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com> + * JavaScriptCore.pro: Moved wtf specific files to wtf.pri, + so that they can also be used from WebCore.pro for v8 builds. + * wtf/wtf.pri: Added. - Reviewed by Simon Hausmann. +2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch> - Fix CRASH() macro for Symbian build. + Reviewed by Andreas Kling. - * wtf/Assertions.h: Added missing } + Add a define missing when building with glib unicode backend + https://bugs.webkit.org/show_bug.cgi?id=45544 -2009-09-29 Geoffrey Garen <ggaren@apple.com> + * wtf/unicode/glib/UnicodeMacrosFromICU.h: - Reviewed by Gavin Barraclough. +2010-09-10 Stephanie Lewis <slewis@apple.com> - Inlined a few math operations. + Reviewed by Alexey Proskuryakov. - ~1% SunSpider speedup. + Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know + about the JIT and other implementation details of JavaScriptCore. Necessary + to fix PPC build. + + https://bugs.webkit.org/show_bug.cgi?id=45528 - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on - a constant int and a double. + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/MemoryStatistics.cpp: Added. + (JSC::memoryStatistics): + * runtime/MemoryStatistics.h: Added. -2009-09-28 Oliver Hunt <oliver@apple.com> +2010-09-09 Michael Saboff <msaboff@apple.com> Reviewed by Gavin Barraclough. - Tidy up codeblock sampler - https://bugs.webkit.org/show_bug.cgi?id=29836 - - Some rather simple refactoring of codeblock sampler so that - it's easier for us to use it to find problems in non-jsc - environments + Added a regular expression tracing facility. This tracing is connected + to jsc. Every compiled regular expression object is added to a list. + When the process exits, each regular expression dumps its pattern, + JIT address, number of times it was executed and the number of matches. + This tracing is controlled by the macro ENABLE_REGEXP_TRACING in + wtf/Platform.h. + https://bugs.webkit.org/show_bug.cgi?id=45401 * JavaScriptCore.exp: - * bytecode/SamplingTool.h: - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::enableSampler): - (JSC::Interpreter::dumpSampleData): - (JSC::Interpreter::startSampling): - (JSC::Interpreter::stopSampling): - * interpreter/Interpreter.h: - (JSC::Interpreter::sampler): - * jit/JIT.h: * jsc.cpp: (runWithScripts): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Executable.h: - (JSC::EvalExecutable::EvalExecutable): - (JSC::ProgramExecutable::create): - (JSC::ProgramExecutable::ProgramExecutable): * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::startSampling): - (JSC::JSGlobalData::stopSampling): - (JSC::JSGlobalData::dumpSampleData): + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + (JSC::JSGlobalData::addRegExpToTrace): + (JSC::JSGlobalData::dumpRegExpTrace): * runtime/JSGlobalData.h: - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - -2009-09-29 Jeremy Orlow <jorlow@chromium.org> + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + (JSC::RegExp::match): + * runtime/RegExp.h: + * wtf/Platform.h: + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::getAddr): - Reviewed by Dimitri Glazkov. +2010-09-09 John Therrell <jtherrell@apple.com> - Add GYP generated files to svn:ignore - https://bugs.webkit.org/show_bug.cgi?id=29895 + 32-bit build fix. - The following files are generated by JavaScriptCore's GYP file and should be ignored: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::committedByteCount): - pcre.mk - wtf.scons - wtf.mk - SConstruct - wtf_config.scons - wtf_config.mk - pcre.scons +2010-09-09 John Therrell <jtherrell@apple.com> - * JavaScriptCore.gyp: Changed property svn:ignore. + Reviewed by Alexey Proskuryakov. -2009-09-29 Geoffrey Garen <ggaren@apple.com> + Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes + https://bugs.webkit.org/show_bug.cgi?id=45134 - Reviewed by Sam Weinig. + Added thread-safe committed byte counting and reporting functionality to RegisterFile and + ExecutableAllocator. - Standardized an optimization for adding non-numbers. + * JavaScriptCore.exp: + Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes. - SunSpider says maybe a tiny speedup. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitSlow_op_add): - -2009-09-29 Geoffrey Garen <ggaren@apple.com> - - Windows build fix: export a new symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-28 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Removed virtual destructor from JSGlobalObjectData to eliminate pointer - fix-ups when accessing JSGlobalObject::d. + * interpreter/RegisterFile.cpp: + (JSC::registerFileStatisticsMutex): + Added function which returns a static Mutex used for locking during read/write access to + static committed byte count variable. + (JSC::RegisterFile::~RegisterFile): + Added call to addToStatistics since memory is decommitted here. + (JSC::RegisterFile::releaseExcessCapacity): + Added call to addToStatistics since memory is decommitted here. + (JSC::RegisterFile::initializeThreading): + Added function which calls registerFileStatisticsMutex(). + (JSC::RegisterFile::committedByteCount): + Added function which returns the current committed byte count for RegisterFile. + (JSC::RegisterFile::addToCommittedByteCount): + Added function which updates committed byte count. + + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + Added call to addToStatistics since memory is committed here. + (JSC::RegisterFile::grow): + Added call to addToStatistics since memory is committed here. - Replaced with an explicit destructor function pointer. + * jit/ExecutableAllocator.h: + Added function prototype for public static function committedByteCount(). + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + Added call to addToStatistics since memory is decommitted here. + (JSC::FixedVMPoolAllocator::reuse): + Added call to addToStatistics since memory is committed here. + (JSC::FixedVMPoolAllocator::addToCommittedByteCount): + Added function which updates committed byte count. + (JSC::ExecutableAllocator::committedByteCount): + Added function which returns the current committed byte count for ExecutableAllocator. - 6% speedup on bench-alloc-nonretained.js. + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + Added call to RegisterFile::initializeThreading. - * JavaScriptCore.exp: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): - (JSC::JSGlobalObject::destroyJSGlobalObjectData): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::JSGlobalObject): +2010-09-09 Mark Rowe <mrowe@apple.com> -2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com> + Reviewed by Oliver Hunt. - Reviewed by David Kilzer. + <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims - [Qt] Assert messages prints visible in Symbian - https://bugs.webkit.org/show_bug.cgi?id=29808 + * API/JSObjectRef.cpp: + (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion + failure. Instead map NULL directly to the null JSValue. + * API/tests/testapi.c: + (main): Add test coverage for the NULL value case. - Asserts use vprintf to print the messages to stderr. - In Symbian Open C it is not possible to see stderr so - I routed the messages to stdout instead. +2010-09-09 Csaba Osztrogonác <ossy@webkit.org> - * wtf/Assertions.cpp: + Reviewed by Gavin Barraclough. -2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com> + [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler + https://bugs.webkit.org/show_bug.cgi?id=29268 - Reviewed by Darin Adler. + * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now. - [Qt] Symbian CRASH macro implementation +2010-09-08 Zoltan Herczeg <zherczeg@webkit.org> - Added Symbian specific crash macro that - stops to crash line if JIT debugging is used. - Additional differentiation of access violation - (KERN-EXEC 3) and CRASH panic. + Reviewed by Darin Adler. - * wtf/Assertions.h: + Removing doneSemicolon label in the lexer + https://bugs.webkit.org/show_bug.cgi?id=45289 -2009-09-28 Mark Rowe <mrowe@apple.com> + As a side effect of moving the multiline comment parsing + to a separate function, an opportunity raised to simplify + the single line comment parsing, and removing doneSemicolon + label. Slight performance increase on --parse-only + tests (from 32.8ms to 31.5ms) - Fix the PowerPC build. + * parser/Lexer.cpp: + (JSC::Lexer::lex): - * JavaScriptCore.exp: +2010-09-08 Xan Lopez <xlopez@igalia.com> -2009-09-28 Mark Rowe <mrowe@apple.com> + Reviewed by Alexey Proskuryakov. - Reviewed by Gavin Barraclough. + Remove accessor for private member variable in JSParser + https://bugs.webkit.org/show_bug.cgi?id=45378 - <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC. + m_token is private to JSParser, so it does not seem to be useful + to have an accessor for it. On top of that, the file was both + using the accessor and directly accessing the member variable, + only one style should be used. - * runtime/Collector.cpp: - (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer - to ensure that we correctly interpret the contents of registers during marking. +2010-09-08 Csaba Osztrogonác <ossy@webkit.org> -2009-09-28 Geoffrey Garen <ggaren@apple.com> + Reviewed by Oliver Hunt. - Windows build fix: added new exports. + [Qt] REGRESSION(63348): jsc is broken + https://bugs.webkit.org/show_bug.cgi?id=42818 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Need fastcall conventions on Qt/Win/MinGW. + Based on patches of Gavin Barraclough: r63947 and r63948. -2009-09-28 Geoffrey Garen <ggaren@apple.com> + * jit/JITStubs.cpp: + * jit/JITStubs.h: - Windows build fix: removed exports that no longer exist. +2010-09-08 Robert Hogan <robert@webkit.org> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by Antonio Gomes. -2009-09-28 Geoffrey Garen <ggaren@apple.com> + Remove some unnecessary duplicate calls to string functions - Reviewed by Darin Adler. + https://bugs.webkit.org/show_bug.cgi?id=45314 - NotNullPassRefPtr: smart pointer optimized for passing references that are not null - https://bugs.webkit.org/show_bug.cgi?id=29822 - - Added NotNullPassRefPtr, and deployed it in all places that initialize - JavaScript objects. - - 2.2% speedup on bench-allocate-nonretained.js. + * wtf/text/WTFString.cpp: + (WTF::String::format): - * API/JSCallbackConstructor.cpp: - (JSC::JSCallbackConstructor::JSCallbackConstructor): - * API/JSCallbackConstructor.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::JSCallbackObject::JSCallbackObject): - * JavaScriptCore.exp: - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addFunctionDecl): - (JSC::CodeBlock::addFunctionExpr): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * runtime/ArrayConstructor.h: - * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::ArrayPrototype): - * runtime/ArrayPrototype.h: - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * runtime/BooleanConstructor.h: - * runtime/BooleanObject.cpp: - (JSC::BooleanObject::BooleanObject): - * runtime/BooleanObject.h: - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/BooleanPrototype.h: - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateConstructor.h: - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DateInstance.h: - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): - * runtime/DatePrototype.h: - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorConstructor.h: - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorInstance.h: - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/ErrorPrototype.h: - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionConstructor.h: - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/FunctionPrototype.h: - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - * runtime/GlobalEvalFunction.h: - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/InternalFunction.h: - (JSC::InternalFunction::InternalFunction): - * runtime/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSArray.h: - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSByteArray.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - * runtime/JSFunction.h: - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObject): - * runtime/JSONObject.h: - (JSC::JSONObject::JSONObject): - * runtime/JSObject.h: - (JSC::JSObject::JSObject): - (JSC::JSObject::setStructure): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::JSVariableObject): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::JSWrapperObject): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/MathObject.h: - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorConstructor.h: - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NativeErrorPrototype.h: - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - * runtime/NumberConstructor.h: - * runtime/NumberObject.cpp: - (JSC::NumberObject::NumberObject): - * runtime/NumberObject.h: - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/NumberPrototype.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * runtime/ObjectConstructor.h: - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * runtime/PropertyNameArray.h: - (JSC::PropertyNameArrayData::setCachedPrototypeChain): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PrototypeFunction.h: - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/RegExpConstructor.h: - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::RegExpObject): - * runtime/RegExpObject.h: - (JSC::RegExpObject::RegExpObjectData::RegExpObjectData): - * runtime/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * runtime/RegExpPrototype.h: - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringConstructor.h: - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined): - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/StringPrototype.h: - * wtf/PassRefPtr.h: - (WTF::NotNullPassRefPtr::NotNullPassRefPtr): - (WTF::NotNullPassRefPtr::~NotNullPassRefPtr): - (WTF::NotNullPassRefPtr::get): - (WTF::NotNullPassRefPtr::clear): - (WTF::NotNullPassRefPtr::releaseRef): - (WTF::NotNullPassRefPtr::operator*): - (WTF::NotNullPassRefPtr::operator->): - (WTF::NotNullPassRefPtr::operator!): - (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType): - * wtf/RefPtr.h: - (WTF::RefPtr::RefPtr): - (WTF::operator==): +2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> -2009-09-28 Oliver Hunt <oliver@apple.com> + Reviewed by Andreas Kling. - Reviewed by Geoff Garen. + Re-Disable JIT for MSVC 64bit to fix the build on this compiler. + https://bugs.webkit.org/show_bug.cgi?id=45382 - Hard dependency on SSE2 instruction set with JIT - https://bugs.webkit.org/show_bug.cgi?id=29779 + It was enabled in the cleanup made in r64176, though it is still + not implemented. - Add floating point support checks to op_jfalse and op_jtrue, and - fix the logic for the slow case of op_add + * wtf/Platform.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_add): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): +2010-09-08 Martin Robinson <mrobinson@igalia.com> -2009-09-28 Yaar Schnitman <yaar@chromium.org> + Reviewed by Xan Lopez. - Reviewed by Dimitri Glazkov. + [GTK] Need a WebSocket implementation + https://bugs.webkit.org/show_bug.cgi?id=45197 - Chromium port - recognize we are being built independently - of chromium and look for dependencies under webkit/chromium rather - than chromium/src. + Add a GIO-based WebSocket implementation. - https://bugs.webkit.org/show_bug.cgi?id=29722 + * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + * wtf/gobject/GRefPtr.h: Added new template specialization declarations. + * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations. - * JavaScriptCore.gyp/JavaScriptCore.gyp: +2010-08-30 Maciej Stachowiak <mjs@apple.com> -2009-09-28 Jakub Wieczorek <faw217@gmail.com> + Reviewed by Darin Adler. - Reviewed by Simon Hausmann. + Handle MediaQueryExp memory management exclusively with smart pointers + https://bugs.webkit.org/show_bug.cgi?id=44874 + + Implemented a non-copying sort function to make it possible to sort a Vector + of OwnPtrs (which cannot be copied). This is required for the above. - [Qt] Implement XSLT support with QtXmlPatterns. - https://bugs.webkit.org/show_bug.cgi?id=28303 + * wtf/NonCopyingSort.h: Added. + (WTF::nonCopyingSort): It's secretly heapsort. + (WTF::heapSort): heapsort implementation. + (WTF::siftDown): Helper function for heapsort. + (WTF::heapify): ditto - * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define. + Adjust build systems. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: -2009-09-28 Gabor Loki <loki@inf.u-szeged.hu> +2010-09-08 Zoltan Herczeg <zherczeg@webkit.org> - Reviewed by Simon Hausmann. + Reviewed by Darin Adler. - Remove __clear_cache which is an internal function of GCC - https://bugs.webkit.org/show_bug.cgi?id=28886 + Refactoring multiline comments in the lexer + https://bugs.webkit.org/show_bug.cgi?id=45289 - Although __clear_cache is exported from GCC, this is an internal - function. GCC makes no promises about it. + MultiLine comment parsing is moved to a separate function. - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): + Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms) + SunSpider reports no change (from 523.1ms to 521.2ms). -2009-09-28 Sam Weinig <sam@webkit.org> + * parser/Lexer.cpp: + (JSC::Lexer::parseMultilineComment): + (JSC::Lexer::lex): + * parser/Lexer.h: - Reviewed by Oliver Hunt. +2010-09-07 James Robinson <jamesr@chromium.org> - Fix an absolute path to somewhere in Oliver's machine to a relative path - for derived JSONObject.lut.h. + Compile fix attempt for windows. - * JavaScriptCore.xcodeproj/project.pbxproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-09-28 Joerg Bornemann <joerg.bornemann@nokia.com> +2010-09-07 Mihai Parparita <mihaip@chromium.org> - Reviewed by Simon Hausmann. + Reviewed by James Robinson. - Add ARM version detection for Windows CE. + Fix Windows build after r66936 + https://bugs.webkit.org/show_bug.cgi?id=45348 - * wtf/Platform.h: + Add symbol names that were missing from r66936. -2009-09-26 Yongjun Zhang <yongjun.zhang@nokia.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Reviewed by Simon Hausmann. +2010-09-07 Mihai Parparita <mihaip@chromium.org> - Add MarkStackSymbian.cpp to build JavascriptCore for Symbian. + Reviewed by Oliver Hunt. - Re-use Windows shrinkAllocation implementation because Symbian doesn't - support releasing part of memory region. + pushState and replaceState do not clone RegExp objects correctly + https://bugs.webkit.org/show_bug.cgi?id=44718 - Use fastMalloc and fastFree to implement allocateStack and releaseStack - for Symbian port. + Move internal representation of JSC::RegExp (which depends on wether + YARR and YARR_JIT is enabled) into RegExpRepresentation which can live + in the implementation only. This makes it feasible to use RegExp in + WebCore without bringing in all of YARR. - * JavaScriptCore.pri: - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackSymbian.cpp: Added. - (JSC::MarkStack::initializePagesize): - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): + * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are + needed inside WebCore's JSC bindings. + * runtime/RegExp.cpp: + (JSC::RegExpRepresentation::~RegExpRepresentation): + (JSC::RegExp::RegExp): + (JSC::RegExp::~RegExp): + (JSC::RegExp::compile): + (JSC::RegExp::match): + * runtime/RegExp.h: -2009-09-25 Gabor Loki <loki@inf.u-szeged.hu> +2010-09-07 Anders Carlsson <andersca@apple.com> - Reviewed by Gavin Barraclough. + Reviewed by Darin Adler. - Fix unaligned data access in YARR_JIT on ARMv5 and below. - https://bugs.webkit.org/show_bug.cgi?id=29695 + <rdar://problem/8381749> -Wcast-align warning emitted when building with clang - On ARMv5 and below all data access should be naturally aligned. - In the YARR_JIT there is a case when character pairs are - loaded from the input string, but this data access is not - naturally aligned. This fix introduces load32WithUnalignedHalfWords - and branch32WithUnalignedHalfWords functions which contain - naturally aligned memory loads - half word loads - on ARMv5 and below. + Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc. - * assembler/MacroAssemblerARM.cpp: - (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerARMv7::branch32): - (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords): - * wtf/Platform.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generatePatternCharacterPair): + * Configurations/Base.xcconfig: -2009-09-25 Jeremy Orlow <jorlow@chromium.org> +2010-09-07 Zoltan Horvath <zoltan@webkit.org> - This is breaking Chromium try bots, so I'm counting this as a build fix. + Reviewed by Darin Adler. - Add more svn:ignore exceptions. On different platforms, these files are - generated with different case for JavaScriptCore. Also there are some - wtf project files that get built apparently. + REGRESSION(66741): Undefined pthread macros + https://bugs.webkit.org/show_bug.cgi?id=45246 - * JavaScriptCore.gyp: Changed property svn:ignore. + PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux, + but used in a statement. Add an additional check to test this. -2009-09-25 Ada Chan <adachan@apple.com> + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): - Build fix. +2010-09-06 Oliver Hunt <oliver@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Windows build fix -2009-09-25 Geoffrey Garen <ggaren@apple.com> +2010-09-05 Oliver Hunt <oliver@apple.com> - Reviewed by Darin Adler. + Reviewed by Sam Weinig. - Inlined some object creation code, including lexicalGlobalObject access - https://bugs.webkit.org/show_bug.cgi?id=29750 - - SunSpider says 0.5% faster. - - 0.8% speedup on bench-alloc-nonretained.js. - 2.5% speedup on v8-splay.js. + SerializedScriptValue needs to use a flat storage mechanism + https://bugs.webkit.org/show_bug.cgi?id=45244 - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/CallFrame.h: - (JSC::ExecState::lexicalGlobalObject): - (JSC::ExecState::globalThisValue): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::ScopeChainNode): - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChainNode::push): - (JSC::ScopeChain::ScopeChain): - (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode. - Replaced accessor function for globalObject() with data member. Replaced - globalThisObject() accessor with direct access to globalThis, to match. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): - * runtime/JSGlobalObject.h: Inlined array and object construction. + Export JSArray::put -2009-09-25 Laszlo Gombos <laszlo.1.gombos@nokia.com> + * JavaScriptCore.exp: - Reviewed by Gavin Barraclough. +2010-09-06 Chao-ying Fu <fu@mips.com> - Add ARM version detection rules for Symbian - https://bugs.webkit.org/show_bug.cgi?id=29715 + Reviewed by Oliver Hunt. + Support JSVALUE32_64 on MIPS + https://bugs.webkit.org/show_bug.cgi?id=43999 + + Add missing functions to support JSVALUE32_64 on MIPS. + Remove JSVALUE32 as the default for MIPS. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::divd): + (JSC::MIPSAssembler::mthc1): + (JSC::MIPSAssembler::cvtwd): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::neg32): + (JSC::MacroAssemblerMIPS::branchOr32): + (JSC::MacroAssemblerMIPS::set8): + (JSC::MacroAssemblerMIPS::loadDouble): + (JSC::MacroAssemblerMIPS::divDouble): + (JSC::MacroAssemblerMIPS::convertInt32ToDouble): + (JSC::MacroAssemblerMIPS::branchDouble): + (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32): + (JSC::MacroAssemblerMIPS::zeroDouble): + * jit/JIT.h: + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITStubs.h: * wtf/Platform.h: -2009-09-24 Xan Lopez <xlopez@igalia.com> +2010-09-06 Robert Hogan <robert@webkit.org> - Reviewed by Mark "Do It!" Rowe. + Unreviewed, compile fix. - Some GCC versions don't like C++-style comments in preprocessor - directives, change to C-style to shut them up. + Fix compile failure in r66843 - * wtf/Platform.h: + Revert to original patch in bugzilla. Leave bug open for + discussion on potential removal of double utf8 conversion. -2009-09-24 Oliver Hunt <oliver@apple.com> + https://bugs.webkit.org/show_bug.cgi?id=45240 - Reviewed by Gavin Barraclough. + * wtf/text/WTFString.cpp: + (WTF::String::format): - Division is needlessly slow in 64-bit - https://bugs.webkit.org/show_bug.cgi?id=29723 +2010-09-06 Robert Hogan <robert@webkit.org> - Add codegen for op_div on x86-64 + Reviewed by Andreas Kling. - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emit_op_div): - (JSC::JIT::emitSlow_op_div): - * jit/JITInlineMethods.h: - (JSC::JIT::isOperandConstantImmediateDouble): - (JSC::JIT::addressFor): - (JSC::JIT::emitLoadDouble): - (JSC::JIT::emitLoadInt32ToDouble): - (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber): + [Qt] utf8 encoding of console() messages -2009-09-24 Jeremy Orlow <jorlow@chromium.org> + Unskip: + http/tests/security/xssAuditor/embed-tag-null-char.html + http/tests/security/xssAuditor/object-embed-tag-null-char.html - Reviewed by Dimitri Glazkov. + Both tests failed because Qt's implementation of String::format() + is casting a utf8 result to String, which assumes latin1 in + its constructor. So instead of casting a QString to a String, use + StringImpl::create() instead. Unfortunately, this involves a lot + of extra casts but the end result is correct. - Add GYP generated files to svn:ignore - https://bugs.webkit.org/show_bug.cgi?id=29724 + https://bugs.webkit.org/show_bug.cgi?id=45240 - Adding the following files to the svn:ignore list (all in the - JavaScriptCore/JavaScriptCore.gyp directory) + * wtf/text/WTFString.cpp: + (WTF::String::format): - JavaScriptCore.xcodeproj - JavaScriptCore.sln - JavaScriptCore.vcproj - JavaScriptCore_Debug.rules - JavaScriptCore_Release.rules - JavaScriptCore_Release - no tcmalloc.rules - JavaScriptCore_Purify.rules - JavaScriptCore.mk - JavaScriptCore_Debug_rules.mk - JavaScriptCore_Release_rules.mk - JavaScriptCore_Release - no tcmalloc_rules.mk - JavaScriptCore_Purify_rules.mk - JavaScriptCore.scons - JavaScriptCore_main.scons +2010-09-03 Alexey Proskuryakov <ap@apple.com> - * JavaScriptCore.gyp: Changed property svn:ignore. + Reviewed by Darin Adler. -2009-09-24 Yong Li <yong.li@torchmobile.com> + https://bugs.webkit.org/show_bug.cgi?id=45135 + <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data - Reviewed by Adam Barth. + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex + regardless of platform default, so that we can assert that it's held (this is for platforms + that don't have libdispatch). + (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look + at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock + is held. + (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before + manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we + can make unbalanced calls to dispatch_resume(). - Replace platform-dependent code with WTF::currentTime() - https://bugs.webkit.org/show_bug.cgi?id=29148 +2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi> - * jsc.cpp: - (StopWatch::start): - (StopWatch::stop): - (StopWatch::getElapsedMS): - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): + Reviewed by Martin Robinson. -2009-09-24 Mark Rowe <mrowe@apple.com> + [EFL] Regression (66531) Build break with Glib Support + https://bugs.webkit.org/show_bug.cgi?id=45011 - Reviewed by Sam Weinig. + Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory + since when glib is enabled, EFL port needs it, too. - <rdar://problem/7215058> FastMalloc scavenging thread should be named + * CMakeListsEfl.txt: Include gobject directory to find new header + file. + * GNUmakefile.am: Ditto. + * wtf/CMakeListsEfl.txt: Ditto. + * wtf/Platform.h: Include header if port is EFL and glib support is + enabled. + * wtf/gtk/GtkTypedefs.h: Removed. + * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now + guarded by PLATFORM(GTK). - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name. - * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP). - * wtf/ThreadingPthreads.cpp: - (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP). +2010-09-03 Csaba Osztrogonác <ossy@webkit.org> -2009-09-24 Geoffrey Garen <ggaren@apple.com> + Reviewed by Simon Hausmann. - Reviewed by Sam Weinig. + Fix warning in wtf/ByteArray.h + https://bugs.webkit.org/show_bug.cgi?id=44672 - Renamed clear to removeAll, as suggested by Darin Adler. + * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers. - * wtf/HashCountedSet.h: - (WTF::::removeAll): +2010-09-02 Adam Barth <abarth@webkit.org> -2009-09-24 Mark Rowe <mrowe@apple.com> + Reviewed by Eric Seidel. - Reviewed by Gavin Barraclough. + Actually parse a URL from ParsedURL + https://bugs.webkit.org/show_bug.cgi?id=45080 - Fix FastMalloc to build with assertions enabled. + This patch only handles standard URLs. At some point we'll need to + distinguish between standard URLs and other kinds of URLs. - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_Central_FreeList::ReleaseToSpans): - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::IsHeld): + * wtf/url/api/ParsedURL.cpp: + (WTF::ParsedURL::ParsedURL): -2009-09-24 Geoffrey Garen <ggaren@apple.com> +2010-09-02 Adam Barth <abarth@webkit.org> - Suggested by Darin Adler. + Reviewed by Eric Seidel. - Removed some unnecessary parameter names. + Add ParsedURL and URLString to WTFURL API + https://bugs.webkit.org/show_bug.cgi?id=45078 - * wtf/HashCountedSet.h: + Currently there's no actual URL parsing going on, but this patch is a + start to sketching out the API. -2009-09-24 Janne Koskinen <janne.p.koskinen@digia.com> + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/api/ParsedURL.cpp: Added. + (WTF::ParsedURL::ParsedURL): + (WTF::ParsedURL::scheme): + (WTF::ParsedURL::username): + (WTF::ParsedURL::password): + (WTF::ParsedURL::host): + (WTF::ParsedURL::port): + (WTF::ParsedURL::path): + (WTF::ParsedURL::query): + (WTF::ParsedURL::fragment): + (WTF::ParsedURL::segment): + * wtf/url/api/ParsedURL.h: Added. + (WTF::ParsedURL::spec): + * wtf/url/api/URLString.h: Added. + (WTF::URLString::URLString): + (WTF::URLString::string): + +2010-09-02 Adam Barth <abarth@webkit.org> - Reviewed by Simon Hausmann. + Reviewed by Eric Seidel. - On Windows JSChar is typedef'ed to wchar_t. + Add WTFURL to the JavaScriptCore build on Mac + https://bugs.webkit.org/show_bug.cgi?id=45075 - When building with WINSCW for Symbian we need to do the - same typedef. + Building code is good. - * API/JSStringRef.h: + * JavaScriptCore.xcodeproj/project.pbxproj: -2009-09-23 Geoffrey Garen <ggaren@apple.com> +2010-09-02 Alexey Proskuryakov <ap@apple.com> - A piece of my last patch that I forgot. + Reviewed by Oliver Hunt. - * wtf/HashCountedSet.h: - (WTF::::clear): Added HashCountedSet::clear. + https://bugs.webkit.org/show_bug.cgi?id=43230 + <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser -2009-09-24 Gabor Loki <loki@inf.u-szeged.hu> + One can't delete a ThreadSpecific object that has data in it. It's not even possible to + enumerate data objects in all threads, much less destroy them from a thread that's destroying + the ThreadSpecific. - Reviewed by Gavin Barraclough. + * parser/JSParser.cpp: + (JSC::JSParser::JSParser): + * runtime/JSGlobalData.h: + * wtf/WTFThreadData.cpp: + (WTF::WTFThreadData::WTFThreadData): + * wtf/WTFThreadData.h: + (WTF::WTFThreadData::approximatedStackStart): + Moved stack guard tracking from JSGlobalData to WTFThreadData. - Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set - https://bugs.webkit.org/show_bug.cgi?id=28886 + * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't + ever face a situation where we'd want to delete a ThreadSpecific object. - There are some GCC packages (for example GCC-2006q3 from CodeSourcery) - which contain __clear_cache built-in function only for C while the C++ - version of __clear_cache is missing on ARM architectures. +2010-09-01 Gavin Barraclough <barraclough@apple.com> - Fixed a small bug in the inline assembly of cacheFlush function on - ARM_TRADITIONAL. + Rubber stamped by Oliver Hunt. - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): + Ecma-262 15.11.1.1 states that if the argument is undefined then an + Error object's message property should be set to the empty string. -2009-09-23 Geoffrey Garen <ggaren@apple.com> + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + (JSC::ErrorInstance::create): + * runtime/ErrorInstance.h: + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): - Reviewed by Sam Weinig. +2010-08-31 Darin Adler <darin@apple.com> - Added the ability to swap vectors with inline capacities, so you can - store a vector with inline capacity in a hash table. + Reviewed by Anders Carlsson. - * wtf/Vector.h: - (WTF::swap): - (WTF::VectorBuffer::swap): + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that + mixed types with code that uses size_t. -2009-09-23 David Kilzer <ddkilzer@apple.com> + * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning. - Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h +2010-08-31 Martin Robinson <mrobinson@igalia.com> - Reviewed by Mark Rowe. + Reviewed by Gustavo Noronha Silva. - * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when - building on 64-bit SnowLeopard. Define to 0 elsewhere. + [GTK] Isolate all GTK+ typedefs into one file + https://bugs.webkit.org/show_bug.cgi?id=44900 -2009-09-22 Oliver Hunt <oliver@apple.com> + * GNUmakefile.am: Add GtkTypedefs.h to the source lists. + * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build. + * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs. + * wtf/gobject/GOwnPtr.h: Ditto. + * wtf/gobject/GRefPtr.h: Ditto. + * wtf/gtk/GtkTypedefs.h: Added. - Reviewed by Geoff Garen. +2010-08-31 Martin Robinson <mrobinson@igalia.com> - Code sampling builds are broken. - https://bugs.webkit.org/show_bug.cgi?id=29662 + Reviewed by Gustavo Noronha Silva. - Fix build. + [GTK] Fix 'make dist' in preparation of the 1.3.3 release + https://bugs.webkit.org/show_bug.cgi?id=44978 - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecode/SamplingTool.cpp: - (JSC::ScriptSampleRecord::sample): - (JSC::SamplingTool::doRun): - (JSC::SamplingTool::notifyOfScope): - (JSC::compareScriptSampleRecords): - (JSC::SamplingTool::dump): - * bytecode/SamplingTool.h: - (JSC::ScriptSampleRecord::ScriptSampleRecord): - (JSC::ScriptSampleRecord::~ScriptSampleRecord): - (JSC::SamplingTool::SamplingTool): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::makeFunction): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::fromGlobalCode): - * runtime/Executable.h: - (JSC::ScriptExecutable::ScriptExecutable): - (JSC::EvalExecutable::EvalExecutable): - (JSC::EvalExecutable::create): - (JSC::ProgramExecutable::ProgramExecutable): - (JSC::FunctionExecutable::create): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): + * GNUmakefile.am: Adding missing headers to the sources list. -2009-09-22 Darin Adler <darin@apple.com> +2010-08-31 Chao-ying Fu <fu@mips.com> - Reviewed by Sam Weinig. + Reviewed by Oliver Hunt. - * wtf/Forward.h: Added PassOwnPtr. + Support emit_op_mod() for MIPS + https://bugs.webkit.org/show_bug.cgi?id=42855 -2009-09-22 Yaar Schnitman <yaar@chromium.org> + This patch uses MIPS div instructions for op_mod to improve performance. - Reviewed by David Levin. + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::div): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): - Ported chromium.org's javascriptcore.gyp for the webkit chromium port. +2010-08-31 Csaba Osztrogonác <ossy@webkit.org> - https://bugs.webkit.org/show_bug.cgi?id=29617 + Reviewed by Darin Adler. - * JavaScriptCore.gyp/JavaScriptCore.gyp: Added. + Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED. + https://bugs.webkit.org/show_bug.cgi?id=44870 -2009-09-22 Thiago Macieira <thiago.macieira@nokia.com> + * wtf/Assertions.h: + * wtf/UnusedParam.h: - Reviewed by Simon Hausmann. +2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com> - Fix compilation with WINSCW: no varargs macros + Reviewed by Kenneth Rohde Christiansen. - Disable variadic arguments for WINSCW just like we do - for MSVC7. + JSC TimeoutChecker::didTimeOut overflows on ARM + https://bugs.webkit.org/show_bug.cgi?id=38538 - * wtf/Assertions.h: + Make getCPUTime() return values relative to the first call. + The previous implementation relied on simply on currentTime(), which + return a time since epoch and not a time since the thread started. This + made the return value of getCPUTime() overflow on 32 bits. -2009-09-22 Kent Hansen <khansen@trolltech.com> + * runtime/TimeoutChecker.cpp: + (JSC::getCPUTime): - Reviewed by Simon Hausmann. +2010-08-30 Mihai Parparita <mihaip@chromium.org> - Disable variadic macros on MSVC7. + Reviewed by Adam Barth. - This was originally added in r26589 but not extended - when LOG_DISABLED/ASSERT_DISABLED was introduced. + HISTORY_ALWAYS_ASYNC should be removed (history should always be async) + https://bugs.webkit.org/show_bug.cgi?id=44315 - * wtf/Assertions.h: + Remove ENABLE_HISTORY_ALWAYS_ASYNC #define. -2009-09-22 Simon Hausmann <simon.hausmann@nokia.com> + * wtf/Platform.h: - Unreviewed build fix for Windows CE < 5 +2010-08-30 Chris Rogers <crogers@google.com> - Define WINCEBASIC to disable the IsDebuggerPresent() code in - wtf/Assertions.cpp. + Reviewed by Kenneth Russell. - * JavaScriptCore.pri: + Fix namespace for wtf/Complex.h and wtf/Vector3.h + https://bugs.webkit.org/show_bug.cgi?id=44892 -2009-09-22 Joerg Bornemann <joerg.bornemann@nokia.com> + * wtf/Complex.h: + * wtf/Vector3.h: - Reviewed by Simon Hausmann. +2010-08-30 Andy Estes <aestes@apple.com> - Fix major memory leak in JavaScriptCore RegisterFile on Windows CE + Reviewed by Eric Carlson. - https://bugs.webkit.org/show_bug.cgi?id=29367 + Strings returned by asciiDebug() should be NULL-terminated. + https://bugs.webkit.org/show_bug.cgi?id=44866 - On Widows CE we must decommit all committed pages before we release - them. See VirtualFree documentation. - Desktop Windows behaves much smoother in this situation. + * wtf/text/WTFString.cpp: + (asciiDebug): - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): +2010-08-30 Zoltan Herczeg <zherczeg@webkit.org> -2009-09-21 Greg Bolsinga <bolsinga@apple.com> + Reviewed by Darin Adler. - Reviewed by Simon Fraser & Sam Weinig. + Refactor number parsing in the lexer + https://bugs.webkit.org/show_bug.cgi?id=44104 - Add ENABLE(ORIENTATION_EVENTS) - https://bugs.webkit.org/show_bug.cgi?id=29508 + Number parsing was full of gotos, and needed a complete + redesign to remove them (Only one remained). Furthermore + integer arithmetic is empolyed for fast cases (= small + integer numbers). - * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines. + * parser/Lexer.cpp: + (JSC::Lexer::parseHex): + (JSC::Lexer::parseOctal): + (JSC::Lexer::parseDecimal): + (JSC::Lexer::parseNumberAfterDecimalPoint): + (JSC::Lexer::parseNumberAfterExponentIndicator): + (JSC::Lexer::lex): + * parser/Lexer.h: -2009-09-21 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> +2010-08-29 Darin Adler <darin@apple.com> - Reviewed by Eric Seidel. + Fix Qt build. - [Fix] SourceCode's uninitialized member - - Potential source of crashes and bugs was fixed. Default constructor - didn't initialized m_provider member. + * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP. + * wtf/unicode/qt4/UnicodeQt4.h: Ditto. + * wtf/unicode/wince/UnicodeWince.h: Ditto. - https://bugs.webkit.org/show_bug.cgi?id=29364 +2010-08-29 Kwang Yul Seo <skyul@company100.net> - * parser/SourceCode.h: - (JSC::SourceCode::SourceCode): + Reviewed by Kent Tamura. -2009-09-21 Oliver Hunt <oliver@apple.com> + [BREWMP] Port vprintf_stderr_common + https://bugs.webkit.org/show_bug.cgi?id=33568 - Reviewed by Geoff Garen. + Use BREW's DBGPRINTF to output debug messages. - REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org - https://bugs.webkit.org/show_bug.cgi?id=29599 + * wtf/Assertions.cpp: - It is unsafe to attempt to cache new property transitions on - dictionaries of any type. +2010-08-28 Gavin Barraclough <barraclough@apple.com> - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCachePutByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): + Reviewed by Oliver Hunt. -2009-09-21 Oliver Hunt <oliver@apple.com> + Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values - RS=Maciej Stachowiak. + We are in places casting doubles to unsigneds, and unsigneds to ints, without always check + that the result is within bounds. This is problematic in the case of double-to-unsigned + conversion because we should be saturating to array length. - Re-land SNES fix with corrected assertion. + Also, the error return value from Array.splice should be [], not undefined. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - * runtime/JSObject.cpp: - (JSC::JSObject::removeDirect): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::despecifyDictionaryFunction): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::removePropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::toCacheableDictionaryTransition): - (JSC::Structure::toUncacheableDictionaryTransition): - (JSC::Structure::fromDictionaryTransition): - (JSC::Structure::removePropertyWithoutTransition): - * runtime/Structure.h: - (JSC::Structure::isDictionary): - (JSC::Structure::isUncacheableDictionary): - (JSC::Structure::): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): + I don't see any security concerns here. These methods are spec'ed in such a way that they + can be applied to non Array objects, so in all cases the (potentially bogus) indices are + being passed to functions that will safely check accesses are within bounds. -2009-09-21 Adam Roben <aroben@apple.com> + * runtime/ArrayPrototype.cpp: + (JSC::argumentClampedIndexFromStartOrEnd): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/JSValue.h: + (JSC::JSValue::toUInt32): - Revert r48573, as it caused many assertion failures +2010-08-28 Pratik Solanki <psolanki@apple.com> - * interpreter/Interpreter.cpp: - * jit/JITStubs.cpp: - * runtime/BatchedTransitionOptimizer.h: - * runtime/JSObject.cpp: - * runtime/Structure.cpp: - * runtime/Structure.h: - * runtime/StructureChain.cpp: + Reviewed by Dan Bernstein. -2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + Add an ENABLE define for purgeable memory support + https://bugs.webkit.org/show_bug.cgi?id=44777 - Unreviewed make dist build fix. Missing files. + * wtf/Platform.h: - * GNUmakefile.am: +2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> -2009-09-19 Gavin Barraclough <barraclough@apple.com> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by Sam 'Cabin Boy' Weinig. + [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin + https://bugs.webkit.org/show_bug.cgi?id=43179 - Fix stack alignment with ARM THUMB2 JIT. - https://bugs.webkit.org/show_bug.cgi?id=29526 - - Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a - multiple of 16 bytes. + Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent + NPAPI Plugin Cache. The flag is enabled by default. - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: + * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE -2009-09-20 Oliver Hunt <oliver@apple.com> +2010-07-27 Jer Noble <jer.noble@apple.com> - Reviewed by Maciej Stachowiak. + Reviewed by Eric Carlson. - SNES is too slow - https://bugs.webkit.org/show_bug.cgi?id=29534 + Add JavaScript API to allow a page to go fullscreen. + rdar://problem/6867795 + https://bugs.webkit.org/show_bug.cgi?id=43099 - The problem was that the emulator used multiple classes with - more properties than our dictionary cutoff allowed, this resulted - in more or less all critical logic inside the emulator requiring - uncached property access. + * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS). - Rather than simply bumping the dictionary cutoff, this patch - recognises that there are two ways to create a "dictionary" - structure. Either by adding a large number of properties, or - by removing a property. In the case of adding properties we - know all the existing properties will maintain their existing - offsets, so we could cache access to those properties, if we - know they won't be removed. +2010-08-27 Gavin Barraclough <barraclough@apple.com> - To make this possible, this patch adds the logic required to - distinguish a dictionary created by addition from one created - by removal. With this logic in place we can now cache access - to objects with large numbers of properties. + Windows build fix pt 2. - SNES performance improved by more than 6x. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - * runtime/JSObject.cpp: - (JSC::JSObject::removeDirect): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::despecifyDictionaryFunction): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::removePropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::toCacheableDictionaryTransition): - (JSC::Structure::toUncacheableDictionaryTransition): - (JSC::Structure::fromDictionaryTransition): - (JSC::Structure::removePropertyWithoutTransition): - * runtime/Structure.h: - (JSC::Structure::isDictionary): - (JSC::Structure::isUncacheableDictionary): - (JSC::Structure::): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): +2010-08-27 Gavin Barraclough <barraclough@apple.com> -2009-09-19 Oliver Hunt <oliver@apple.com> + Windows build fix pt 1. - Reviewed by Maciej Stachowiak. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Implement ES5 Object.create function - https://bugs.webkit.org/show_bug.cgi?id=29524 +2010-08-27 Gavin Barraclough <barraclough@apple.com> - Implement Object.create. Very simple patch, effectively Object.defineProperties - only creating the target object itself. + Reviewed by Oliver Hunt. - * runtime/CommonIdentifiers.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorCreate): + Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate. -2009-09-19 Dan Bernstein <mitz@apple.com> + These methods should be using a version of dtoa that can generate results accurate + to the requested precision, whereas our version of dtoa is only currently able to + support producing results sufficiently accurate to distinguish the value from any + other IEEE-754 double precision number. - Fix clean debug builds. + This change has no impact on benchmarks we track. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + On microbenchmarks for these functions, this is a slight regression where a high + precision is requested (dtoa now need to iterate further to generate a a greater + number of digits), but with smaller precision values (hopefully more common) this + improves performance, since it reduced the accurate of result dtoa is required, + to produce, and removes the need to pre-round values before calling dtoa. -2009-09-19 Joerg Bornemann <joerg.bornemann@nokia.com> + * JavaScriptCore.exp: + doubleToStringInJavaScriptFormat renamed to numberToString - Reviewed by George Staikos. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + doubleToStringInJavaScriptFormat renamed to numberToString - QtWebKit Windows CE compile fix + * runtime/UString.cpp: + (JSC::UString::number): + doubleToStringInJavaScriptFormat renamed to numberToString - https://bugs.webkit.org/show_bug.cgi?id=29379 + * wtf/DecimalNumber.h: + (WTF::DecimalNumber::DecimalNumber): + (WTF::DecimalNumber::toStringDecimal): + (WTF::DecimalNumber::toStringExponential): + Remove all pre-rounding of values, instead call dtoa correctly. - There is no _aligned_alloc or _aligned_free on Windows CE. - We just use the Windows code that was there before and use VirtualAlloc. - But that also means that the BLOCK_SIZE must be 64K as this function - allocates on 64K boundaries. + * wtf/dtoa.cpp: + (WTF::dtoa): + * wtf/dtoa.h: + Reenable support for rounding to specific-figures/decimal-places in dtoa. + Modify to remove unbiased rounding, provide ECMA required away-from-zero. + Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to + numberToString. - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - * runtime/Collector.h: +2010-08-27 Chao-ying Fu <fu@mips.com> -2009-09-19 Oliver Hunt <oliver@apple.com> + Reviewed by Oliver Hunt. - Reviewed by Sam Weinig. + Byte alignment issue on MIPS + https://bugs.webkit.org/show_bug.cgi?id=29415 - Implement ES5 Object.defineProperties function - https://bugs.webkit.org/show_bug.cgi?id=29522 + MIPS accesses one byte at a time for now to avoid the help from the + kernel to fix unaligned accesses. - Implement Object.defineProperties. Fairly simple patch, simply makes use of - existing functionality used for defineProperty. + * wtf/text/AtomicString.cpp: + (WebCore::equal): + * wtf/text/StringHash.h: + (WebCore::StringHash::equal): - * runtime/CommonIdentifiers.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::defineProperties): - (JSC::objectConstructorDefineProperties): +2010-08-27 Xan Lopez <xlopez@igalia.com> -2009-09-19 Oliver Hunt <oliver@apple.com> + Reviewed by Tor Arne Vestbø. - Reviewed by NOBODY (Build fix). + Fix a couple of typos in comment. - Windows build fix part2 + * bytecode/CodeBlock.h: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: +2010-08-26 Gavin Barraclough <barraclough@apple.com> -2009-09-19 Oliver Hunt <oliver@apple.com> + Windows build fix. - Reviewed by NOBODY (Buildfix). + * wtf/dtoa.cpp: - Windows build fix part 1. +2010-08-26 Gavin Barraclough <baraclough@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by Sam Weinig. -2009-09-18 Oliver Hunt <oliver@apple.com> + Bug 44735 - Clean up dtoa.cpp + Remove unused & unmaintained code paths, reformat code to match + coding standard & use platform #defines from Platform.h directly. - Reviewed by Geoff Garen. + * wtf/dtoa.cpp: + (WTF::storeInc): + (WTF::multadd): + (WTF::s2b): + (WTF::lo0bits): + (WTF::mult): + (WTF::pow5mult): + (WTF::lshift): + (WTF::diff): + (WTF::ulp): + (WTF::b2d): + (WTF::d2b): + (WTF::ratio): + (WTF::): + (WTF::strtod): + (WTF::quorem): + (WTF::dtoa): - Implement ES5 Object.defineProperty function - https://bugs.webkit.org/show_bug.cgi?id=29503 +2010-08-26 Gavin Barraclough <barraclough@apple.com> - Implement Object.defineProperty. This requires adding the API to - ObjectConstructor, along with a helper function that implements the - ES5 internal [[ToPropertyDescriptor]] function. It then adds - JSObject::defineOwnProperty that implements the appropriate ES5 semantics. - Currently defineOwnProperty uses a delete followed by a put to redefine - attributes of a property, clearly this is less efficient than it could be - but we can improve this if it needs to be possible in future. + Rubber Stamped by Oliver Hunt. + + Partially revert r65959. The toString changes regressed the v8 tests, + but keep the toFixed/toExponential/toPrecision changes. * JavaScriptCore.exp: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::defineGetter): - (JSC::DebuggerActivation::defineSetter): - * debugger/DebuggerActivation.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - Update defineGetter/Setter calls - * runtime/CommonIdentifiers.h: - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::defineGetter): - (JSC::JSGlobalObject::defineSetter): - * runtime/JSGlobalObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::putDescriptor): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - (JSC::toPropertyDescriptor): - (JSC::objectConstructorDefineProperty): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - * runtime/PropertyDescriptor.cpp: - (JSC::PropertyDescriptor::writable): - (JSC::PropertyDescriptor::enumerable): - (JSC::PropertyDescriptor::configurable): - (JSC::PropertyDescriptor::isDataDescriptor): - (JSC::PropertyDescriptor::isGenericDescriptor): - (JSC::PropertyDescriptor::isAccessorDescriptor): - (JSC::PropertyDescriptor::getter): - (JSC::PropertyDescriptor::setter): - (JSC::PropertyDescriptor::setDescriptor): - (JSC::PropertyDescriptor::setAccessorDescriptor): - (JSC::PropertyDescriptor::setWritable): - (JSC::PropertyDescriptor::setEnumerable): - (JSC::PropertyDescriptor::setConfigurable): - (JSC::PropertyDescriptor::setSetter): - (JSC::PropertyDescriptor::setGetter): - (JSC::PropertyDescriptor::equalTo): - (JSC::PropertyDescriptor::attributesEqual): - (JSC::PropertyDescriptor::attributesWithOverride): - * runtime/PropertyDescriptor.h: - (JSC::PropertyDescriptor::PropertyDescriptor): - (JSC::PropertyDescriptor::value): - (JSC::PropertyDescriptor::setValue): - (JSC::PropertyDescriptor::isEmpty): - (JSC::PropertyDescriptor::writablePresent): - (JSC::PropertyDescriptor::enumerablePresent): - (JSC::PropertyDescriptor::configurablePresent): - (JSC::PropertyDescriptor::setterPresent): - (JSC::PropertyDescriptor::getterPresent): - (JSC::PropertyDescriptor::operator==): - (JSC::PropertyDescriptor::): - -2009-09-18 Gabor Loki <loki@inf.u-szeged.hu> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/NumberPrototype.cpp: + * runtime/UString.cpp: + (JSC::UString::number): + * wtf/DecimalNumber.h: + * wtf/dtoa.cpp: + (WTF::append): + (WTF::doubleToStringInJavaScriptFormat): + * wtf/dtoa.h: + * wtf/text/WTFString.cpp: + * wtf/text/WTFString.h: - Reviewed by Gavin Barraclough. +2010-08-26 James Robinson <jamesr@chromium.org> - Build fix to enable ARM_THUMB2 on Linux - https://bugs.webkit.org/show_bug.cgi?id= + Reviewed by Darin Fisher. - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - * jit/JITStubs.cpp: - * wtf/Platform.h: + [chromium] Remove the USE(GLES2_RENDERING) define and associated code + https://bugs.webkit.org/show_bug.cgi?id=43761 -2009-09-18 Gabor Loki <loki@inf.u-szeged.hu> + Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused. - Reviewed by Gavin Barraclough. + * wtf/Platform.h: - Defines two pseudo-platforms for ARM and Thumb-2 instruction set. - https://bugs.webkit.org/show_bug.cgi?id=29122 +2010-08-26 Gavin Barraclough <barraclough@apple.com> - Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 - macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used - when Thumb-2 instruction set is the required target. The - PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In - case where the code is common the PLATFORM(ARM) have to be used. + Rolling out r64608, this regressed performance. + * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/ARMAssembler.cpp: - * assembler/ARMAssembler.h: - * assembler/ARMv7Assembler.h: - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.cpp: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): + (JSC::ARMAssembler::executableCopy): + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::LinkBuffer): + (JSC::LinkBuffer::~LinkBuffer): + (JSC::LinkBuffer::performFinalization): + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::executableCopy): + * assembler/X86Assembler.h: + (JSC::X86Assembler::executableCopy): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initGetByIdSelfList): + (JSC::StructureStubInfo::initGetByIdProtoList): + (JSC::StructureStubInfo::initPutByIdTransition): + * jit/ExecutableAllocator.cpp: + (JSC::ExecutablePool::systemAlloc): * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::create): + (JSC::ExecutableAllocator::ExecutableAllocator): + (JSC::ExecutableAllocator::poolForSize): + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::allocInternal): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::beginUninterruptedSequence): - (JSC::JIT::preserveReturnAddressAfterCall): - (JSC::JIT::restoreReturnAddressBeforeReturn): - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::restoreArgumentReferenceForTrampoline): + (JSC::JIT::compileGetByIdProto): + (JSC::JIT::compileGetByIdSelfList): + (JSC::JIT::compileGetByIdProtoList): + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + (JSC::JIT::compilePutByIdTransition): + (JSC::JIT::compilePatchGetArrayLength): * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + (JSC::getPolymorphicAccessStructureListSlot): * jit/JITStubs.h: - * wtf/Platform.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::finalize): + * runtime/ExceptionHelpers.cpp: + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - -2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com> - - Reviewed by Simon Hausmann. - - Fix the Qt/Windows CE build. - - * JavaScriptCore.pri: Build the ce_time.cpp functions from - within Qt externally. - * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the - Qt build these functions are no external, too. + (JSC::Yarr::RegexGenerator::compile): -2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com> - - Reviewed by Simon Hausmann. +2010-08-26 Gavin Barraclough <barraclough@apple.com> - Symbian/WINSCW build fox. + Reviewed by Brady Eidson. - Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to - revision 24774. + Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl. - WINSCW defines wchar_t, thus UChar has to be wchar_t + * wtf/text/WTFString.cpp: + (asciiDebug): + Return a Vector<char> containing the contents of a string as ASCII. - * wtf/unicode/qt4/UnicodeQt4.h: +2010-08-26 Sam Weinig <sam@webkit.org> -2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com> + Reviewed by Darin Adler. - Reviewed by Simon Hausmann. + Add PassOwnArrayPtr + https://bugs.webkit.org/show_bug.cgi?id=44627 - Symbian/WINSCW build fix. + * GNUmakefile.am: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + Add the new files. - https://bugs.webkit.org/show_bug.cgi?id=29186 + * wtf/Forward.h: + Forward declare PassOwnArrayPtr. + + * wtf/OwnArrayPtr.h: + Mimic the OwnPtr interface. - WINSCW Template specialisation name in declaration must the be the same as in implementation. + * wtf/OwnArrayPtrCommon.h: Added. + (WTF::deleteOwnedArrayPtr): + Move delete function here so it can be shared by OwnArrayPtr and + PassOwnArrayPtr. - * runtime/LiteralParser.h: + * wtf/PassOwnArrayPtr.h: Added. + Mimic the PassOwnPtr interface. -2009-09-15 Norbert Leser <norbert.leser@nokia.com> +2010-08-26 Oliver Hunt <oliver@apple.com> - Reviewed by Darin Adler. + Reviewed by Gavin Barraclough. - https://bugs.webkit.org/show_bug.cgi?id=27060 + [JSC] JavaScript parsing error when loading Equifax web page + https://bugs.webkit.org/show_bug.cgi?id=42900 - Symbian compiler for emulator target (WINSCW) fails with - "illegal operand" for m_attributesInPrevious in structure.ccp - (when calling make_pair functions). - This error is apparently due to the compiler not properly - resolving the unsigned type of the declared bitfield. + '-->' is ostensibly only meant to occur when there is only + whitespace preceeding it on the line. However firefox treats + multiline comments as a space character, so they are allowed. + One side effect of the firefox model is that any line terminators + inside the multiline comment are ignored, so - Initial patch explicitly casted m_attributesInPrevious - to unsigned, but since bitfield optimization is not critical for - the emulator target, this conditional change in header file - appears to be least intrusive. + foo/* + */--> - * runtime/Structure.h: + is treated as -2009-09-16 Gabor Loki <loki@inf.u-szeged.hu> + foo --> - Reviewed by Darin Adler. + and so '-->' will not be a comment in this case. Happily this simply + means that to fix this issue all we need to do is stop updating + m_atLineStart when handling multiline comments. - Fix GCC warnings on ARM_THUMB2 platform + * parser/Lexer.cpp: + (JSC::Lexer::lex): - * assembler/ARMv7Assembler.h: - (JSC::ARMThumbImmediate::countLeadingZerosPartial): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding): +2010-08-25 Oliver Hunt <oliver@apple.com> -2009-09-16 Greg Bolsinga <bolsinga@apple.com> + Reviewed by Geoffrey Garen. - Add ENABLE(INSPECTOR) - https://bugs.webkit.org/show_bug.cgi?id=29260 + Improve overflow handling in StringImpl::Replace + https://bugs.webkit.org/show_bug.cgi?id=42502 + <rdar://problem/8203794> - Reviewed by David Kilzer. + Harden StringImpl::replace against overflow -- I can't see how this + could be abused, but it's better to be safe than sorry. - * wtf/Platform.h: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::replace): -2009-09-16 Greg Bolsinga <bolsinga@apple.com> +2010-08-26 Martin Robinson <mrobinson@igalia.com> - Add ENABLE(CONTEXT_MENUS) - https://bugs.webkit.org/show_bug.cgi?id=29225 + Reviewed by Xan Lopez. - Reviewed by David Kilzer. + [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions + https://bugs.webkit.org/show_bug.cgi?id=44624 - * wtf/Platform.h: + Clean up GNUmakefile.am. -2009-09-16 Benjamin C Meyer <benjamin.meyer@torchmobile.com> + * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move + a couple include lines from the top-level GNUmakefile.am. - Reviewed by Eric Seidel. +2010-08-25 Xan Lopez <xlopez@igalia.com> - The webkit stdint and stdbool headers exists because - the compiler MSVC doesn't include them. The check - should not check for PLATFORM(WIN_OS) but for MSVC. + Reviewed by Kent Tamura. - * os-win32/stdbool.h: - * os-win32/stdint.h: + Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used + https://bugs.webkit.org/show_bug.cgi?id=29259 -2009-09-16 Greg Bolsinga <bolsinga@apple.com> + Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang. - Add ENABLE(DRAG_SUPPORT) - https://bugs.webkit.org/show_bug.cgi?id=29233 + * wtf/dtoa.cpp: + (WTF::s2b): - Reviewed by David Kilzer. +2010-08-25 Kwang Yul Seo <skyul@company100.net> - * wtf/Platform.h: + Reviewed by Kevin Ollivier. -2009-09-16 Kevin Ollivier <kevino@theolliviers.com> + [BREWMP] Add build system + https://bugs.webkit.org/show_bug.cgi?id=44645 - waf build fix after flag was moved to correct place. + Make waf script portable so that we can add more ports. * wscript: -2009-09-16 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Build fix for 64-bit Qt on Mac OS X - - * wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC - -2009-09-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - - Reviewed by Simon Hausmann. - - [Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects. - https://bugs.webkit.org/show_bug.cgi?id=29295 - - This is an important fix when JavaScript workers are in use, since - unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each). - QThreadStorage calls the destructor of a given object, which is the - ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does - not support the calling of a static utility function when the thread - is about to close. In this patch we call the ThreadSpecific::destroy() - utility function from the destructor of ThreadSpecific::Data. Moreover, - since Qt resets all thread local values to 0 before the calling of the - appropriate destructors, we set back the pointer to its original value. - This is necessary because the get() method of the ThreadSpecific - object may be called during the exuction of the destructor. +2010-08-25 Michael Saboff <msaboff@apple.com> - * wtf/ThreadSpecific.h: - (WTF::ThreadSpecific::Data::~Data): - (WTF::::~ThreadSpecific): - (WTF::::set): - (WTF::::destroy): - -2009-09-10 Oliver Hunt <oliver@apple.com> + Reviewed by Sam Weinig. - Reviewed by Geoff Garen. + Remove the single entry regular expression cache introduced as part of + the fix for https://bugs.webkit.org/show_bug.cgi?id=41238. + The performance problem in Dromaeo that initiated that bug is no + longer present. Dromaeo has been modified so that the regular + expression tests are somewhat random and don't benefit from a + single entry cache. - Allow anonymous storage inside JSObject - https://bugs.webkit.org/show_bug.cgi?id=29168 + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::match): + * runtime/RegExp.h: - Add the concept of anonymous slots to Structures so that it is - possible to store references to values that need marking in the - standard JSObject storage buffer. This allows us to reduce the - malloc overhead of some objects (by allowing them to store JS - values in the inline storage of the object) and reduce the - dependence of custom mark functions (if all an objects children - are in the standard object property storage there's no need to - mark them manually). +2010-08-25 Martin Robinson <mrobinson@igalia.com> - * JavaScriptCore.exp: - * runtime/JSObject.h: - (JSC::JSObject::putAnonymousValue): - (JSC::JSObject::getAnonymousValue): - (JSC::JSObject::addAnonymousSlots): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - (JSC::JSWrapperObject::JSWrapperObject): - (JSC::JSWrapperObject::setInternalValue): - * runtime/PropertyMapHashTable.h: - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::materializePropertyMap): - (JSC::Structure::addAnonymousSlotsTransition): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::put): - (JSC::Structure::rehashPropertyMapHashTable): - * runtime/Structure.h: - (JSC::Structure::propertyStorageSize): - (JSC::StructureTransitionTable::reifySingleTransition): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::TransitionTable::addSlotTransition): - (JSC::StructureTransitionTable::TransitionTable::removeSlotTransition): - (JSC::StructureTransitionTable::TransitionTable::getSlotTransition): - (JSC::StructureTransitionTable::getAnonymousSlotTransition): - (JSC::StructureTransitionTable::addAnonymousSlotTransition): - (JSC::StructureTransitionTable::removeAnonymousSlotTransition): + Reviewed by Gustavo Noronha Silva. -2009-09-15 Alex Milowski <alex@milowski.com> + Cairo and EFL port shouldn't depend on glib. + https://bugs.webkit.org/show_bug.cgi?id=44354 + + Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in + GRefPtr.h. + + * GNUmakefile.am: Add PlatformRefPtr.h to the source list. + * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h. + (WTF::PlatformRefPtr::PlatformRefPtr): Ditto. + (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto. + (WTF::PlatformRefPtr::clear): Ditto. + (WTF::PlatformRefPtr::get): Ditto. + (WTF::PlatformRefPtr::operator*): Ditto. + (WTF::PlatformRefPtr::operator->): Ditto. + (WTF::PlatformRefPtr::operator!): Ditto. + (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto. + (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto. + (WTF::::operator): Ditto. + (WTF::::swap): Ditto. + (WTF::swap): Ditto. + (WTF::operator==): Ditto. + (WTF::operator!=): Ditto. + (WTF::static_pointer_cast): Ditto. + (WTF::const_pointer_cast): Ditto. + (WTF::getPtr): Ditto. + (WTF::adoptPlatformRef): Ditto. + * wtf/gobject/GRefPtr.cpp: Changes to reflect new names. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + * wtf/gobject/GRefPtr.h: Ditto. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + +2010-08-25 Xan Lopez <xlopez@igalia.com> - Reviewed by Tor Arne Vestbø. + Reviewed by Alexey Proskuryakov. - Added the ENABLE_MATHML define to the features + Remove dead code in JSGlobalObject + https://bugs.webkit.org/show_bug.cgi?id=44615 - * Configurations/FeatureDefines.xcconfig: + The recursion data member in the JSGlobalObject and its getter + plus inc/dec methods seems to be unused, remove them. -2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::init): + * runtime/JSGlobalObject.h: - Reviewed by Tor Arne Vestbø. +2010-08-25 Michael Saboff <msaboff@apple.com> - [Qt] Build fix for windows. + Reviewed by Geoffrey Garen. - After http://trac.webkit.org/changeset/47795 the MinGW build broke, - because MinGW has __mingw_aligned_malloc instead of _aligned_malloc. + Changed the initial and subsequent allocation of vector storage to + Array()s. The changes are to limit sparse arrays to 100000 entries + and fixed the sparse map to vector storage conversion to use the + minimum amount of memory needed to store the current number of entries. + These changes address https://bugs.webkit.org/show_bug.cgi?id=43707 - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): MinGW case added. - (JSC::Heap::freeBlock): MinGW case added. + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::getNewVectorLength): -2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu> +2010-08-16 Gabor Loki <loki@webkit.org> - Reviewed by Tor Arne Vestbø. + Reviewed by Gavin Barraclough. - [Qt] Build fix for Windows/MinGW + Avoid increasing required alignment of target type warning + https://bugs.webkit.org/show_bug.cgi?id=43963 - https://bugs.webkit.org/show_bug.cgi?id=29268 + Fix platform independent alignment warnings. - * wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW) + * wtf/ListHashSet.h: + (WTF::ListHashSetNodeAllocator::pool): -2009-09-14 Gabor Loki <loki@inf.u-szeged.hu> +2010-08-19 Gabor Loki <loki@webkit.org> Reviewed by Gavin Barraclough. - Detect VFP at runtime in generic ARM port on Linux platform. - https://bugs.webkit.org/show_bug.cgi?id=29076 - - * JavaScriptCore.pri: - * assembler/MacroAssemblerARM.cpp: Added. - (JSC::isVFPPresent): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::supportsFloatingPoint): - -2009-09-14 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + Enable truncated floating point feature on ARM + https://bugs.webkit.org/show_bug.cgi?id=44233 - Reviewed by Tor Arne Vestbø. + Enable truncated floating point feature with the help of VCVTR.S32.F64 + instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit + integer/register, it saturates at INT_MAX or INT_MIN. Testing this + looks quicker than testing FPSCR for exception. - [Qt] Build fix for windows build. + Inspired by Jacob Bramley's patch from JaegerMonkey - * JavaScriptCore.pri: Correct a logic error. - * pcre/dftables: Add missing paranthesis for tmpdir function. - -2009-09-12 Oliver Hunt <oliver@apple.com> + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + (JSC::ARMAssembler::cmn_r): + (JSC::ARMAssembler::vcvtr_s32_f64_r): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): + (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32): - Reviewed by NOBODY (Build fix). +2010-08-24 Gavin Barraclough <barraclough@apple.com> - Build fix for windows exports (again). + Windows build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: -2009-09-12 Oliver Hunt <oliver@apple.com> +2010-08-24 Gavin Barraclough <barraclough@apple.com> - Reviewed by NOBODY (Build fix). - - Build fix for windows exports. + Windows build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-12 Oliver Hunt <oliver@apple.com> - - Reviewed by NOBODY (Build fix). - - Correct fix for non-allinonefile builds - - * runtime/ObjectConstructor.cpp: - -2009-09-12 Oliver Hunt <oliver@apple.com> - - Reviewed by NOBODY (Build fix). - - Fix non-allinonefile builds - - * runtime/ObjectConstructor.cpp: + * wtf/DecimalNumber.h: + (WTF::DecimalNumber::intPow10): + * wtf/dtoa.cpp: + * wtf/dtoa.h: -2009-09-12 Oliver Hunt <oliver@apple.com> +2010-08-23 Gavin Barraclough <barraclough@apple.com> - Reviewed by Maciej Stachowiak. + Reviewed by Oliver Hunt. - [ES5] Implement Object.keys - https://bugs.webkit.org/show_bug.cgi?id=29170 + https://bugs.webkit.org/show_bug.cgi?id=44487 - This patch basically requires two separate steps, the first is to split getPropertyNames - into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave - in the same way as getOwnPropertySlot and getPropertySlot. In essence getOwnPropertyNames - produces the list of properties on an object excluding its prototype chain and getPropertyNames - just iterates the the object and its prototype chain calling getOwnPropertyNames at each level. + Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated + code & unnecessary complexity. Add a new DecimalNumber class to encapsulate + double to string conversion, share the implementations of rounding & + decimal-fraction/exponential formatting. - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertyNames): * JavaScriptCore.exp: - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::getOwnPropertyNames): - * debugger/DebuggerActivation.h: - * runtime/CommonIdentifiers.h: - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertyNames): - * runtime/JSArray.h: - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertyNames): - * runtime/JSByteArray.h: - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::getOwnPropertyNames): - * runtime/JSNotAnObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::getOwnPropertyNames): - * runtime/JSObject.h: - * runtime/JSVariableObject.cpp: - (JSC::JSVariableObject::getOwnPropertyNames): - * runtime/JSVariableObject.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorKeys): - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertyNames): - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyNames): - * runtime/StringObject.h: - * runtime/Structure.cpp: - (JSC::Structure::getOwnEnumerablePropertyNames): - (JSC::Structure::getEnumerablePropertyNames): - * runtime/Structure.h: - -2009-09-11 Oliver Hunt <oliver@apple.com> + Update exports. - Reviewed by Sam Weinig. + * runtime/NumberPrototype.cpp: + (JSC::toThisNumber): + (JSC::getIntegerArgumentInRange): + Helper methods used in implementing toExponential/toFixed/toString. + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + Reimplemented using new DecimalNumber class. + + * runtime/UString.cpp: + (JSC::UString::number): + Updated to call numberToString. - getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames - https://bugs.webkit.org/show_bug.cgi?id=29214 - - Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames. - This flag is used to make sure that caching of the property name data is safe. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * debugger/DebuggerActivation.h: - (JSC::DebuggerActivation::createStructure): - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/DatePrototype.h: - (JSC::DatePrototype::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.h: - (JSC::JSObject::createStructure): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::hasDefaultGetPropertyNames): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::createStructure): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::createStructure): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): + * wtf/DecimalNumber.h: Added. + (WTF::): + (WTF::DecimalNumber::DecimalNumber): + (WTF::DecimalNumber::toStringDecimal): + (WTF::DecimalNumber::toStringExponential): + (WTF::DecimalNumber::sign): + (WTF::DecimalNumber::exponent): + (WTF::DecimalNumber::significand): + (WTF::DecimalNumber::precision): + (WTF::DecimalNumber::init): + (WTF::DecimalNumber::isZero): + (WTF::DecimalNumber::roundToPrecision): + New class to perform double to string conversion. + Has three constructors, which allow conversion with no rounding, + rounding to significant-figures, or rounding to decimal-places, + and two methods for formatting strings, either using decimal + fraction or exponential encoding. Internal implementation uses + pre-rounding of the values before calling dtoa rather than + relying on dtoa to correctly round, which does not produce + fully accurate results. Hopefully we can address this in the + near future. -2009-09-11 Alexey Proskuryakov <ap@webkit.org> + * wtf/dtoa.cpp: + (WTF::intPow10): + * wtf/dtoa.h: + intPow10 is used internally by DecimalNumber. + + * wtf/text/WTFString.cpp: + (WTF::copyToString): + (WTF::nanOrInfToString): + Used internally in numberToString for NaN/Infinity handling. + (WTF::numberToString): + Added new method to convert doubles to strings. + + * wtf/text/WTFString.h: + Added declaration for numberToString. This is here because + we should switch over to using this for all double to string + conversion in WebCore (see section 2.4.4.3 of the HTML5 spec). + +2010-08-24 Oliver Hunt <oliver@apple.com> Reviewed by Geoff Garen. - https://bugs.webkit.org/show_bug.cgi?id=29207 - Add checks for using WebCore JS context on secondary threads - - * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - Added a new mainThreadOnly flag that WebCore would set. - - * runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this, - so this is a good place to check that the API isn't used form a wrong thread. + Don't seed the JS random number generator from time() + https://bugs.webkit.org/show_bug.cgi?id=41868 + <rdar://problem/8171025> -2009-09-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + Switch to using the secure random number generator to + seed the fast random generator, and make the generator + be per global object. - Reviewed by Simon Hausmann. - - Compiling JavaScriptCore on sparc 64 with gcc fails. - - ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int, - however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes). - - The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use - a mutex instead when compiling for sparc 64 with gcc. - - https://bugs.webkit.org/show_bug.cgi?id=29175 - - * wtf/Platform.h: - __sparc64__ is not defined on all OS. - Uses instead: __sparc__ && __arch64__ || __sparcv9 - * wtf/Threading.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::weakRandomNumber): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncRandom): -2009-09-11 Prasanth Ullattil <prasanth.ullattil@nokia.com> +2010-08-24 Oliver Hunt <oliver@apple.com> - Reviewed by Simon Hausmann. + Reviewed by Beth Dakin. - Fix compile error on Windows7(64Bit) with latest SDK. + Make overflow guards in UString::utf8 explicit + https://bugs.webkit.org/show_bug.cgi?id=44540 - Added the missing include file. + Add an explicit overflow check prior to allocating our buffer, + rather than implicitly relying on the guard in convertUTF16ToUTF8. * runtime/UString.cpp: + (JSC::UString::utf8): -2009-09-11 Joerg Bornemann <joerg.bornemann@trolltech.com> +2010-08-24 Yael Aharon <yael.aharon@nokia.com> Reviewed by Simon Hausmann. - Qt/Windows CE compile fix, include the executable allocator and - markstack implementation in the windows build. - - * JavaScriptCore.pri: - -2009-09-08 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Dimitri Glazkov. - - Remove unneeded define for ActiveX. - https://bugs.webkit.org/show_bug.cgi?id=29054 - - * wtf/Platform.h: - -2009-09-10 Mark Rowe <mrowe@apple.com> - - Rubber-stamped by Sam Weinig. - - Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be. - - * Configurations/FeatureDefines.xcconfig: - -2009-09-10 Fumitoshi Ukai <ukai@chromium.org> - - Reviewed by Alexey Proskuryakov. - - Export WTF::tryFastMalloc used in WebSocketChannel. - https://bugs.webkit.org/show_bug.cgi?id=28038 - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-10 Oliver Hunt <oliver@apple.com> - - Reviewed by NOBODY (Build fix). - - Make StructureTransitionTable use an enum for the PtrAndFlags member - used for the single transition slot optimisation. - - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::StructureTransitionTable): - (JSC::StructureTransitionTable::usingSingleTransitionSlot): - (JSC::StructureTransitionTable::): - -2009-09-10 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization - https://bugs.webkit.org/show_bug.cgi?id=29141 - - Make StructureTransitionTable encapsulate the single transition slot optimization. - - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::~Structure): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::addPropertyWithoutTransition): - (JSC::Structure::removePropertyWithoutTransition): - (JSC::Structure::hasTransition): - * runtime/Structure.h: - (JSC::StructureTransitionTable::contains): - (JSC::StructureTransitionTable::get): - (JSC::StructureTransitionTable::hasTransition): - (JSC::StructureTransitionTable::reifySingleTransition): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::StructureTransitionTable): - (JSC::StructureTransitionTable::~StructureTransitionTable): - (JSC::StructureTransitionTable::remove): - (JSC::StructureTransitionTable::add): - (JSC::StructureTransitionTable::table): - (JSC::StructureTransitionTable::singleTransition): - (JSC::StructureTransitionTable::usingSingleTransitionSlot): - (JSC::StructureTransitionTable::setSingleTransition): - (JSC::StructureTransitionTable::setTransitionTable): - (JSC::StructureTransitionTable::): - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - -2009-09-10 Zoltan Horvath <zoltan@webkit.org> - - Reviewed by Darin Adler. - - Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet - https://bugs.webkit.org/show_bug.cgi?id=25930 - - FastAllocBase has been extended with fastDeleteSkippingDestructor function which - releases memory without destructor call. fastDeleteAllValues has been implemented - similar as deleteAllValues but it uses fastDelete function to release memory. - - * wtf/FastAllocBase.h: - (WTF::fastDeleteSkippingDestructor): - * wtf/HashSet.h: - (WTF::fastDeleteAllValues): - -2009-09-10 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Darin Adler. - - ARM compiler does not understand GCC visibility attribute - https://bugs.webkit.org/show_bug.cgi?id=29079 + [Symbian] Fix commit/decommit of system memory using RChunk - * API/JSBase.h: Make the test more specific to hit only - the GCC compiler + Swap accidentially reversed start and m_base values for determining the + offset within the RChunk. -2009-09-10 Adam Barth <abarth@webkit.org> + * wtf/PageReservation.h: + (WTF::PageReservation::systemCommit): + (WTF::PageReservation::systemDecommit): - Unreviewed revert of the previous change. It broke the tests. +2010-08-23 Patrick Gansterer <paroga@paroga.com> - * wtf/dtoa.cpp: - (WTF::dtoa): - -2009-09-10 Ben Laurie <benl@google.com> - - Reviewed by Adam Barth. + Rubber-stamped by Gabor Loki. - <https://bugs.webkit.org/show_bug.cgi?id=26836> + [WINCE] Buildfix for GeneratedJITStubs after r64818 + https://bugs.webkit.org/show_bug.cgi?id=44469 - If dtoa was given a small buffer and the number was either infinite or - NaN, then the buffer would be overflowed. + Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#". - * wtf/dtoa.cpp: + * jit/JITStubs.cpp: -2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-08-23 Oliver Hunt <oliver@apple.com> Reviewed by Darin Adler. - Change reinterpret_cast to static_cast in r48212. - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> + [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition + https://bugs.webkit.org/show_bug.cgi?id=44240 + <rdar://problem/8328995> - Reviewed by Darin Adler. + Fix an error I introduced when cleaning up the interpreter side of the logic + to prevent setters being called in object initialisers. - Remove WTF_PLATFORM_FORCE_PACK as it is no longer used - https://bugs.webkit.org/show_bug.cgi?id=29066 + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): - * wtf/Platform.h: +2010-08-23 Michael Saboff <msaboff@apple.com> -2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> + Reviewed by Oliver Hunt. - Reviewed by Ariya Hidayat. + Fixed case where a single character search string in a string.replace() + did not properly handle back reference replacement. The fix is to + check for a '$' as part of the check to see if we can execute the + single character replace optimization. + https://bugs.webkit.org/show_bug.cgi?id=44067 - Implement flushing the instruction cache for Symbian - https://bugs.webkit.org/show_bug.cgi?id=29075 + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush - the instruction cache on Symbian +2010-08-23 Oliver Hunt <oliver@apple.com> -2009-09-09 Kent Hansen <khansen@trolltech.com> + Reviewed by Gavin Barraclough. - Reviewed by Darin Adler. + JSON.stringify is much slower than Firefox on particular pathological input + https://bugs.webkit.org/show_bug.cgi?id=44456 - https://bugs.webkit.org/show_bug.cgi?id=29024 - Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL + Make StringBuilder::reserveCapacity reserve additional space so we don't end up + repeatedly copying the entire result string. - These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler. + * runtime/StringBuilder.h: + (JSC::StringBuilder::append): + (JSC::StringBuilder::reserveCapacity): - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h. - * runtime/Structure.h: - * runtime/TypeInfo.h: Removed. +2010-08-23 Jian Li <jianli@chromium.org> -2009-09-08 Oliver Hunt <oliver@apple.com> + Reviewed by Darin Fisher. - Reviewed by Maciej Stachowiak. + Handle blob resource. + https://bugs.webkit.org/show_bug.cgi?id=43941 - JSON.stringify(Date) loses the milliseconds information - https://bugs.webkit.org/show_bug.cgi?id=29063 + * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle. - Make sure we include milliseconds in the output of toISOString. +2010-08-19 Andreas Kling <andreas.kling@nokia.com> - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToISOString): + Reviewed by Geoffrey Garen. -2009-09-08 Kevin Ollivier <kevino@theolliviers.com> + JSC: Move the static_cast into to(U)Int32 fast case + https://bugs.webkit.org/show_bug.cgi?id=44037 - wx build fix, generate derived sources earlier in order to make sure - they're found by the build system when generating the list of sources to build. + Do the static_cast<(u)int32_t> inline to avoid the function call overhead + for easily converted values (within (u)int32_t range.) - * wscript: + * runtime/JSValue.cpp: + (JSC::toInt32SlowCase): + (JSC::toUInt32SlowCase): + * runtime/JSValue.h: + (JSC::JSValue::toInt32): + (JSC::JSValue::toUInt32): -2009-09-08 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-08-18 Andreas Kling <andreas.kling@nokia.com> - Reviewed by Simon Hausmann. + Reviewed by Geoffrey Garen. - Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined - https://bugs.webkit.org/show_bug.cgi?id=29011 + REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript + https://bugs.webkit.org/show_bug.cgi?id=43742 - * wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for - atomicIncrement and atomicDecrement + Add codegen for pow() to return Int32 values when possible. -2009-09-07 Zoltan Horvath <zoltan@webkit.org> + * jit/ThunkGenerators.cpp: + (JSC::powThunkGenerator): - Reviewed by Darin Adler. +2010-08-18 Gabor Loki <loki@webkit.org> - Allow custom memory allocation control in Yarr's RegexInterpreter - https://bugs.webkit.org/show_bug.cgi?id=29025 + Reviewed by Gavin Barraclough. - Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has - been instantiated by 'new': + The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64 + https://bugs.webkit.org/show_bug.cgi?id=43897 - class ByteDisjunction - -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462 + A 64 bits wide member in a structure is aligned to 8 bytes on ARM by + default, but this is not taken into account in the offset defines of + JITStackFrame. - struct BytecodePattern - -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279 + * jit/JITStubs.cpp: + * jit/JITStubs.h: - * yarr/RegexInterpreter.h: +2010-08-18 Gavin Barraclough <barraclough@apple.com> -2009-09-07 Drew Wilson <atwilson@google.com> + Rubber stamped by Sam Weinig. - Reverting r48121 to fix Windows build errors. + Rename UString::substr to substringSharingImpl, add to WTF::String. + Now WTF::String can do everything that JSC::UString can do! * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::escapeQuotes): + * bytecompiler/NodesCodegen.cpp: + (JSC::substitute): + * parser/SourceProvider.h: + (JSC::UStringSourceProvider::getRange): + * runtime/FunctionPrototype.cpp: + (JSC::insertSemicolonIfNeeded): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseInt): + * runtime/JSONObject.cpp: + (JSC::gap): + (JSC::Stringifier::indent): + (JSC::Stringifier::unindent): + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::trimString): + * runtime/UString.cpp: + (JSC::UString::substringSharingImpl): + * runtime/UString.h: + * wtf/text/WTFString.cpp: + (WTF::String::substringSharingImpl): + * wtf/text/WTFString.h: -2009-09-07 Drew Wilson <atwilson@google.com> - - Reviewed by David Levin. - - Enable SHARED_WORKERS by default - https://bugs.webkit.org/show_bug.cgi?id=28959 - - * Configurations/FeatureDefines.xcconfig: - -2009-09-07 Fumitoshi Ukai <ukai@chromium.org> - - Reviewed by Alexey Proskuryakov. - - Export WTF::tryFastMalloc used in WebSocketChannel. - https://bugs.webkit.org/show_bug.cgi?id=28038 +2010-08-18 Gavin Barraclough <barraclough@apple.com> - * JavaScriptCore.exp: + Windows build fix. -2009-09-04 Oliver Hunt <oliver@apple.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: - Reviewed by NOBODY (Build fix). +2010-08-18 Gavin Barraclough <barraclough@apple.com> - Fix windows export files + Windows build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-09-04 Oliver Hunt <oliver@apple.com> + * JavaScriptCore.xcodeproj/project.pbxproj: - Reviewed by Gavin Barraclough. +2010-08-17 Gavin Barraclough <barraclough@apple.com> - [[ToString]] conversion should use the actual toString function for String objects. + Reviewed by Sam Weinig. - Remove incorrect specialisations of toString conversions on StringObject. + Bug 44146 - Remove toDouble/toUInt32 methods from UString. + + These methods all implement JavaScript language specific behaviour, and as such + are not suited to being on a generic string object. They are also inefficient + and incorrectly used, refactor & cleanup. Uses of these methods really divide + out into two cases. + + ToNumber: + Uses of toDouble from JSString and from parseFloat are implementing ecma's + ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble + should largely just be moved out to a global jsToNumber function. ToNumber is + capable of recognizing either decimal or hexadecimal numbers, but parseFloat + should only recognize decimal values. This is currently handled by testing for + hexadecimal before calling toDouble, which should unnecessary - instead we can + just split out the two parts to the grammar into separate functions. Also, + strtod recognizes a set of literals (nan, inf, and infinity - all with any + capitalization) - which are not defined by any of the specs we are implementing. + To handle this we need to perform additional work in toDouble to convert the + unsupported cases of infinities back to NaNs. Instead we should simply remove + support for this literals from strtod. This should provide a more desirable + behaviour for all clients of strtod. + + Indexed properties: + Uses of the toStrictUInt32 methods are were all converting property names to + indices, and all uses of toUInt32 were incorrect; in all cases we should have + been calling toUInt32. This error results in some incorrect behaviour in the + DOM (accessing property "0 " of a NodeList should fail; it currently does not). + Move this method onto Identifier (our canonical property name), and make it + always perform a strict conversion. Add a layout test to check NodeList does + convert indexed property names correctly. * JavaScriptCore.exp: + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/Identifier.cpp: + (JSC::Identifier::toUInt32): + * runtime/Identifier.h: + (JSC::Identifier::toUInt32): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): + * runtime/JSArray.h: + (JSC::Identifier::toArrayIndex): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::getOwnPropertySlot): + (JSC::JSByteArray::getOwnPropertyDescriptor): + (JSC::JSByteArray::put): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::isInfinity): + (JSC::jsHexIntegerLiteral): + (JSC::jsStrDecimalLiteral): + (JSC::jsToNumber): + (JSC::parseFloat): + * runtime/JSGlobalObjectFunctions.h: + * runtime/JSString.cpp: + (JSC::JSString::getPrimitiveNumber): + (JSC::JSString::toNumber): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::JSString::getStringPropertySlot): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::put): * runtime/StringObject.cpp: - * runtime/StringObject.h: - -2009-09-04 Steve Falkenburg <sfalken@apple.com> + (JSC::StringObject::deleteProperty): + * runtime/UString.cpp: + * runtime/UString.h: + * wtf/dtoa.cpp: + (WTF::strtod): - Windows build fix. +2010-08-17 Gavin Barraclough <barraclough@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export. + Reviewed by Sam Weinig. -2009-09-04 Steve Falkenburg <sfalken@apple.com> + Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find - Windows build fix. + Bug 44080 introuduced a couple of cases in which array bounds could be overrun. + One of these was fixed in r65493, this patch fixes the other and address the + concerns voiced in comment #6 by restructuring the loops to remove the code + dupliction without introducing an additional if check. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export. + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::find): + (WTF::StringImpl::findIgnoringCase): + (WTF::StringImpl::reverseFind): + (WTF::StringImpl::reverseFindIgnoringCase): -2009-09-04 Darin Adler <darin@apple.com> +2010-08-17 No'am Rosenthal <noam.rosenthal@nokia.com> - Reviewed by Geoff Garen. + Reviewed by Ariya Hidayat. - DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32) - https://bugs.webkit.org/show_bug.cgi?id=28909 + [Qt] Move the accelerated compositing build flag to the right place + https://bugs.webkit.org/show_bug.cgi?id=43882 - Part two. + * wtf/Platform.h: - Make some improvements to garbage collection code: +2010-08-17 Yuta Kitamura <yutak@chromium.org> - 1) Create a runtime assertion that catches any classes that - override markChildren but have the HasDefaultMark bit set. - 2) Remove checks of the mark bit outside the MarkStack::append - function; they are redundant. - 3) Improve the efficiency of the asObject and asArray functions - when called on JSCell* to avoid a round trip to JSValue. - 4) Make more callers use the checked asCell and asObject - casting functions rather than unchecked casts. - 5) Removed the JSCell::marked function and other GC-related - functions because these operations are no longer things that - code other than the core GC code needs to do directly. Fixed - callers that were calling them. + Reviewed by Shinichiro Hamaji. - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain. - (JSC::Heap::markProtectedObjects): Removed unneeded check of the mark - bit and call to MarkStack::drain. - (JSC::Heap::collect): Removed unneeded checks of the mark bit and also - changed call to SmallStrings::mark to call markChildren instead to match - the rest of the objects. - (JSC::typeName): Removed unneeded cast to JSObject*. + Avoid uninitialized memory read in StringImpl::find(). - * runtime/JSArray.h: - (JSC::asArray): Added an overload for JSCell* and changed the JSValue - version to call it. Removed some unneeded casts. - (JSC::JSArray::markChildrenDirect): Marked this function inline. It's in - a header, and if not marked inline this could lead to linking problems. - (JSC::MarkStack::markChildren): Added. This helper function is used by - the drain function to avoid repating code. Also added the code here to - check fro default mark violations in debug code. If a markChildren - function adds something to the mark stack, but the type info claimed - hasDefaultMark was true, then we will get an assertion now. Also fixed - the assertion about the mark bit to use the Heap function directly - because we don't have a JSCell::marked function any more. - (JSC::MarkStack::drain): Changed a local variable from "v" to "value", - and from "currentCell" to "cell". Changed to call markChildren in two - places instead of repeating a chain of if statements twice. Changed - code that reads and writes the mark bit to use Heap::isCellMarked and - Heap::markCell so we can eliminate the JSCell::marked and - JSCell::markCellDirect functions. - - * runtime/JSCell.h: Removed JSCell's markCellDirect and marked member - functions. Added a comment explaining that asCell should be deprecated - in favor of the JSValue asCell member function. - (JSC::MarkStack::append): Added the assertion that catches callers - that have set the HasDefaultMark bit incorrectly. Changed - code that reads and writes the mark bit to use Heap::isCellMarked and - Heap::markCell so we can eliminate the JSCell::marked and - JSCell::markCellDirect functions. Moved the overload of - MarkStack::append for JSValue here so it can call through to the cell - version. The old version had a copy of all the code instead, but that - repeated the conversion from JSValue to JSCell* and the check for - whether a value is a cell multiple times. - (JSC::Structure::markAggregate): Moved this function here to avoid - dependencies for Structure.h, since this calls MarkStack::append. + REGRESSION(r65468): Crashes in StringImpl::find + https://bugs.webkit.org/show_bug.cgi?id=44099 - * runtime/JSObject.cpp: - (JSC::JSObject::markChildren): Added code to clear - m_isCheckingForDefaultMarkViolation so the marking done by JSObject - doesn't trigger the assertion. + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::find): - * runtime/JSValue.h: Moved some stray includes that were outside the - header guard inside it. Not sure how that happened! Removed the - GC-related member functions markChildren, hasChildren, marked, and - markDirect. +2010-08-16 Gavin Barraclough <barraclough@apple.com> - * runtime/JSWrapperObject.h: Made markChildren private. - (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the - HasDefaultMark bit was set. + Rubber stamped by Sam Weinig - * runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and - initialized it to false. Moved the append function body from here to - JSCell.h. Added a declaration of a private markChildren function used - inside the drain function. + Add VectorTraits to String & DefaultHash traits to UString to unify behaviour. - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::markChildren): Changed the name and style of this - function to match other functions. This allows us to share the normal - mark stack code path. - - * runtime/SmallStrings.h: Changed the name and interface of mark to - the more-normal markChildren style. - - * runtime/Structure.h: Moved the body of markAggregate into the - JSCell.h to avoid a circular dependency with JSCell.h. + * runtime/UString.h: + (JSC::UStringHash::hash): + (JSC::UStringHash::equal): + (WTF::): + * wtf/text/WTFString.h: + (WTF::): -2009-09-04 Darin Adler <darin@apple.com> +2010-08-16 Gavin Barraclough <barraclough@apple.com> - Reviewed by Geoff Garen. + Rubber stamped by Sam Weinig - DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32) - https://bugs.webkit.org/show_bug.cgi?id=28909 + Remove unnecessary includes from UString.h, add new includes as necessary. - Part one. + * profiler/CallIdentifier.h: + * profiler/ProfileNode.h: + * runtime/DateConversion.cpp: + * runtime/Identifier.h: + (JSC::IdentifierRepHash::hash): + * runtime/RegExpCache.h: + * runtime/RegExpKey.h: + * runtime/UString.cpp: + (JSC::UString::substr): + * runtime/UString.h: + * wtf/text/WTFString.h: - Make some improvements to garbage collection code: +2010-08-16 Gavin Barraclough <barraclough@apple.com> - 1) Fix the two classes that had the default mark bit set but - should not. - 2) Remove checks of the mark bit outside the MarkStack::append - function; they are redundant. - 3) Make more callers use the checked asCell and asObject - casting functions rather than unchecked casts. - 4) Removed some GC-related functions because these operations are - no longer things that code other than the core GC code needs - to do directly. Fixed callers that were calling them. + Reviewed by Sam Weinig - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): Removed unneeded check of the mark - bit before calling MarkStack::append. + Bug 44080 - String find/reverseFind methods need tidying up + These methods have a couple of problems with their interface, and implementation. - * interpreter/Register.h: Removed unneeded marked and markChildren - functions. + These methods take and int index, and return an int - however this is problematic + since on 64-bit string indices may have a full 32-bit range. This spills out into + surrounding code, which unsafely casts string indices from unsigned to int. Code + checking the result of these methods check for a mix of "== -1", "< 0", and + "== notFound". Clean this up by changing these methods to take an unsigned + starting index, and return a size_t. with a failed match indicated by notFound. + reverseFind also has a special meaning for the starting index argument, in that a + negative index is interpreted as an offset back from the end of the string. Remove + this functionality, in the (1!) case where it is used we should just calculate the + offset by subtracting from the string's length. - * jit/JITStubs.cpp: - (op_eq): Removed unneeded assertions, instead using checked casting - functions such as asObject. + The implementation has a few problems too. The code is not in webkit style, in + using assorted abbreviations in variable names, and implementations of similar + find methods with differing argument types were unnecessarily inconsistent. When + find is passed const char* data the string would be handled as latin1 (zero + extended to UTF-16) for all characters but the first; this is sign extended. + Case-insensitive find is broken for unicode strings; the hashing optimization is + not unicode safe, and could result in false negatives. - * runtime/ArgList.h: Added now-needed forward declaration of MarkStack. + Unify UString find methods to match String. - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit. + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::escapeQuotes): + * bytecompiler/NodesCodegen.cpp: + (JSC::substitute): + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExpKey.h: + (JSC::RegExpKey::getFlagsValue): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::substituteBackreferences): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncSplit): + * runtime/UString.cpp: + * runtime/UString.h: + (JSC::UString::find): + (JSC::UString::reverseFind): + * wtf/text/AtomicString.h: + (WTF::AtomicString::find): + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::find): + (WTF::StringImpl::findCaseInsensitive): + (WTF::StringImpl::reverseFind): + (WTF::StringImpl::reverseFindCaseInsensitive): + (WTF::StringImpl::endsWith): + (WTF::StringImpl::replace): + * wtf/text/StringImpl.h: + (WTF::StringImpl::startsWith): + * wtf/text/WTFString.cpp: + (WTF::String::split): + * wtf/text/WTFString.h: + (WTF::String::find): + (WTF::String::reverseFind): + (WTF::String::findCaseInsensitive): + (WTF::String::reverseFindCaseInsensitive): + (WTF::String::contains): + (WTF::find): + (WTF::reverseFind): + +2010-08-16 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, do not build WebCore as a convenience library as this leads to + errors in the Win build w/export symbols and causes problems with DOM bindings + debugging in gdb. - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the - HasDefaultMark bit was set. + * wscript: - * runtime/JSCell.cpp: - (JSC::JSCell::getObject): Use asObject to avoid a direct static_cast. +2010-08-16 Leandro Pereira <leandro@profusion.mobi> - * runtime/JSObject.h: - (JSC::asObject): Added an overload for JSCell* and changed the JSValue - version to call it. - (JSC::JSValue::get): Use asObject to avoid a direct static_cast. + [EFL] Build fix after r65366. - * runtime/JSWrapperObject.h: Made markChildren private. - (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the - HasDefaultMark bit was set. Later we may want to optimize this for - wrapper types that never have cells in their internal values, but there - is no measured performance regression in SunSpider or V8 doing this - all the time. + * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if + they're empty. + * jsc/CMakeLists.txt: Ditto. + * wtf/CMakeLists.txt: Ditto. - * runtime/MarkStack.cpp: Tweaked formatting. +2010-08-15 Kevin Ollivier <kevino@theolliviers.com> -2009-09-04 Kevin Ollivier <kevino@theolliviers.com> + [wx] Build fix, don't build intermediate source in DerivedSources dir. - wx build fix. Switch USE_ defines over to the compiler so that they can be - checked by files not including config.h (like WebCorePrefix.h). + * wscript: - * wtf/Platform.h: +2010-08-14 Patrick Gansterer <paroga@paroga.com> -2009-09-03 Yong Li <yong.li@torchmobile.com> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by David Levin. + [CMake] Add preprocessor detection for generator scripts + https://bugs.webkit.org/show_bug.cgi?id=43984 - Remove unnecessary dependency on unistd.h - https://bugs.webkit.org/show_bug.cgi?id=28962 + * CMakeLists.txt: - * runtime/Completion.cpp: +2010-08-14 Patrick Gansterer <paroga@paroga.com> -2009-09-03 Fumitoshi Ukai <ukai@chromium.org> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by Eric Seidel. + [CMake] Set target properties only if available + https://bugs.webkit.org/show_bug.cgi?id=43978 - Add strnstr for Linux and Windows in StringExtras.h - https://bugs.webkit.org/show_bug.cgi?id=28901 + * CMakeLists.txt: + * jsc/CMakeLists.txt: + * wtf/CMakeLists.txt: - * wtf/StringExtras.h: - (strnstr): +2010-08-13 Kevin Ollivier <kevino@theolliviers.com> -2009-09-03 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + [wx] Build fix, add CString to the list of forwards. - Reviewed by Darin Adler. + * wtf/Forward.h: - Allow custom memory allocation control for JavaScriptCore's HashEntry class - https://bugs.webkit.org/show_bug.cgi?id=27830 +2010-08-13 Gavin Barraclough <barraclough@apple.com> - Inherits HashEntry class from FastAllocBase because it has been - instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32. + Windows build fix - * runtime/Lookup.h: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-09-02 Gavin Barraclough <barraclough@apple.com> +2010-08-13 Gavin Barraclough <barraclough@apple.com> - Should crash if JIT code buffer allocation fails. + Windows build fix - https://bugs.webkit.org/show_bug.cgi?id=28926 - <rdar://problem/7031922> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::systemAlloc): - * jit/ExecutableAllocatorWin.cpp: - (JSC::ExecutablePool::systemAlloc): +2010-08-13 Gavin Barraclough <barraclough@apple.com> -2009-09-02 Kevin Ollivier <kevino@theolliviers.com> + Windows build fix - waf build fixes for Windows/MSVC. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wscript: +2010-08-13 Gavin Barraclough <barraclough@apple.com> -2009-09-02 Kevin Ollivier <kevino@theolliviers.com> + Rubber stamped by Sam Weinig. + Switch String::/UString::ascii() to return a CString. - Build fix for building on Windows. + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::dump): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::dumpCaller): + * jsc.cpp: + (runWithScripts): + (runInteractive): + * runtime/Identifier.h: + (JSC::Identifier::ascii): + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + * runtime/UString.cpp: + (JSC::UString::ascii): + (JSC::UString::latin1): + * runtime/UString.h: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::asciiOLD): + * wtf/text/StringImpl.h: + * wtf/text/WTFString.cpp: + (WTF::String::ascii): + (WTF::String::latin1): + * wtf/text/WTFString.h: - * wtf/ThreadingPthreads.cpp: +2010-08-13 Gabor Loki <loki@webkit.org> -2009-09-02 Norbert Leser <norbert.leser@nokia.com> + Reviewed by Gavin Barraclough. - Reviewed by Eric Seidel. + Avoid increasing required alignment of target type warning on ARM + https://bugs.webkit.org/show_bug.cgi?id=38045 - Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled - - RegisterFile constructor currently throws #error when both - MMAP and VIRTUALALLOC conditions fail. - On any platform that does not provide these features - (for instance, Symbian), - the fallback should be regular malloc (or fastMalloc). - It is functionally equivalent in this case, even though it may - have certain drawbacks such as lack of dynamic pre-allocation. + The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where + sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM: + increases required alignment of target type warnings. + Casting the type of [pointer to Type2] object to void* bypasses the + warning. - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putShortUnchecked): + (JSC::AssemblerBuffer::putIntUnchecked): + (JSC::AssemblerBuffer::putInt64Unchecked): * interpreter/RegisterFile.h: (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::grow): + * jit/JITStubs.cpp: + * pcre/pcre_compile.cpp: + (jsRegExpCompile): + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + * wtf/FastMalloc.cpp: + (WTF::PageHeapAllocator::New): + (WTF::TCMalloc_Central_FreeList::Populate): + * wtf/MD5.cpp: + (WTF::reverseBytes): + (WTF::MD5::addBytes): + (WTF::MD5::checksum): + * wtf/StdLibExtras.h: + (isPointerTypeAlignmentOkay): + (reinterpret_cast_ptr): + * wtf/Vector.h: + (WTF::VectorBuffer::inlineBuffer): + * wtf/qt/StringQt.cpp: + (WTF::String::String): -2009-08-31 Robert Agoston <Agoston.Robert@stud.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Fixed typo. - https://bugs.webkit.org/show_bug.cgi?id=28691 - - * parser/Parser.h: - (JSC::Parser::parse): - -2009-08-27 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects - https://bugs.webkit.org/show_bug.cgi?id=28797 - - Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception - checks, and corrected the logic in gap to correctly convert Number and String objects. - - * runtime/JSONObject.cpp: - (JSC::unwrapBoxedPrimitive): - (JSC::gap): - (JSC::Stringifier::Stringifier): - (JSC::Stringifier::appendStringifiedValue): - -2009-08-27 Oliver Hunt <oliver@apple.com> - - Reviewed by Adam Roben. +2010-08-13 Gavin Barraclough <barraclough@apple.com> - JSON.stringify replacer array does not accept values that are not string primitives. - https://bugs.webkit.org/show_bug.cgi?id=28788 + Reviewed by Sam Weinig - Update the JSON stringifier to initialise its replacer array according to the most - recent version of the spec. + Unify UString::UTF8String() & String::utf8() methods, + remove UString::cost() & make atArrayIndex a free function. + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + (JSC::printGlobalResolveInfo): + (JSC::printStructureStubInfo): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + * jsc.cpp: + (functionPrint): + (functionDebug): + (runInteractive): + (fillBufferWithContentsOfFile): + * pcre/pcre_exec.cpp: + (Histogram::~Histogram): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::c_str): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/DateConversion.cpp: + (JSC::parseDate): * runtime/Identifier.h: - (JSC::Identifier::from): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Stringifier): - -2009-08-27 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=28753 - <rdar://problem/7173448> Excessive number of threads (and a crash) - - * wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement - and return the new value. Also added using directives for these functions, to match - te rest of WTF. - -2009-08-27 Brent Fulgham <bfulgham@webkit.org> - - Reviewed by Adam Roben. - - Link the testapi against CFLite when building the WinCairo port. - - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite - target. Update all targets to inherit from either the - JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops - file (WinCairo target). - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove - input file CoreFoundation.lib. This is provided by either the - JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file. - -2009-08-27 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Geoff Garen. - - Fix Windows-specific crash due to missing memory clearing call. - - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - -2009-08-27 Brent Fulgham <bfulgham@webkit.org> - - Build fix: JavaScriptCore_debug.def missing some exports. Apple - Windows build does not use this file, so it was not noticed previously. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-27 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. + (JSC::Identifier::toStrictUInt32): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): + * runtime/JSArray.h: + (JSC::toArrayIndex): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::parseInt): + (JSC::globalFuncJSCPrint): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + * runtime/UString.cpp: + (JSC::UString::toDouble): + (JSC::putUTF8Triple): + (JSC::UString::utf8): + * runtime/UString.h: + (JSC::UString::~UString): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + * wtf/text/WTFString.cpp: + (WTF::String::utf8): + * wtf/text/WTFString.h: + (WTF::String::~String): + (WTF::String::swap): + (WTF::String::isNull): + (WTF::String::isEmpty): + (WTF::String::impl): + (WTF::String::length): + (WTF::String::String): + (WTF::String::isHashTableDeletedValue): + +2010-08-12 Zoltan Herczeg <zherczeg@webkit.org> - x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates. - https://bugs.webkit.org/show_bug.cgi?id=28317 + Reviewed by Gavin Barraclough. - Missed one, fix part II. + Refactoring the fpu code generator for the ARM port + https://bugs.webkit.org/show_bug.cgi?id=43842 - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::move): - * assembler/X86Assembler.h: - (JSC::CAN_SIGN_EXTEND_8_32): + Support up to 32 double precision registers, and the + recent VFP instruction formats. This patch is mainly + a style change which keeps the current functionality. -2009-08-27 Oliver Hunt <oliver@apple.com> + * assembler/ARMAssembler.h: + (JSC::ARMRegisters::): + (JSC::ARMAssembler::): + (JSC::ARMAssembler::emitInst): + (JSC::ARMAssembler::emitDoublePrecisionInst): + (JSC::ARMAssembler::emitSinglePrecisionInst): + (JSC::ARMAssembler::vadd_f64_r): + (JSC::ARMAssembler::vdiv_f64_r): + (JSC::ARMAssembler::vsub_f64_r): + (JSC::ARMAssembler::vmul_f64_r): + (JSC::ARMAssembler::vcmp_f64_r): + (JSC::ARMAssembler::vsqrt_f64_r): + (JSC::ARMAssembler::vmov_vfp_r): + (JSC::ARMAssembler::vmov_arm_r): + (JSC::ARMAssembler::vcvt_f64_s32_r): + (JSC::ARMAssembler::vcvt_s32_f64_r): + (JSC::ARMAssembler::vmrs_apsr): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::addDouble): + (JSC::MacroAssemblerARM::divDouble): + (JSC::MacroAssemblerARM::subDouble): + (JSC::MacroAssemblerARM::mulDouble): + (JSC::MacroAssemblerARM::sqrtDouble): + (JSC::MacroAssemblerARM::convertInt32ToDouble): + (JSC::MacroAssemblerARM::branchDouble): + (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): - Reviewed by Adam Roben. +2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com> - JSON.stringify replacer array does not accept values that are not string primitives. - https://bugs.webkit.org/show_bug.cgi?id=28788 + Unreviewed, rolling out r65295. + http://trac.webkit.org/changeset/65295 + https://bugs.webkit.org/show_bug.cgi?id=43950 - Update the JSON stringifier to initialise its replacer array according to the most - recent version of the spec. + It broke 4 sputnik tests (Requested by Ossy on #webkit). + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + (JSC::printGlobalResolveInfo): + (JSC::printStructureStubInfo): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + * jsc.cpp: + (functionPrint): + (functionDebug): + (runInteractive): + (fillBufferWithContentsOfFile): + * pcre/pcre_exec.cpp: + (Histogram::~Histogram): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::c_str): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/DateConversion.cpp: + (JSC::parseDate): * runtime/Identifier.h: - (JSC::Identifier::from): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Stringifier): - -2009-08-27 Oliver Hunt <oliver@apple.com> - - Reviewed by Alexey Proskuryakov. - - JSON parser accepts trailing comma in array literals - https://bugs.webkit.org/show_bug.cgi?id=28779 - - Update parser to correctly fail if there's a trailing comma. + (JSC::Identifier::Identifier): + (JSC::Identifier::toArrayIndex): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): + * runtime/JSArray.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::parseInt): + (JSC::globalFuncJSCPrint): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + * runtime/UString.cpp: + (JSC::UString::toDouble): + (JSC::UString::UTF8String): + * runtime/UString.h: + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + (JSC::UString::cost): + (JSC::UString::~UString): + (JSC::UString::toArrayIndex): + * wtf/text/WTFString.cpp: + (WTF::String::utf8): + * wtf/text/WTFString.h: + (WTF::String::String): + (WTF::String::isHashTableDeletedValue): + (WTF::String::length): + (WTF::String::operator[]): + (WTF::String::isNull): + (WTF::String::isEmpty): + (WTF::String::impl): + +2010-08-12 Gavin Barraclough <barraclough@apple.com> - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): + Windows build fix. -2009-08-26 Oliver Hunt <oliver@apple.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Reviewed by Gavin Barraclough. +2010-08-12 Gavin Barraclough <barraclough@apple.com> - 'this' in JSON.parse reviver is the global object - https://bugs.webkit.org/show_bug.cgi?id=28752 + Reviewed by Sam Weinig - This is a technically simple change, we merely update the code for calling - the reviver function to pass the correct this object. Doing so however - exposes the holder to arbitrary mutation by the reviver function so it is - necessary for us to now guard all property accesses against the possibility - of failure. + Unify UString::UTF8String() & String::utf8() methods, + remove UString::cost() & make atArrayIndex a free function. + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + (JSC::printGlobalResolveInfo): + (JSC::printStructureStubInfo): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + * jsc.cpp: + (functionPrint): + (functionDebug): + (runInteractive): + (fillBufferWithContentsOfFile): + * pcre/pcre_exec.cpp: + (Histogram::~Histogram): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::c_str): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/DateConversion.cpp: + (JSC::parseDate): + * runtime/Identifier.h: + (JSC::Identifier::toStrictUInt32): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): * runtime/JSArray.h: - JSON needs to delete a property from the array, so we friend its - Walker class so that we can make a non-virtual call to the arrays - delete and getOwnPropertySlot methods. - * runtime/JSONObject.cpp: - (JSC::Walker::callReviver): - We need to pass the correct this object - (JSC::Walker::walk): - Update calls to callReviver, and update property logic logic - to correctly handle the holder being mutated by the reviver - function. + (JSC::toArrayIndex): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::parseInt): + (JSC::globalFuncJSCPrint): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + * runtime/UString.cpp: + (JSC::UString::toDouble): + (JSC::putUTF8Triple): + (JSC::UString::utf8): + * runtime/UString.h: + (JSC::UString::~UString): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + * wtf/text/WTFString.cpp: + (WTF::String::utf8): + * wtf/text/WTFString.h: + (WTF::String::~String): + (WTF::String::swap): + (WTF::String::isNull): + (WTF::String::isEmpty): + (WTF::String::impl): + (WTF::String::length): + (WTF::String::String): + (WTF::String::isHashTableDeletedValue): + +2010-08-12 Gavin Barraclough <barraclough@apple.com> + + Eeerk! - revert accidentally committed changes in UString! + + * JavaScriptCore.exp: + * runtime/UString.cpp: + (JSC::UString::UString): + * runtime/UString.h: -2009-08-26 Alice Liu <alice.liu@apple.com> +2010-08-12 Gavin Barraclough <barraclough@apple.com> - Windows build fix: added some exported symbols + Reviewed by Sam Weinig - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Change UString constructors to match those in WTF::String. + This changes behaviour of UString((char*)0) to create null + strings, akin to UString() rather than UString::empty(). + (This matches String). Remove unused constructors from + UString, and add null-terminated UTF-16 constructor, to + match String. Move String's constructor into the .cpp to + match UString. -2009-08-26 Geoffrey Garen <ggaren@apple.com> + * JavaScriptCore.exp: + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::calculatedFunctionName): + * runtime/RegExpKey.h: + (JSC::RegExpKey::RegExpKey): + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::createSingleCharacterString): + * runtime/UString.cpp: + (JSC::UString::UString): + * runtime/UString.h: + (JSC::UString::UString): + (JSC::UString::swap): + (JSC::UString::adopt): + (JSC::UString::operator[]): + * wtf/text/WTFString.h: + (WTF::String::String): + (WTF::String::adopt): + (WTF::String::operator[]): - Windows build fix: Removed some exported symbols that no longer exist. +2010-08-12 David Levin <levin@chromium.org> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by NOBODY (build fix). -2009-08-26 Gavin Barraclough <barraclough@apple.com> + * runtime/UString.h: Removed unneccessary #include. - Reviewed by Olliejver Hunt. +2010-08-12 Gavin Barraclough <barraclough@apple.com> - x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates. - https://bugs.webkit.org/show_bug.cgi?id=28317 + Reviewed by Sam Weinig - We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page, - so pointers are never representable as a 32-bit integer, and always have to be represented by - a separate immediate load instruction, rather than within the immediate field of an arithmetic - or memory operation. + Revert changes to ALWAYS_INLINEness of a couple of functions in UString. + This appears to have degraded performance. - We explicitly check for a couple of cases where a value might be representable in 32-bit, but - these probably never kick in on Mac OS, and only kick in to hose GTK. Deleting these does not - show a performance degradation on SunSpider. Remove. + * runtime/UString.cpp: + (JSC::UString::ascii): + * runtime/UString.h: + (JSC::UString::length): + (JSC::UString::isEmpty): + (JSC::UString::~UString): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::storePtr): - (JSC::MacroAssemblerX86_64::branchPtr): +2010-08-12 Csaba Osztrogonác <ossy@webkit.org> -2009-08-26 Geoffrey Garen <ggaren@apple.com> + Reviewed by Antonio Gomes. - Reviewed by Oliver Hunt. + [Qt] Fix warnings: unknown conversion type character 'l' in format + https://bugs.webkit.org/show_bug.cgi?id=43359 - A bit of Collector refatoring. - - SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay). + Qt port doesn't call any printf in String::format(...), consequently + using __attribute__((format(printf,m,n))) is incorrect and causes + false positive warnings on Windows if you build with MinGW. - * JavaScriptCore.exp: + Qt port calls QString::vsprintf(...) , which is platform + independent, and handles %lli, %llu and %llx on all platforms. + (http://trac.webkit.org/changeset/35712) - * runtime/JSCell.cpp: - (JSC::JSCell::toPrimitive): - (JSC::JSCell::getPrimitiveNumber): - (JSC::JSCell::toBoolean): - (JSC::JSCell::toNumber): - (JSC::JSCell::toString): - (JSC::JSCell::toObject): Removed pure virtual functions from - JSCell, so the collector can construct one. This allowed - me to remove a bunch of ASSERT_NOT_REACHED throughout the - code, too. + * wtf/text/WTFString.h: - * runtime/JSCell.h: - (JSC::JSCell::JSCell): ditto - (JSC::Heap::heap): Inlined this function because it's trivial. +2010-08-12 Gabor Loki <loki@webkit.org> - * JavaScriptCore.exp: + Reviewed by Geoffrey Garen. - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - (JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since - it doesn't actually free the Heap object. - (JSC::Heap::heapAllocate): - (JSC::Heap::sweep): - * runtime/Collector.h: Refactored block allocation and destruction - into helper functions. - - * runtime/GetterSetter.cpp: - * runtime/JSAPIValueWrapper.cpp: - * runtime/JSPropertyNameIterator.cpp: Removed dummy implementations - of pure virtual functions. (See above.) + Fix the array subscript is above array bounds warning in ByteArray on ARM. + https://bugs.webkit.org/show_bug.cgi?id=43358 -=== End re-roll-in of r47738:47740 with Windows crash fixed === + The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861 -2009-08-26 Geoffrey Garen <ggaren@apple.com> + * wtf/ByteArray.cpp: + (WTF::ByteArray::create): - Build fix: start out with a 32-bit value to avoid a shortening warning. +2010-08-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - * runtime/Collector.cpp: - (JSC::Heap::sweep): + Reviewed by Martin Robinson. -2009-08-24 Geoffrey Garen <ggaren@apple.com> + [GTK] Use GSettings to save/restore Web Inspector settings + https://bugs.webkit.org/show_bug.cgi?id=43512 - Reviewed by Oliver Hunt. + * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our + GSettings support. + (WTF::refGPtr): + (WTF::derefGPtr): + * wtf/gobject/GRefPtr.h: - Substantially reduced VM thrash in the GC heap. - - 1.08x faster on v8 (1.60x faster on v8-splay). - - 1.40x faster on bench-alloc-nonretained. - - 1.90x faster on bench-alloc-retained. - - SunSpider says no change. - - * runtime/Collector.cpp: - (JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local - variables unconditionally after calling collect(), since they may be used - even if we don't "goto scan". (In the bug I saw, usedBlocks got out of - sync with heap.usedBlocks). - (JSC::Heap::sweep): Keep enough free heap space to accomodate - the number of objects we'll allocate before the next GC, plus 25%, for - good measure. - * runtime/Collector.h: Bumped the block size to 256k. This seems to give - the best cache performance, and it prevents us from initiating lots of - VM traffic to recover very small chunks of memory. +2010-08-12 Gabor Loki <loki@webkit.org> -=== Begin re-roll-in of r47738:47740 with Windows crash fixed === + Reviewed by Simon Hausmann. -2009-08-25 Drew Wilson <atwilson@google.com> + The scratch register should be saved in YARR with ARM JIT + https://bugs.webkit.org/show_bug.cgi?id=43910 - Reviewed by David Levin. + Reported by Jocelyn Turcotte. - postMessage() spec now supports sending arrays of ports - https://bugs.webkit.org/show_bug.cgi?id=26902 + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): + (JSC::Yarr::RegexGenerator::generateReturn): - Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors. +2010-08-11 Gavin Barraclough <barraclough@apple.com> - * wtf/VectorTraits.h: + Windows build fix. -2009-08-26 Xan Lopez <xlopez@igalia.com> + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: - Rubber-stamped by Gustavo Noronha. +2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn> - Remove duplicated files from file list. + Reviewed by Geoffrey Garen. - * GNUmakefile.am: + Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date, + which means isNaN(new Date("")) should return true. + https://bugs.webkit.org/show_bug.cgi?id=43793 + Tests: fast/js/date-constructor.html -2009-08-26 Oliver Hunt <oliver@apple.com> + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::resetDateCache): - Reviewed by NOBODY (Build fix). +2010-08-11 Gavin Barraclough <barraclough@apple.com> - More export fixes. + Windows & !JIT build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-26 Oliver Hunt <oliver@apple.com> + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + (JSC::RegExp::match): - Reviewed by NOBODY (Build fix). +2010-08-11 Gavin Barraclough <barraclough@apple.com> - Hopefully fix all the exports from JSC on windows + Rubber stamp by sam weinig - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Touch a file to stop the bot rolling a bit change out! -2009-08-26 Oliver Hunt <oliver@apple.com> + * runtime/UString.cpp: + (JSC::UString::ascii): - Reviewed by NOBODY (Build fixes). +2010-08-11 Kevin Ollivier <kevino@theolliviers.com> - Forgot I added files to JavaScriptCore. + [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards. - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCoreSources.bkl: + * wtf/Forward.h: -2009-08-25 Oliver Hunt <oliver@apple.com> +2010-08-11 Gavin Barraclough <barraclough@apple.com> - Reviewed by Gavin Barraclough. + Rubber stamps by Darin Adler & Sam Weinig. - [ES5] Implement getOwnPropertyDescriptor - https://bugs.webkit.org/show_bug.cgi?id=28724 + Bug 43867 - Some UString cleanup - Implement the core runtime support for getOwnPropertyDescriptor. - This adds a virtual getOwnPropertyDescriptor method to every class - that implements getOwnPropertySlot that shadows the behaviour of - getOwnPropertySlot. The alternative would be to make getOwnPropertySlot - (or PropertySlots in general) provide property attribute information, - but quick testing showed this to be a regression. + Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String. + Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit(). + * API/JSClassRef.cpp: + (OpaqueJSClass::~OpaqueJSClass): + (OpaqueJSClass::className): + * API/OpaqueJSString.cpp: + (OpaqueJSString::create): * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecompiler/NodesCodegen.cpp: + (JSC::ResolveNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::processClauseList): + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createRegex): + * parser/ParserArena.h: + (JSC::IdentifierArena::makeNumericIdentifier): + * parser/SourceProvider.h: + (JSC::UStringSourceProvider::data): + (JSC::UStringSourceProvider::length): + * profiler/Profiler.cpp: * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertyDescriptor): - * runtime/Arguments.h: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyNames): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::getOwnPropertyDescriptor): - * runtime/ArrayPrototype.h: - * runtime/CommonIdentifiers.h: + (JSC::arrayProtoFuncToString): * runtime/DatePrototype.cpp: - (JSC::DatePrototype::getOwnPropertyDescriptor): - * runtime/DatePrototype.h: - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertyDescriptor): - * runtime/JSArray.h: - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertyDescriptor): - * runtime/JSByteArray.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertyDescriptor): - * runtime/JSFunction.h: - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::getOwnPropertyDescriptor): - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::getOwnPropertyDescriptor): - * runtime/JSNotAnObject.h: + (JSC::formatLocaleDate): + * runtime/ExceptionHelpers.cpp: + * runtime/FunctionConstructor.cpp: + * runtime/FunctionPrototype.cpp: + (JSC::insertSemicolonIfNeeded): + * runtime/Identifier.h: + (JSC::Identifier::characters): + (JSC::Identifier::length): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::decode): + (JSC::parseInt): + (JSC::parseFloat): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + * runtime/JSNumberCell.cpp: + (JSC::JSNumberCell::toString): * runtime/JSONObject.cpp: - (JSC::JSONObject::getOwnPropertySlot): - (JSC::JSONObject::getOwnPropertyDescriptor): - * runtime/JSONObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::getOwnPropertyDescriptor): - (JSC::JSObject::getPropertyDescriptor): - * runtime/JSObject.h: + (JSC::gap): + (JSC::Stringifier::appendQuotedString): + (JSC::Stringifier::appendStringifiedValue): + (JSC::Stringifier::indent): + (JSC::Stringifier::unindent): + (JSC::Walker::walk): * runtime/JSString.cpp: - (JSC::JSString::getStringPropertyDescriptor): - (JSC::JSString::getOwnPropertyDescriptor): + (JSC::JSString::replaceCharacter): + (JSC::JSString::getIndexSlowCase): * runtime/JSString.h: - * runtime/JSVariableObject.cpp: - (JSC::JSVariableObject::symbolTableGet): - * runtime/JSVariableObject.h: - * runtime/Lookup.h: - (JSC::getStaticPropertyDescriptor): - (JSC::getStaticFunctionDescriptor): - (JSC::getStaticValueDescriptor): - Add property descriptor equivalents of the lookup - table access functions - - * runtime/MathObject.cpp: - (JSC::MathObject::getOwnPropertySlot): - (JSC::MathObject::getOwnPropertyDescriptor): - * runtime/MathObject.h: - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::getOwnPropertyDescriptor): - * runtime/NumberConstructor.h: - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - * runtime/PropertyDescriptor.cpp: Added. - (JSC::PropertyDescriptor::writable): - (JSC::PropertyDescriptor::enumerable): - (JSC::PropertyDescriptor::configurable): - (JSC::PropertyDescriptor::hasAccessors): - (JSC::PropertyDescriptor::setUndefined): - (JSC::PropertyDescriptor::getter): - (JSC::PropertyDescriptor::setter): - (JSC::PropertyDescriptor::setDescriptor): - (JSC::PropertyDescriptor::setAccessorDescriptor): - * runtime/PropertyDescriptor.h: Added. - (JSC::PropertyDescriptor::PropertyDescriptor): - (JSC::PropertyDescriptor::attributes): - (JSC::PropertyDescriptor::isValid): - (JSC::PropertyDescriptor::value): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::fiberCount): + (JSC::jsSingleCharacterSubstring): + (JSC::jsNontrivialString): + (JSC::JSString::getIndex): + (JSC::jsString): + (JSC::jsStringWithFinalizer): + (JSC::jsSubstring): + (JSC::jsOwnedString): + * runtime/JSStringBuilder.h: + (JSC::JSStringBuilder::append): + * runtime/LiteralParser.h: + (JSC::LiteralParser::Lexer::Lexer): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/NumericStrings.h: + (JSC::NumericStrings::add): + (JSC::NumericStrings::lookupSmallString): + * runtime/Operations.h: + (JSC::jsString): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::getOwnPropertyDescriptor): - * runtime/RegExpConstructor.h: - * runtime/RegExpMatchesArray.h: - (JSC::RegExpMatchesArray::getOwnPropertyDescriptor): + (JSC::RegExpConstructor::getRightContext): * runtime/RegExpObject.cpp: - (JSC::RegExpObject::getOwnPropertyDescriptor): - * runtime/RegExpObject.h: + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncToString): + * runtime/StringBuilder.h: + (JSC::StringBuilder::append): + * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h. + (JSC::): + (JSC::sumWithOverflow): + (JSC::tryMakeString): + (JSC::makeString): * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyDescriptor): - * runtime/StringObject.h: + (JSC::StringObject::getOwnPropertyNames): * runtime/StringPrototype.cpp: - (JSC::StringPrototype::getOwnPropertyDescriptor): - * runtime/StringPrototype.h: - -2009-08-24 Gavin Barraclough <barraclough@apple.com> + (JSC::substituteBackreferencesSlow): + (JSC::localeCompare): + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + (JSC::trimString): + * runtime/UString.cpp: + (JSC::UString::number): + (JSC::UString::ascii): + (JSC::UString::operator[]): + (JSC::UString::toDouble): + (JSC::UString::find): + (JSC::UString::rfind): + (JSC::UString::substr): + (JSC::operator==): + (JSC::operator<): + (JSC::operator>): + (JSC::UString::UTF8String): + * runtime/UString.h: + (JSC::UString::UString): + (JSC::UString::adopt): + (JSC::UString::length): + (JSC::UString::characters): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + (JSC::UString::cost): + (JSC::operator==): + (JSC::operator!=): + (JSC::codePointCompare): + (JSC::UString::toArrayIndex): + (JSC::IdentifierRepHash::hash): + (WTF::): + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexParser.h: + (JSC::Yarr::Parser::Parser): - Reviewed by Darin Adler. +2010-08-11 Gabor Loki <loki@webkit.org> - How many copies of the parameters do you need? - https://bugs.webkit.org/show_bug.cgi?id=28701 + Qt build fix (ARMv7). - The function parameters in JSC get copied a lot - and unnecessarily so. + Fix invalid conversion from int to Condition. + Add ARMv7Assembler.cpp to JavaScriptCore.pro. - Originally this happened due to duplicating FunctionBodyNodes on recompilation, - though the problem has been exacerbated by copying the parameters from the - original function body onto the executable, then back onto the real body that - will be generated (this happens on every function). And this is all made worse - since the data structures in question are a little ugly - C style arrays of C++ - objects containing ref counts, so they need a full copy-construct (rather than - a simple memcpy). + * JavaScriptCore.pro: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::JmpSrc::JmpSrc): - This can all be greatly simplified by just punting the parameters off into - their own ref-counted object, and forgoing all the copying. +2010-08-11 Nathan Lawrence <nlawrence@apple.com> - ~no performance change, possible slight progression. + Reviewed by Geoffrey Garen. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::makeFunction): - * parser/Nodes.cpp: - (JSC::FunctionParameters::FunctionParameters): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::finishParsing): - * parser/Nodes.h: - (JSC::FunctionBodyNode::parameters): - (JSC::FunctionBodyNode::parameterCount): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::~FunctionExecutable): - (JSC::FunctionExecutable::compile): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::fromGlobalCode): - (JSC::FunctionExecutable::paramString): - * runtime/Executable.h: - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::parameterCount): + At collection time, we frequently want to mark a cell, while checking + whether it was originally checked. Previously, this was a get + operation follwed by a set operation. Fusing the two saves + computation and gives a 0.5% sunspider speedup. -2009-08-25 Brent Fulgham <bfulgham@webkit.org> + * runtime/Collector.h: + (JSC::CollectorBitmap::getset): + (JSC::Heap::checkMarkCell): + * runtime/JSArray.h: + (JSC::MarkStack::drain): + * runtime/JSCell.h: + (JSC::MarkStack::append): - Reviewed by NOBODY (Buildfix). +2010-08-11 Steve Falkenburg <sfalken@apple.com> - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target - that inherits from the debug_wincairo property sheet and therefore - links to the proper debug library. - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target - that inherits from the debug_wincairo property sheet and therefore - links to the proper debug library. + Reviewed by Adam Roben. -2009-08-25 Chris Marrin <cmarrin@apple.com> + Improve vsprops copying for Windows build + https://bugs.webkit.org/show_bug.cgi?id=41982 - Reviewed by Simon Fraser. + When we detect a new SDK, always copy a new set of vsprops files. + Previously, if someone updated their SDK after updating their sources, + they could end up with out-of-date vsprops files. - Export tryFastMalloc for Canvas3D work - https://bugs.webkit.org/show_bug.cgi?id=28018 + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * JavaScriptCore.exp: +2010-08-10 Darin Adler <darin@apple.com> -2009-08-25 David Levin <levin@chromium.org> + Reviewed by Sam Weinig. - Reviewed by Adam Roben. + Add leakRef and clear to all RefPtr variants + https://bugs.webkit.org/show_bug.cgi?id=42389 - PLATFORM(CFNETWORK) should be USE(CFNETWORK). - https://bugs.webkit.org/show_bug.cgi?id=28713 + * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do + "template<...>". We should probably put this in the style guide and do it + consitently. Fixed other minor style issues. Defined many of the inlined + functions outside the class definition, to avoid style checker warnings + about multiple statements on a single line and for slightly better clarity + of the class definition itself. Renamed releaseRef to leakRef. Added a + releaseRef that calls leakRef so we don't have to rename all callers oat + once. Added a clear function. - * wtf/Platform.h: Added a #define to catch this issue in the - future. The define would generate an error on gcc without the - space in the expansion, but Visual C++ needs the space to cause an error. + * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef. +n + * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do + "template<...>". Tidied up declarations and comments a bit. + Changed all uses of releaseRef to leakRef. -2009-08-24 Brent Fulgham <bfulgham@webkit.org> + * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do + "template<...>". Defined many of the inlined functions outside the class + definition, to avoid style checker warnings about multiple statements on + a single line and for slightly better clarity of the class definition itself. + Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we + don't have to rename all callers at once. Added a clear function. - Reviewed by Steve Falkenburg. +2010-08-10 Dumitru Daniliuc <dumi@chromium.org> - Revise CFLite Debug build to emit DLL's with _debug label. - https://bugs.webkit.org/show_bug.cgi?id=28695. + Unreviewed, reverting an unintentional change to a file submitted in r65108. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify - Cairo debug build to inherit from new debug_cairo property sheet. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: - Modify to look for debug CFLite when in debug build. + * bytecode/CodeBlock.h: + (JSC::binaryChop): -2009-08-24 Gavin Barraclough <barraclough@apple.com> +2010-08-10 Gavin Barraclough <barraclough@apple.com> - Reviewed by Oliver Adler & Darin Hunt. + Rubber stamped by Sam Weinig - https://bugs.webkit.org/show_bug.cgi?id=28691 - Do not retain ScopeNodes outside of parsing - - There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types. + Bug 43817 - Remove UString::Rep + UString::Rep has for a long time been replaced by UStringImpl (Rep + remaining as a typedef). UStringImpl has since been removed too + (unified with StringImpl). Remove Rep, rename rep() to impl() and + m_rep to m_impl. Also add impl() method to Identifier, and rename + its UString member from _ustring to m_string. + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::getOwnPropertyNames): + (JSC::::staticValueGetter): + (JSC::::staticFunctionGetter): + * API/JSClassRef.cpp: + (tryCreateStringFromUTF8): + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClass::~OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * API/JSClassRef.h: + * API/OpaqueJSString.cpp: + (OpaqueJSString::ustring): * bytecode/EvalCodeCache.h: (JSC::EvalCodeCache::get): + * bytecode/JumpTable.h: + (JSC::StringJumpTable::offsetForValue): + (JSC::StringJumpTable::ctiForValue): * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::addVar): + (JSC::BytecodeGenerator::addGlobalVar): (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): + (JSC::BytecodeGenerator::addParameter): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::willResolveToArguments): + (JSC::BytecodeGenerator::uncheckedRegisterForArguments): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::isLocal): + (JSC::BytecodeGenerator::isLocalConstant): + (JSC::BytecodeGenerator::addConstant): + (JSC::BytecodeGenerator::emitLoad): + (JSC::BytecodeGenerator::findScopedProperty): + (JSC::keyForCharacterSwitch): + (JSC::prepareJumpTableForStringSwitch): * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::makeFunction): - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): + * bytecompiler/NodesCodegen.cpp: + (JSC::processClauseList): * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::ScopeNodeData): - (JSC::ProgramNode::create): - (JSC::EvalNode::create): - (JSC::FunctionBodyNode::create): - * parser/Nodes.h: - (JSC::ScopeNode::adoptData): - (JSC::FunctionBodyNode::parameterCount): - * parser/Parser.cpp: - * parser/Parser.h: - (JSC::Parser::arena): - (JSC::Parser::Parser): - (JSC::Parser::parse): + * parser/JSParser.cpp: + (JSC::JSParser::parseStrictObjectLiteral): + * pcre/pcre_exec.cpp: + (Histogram::add): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::Hash::hash): + * profiler/Profile.cpp: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintDataSampleStyle): + * profiler/ProfileNode.h: * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - (JSC::arrayProtoFuncSort): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::~FunctionExecutable): - (JSC::EvalExecutable::compile): - (JSC::ProgramExecutable::checkSyntax): - (JSC::ProgramExecutable::compile): - (JSC::FunctionExecutable::compile): - (JSC::EvalExecutable::generateJITCode): - (JSC::ProgramExecutable::generateJITCode): - (JSC::FunctionExecutable::generateJITCode): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::recompile): - (JSC::FunctionExecutable::fromGlobalCode): - (JSC::FunctionExecutable::copyParameters): - (JSC::FunctionExecutable::paramString): - * runtime/Executable.h: - (JSC::ScriptExecutable::ScriptExecutable): - (JSC::ScriptExecutable::sourceID): - (JSC::ScriptExecutable::sourceURL): - (JSC::ScriptExecutable::lineNo): - (JSC::ScriptExecutable::lastLine): - (JSC::ScriptExecutable::usesEval): - (JSC::ScriptExecutable::usesArguments): - (JSC::ScriptExecutable::needsActivation): - (JSC::ScriptExecutable::recordParse): - (JSC::EvalExecutable::bytecode): - (JSC::EvalExecutable::jitCode): - (JSC::ProgramExecutable::bytecode): - (JSC::ProgramExecutable::reparseExceptionInfo): - (JSC::ProgramExecutable::jitCode): - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::make): - (JSC::FunctionExecutable::bytecode): - (JSC::FunctionExecutable::isGenerated): - (JSC::FunctionExecutable::name): - (JSC::FunctionExecutable::parameterCount): - (JSC::FunctionExecutable::jitCode): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::numericCompareFunction): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - -2009-08-24 Darin Adler <darin@apple.com> - - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::put): Landed revised version I had tested but forgot - to land. Leave out the branch, since we don't need one. - -2009-08-24 Darin Adler <darin@apple.com> + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + (JSC::IdentifierCStringTranslator::hash): + (JSC::IdentifierCStringTranslator::equal): + (JSC::IdentifierCStringTranslator::translate): + (JSC::Identifier::add): + (JSC::IdentifierUCharBufferTranslator::hash): + (JSC::IdentifierUCharBufferTranslator::equal): + (JSC::IdentifierUCharBufferTranslator::translate): + (JSC::Identifier::addSlowCase): + * runtime/Identifier.h: + (JSC::Identifier::Identifier): + (JSC::Identifier::ustring): + (JSC::Identifier::impl): + (JSC::Identifier::data): + (JSC::Identifier::size): + (JSC::Identifier::ascii): + (JSC::Identifier::isNull): + (JSC::Identifier::isEmpty): + (JSC::Identifier::toUInt32): + (JSC::Identifier::toStrictUInt32): + (JSC::Identifier::toArrayIndex): + (JSC::Identifier::toDouble): + (JSC::Identifier::equal): + (JSC::Identifier::add): + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::displayName): + * runtime/JSFunction.cpp: + (JSC::JSFunction::displayName): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::addStaticGlobals): + * runtime/JSStaticScopeObject.h: + (JSC::JSStaticScopeObject::JSStaticScopeObject): + * runtime/JSString.h: + (JSC::): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::jsSingleCharacterSubstring): + (JSC::jsSubstring): + * runtime/JSVariableObject.cpp: + (JSC::JSVariableObject::deleteProperty): + (JSC::JSVariableObject::symbolTableGet): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::symbolTableGet): + (JSC::JSVariableObject::symbolTablePut): + (JSC::JSVariableObject::symbolTablePutWithAttributes): + * runtime/Lookup.cpp: + (JSC::HashTable::createTable): + (JSC::HashTable::deleteTable): + * runtime/Lookup.h: + (JSC::HashEntry::initialize): + (JSC::HashEntry::setKey): + (JSC::HashEntry::key): + (JSC::HashTable::entry): + * runtime/PropertyMapHashTable.h: + (JSC::PropertyMapEntry::PropertyMapEntry): + * runtime/PropertyNameArray.cpp: + (JSC::PropertyNameArray::add): + * runtime/PropertyNameArray.h: + (JSC::PropertyNameArray::add): + (JSC::PropertyNameArray::addKnownUnique): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::create): + * runtime/RegExpKey.h: + (JSC::RegExpKey::RegExpKey): + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::rep): + (JSC::SmallStrings::singleCharacterStringRep): + * runtime/SmallStrings.h: + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + * runtime/Structure.cpp: + (JSC::Structure::~Structure): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::put): + (JSC::Structure::hasTransition): + (JSC::Structure::remove): + (JSC::Structure::checkConsistency): + * runtime/Structure.h: + (JSC::Structure::get): + (JSC::Structure::hasTransition): + * runtime/StructureTransitionTable.h: + * runtime/SymbolTable.h: + * runtime/UString.cpp: + (JSC::UString::UString): + (JSC::UString::toStrictUInt32): + (JSC::UString::substr): + * runtime/UString.h: + (JSC::UString::UString): + (JSC::UString::adopt): + (JSC::UString::data): + (JSC::UString::size): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + (JSC::UString::cost): + (JSC::operator==): + (JSC::codePointCompare): + (JSC::IdentifierRepHash::hash): + (WTF::): - Reviewed by Geoff Garen. +2010-08-10 Gavin Barraclough <barraclough@apple.com> - Array index miss case creates a string every time - https://bugs.webkit.org/show_bug.cgi?id=28664 + Bug 43816 - Remove UStringImpl + The class was actually removed a long time ago, replaced by StringImpl. + UStringImpl is just a typedef onto StringImpl. Remove this. - SunSpider test results I saw: + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + (JSC::JSString::replaceCharacter): + * runtime/JSString.h: + (JSC::RopeBuilder::RopeIterator::operator*): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::jsSingleCharacterSubstring): + (JSC::jsSubstring): + * runtime/JSStringBuilder.h: + (JSC::jsMakeNontrivialString): + * runtime/RopeImpl.cpp: + (JSC::RopeImpl::derefFibersNonRecursive): + * runtime/RopeImpl.h: + (JSC::RopeImpl::deref): + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::SmallStringsStorage): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + * runtime/UString.cpp: + (JSC::initializeUString): + * runtime/UString.h: + (JSC::UString::adopt): + (JSC::tryMakeString): + (JSC::makeString): + * runtime/UStringImpl.h: Removed. - 0.5% faster overall - 1% faster on crypto-aes - 20% faster on crypto-md5 - 13% faster on crypto-sha1 +2010-08-10 Patrick Gansterer <paroga@paroga.com> - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names - to true. - (JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new - property has a name that is the string form of a UInt32. - (JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot - if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true. + Reviewed by Eric Seidel. - * runtime/ObjectPrototype.h: Added declarations for the above. + Make FastMalloc more portable. + https://bugs.webkit.org/show_bug.cgi?id=41790 -2009-08-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_Central_FreeList::Populate): + (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - Unreviewed. Fix a typo in my distcheck build fix. +2010-08-10 Patrick Gansterer <paroga@paroga.com> - * GNUmakefile.am: + Reviewed by David Levin. -2009-08-23 Gustavo Noronha Silva <gns@gnome.org> + [WINCE] Buildfix for CE 6.0 + https://bugs.webkit.org/show_bug.cgi?id=43027 - Unreviewed build fix for make distcheck. + CE 6.0 doesn't define localtime in the system include files. - * GNUmakefile.am: Added files required for the build. + * wtf/Platform.h: Include ce_time.h on all OS(WINCE). -2009-08-22 Maciej Stachowiak <mjs@apple.com> +2010-08-10 Gavin Barraclough <barraclough@apple.com> - Reviewed by Mark Rowe. + Rubber stamped by Sam Weinig. - REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC - https://bugs.webkit.org/show_bug.cgi?id=28655 + Bug 43786 - Move AtomicStringHash from WebCore to WTF + Also remove deprecated string headers from WebCore/platform/text. - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable. - * wtf/Platform.h: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/AtomicString.h: + * wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h. -2009-08-22 Darin Adler <darin@apple.com> +2010-08-09 Oliver Hunt <oliver@apple.com> - Fix storage leak from syntax tree arena allocation patch. + Fix Qt/ARM again, this time including the other changed file. - * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable - because it has a vector. + * jit/JIT.h: -2009-08-21 Darin Adler <darin@apple.com> +2010-08-09 Oliver Hunt <oliver@apple.com> - Fix Qt build. + Fix Qt/ARM - * parser/Nodes.cpp: - (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again. - This is used outside Nodes.cpp so can't be inline unless - it is in the header. + C++ overload resolution I stab at thee -2009-08-21 Darin Adler <darin@apple.com> + * jit/JITInlineMethods.h: + (JSC::JIT::beginUninterruptedSequence): + (JSC::JIT::endUninterruptedSequence): - Two loose ends from the last commit. +2010-08-09 Oliver Hunt <oliver@apple.com> - * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h - and create_hash_table project-internal instead of "private". - * runtime/Executable.h: Removed accidentally-added constructor. + Reviewed by Gavin Barraclough. -2009-08-21 Darin Adler <darin@apple.com> + Allow an assembler/macroassembler to compact branches to more concise forms when linking + https://bugs.webkit.org/show_bug.cgi?id=43745 - Reviewed by Gavin Barraclough. + This patch makes it possible for an assembler to convert jumps into a different + (presumably more efficient) form at link time. Currently implemented in the + ARMv7 JIT as that already had logic to delay linking of jumps until the end of + compilation already. The ARMv7 JIT chooses between either a 4 byte short jump + or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does + not yet produce the most compact form possible. The general design of the linker + should make it relatively simple to introduce new branch types with little effort, + as the linker has no knowledge of the exact form of any of the branches. - Syntax tree nodes should use arena allocation - https://bugs.webkit.org/show_bug.cgi?id=25674 + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/ARMv7Assembler.cpp: Added. + (JSC::): + Record jump sizes - Use an actual arena now. 0.6% speedup on SunSpider. + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::LinkRecord::LinkRecord): + (JSC::ARMv7Assembler::LinkRecord::from): + (JSC::ARMv7Assembler::LinkRecord::setFrom): + (JSC::ARMv7Assembler::LinkRecord::to): + (JSC::ARMv7Assembler::LinkRecord::type): + (JSC::ARMv7Assembler::LinkRecord::linkType): + (JSC::ARMv7Assembler::LinkRecord::setLinkType): + Encapsulate LinkRecord fields so we can compress the values somewhat + + (JSC::ARMv7Assembler::JmpSrc::JmpSrc): + Need to record the jump type now + + (JSC::ARMv7Assembler::b): + (JSC::ARMv7Assembler::blx): + (JSC::ARMv7Assembler::bx): + Need to pass the jump types + + (JSC::ARMv7Assembler::executableOffsetFor): + (JSC::ARMv7Assembler::jumpSizeDelta): + (JSC::ARMv7Assembler::linkRecordSourceComparator): + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::convertJumpTo): + (JSC::ARMv7Assembler::recordLinkOffsets): + (JSC::ARMv7Assembler::jumpsToLink): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::unlinkedCode): + Helper functions for the linker - New and improved with 100% less leaking of the universe. + (JSC::ARMv7Assembler::linkJump): + (JSC::ARMv7Assembler::canBeShortJump): + (JSC::ARMv7Assembler::linkLongJump): + (JSC::ARMv7Assembler::linkShortJump): + (JSC::ARMv7Assembler::linkJumpAbsolute): + Moving code around for the various jump linking functions - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - Removed all exports involving the class FunctionBodyNode, which no - longer needs to be used outside JavaScriptCore. + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::beginUninterruptedSequence): + (JSC::AbstractMacroAssembler::endUninterruptedSequence): + We have to track uninterrupted sequences in any assembler that compacts + branches as that's not something we're allowed to do in such sequences. + AbstractMacroAssembler has a nop version of these functions as it makes the + code elsewhere nicer. - * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and - Executable.h project-internal instead of "private". + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::LinkBuffer): + (JSC::LinkBuffer::link): + (JSC::LinkBuffer::patch): + (JSC::LinkBuffer::locationOf): + (JSC::LinkBuffer::locationOfNearCall): + (JSC::LinkBuffer::returnAddressOffset): + (JSC::LinkBuffer::trampolineAt): + Updated these functions to adjust for any changed offsets in the linked code - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack - contains const Identifier* now. + (JSC::LinkBuffer::applyOffset): + A helper function to deal with the now potentially moved labels - * parser/Grammar.y: Made identifiers from the lexer be const - Identifier* and updated since VarStack contains const Identifier* now. + (JSC::LinkBuffer::linkCode): + The new and mighty linker function - * parser/Lexer.cpp: - (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers. - (JSC::Lexer::makeIdentifier): Changed return type to const Identifier* - and changed to call ParserArena. - (JSC::Lexer::clear): Removed the code to manage m_identifiers and - added code to set m_arena to 0. - * parser/Lexer.h: Updated for changes above. + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::MacroAssemblerARMv7): + (JSC::MacroAssemblerARMv7::beginUninterruptedSequence): + (JSC::MacroAssemblerARMv7::endUninterruptedSequence): + (JSC::MacroAssemblerARMv7::jumpsToLink): + (JSC::MacroAssemblerARMv7::unlinkedCode): + (JSC::MacroAssemblerARMv7::computeJumpType): + (JSC::MacroAssemblerARMv7::convertJumpTo): + (JSC::MacroAssemblerARMv7::recordLinkOffsets): + (JSC::MacroAssemblerARMv7::jumpSizeDelta): + (JSC::MacroAssemblerARMv7::link): + (JSC::MacroAssemblerARMv7::jump): + (JSC::MacroAssemblerARMv7::branchMul32): + (JSC::MacroAssemblerARMv7::breakpoint): + (JSC::MacroAssemblerARMv7::nearCall): + (JSC::MacroAssemblerARMv7::call): + (JSC::MacroAssemblerARMv7::ret): + (JSC::MacroAssemblerARMv7::tailRecursiveCall): + (JSC::MacroAssemblerARMv7::executableOffsetFor): + (JSC::MacroAssemblerARMv7::inUninterruptedSequence): + (JSC::MacroAssemblerARMv7::makeJump): + (JSC::MacroAssemblerARMv7::makeBranch): + All branches need to pass on their type now - * parser/NodeConstructors.h: - (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable - on the arena. - (JSC::ParserArenaDeletable::operator new): Changed to call the - allocateDeletable function on the arena instead of deleteWithArena. - (JSC::PropertyNode::PropertyNode): Added new constructor that makes - numeric identifiers. Some day we might want to optimize this for - integers so it doesn't create a string for each one. - (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier - since it's now a const Identifier& so it can't be left uninitialized. - (JSC::BreakNode::BreakNode): Ditto. - (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements* - to keep track of the statements rather than a separate statement vector. - (JSC::BlockNode::BlockNode): Ditto. - (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier. - - * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here. - It seemed strangely out of place in the header. - (JSC::ThrowableExpressionData::emitThrowError): Added an overload for - UString as well as Identifier. - (JSC::SourceElements::singleStatement): Added. - (JSC::SourceElements::lastStatement): Added. - (JSC::RegExpNode::emitBytecode): Changed the throwError code to use - the substitution mechanism instead of doing a string append. - (JSC::SourceElements::emitBytecode): Added. Replaces the old - statementListEmitCode function, since we now keep the SourceElements - objects around. - (JSC::BlockNode::lastStatement): Added. - (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of - statementListEmitCode. - (JSC::CaseClauseNode::emitBytecode): Added. - (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode - instead of statementListEmitCode. - (JSC::ScopeNodeData::ScopeNodeData): Changed to store the - SourceElements* instead of using releaseContentsIntoVector. - (JSC::ScopeNode::emitStatementsBytecode): Added. - (JSC::ScopeNode::singleStatement): Added. - (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead - of statementListEmitCode. - (JSC::EvalNode::emitBytecode): Ditto. - (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode - insetad of statementListEmitCode and check for the return node using - the new functions. - - * parser/Nodes.h: Changed VarStack to store const Identifier* instead - of Identifier and rely on the arena to control lifetime. Added a new - ParserArenaFreeable class. Made ParserArenaDeletable inherit from - FastAllocBase instead of having its own operator new. Base the Node - class on ParserArenaFreeable. Changed the various Node classes - to use const Identifier& instead of Identifier to avoid the need to - call their destructors and allow them to function as "freeable" in the - arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions. - Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode, - CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable - as a base class since they do not descend from Node. Eliminated the - StatementVector type and instead have various classes use SourceElements* - instead of StatementVector. This prevents those classes from having to - use ParserArenaDeletable to make sure the vector destructor is called. + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::returnLastBytes): + We can't know ahead of time how much space will be necessary to + hold the linked code if we're compacting branches, this new + function allows us to return the unused bytes at the end of linking - * parser/Parser.cpp: - (JSC::Parser::parse): Pass the arena to the lexer. + * jit/JIT.cpp: + (JSC::JIT::JIT): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::JIT::compile): + The JIT class now needs to take a linker offset so that recompilation + can generate the same jumps when using branch compaction. + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emitSlow_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + Update for new trampolineAt changes - * parser/Parser.h: Added an include of ParserArena.h, which is no longer - included by Nodes.h. - (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the - singleStatement function, since there is no longer any children function. - Removed some unneeded use of RefPtr. + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::): + * wtf/Platform.h: - * parser/ParserArena.cpp: - (JSC::ParserArena::ParserArena): Added. Initializes the new members, - m_freeableMemory, m_freeablePoolEnd, and m_identifiers. - (JSC::ParserArena::freeablePool): Added. Computes the pool pointer, - since we store only the current pointer and the end of pool pointer. - (JSC::ParserArena::deallocateObjects): Added. Contains the common - memory-deallocation logic used by both the destructor and the - reset function. - (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects. - (JSC::ParserArena::reset): Ditto. Also added code to zero out the - new structures, and switched to use clear() instead of shrink(0) since - we don't really reuse arenas. - (JSC::ParserArena::makeNumericIdentifier): Added. - (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool - is empty. - (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine - since this is used only for assertions at the moment. - (JSC::ParserArena::derefWithArena): Make non-inline. - - * parser/ParserArena.h: Added an actual arena of "freeable" objects, - ones that don't need destructors to be called. Also added a separate - IdentifierArena object, a segmented vector of identifiers that used - to be in the Lexer. - - * runtime/Executable.h: Moved the definition of the - FunctionExecutable::make function here. It can't go in JSFunction.h - since that header has to be used outside JavaScriptCore and so can't - include this, which includes Nodes.h. The function could be moved - elswhere if we don't want to include JSFunction.h in this header, but - for now this seems to be the best place. - - * runtime/JSFunction.h: Removed the include of Executable.h and - definition of the FunctionExecutable::make function. - - * wtf/FastMalloc.cpp: Fixed an incorrect comment. - -2009-08-21 Mark Rowe <mrowe@apple.com> - - Fix the non-JIT build. +2010-08-09 Gavin Barraclough <barraclough@apple.com> - * runtime/Executable.cpp: - * runtime/Executable.h: + Qt build fix III. -2009-08-21 Gavin Barraclough <barraclough@apple.com> + * wtf/text/WTFString.h: - Speculative QuickTime build fix. +2010-08-09 Gavin Barraclough <barraclough@apple.com> - * runtime/JSArray.cpp: + Qt build fix. -2009-08-21 Gavin Barraclough <barraclough@apple.com> + * wtf/qt/StringQt.cpp: - Speculative QT build fix. +2010-08-06 Gavin Barraclough <barraclough@apple.com> - * runtime/StringPrototype.cpp: + Rubber stamped by Sam Weinig -2009-08-21 Gavin Barraclough <barraclough@apple.com> + Bug 43594 - Add string forwards to Forward.h + This allows us to remove forward declarations for these classes from + WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). - Reviewed by Oliver Hunt. + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: - Restructure Executable types so that host functions do not hold a FunctionExecutable. - https://bugs.webkit.org/show_bug.cgi?id=28621 - - All JSFunction objects have a pointer to an Executable*. This is currently always a - FunctionExecutable, however this has a couple of drawbacks. Host functions do not - store a range of information that the FunctionExecutable provides (source, name, - CodeBlock & information presently held on the FunctionBodyNode). - - [ * nearly all... see below! ] - - Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific - to JS sourced executable types (source, node) into a new subclass (ScriptExecutable), - and create a new NativeExecutable type. We now provide a new method in JSFunction - to access & downcast to FunctionExecutable, but in doing so we can make an early - check (with an ASSERT) to ensure that the Executable read from a function will only - be treated as a FunctionExecutable (and thus the JS sepcific fields will only be - accessed) if the JSFunction is not a host function. - - There is one JSFunction that currently does not have an Executable, which is the - object created to allow us to read out the vtable pointer. By making this change - we can also add a new Executable type fror this object (VPtrHackExecutable). - Since this means that really all JSFunctions have an Executable we no longer have - to null-check m_executable before us it - particularly in isHostFunction(). - - This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase - can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase - that might be a FunctionExecutable or a NativeExecutable. This does now mean that all - ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be - ref-counted, however this seems less-bad than host functions unnecessarily providing - interface to access non-host specific information. - - The class hierarcy has changed from this: - - - ExecutableBase - - ProgramExecutable - - EvalExecutable - - CacheableEvalExecutable (also RefCounted by multiple-inheritance) - - FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions) +2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com> - To this: - - - RefCounted - - ExecutableBase - - NativeExecutable - - VPtrHackExecutable - - ScriptExecutable - - ProgramExecutable - - EvalExecutable - - FunctionExecutable + Unreviewed, rolling out r64938. + http://trac.webkit.org/changeset/64938 + https://bugs.webkit.org/show_bug.cgi?id=43685 - This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()). + Did not compile on several ports (Requested by abarth on + #webkit). + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/AbstractMacroAssembler.h: + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::load32): + (JSC::MacroAssemblerX86::store32): + * assembler/X86Assembler.h: + (JSC::X86Assembler::movl_rm): + (JSC::X86Assembler::movl_mr): * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::ownerExecutable): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::privateExecute): + (JSC::CodeBlock::markAggregate): + * bytecode/Instruction.h: + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::): + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): + (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::deref): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::): + * jit/JIT.h: + * jit/JITMarkObjects.cpp: Removed. + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * profiler/Profiler.cpp: - (JSC::createCallIdentifierFromFunctionImp): - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - (JSC::Arguments::Arguments): - * runtime/Executable.cpp: - (JSC::NativeExecutable::~NativeExecutable): - (JSC::VPtrHackExecutable::~VPtrHackExecutable): - * runtime/Executable.h: - (JSC::ExecutableBase::ExecutableBase): - (JSC::ExecutableBase::~ExecutableBase): - (JSC::ExecutableBase::isHostFunction): - (JSC::NativeExecutable::NativeExecutable): - (JSC::VPtrHackExecutable::VPtrHackExecutable): - (JSC::ScriptExecutable::ScriptExecutable): - (JSC::ScriptExecutable::source): - (JSC::ScriptExecutable::sourceID): - (JSC::ScriptExecutable::sourceURL): - (JSC::ScriptExecutable::lineNo): - (JSC::ScriptExecutable::lastLine): - (JSC::ScriptExecutable::usesEval): - (JSC::ScriptExecutable::usesArguments): - (JSC::ScriptExecutable::needsActivation): - (JSC::EvalExecutable::EvalExecutable): - (JSC::EvalExecutable::create): - (JSC::ProgramExecutable::ProgramExecutable): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::markChildren): - (JSC::JSFunction::getCallData): - (JSC::JSFunction::call): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getConstructData): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::executable): - (JSC::JSFunction::jsExecutable): - (JSC::JSFunction::isHostFunction): - -2009-08-20 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Browser hangs on opening Web Inspector. - https://bugs.webkit.org/show_bug.cgi?id=28438 - - Code generation needs to be able to walk the entire scopechain in some - cases, however the symbol table used by activations was a member of the - codeblock. Following recompilation this may no longer exist, leading - to a crash or hang on lookup. - - We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable, - for the CodeBlocks used by function code. This allows activations to - maintain ownership of a copy of the symbol table even after recompilation so - they can continue to work. + (JSC::setupPolymorphicProtoList): + * wtf/Platform.h: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::symbolTable): - (JSC::CodeBlock::sharedSymbolTable): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::FunctionCodeBlock::FunctionCodeBlock): - (JSC::FunctionCodeBlock::~FunctionCodeBlock): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::retrieveArguments): - * runtime/Executable.cpp: - (JSC::EvalExecutable::generateBytecode): - (JSC::FunctionExecutable::generateBytecode): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - (JSC::JSActivation::JSActivationData::~JSActivationData): - * runtime/SymbolTable.h: +2010-08-07 Nathan Lawrence <nlawrence@apple.com> -2009-08-20 Xan Lopez <xlopez@igalia.com> + Reviewed by Geoffrey Garen. - Add new file to GTK+ build. + The JIT code contains a number of direct references to GC'd objects. + When we have movable objects, these references will need to be + updated. + * Android.mk: + * CMakeLists.txt: * GNUmakefile.am: - -2009-08-20 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Maciej Stachowiak. - - Added a number => string cache. - - 1.07x faster on v8 (1.7x faster on v8-splay). - 1.004x faster on SunSpider. - - * runtime/JSCell.h: Moved JSValue::toString to JSString.h. - * runtime/JSGlobalData.h: Holds the cache. - * runtime/JSNumberCell.cpp: - (JSC::JSNumberCell::toString): - (JSC::JSNumberCell::toThisString): Removed -0 special case. - UString handles this now, since too many clients were - special-casing it. - - * runtime/JSString.h: - (JSC::JSValue::toString): Use the cache when converting - an int or double to string. - - * runtime/Operations.h: - (JSC::concatenateStrings): Call toString to take advantage - of the cache. - - * runtime/SmallStrings.h: - (JSC::NumericStrings::add): - (JSC::NumericStrings::lookup): The cache. - - * runtime/UString.cpp: - (JSC::UString::from): Added -0 special case mentioned above. - Removed appendNumeric because it's mutually exclusive with the - cache. - -2009-08-20 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - REGRESSION: fast/profiler/call.html is crashing occasionally - https://bugs.webkit.org/show_bug.cgi?id=28476 - - Using the codeblock for information about how many parameters and - locals a function has is unsafe in certain circumstances. The - basic scenario is all function code being cleared in response to - the debugger or profiler being enabled, and then an activation is - marked before its associated function is re-executed. - - To deal with this scenario we store the variable count of a function - directly in the FunctionExecutable, and then use that information. - - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::generateBytecode): - * runtime/Executable.h: - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::variableCount): - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - -2009-08-20 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect - <bug lost in the great bug disasteroony of 08/20/09!> - - The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match - the argument number used within the stub functions in JITStubs.cpp, but it doesn't. - - Firstly, all the numbers changed when we added a void* 'reserved' as the first slot - (rather than leaving argument 0 unused), and secondly in 32_64 builds the index to - peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number - of machine words, and on 32_64 build the argument slots to stub functions are two - words wide). - + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::int32AtLocation): + (JSC::AbstractMacroAssembler::pointerAtLocation): + (JSC::AbstractMacroAssembler::jumpTarget): + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::loadPtrWithPatch): + Normally, loadPtr will optimize when the register is eax. Since + the slightly smaller instruction changes the offsets, it messes up + our ability to repatch the code. We added this new instruction + that garuntees a constant size. + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::load32WithPatch): + Changed load32 in the same way described above. + (JSC::MacroAssemblerX86::load32): + Moved the logic to optimize laod32 from movl_mr to load32 + (JSC::MacroAssemblerX86::store32): + Moved the logic to optimize store32 from movl_rm to store32 + * assembler/X86Assembler.h: + (JSC::X86Assembler::movl_rm): + (JSC::X86Assembler::movl_mr): + (JSC::X86Assembler::int32AtLocation): + (JSC::X86Assembler::pointerAtLocation): + (JSC::X86Assembler::jumpTarget): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/Instruction.h: + As described in StructureStubInfo.h, we needed to add additional + fields to both StructureStubInfo and + PolymorphicAccessStructureList so that we can determine the + structure of the JITed code at patch time. + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): + (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::markAggregate): + Added this function to mark the JITed code that correosponds to + this structure stub info. + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::): * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArg): - (JSC::JIT::emitPutJITStubArgConstant): - (JSC::JIT::emitGetJITStubArg): - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITMarkObjects.cpp: Added. + (JSC::JIT::patchPrototypeStructureAddress): + (JSC::JIT::patchGetDirectOffset): + (JSC::JIT::markGetByIdProto): + (JSC::JIT::markGetByIdChain): + (JSC::JIT::markGetByIdProtoList): + (JSC::JIT::markPutByIdTransition): + (JSC::JIT::markGlobalObjectReference): * jit/JITPropertyAccess.cpp: + Added asserts for the patch offsets. + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::setupPolymorphicProtoList): + * wtf/Platform.h: + Added ENABLE_MOVABLE_GC_OBJECTS flag -2009-08-20 Oliver Hunt <oliver@apple.com> +2010-08-07 Michael Saboff <msaboff@apple.com> - Reviewed by Geoff Garen. + Reviewed by Geoffrey Garen. - REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest - https://bugs.webkit.org/show_bug.cgi?id=28332 + Revert JSArray to point to the beginning of the contained ArrayStorage + struct. This is described in + https://bugs.webkit.org/show_bug.cgi?id=43526. - Follow up style fixes that were missed in review. + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::getNewVectorLength): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): + * runtime/JSArray.h: + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): - * runtime/Structure.cpp: - (JSC::Structure::hasTransition): - * runtime/Structure.h: - (JSC::Structure::get): - (JSC::StructureTransitionTable::contains): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTable::add): +2010-08-07 Kwang Yul Seo <skyul@company100.net> -2009-08-20 Oliver Hunt <oliver@apple.com> + Reviewed by Eric Seidel. - Add new exports to windows jsc build + Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator + https://bugs.webkit.org/show_bug.cgi?id=43399 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR). -2009-08-20 Oliver Hunt <oliver@apple.com> + * runtime/JSGlobalData.h: - Reviewed by Gavin Barraclough. +2010-08-07 Patrick Roland Gansterer <paroga@paroga.com> - REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest - https://bugs.webkit.org/show_bug.cgi?id=28332 + Reviewed by Eric Seidel. - The method check optimisation made transitions aware of the value being - assigned when a transition was assigning a function. This had the side - effect of making every assignment of a function expression result in a - new transition, and thus a new Structure. The net result of this is that - the common JS idiom of + [Qt] Enable JIT on WinCE + https://bugs.webkit.org/show_bug.cgi?id=43303 - function MyObject() { - this.myFunction = function(...){...}; - } - new MyObject(); + Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm. - Will produce a unique structure on every iteration, meaning that all - caching is defeated and there is a significant amount of structure churn. + * DerivedSources.pro: - The fix is to return the transition to its original form where it is - keyed off a property name + attributes tuple, but have each transition - support an optional transition on a specific value. +2010-08-07 Dan Bernstein <mitz@apple.com> - * JavaScriptCore.exp: - * runtime/JSObject.h: - (JSC::JSObject::putDirectInternal): - * runtime/Structure.cpp: - (JSC::Structure::~Structure): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::hasTransition): - * runtime/Structure.h: - (JSC::Structure::transitionedFor): - (JSC::Structure::hasTransition): - (JSC::Structure::): - (JSC::StructureTransitionTable::contains): - (JSC::StructureTransitionTable::get): - * runtime/StructureTransitionTable.h: - (JSC::StructureTransitionTableHashTraits::emptyValue): - (JSC::StructureTransitionTable::hasTransition): - (JSC::StructureTransitionTable::remove): - (JSC::StructureTransitionTable::add): + Reviewed by Anders Carlsson. -2009-08-20 Gavin Barraclough <barraclough@apple.com> + Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef + from SimpleFontData to FontPlatformData. + https://bugs.webkit.org/show_bug.cgi?id=43674 - Reviewed by Oliver Hunt. + * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h. - Remove FunctionCodeBlock. - https://bugs.webkit.org/show_bug.cgi?id=28502 +2010-08-07 Zoltan Herczeg <zherczeg@webkit.org> - These only exist to allow JIT code to dereference properties off the - CodeBlock for any callee, regardless of whether it is a host function. + Reviewed by Eric Seidel. - Instead just use the FunctionExecutable. Copy the m_parameters field - from the CodeBlock into the Executable, and use this to distinguish - between host functions, functions that have been bytecompiled, and - functions that have not. + Bitmap.h has no default constructor + https://bugs.webkit.org/show_bug.cgi?id=43619 - m_parameters is moved to ExecutableBase rather than FunctionExecutable - so that (as a separate change) we can move make a separate class of - executable for host code, which is not devived from FunctionExecutable - (host code does not feature any of the properties that normal executable - do and will provide, such as source, attributes, and a parsed name). + Without a constructor, the initial bits of the Bitmap class + are undefinied. If only a few, or zero bits are 0, the memory + area provided by AlignedMemoryAllocator can be easly exhausted. - 1% win on v8 tests, 0.5% on sunspider. + Csaba Osztrogonác helped to find this bug. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::handlerForBytecodeOffset): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - (JSC::CodeBlock::functionRegisterForBytecodeOffset): - (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset): - (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): - * bytecode/CodeBlock.h: - (JSC::): - (JSC::CodeBlock::source): - (JSC::CodeBlock::sourceOffset): - (JSC::CodeBlock::evalCodeCache): - (JSC::CodeBlock::createRareDataIfNecessary): - - remove NativeCodeBlocks and the NativeCode code type. - - * jit/JIT.cpp: - (JSC::JIT::linkCall): + * wtf/Bitmap.h: + (WTF::::Bitmap): - Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock. +2010-08-06 Rafael Antognolli <antognolli@profusion.mobi> - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): + [EFL] Build fix. - Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0. + * CMakeLists.txt: add runtime/CGHandle.cpp. - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): +2010-08-06 Jessie Berlin <jberlin@apple.com> - Rewrite call trampolines to not use the CodeBlock. + Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build. + Unreviewed. - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: - Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock. +2010-08-06 Jessie Berlin <jberlin@apple.com> - * runtime/Executable.cpp: - (JSC::FunctionExecutable::generateBytecode): - (JSC::FunctionExecutable::recompile): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/Executable.h: - (JSC::ExecutableBase::): - (JSC::ExecutableBase::ExecutableBase): - (JSC::FunctionExecutable::isHostFunction): + Windows Build Fix (continued). Unreviewed. - Add m_numParameters. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): +2010-08-06 Jessie Berlin <jberlin@apple.com> - Only call generatedBytecode() on JSFunctions non-host FunctionExecutables. + Windows Build Fix. Unreviewed. -2009-08-20 Yongjun Zhang <yongjun.zhang@nokia.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + Add GCHandle.h and GCHandle.cpp. - Reviewed by Eric Seidel. +2010-08-06 Nathan Lawrence <nlawrence@apple.com> - https://bugs.webkit.org/show_bug.cgi?id=28054 - - Use a helper function to work around winscw compiler forward declaration bug - regarding templated classes. + Reviewed by Geoffrey Garen. - Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler - work with the default UnSpecifiedBoolType() operator, which removes the winscw - specific bool cast hack. + https://bugs.webkit.org/show_bug.cgi?id=43207 - * wtf/PassRefPtr.h: - (WTF::derefIfNotNull): - (WTF::PassRefPtr::~PassRefPtr): + WeakGCPtr's should instead of directly pointing to the GC'd object + should be directed to an array of pointers that can be updated for + movable objects. -2009-08-19 Yong Li <yong.li@torchmobile.com> + * Android.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Collector.cpp: + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + (JSC::Heap::updateWeakGCHandles): + (JSC::WeakGCHandlePool::update): + (JSC::Heap::addWeakGCHandle): + (JSC::Heap::markRoots): + * runtime/Collector.h: + (JSC::Heap::weakGCHandlePool): + * runtime/GCHandle.cpp: Added. + (JSC::WeakGCHandle::pool): + (JSC::WeakGCHandlePool::WeakGCHandlePool): + (JSC::WeakGCHandlePool::allocate): + (JSC::WeakGCHandlePool::free): + (JSC::WeakGCHandlePool::operator new): + * runtime/GCHandle.h: Added. + (JSC::WeakGCHandle::isValidPtr): + (JSC::WeakGCHandle::isPtr): + (JSC::WeakGCHandle::isNext): + (JSC::WeakGCHandle::invalidate): + (JSC::WeakGCHandle::get): + (JSC::WeakGCHandle::set): + (JSC::WeakGCHandle::getNextInFreeList): + (JSC::WeakGCHandle::setNextInFreeList): + (JSC::WeakGCHandlePool::isFull): + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::WeakGCPtr): + (JSC::WeakGCPtr::~WeakGCPtr): + (JSC::WeakGCPtr::get): + (JSC::WeakGCPtr::clear): + (JSC::WeakGCPtr::assign): + (JSC::get): - Reviewed by Gavin Barraclough. +2010-08-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> - Change namespace ARM to ARMRegisters - X86 to X86Registers to avoid conflict with macros - https://bugs.webkit.org/show_bug.cgi?id=28428 + Reviewed by Antonio Gomes. - * assembler/ARMAssembler.cpp: - * assembler/ARMAssembler.h: - * assembler/ARMv7Assembler.h: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerARMv7.h: - * assembler/MacroAssemblerX86Common.h: - * assembler/MacroAssemblerX86_64.h: - * assembler/X86Assembler.h: - * jit/JIT.h: - * jit/JITArithmetic.cpp: - * jit/JITInlineMethods.h: - * jit/JITOpcodes.cpp: - * wrec/WRECGenerator.cpp: - * wrec/WRECGenerator.h: - * yarr/RegexJIT.cpp: + [Qt] Fix warnings about difference in symbol visiblity on Mac OS X -2009-08-19 Oliver Hunt <oliver@apple.com> + * jsc.pro: - Reviewed by Gavin Barraclough. +2010-08-06 Zoltan Herczeg <zherczeg@webkit.org> - Devirtualise marking - https://bugs.webkit.org/show_bug.cgi?id=28294 + Reviewed by Darin Adler. - We actually need to mark the value in a number object if we're using the - 32bit number representation. + Refactor identifier parsing in lexer + https://bugs.webkit.org/show_bug.cgi?id=41845 - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): + The code is refactored to avoid gotos. The new code + has the same performance as the old one. -2009-08-19 Gavin Barraclough <barraclough@apple.com> + SunSpider --parse-only: no change (from 34.0ms to 33.6ms) + SunSpider: no change (from 523.2ms to 523.5ms) - Reviewed by Darin Adler. + * parser/Lexer.cpp: + (JSC::Lexer::parseIdent): + (JSC::Lexer::lex): + * parser/Lexer.h: - We probably shouldn't be keeping the AST for eval nodes around forevar. - https://bugs.webkit.org/show_bug.cgi?id=28469 +2010-08-06 Gabor Loki <loki@webkit.org> - EvalNodes don't destroyData() (delete their parser data) since they need to hold onto - their varStack. Copy a list of variable onto EvalCodeBlock, and this can go away. + Reviewed by Gavin Barraclough. - * bytecode/CodeBlock.h: - (JSC::EvalCodeBlock::variable): - (JSC::EvalCodeBlock::numVariables): - (JSC::EvalCodeBlock::adoptVariables): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - * parser/Nodes.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::generateBytecode): - * runtime/Executable.h: + The ARM JIT does not support JSValue32_64 with RVCT + https://bugs.webkit.org/show_bug.cgi?id=43411 -2009-08-19 Jungshik Shin <jshin@chromium.org> + JSValue32_64 is enabled for RVCT by default. - Reviewed by Darin Adler. + * create_jit_stubs: + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC::ctiVMThrowTrampoline): + (JSC::ctiOpThrowNotCaught): + * wtf/Platform.h: - http://bugs.webkit.org/show_bug.cgi?id=28441 +2010-08-05 Chao-ying Fu <fu@mips.com> - Fix a build issue with ICU 4.2 or later on Windows with Visual C++. - Instead of defining all isXXX and toupper/tolower as - WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h, - #define them to be different by prepending 'WTF_...ASCIIType_h' with - the originial names like 'toupper_WTF_...ASCIIType_h'. + Reviewed by Darin Adler. - * wtf/DisallowCType.h: + Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS + https://bugs.webkit.org/show_bug.cgi?id=43514 -2009-08-18 Oliver Hunt <oliver@apple.com> + MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that + RenderArena::allocate() can return 8-byte aligned memory to avoid + exceptions on sdc1/ldc1. - Reviewed by Gavin Barraclough. + * wtf/Platform.h: - Assigning a function to an object should always use the existing transition, even if the transition is not specialized - https://bugs.webkit.org/show_bug.cgi?id=28442 +2010-08-05 Gavin Barraclough <barraclough@apple.com> - Check for an unspecialized transition as an alternative to always failing if specialisation does not match. + Rubber stamped by Sam Weinig - * runtime/Structure.cpp: - (JSC::Structure::addPropertyTransitionToExistingStructure): + Bug 43594 - Add string forwards to Forward.h + This allows us to remove forward declarations for these classes from + WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). -2009-08-18 Dirk Schulze <krit@webkit.org> + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: - Reviewed by Oliver Hunt. +2010-08-05 Geoffrey Garen <ggaren@apple.com> - Added additional getter to ByteArray with an unsigned char as return. - ByteArray can take unsigned char directly now. + Reviewed by Mark Rowe. - * wtf/ByteArray.h: - (WTF::ByteArray::set): - (WTF::ByteArray::get): + Fixed leak seen on buildbot. -2009-08-18 Peter Kasting <pkasting@google.com> + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr, + since anything less would be uncivilized. - Reviewed by Eric Seidel. +2010-08-05 Andy Estes <aestes@apple.com> - https://bugs.webkit.org/show_bug.cgi?id=28415 - Set svn:eol-style CRLF on all .sln and .vcproj files that don't already - have it. + Reviewed by David Kilzer. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: + Rename iOS-related OS and PLATFORM macros. + https://bugs.webkit.org/show_bug.cgi?id=43493 -2009-08-18 Xan Lopez <xlopez@igalia.com> + Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to + WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to + WTF_PLATFORM_IOS_SIMULATOR. - Try to fix the GTK+ build. - - * GNUmakefile.am: + * jit/ExecutableAllocator.h: + * jit/JITStubs.cpp: + * profiler/ProfilerServer.mm: + (-[ProfilerServer init]): + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::): + * wtf/Platform.h: + * wtf/unicode/icu/CollatorICU.cpp: + (WTF::Collator::userDefault): -2009-08-17 Gavin Barraclough <barraclough@apple.com> +2010-08-05 Nathan Lawrence <nlawrence@apple.com> - Reviewed by Sam Weinig. + Reviewed by Darin Adler. - No, silly runtime, AST nodes are not for you. + https://bugs.webkit.org/show_bug.cgi?id=43464 - We still use AST nodes (ScopeNodes, particularly FunctionBodyNodes) within - the runtime, which means that these nodes must be persisted outside of the - arena, contain both parser & runtime data, etc. This is all a bit of a mess. + Currently, the global object is being embedded in the JavaScriptCore + bytecode, however since the global object is the same for all opcodes + in a code block, we can have the global object just be a member of the + associated code block. - Move functionality into a new FunctionExecutable class. + Additionally, I added an assert inside of emitOpcode that verifies + that the last generated opcode was of the correct length. - * API/JSCallbackFunction.cpp: - * API/JSObjectRef.cpp: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::derefStructures): (JSC::CodeBlock::markAggregate): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::shrinkToFit): * bytecode/CodeBlock.h: - (JSC::CodeBlock::getBytecodeIndex): - (JSC::CodeBlock::discardBytecode): - (JSC::CodeBlock::instructionCount): - (JSC::CodeBlock::getJITCode): - (JSC::CodeBlock::executablePool): - (JSC::CodeBlock::ownerExecutable): - (JSC::CodeBlock::extractExceptionInfo): - (JSC::CodeBlock::addFunctionDecl): - (JSC::CodeBlock::functionDecl): - (JSC::CodeBlock::numberOfFunctionDecls): - (JSC::CodeBlock::addFunctionExpr): - (JSC::CodeBlock::functionExpr): + (JSC::CodeBlock::globalObject): (JSC::GlobalCodeBlock::GlobalCodeBlock): (JSC::ProgramCodeBlock::ProgramCodeBlock): (JSC::EvalCodeBlock::EvalCodeBlock): (JSC::FunctionCodeBlock::FunctionCodeBlock): - (JSC::NativeCodeBlock::NativeCodeBlock): - * bytecode/EvalCodeCache.h: - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::doRun): + * bytecode/Opcode.h: + (JSC::opcodeLength): * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): + (JSC::BytecodeGenerator::emitOpcode): + Added an assert to check that the last generated opcode is the + correct length. + (JSC::BytecodeGenerator::rewindBinaryOp): + Changed the last opcode to op_end since the length will no longer + be correct. + (JSC::BytecodeGenerator::rewindUnaryOp): + Changed the last opcode to op_end since the length will no longer + be correct. + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitGetScopedVar): + (JSC::BytecodeGenerator::emitPutScopedVar): + (JSC::BytecodeGenerator::emitResolveWithBase): * bytecompiler/BytecodeGenerator.h: - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * interpreter/CachedCall.h: - (JSC::CachedCall::CachedCall): - * interpreter/CallFrameClosure.h: * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::debug): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveLastCaller): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::JIT::compile): * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::emit_op_new_func): - (JSC::JIT::emit_op_new_func_exp): + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (JSC::JIT::emit_op_resolve_global_dynamic): + (JSC::JIT::emitSlow_op_resolve_global_dynamic): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::reparseDataIfNecessary): - * parser/Nodes.h: - (JSC::EvalNode::partialDestroyData): - * parser/Parser.h: - * profiler/ProfileGenerator.cpp: - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): - (JSC::createCallIdentifierFromFunctionImp): - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - (JSC::Arguments::Arguments): - (JSC::JSActivation::copyRegisters): - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - * runtime/CallData.h: - (JSC::): - * runtime/Collector.cpp: - (JSC::Heap::collect): - * runtime/ConstructData.h: - (JSC::): - * runtime/ExceptionHelpers.cpp: - (JSC::createUndefinedVariableError): - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAFunctionError): - (JSC::createNotAnObjectError): - * runtime/Executable.cpp: Added. - (JSC::EvalExecutable::generateBytecode): - (JSC::ProgramExecutable::generateBytecode): - (JSC::FunctionExecutable::generateBytecode): - (JSC::EvalExecutable::generateJITCode): - (JSC::ProgramExecutable::generateJITCode): - (JSC::FunctionExecutable::generateJITCode): - (JSC::FunctionExecutable::isHostFunction): - (JSC::FunctionExecutable::markAggregate): + (JSC::cti_op_resolve_global): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::recompile): - (JSC::FunctionExecutable::FunctionExecutable): - * runtime/Executable.h: - (JSC::ExecutableBase::~ExecutableBase): - (JSC::ExecutableBase::ExecutableBase): - (JSC::ExecutableBase::source): - (JSC::ExecutableBase::sourceID): - (JSC::ExecutableBase::lastLine): - (JSC::ExecutableBase::usesEval): - (JSC::ExecutableBase::usesArguments): - (JSC::ExecutableBase::needsActivation): - (JSC::ExecutableBase::astNode): - (JSC::ExecutableBase::generatedJITCode): - (JSC::ExecutableBase::getExecutablePool): - (JSC::EvalExecutable::EvalExecutable): - (JSC::EvalExecutable::bytecode): - (JSC::EvalExecutable::varStack): - (JSC::EvalExecutable::evalNode): - (JSC::EvalExecutable::jitCode): - (JSC::ProgramExecutable::ProgramExecutable): - (JSC::ProgramExecutable::reparseExceptionInfo): - (JSC::ProgramExecutable::bytecode): - (JSC::ProgramExecutable::programNode): - (JSC::ProgramExecutable::jitCode): - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::name): - (JSC::FunctionExecutable::bytecode): - (JSC::FunctionExecutable::generatedBytecode): - (JSC::FunctionExecutable::usesEval): - (JSC::FunctionExecutable::usesArguments): - (JSC::FunctionExecutable::parameterCount): - (JSC::FunctionExecutable::paramString): - (JSC::FunctionExecutable::isGenerated): - (JSC::FunctionExecutable::body): - (JSC::FunctionExecutable::jitCode): - (JSC::FunctionExecutable::createNativeThunk): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - (JSC::JSActivation::markChildren): - (JSC::JSActivation::isDynamicScope): - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: - (JSC::JSActivation::JSActivationData::JSActivationData): - * runtime/JSFunction.cpp: - (JSC::JSFunction::isHostFunction): - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::markChildren): - (JSC::JSFunction::getCallData): - (JSC::JSFunction::call): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getConstructData): - (JSC::JSFunction::construct): - * runtime/JSFunction.h: - (JSC::JSFunction::executable): - (JSC::FunctionExecutable::make): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::numericCompareFunction): - * runtime/JSGlobalData.h: - -2009-08-17 Mark Rowe <mrowe@apple.com> - - Reviewed by Darin Adler. - - Fix 300,000+ leaks seen during the regression tests. - - EvalCodeCache::get was heap-allocating an EvalExecutable instance without adopting the initial reference. - While fixing this we noticed that EvalExecutable was a RefCounted type that was sometimes stack allocated. - To make this cleaner and to prevent clients from attempting to ref a stack-allocated instance, we move the - refcounting down to a new CacheableEvalExecutable class that derives from EvalExecutable. EvalCodeCache::get - now uses CacheableEvalExecutable::create and avoids the leak. - - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - * runtime/Executable.h: - (JSC::CacheableEvalExecutable::create): - (JSC::CacheableEvalExecutable::CacheableEvalExecutable): - -2009-08-17 Oliver Hunt <oliver@apple.com> - - RS=Mark Rowe. - - REGRESSION (r47292): Prototype.js is broken by ES5 Arguments changes - https://bugs.webkit.org/show_bug.cgi?id=28341 - <rdar://problem/7145615> - - Reverting r47292. Alas Prototype.js breaks with Arguments inheriting - from Array as ES5 attempted. Prototype.js defines $A in terms of a - function it places on (among other global objects) the Array prototype, - thus breaking $A for arrays. - - * runtime/Arguments.h: - (JSC::Arguments::Arguments): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * tests/mozilla/ecma_3/Function/arguments-001.js: - -2009-08-17 Peter Kasting <pkasting@google.com> - - Reviewed by Steve Falkenburg. - - https://bugs.webkit.org/show_bug.cgi?id=27323 - Only add Cygwin to the path when it isn't already there. This avoids - causing problems for people who purposefully have non-Cygwin versions of - executables like svn in front of the Cygwin ones in their paths. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - -2009-08-17 Xan Lopez <xlopez@igalia.com> - - Reviewed by Mark Rowe. - Fix build with FAST_MALLOC_MATCH_VALIDATION enabled. +2010-08-05 Gavin Barraclough <barraclough@apple.com> - * wtf/FastMalloc.cpp: - (WTF::fastMalloc): - (WTF::fastCalloc): - (WTF::fastRealloc): - -2009-08-16 Holger Hans Peter Freyther <zecke@selfish.org> - - Reviewed by Mark Rowe. - - Fix crash on ./ecma_2/RegExp/exec-002.js. - https://bugs.webkit.org/show_bug.cgi?id=28353 - - Change the order of freeParenthesesDisjunctionContext and - popParenthesesDisjunctionContext on all call sites as the pop - method is accessing backTrack->lastContext which is the context - that is about to be freed. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::parenthesesDoBacktrack): - (JSC::Yarr::Interpreter::backtrackParentheses): - -2009-08-16 Holger Hans Peter Freyther <zecke@selfish.org> - - Reviewed by Mark Rowe. + Reviewed by Sam Weinig. - https://bugs.webkit.org/show_bug.cgi?id=28352 + Bug 43185 - Switch RegisterFile over to use PageAllocation - Fix coding style violations. Use m_ for C++ class members. Remove - trailing whitespace on empty lines. + Remove platform-specific memory allocation code. - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::tryConsumeCharacter): - (JSC::Yarr::Interpreter::tryConsumeBackReference): - (JSC::Yarr::Interpreter::parenthesesDoBacktrack): - (JSC::Yarr::Interpreter::backtrackParentheses): - (JSC::Yarr::ByteCompiler::ByteCompiler): - (JSC::Yarr::ByteCompiler::compile): - (JSC::Yarr::ByteCompiler::checkInput): - (JSC::Yarr::ByteCompiler::assertionBOL): - (JSC::Yarr::ByteCompiler::assertionEOL): - (JSC::Yarr::ByteCompiler::assertionWordBoundary): - (JSC::Yarr::ByteCompiler::atomPatternCharacter): - (JSC::Yarr::ByteCompiler::atomCharacterClass): - (JSC::Yarr::ByteCompiler::atomBackReference): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): - (JSC::Yarr::ByteCompiler::popParenthesesStack): - (JSC::Yarr::ByteCompiler::closeAlternative): - (JSC::Yarr::ByteCompiler::closeBodyAlternative): - (JSC::Yarr::ByteCompiler::atomParenthesesEnd): - (JSC::Yarr::ByteCompiler::regexBegin): - (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction): - (JSC::Yarr::ByteCompiler::alterantiveDisjunction): - (JSC::Yarr::ByteCompiler::emitDisjunction): + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::~RegisterFile): + (JSC::RegisterFile::releaseExcessCapacity): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::grow): + (JSC::RegisterFile::checkAllocatedOkay): + * wtf/PageAllocation.cpp: + (WTF::PageAllocation::lastError): + * wtf/PageAllocation.h: + (WTF::PageAllocation::allocate): + (WTF::PageAllocation::allocateAt): + (WTF::PageAllocation::allocateAligned): + (WTF::PageAllocation::pageSize): + (WTF::PageAllocation::isPageAligned): + (WTF::PageAllocation::isPowerOfTwo): + * wtf/PageReservation.h: + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::reserve): + (WTF::PageReservation::reserveAt): + +2010-08-05 Michael Saboff <msaboff@apple.com> -2009-08-15 Mark Rowe <mrowe@apple.com> + Reviewed by Darin Adler. - Fix the build with JIT disabled. + Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array + content aren't properly initialized as part of unshift. - * runtime/Arguments.h: Only compile the jitCode method when the JIT is enabled. - * runtime/Executable.h: Include PrototypeFunction.h so the compiler knows what - NativeFunctionWrapper is when the JIT is disabled. + * runtime/JSArray.cpp: + (JSC::JSArray::unshiftCount): -2009-08-15 Adam Bergkvist <adam.bergkvist@ericsson.com> +2010-08-05 Jian Li <jianli@chromium.org> - Reviewed by Sam Weinig. + Reviewed by David Levin. - Added ENABLE_EVENTSOURCE flag. - https://bugs.webkit.org/show_bug.cgi?id=14997 + Unify blob related feature defines to ENABLE(BLOB). + https://bugs.webkit.org/show_bug.cgi?id=43081 * Configurations/FeatureDefines.xcconfig: -2009-08-14 Gavin Barraclough <barraclough@apple.com> - - * parser/Parser.h: - (JSC::EvalExecutable::parse): - (JSC::ProgramExecutable::parse): - * runtime/Executable.h: - -2009-08-14 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Remove AST nodes from use within the Runtime (outside of parsing), stage 1 - https://bugs.webkit.org/show_bug.cgi?id=28330 - - Remove the EvalNode and ProgramNode from use in the runtime. They still exist - after this patch, but are hidden behind EvalExecutable and FunctionExecutable, - and are also still reachable behind CodeBlock::m_ownerNode. - - The next step will be to beat back FunctionBodyNode in the same fashion. - Then remove the usage via CodeBlock, then only construct these nodes only on - demand during bytecode generation. +2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.h: - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::GlobalCodeBlock::~GlobalCodeBlock): - (JSC::ProgramCodeBlock::ProgramCodeBlock): - (JSC::EvalCodeBlock::EvalCodeBlock): - (JSC::FunctionCodeBlock::FunctionCodeBlock): - (JSC::NativeCodeBlock::NativeCodeBlock): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::execute): - * interpreter/Interpreter.h: - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::createNativeThunk): - (JSC::FunctionBodyNode::generateBytecode): - (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse): - * parser/Parser.h: - (JSC::Parser::parse): - (JSC::Parser::reparse): - (JSC::Parser::parseFunctionFromGlobalCode): - (JSC::::parse): - * runtime/Completion.cpp: - (JSC::checkSyntax): - (JSC::evaluate): - * runtime/Error.cpp: - (JSC::throwError): - * runtime/Error.h: - * runtime/Executable.h: Added. - (JSC::TemplateExecutable::TemplateExecutable): - (JSC::TemplateExecutable::markAggregate): - (JSC::TemplateExecutable::sourceURL): - (JSC::TemplateExecutable::lineNo): - (JSC::TemplateExecutable::bytecode): - (JSC::TemplateExecutable::jitCode): - (JSC::EvalExecutable::EvalExecutable): - (JSC::ProgramExecutable::ProgramExecutable): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/FunctionConstructor.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::numericCompareFunction): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::codeBlocks): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): + Rubber-stamped by Xan Lopez. -2009-08-14 Darin Adler <darin@apple.com> + Remove GHashTable left-overs. GHashTable is ref-counted, and is + correctly supported by GRefPtr. - Reviewed by Sam Weinig. + * wtf/gobject/GOwnPtr.h: - Rename the confusing isObject(<class>) to inherits(<class>). - It still works on non-objects, returning false. +2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - * runtime/ArrayConstructor.cpp: - (JSC::arrayConstructorIsArray): Removed unneeded isObject call - and updated remaining isObject call to new name, inherits. - - * runtime/JSCell.h: Renamed isObject(<class>) to inherits(<class>) - but more importantly, made it non-virtual (it was already inline) - so it is now as fast as JSObject::inherits was. + Unreviewed. - * runtime/JSObject.h: Removed inherits function since the one - in the base class is fine as-is. Also made various JSCell functions - that should not be called on JSObject uncallable by making them - both private and not implemented. - (JSC::JSCell::inherits): Updated name. - (JSC::JSValue::inherits): Ditto. + Typo fix that makes distcheck happy. - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncConcat): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/DateConstructor.cpp: - (JSC::constructDate): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * runtime/JSValue.h: - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/ScopeChain.cpp: - (JSC::ScopeChain::localDepth): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSplit): - Updated to new name, inherits, from old name, isObject. + * GNUmakefile.am: -2009-07-31 Harald Fernengel <harald.fernengel@nokia.com> +2010-08-03 Geoffrey Garen <ggaren@apple.com> - Reviewed by Simon Hausmann. + Reviewed by Oliver Hunt and Beth Dakin. - Adding QNX as a platform. Currently only tested with Qt. + https://bugs.webkit.org/show_bug.cgi?id=43461 + Invalid NaN parsing + + * wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a + non-standard NaN representation, since our NaN encoding assumes that all + true NaNs have the standard bit pattern. - https://bugs.webkit.org/show_bug.cgi?id=27885 + * API/JSValueRef.cpp: + (JSValueMakeNumber): Don't allow an API client to accidentally specify + a non-standard NaN either. - * JavaScriptCore/runtime/Collector.cpp: Added retrieving of stack base - since QNX doesn't have the pthread _nt functions - * JavaScriptCore/wtf/Platform.h: Added WTF_PLATFORM_QNX and corresponding - defines - * WebCore/bridge/npapi.h: Build fix for missing typedefs on QNX +2010-08-04 Gavin Barraclough <barraclough@apple.com> -2009-08-14 Gabor Loki <loki@inf.u-szeged.hu> + Windows build fix part II. - Reviewed by Simon Hausmann. + * wtf/PageReservation.h: + (WTF::PageReservation::systemReserve): - Currently generic ARM and ARMv7 platforms work only with JSVALUE32 - https://bugs.webkit.org/show_bug.cgi?id=28300 +2010-08-04 Gavin Barraclough <barraclough@apple.com> - * wtf/Platform.h: + Windows build fix. -2009-08-14 Gabor Loki <loki@inf.u-szeged.hu> + * wtf/PageReservation.h: + (WTF::PageReservation::systemReserve): - Reviewed by Simon Hausmann. +2010-08-04 Gavin Barraclough <barraclough@apple.com> - Enable JIT on ARM for QT by default - https://bugs.webkit.org/show_bug.cgi?id=28259 + Build fix - add new header to !Mac projects. - * wtf/Platform.h: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: -2009-08-14 Gabor Loki <loki@inf.u-szeged.hu> +2010-08-04 Gavin Barraclough <barraclough@apple.com> - Reviewed by Simon Hausmann. + Reviewed by Sam Weinig. - Enable YARR_JIT on ARM for QT by default - https://bugs.webkit.org/show_bug.cgi?id=28259 + Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation. + + The PageAllocation class has a number of issues: + * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate + blocks of memory for the GC heap, instead of allocating RChunks. Revert this change in + behaviour. + * In order for PageAllocation to work correctly on WinCE we should be decommitting memory + before deallocating. In order to simplify understanding the expected state at deallocate, + split behaviour out into PageAllocation and PageReservation classes. Require that all + memory be decommitted before calling deallocate on a PageReservation, add asserts to + enforce this. + * add many missing asserts. + * inline more functions. + * remove ability to create sub-PageAllocations from an existing PageAllocations object - + this presented an interface that would allow sub regions to be deallocated, which would + not have provided expected behaviour. + * remove writable/executable arguments to commit, this value can be cached at the point + the memory is reserved. + * remove writable/executable arguments to allocateAligned, protection other than RW is not + supported. + * add missing checks for overflow & failed allocation to mmap path through allocateAligned. + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::Allocation::Allocation): + (JSC::ExecutablePool::Allocation::base): + (JSC::ExecutablePool::Allocation::size): + (JSC::ExecutablePool::Allocation::operator!): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::coalesceFreeSpace): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::allocInternal): + * runtime/AlignedMemoryAllocator.h: + (JSC::::allocate): + (JSC::::AlignedMemoryAllocator): + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + * runtime/Collector.h: + * wtf/PageAllocation.cpp: + * wtf/PageAllocation.h: + (WTF::PageAllocation::operator!): + (WTF::PageAllocation::allocate): + (WTF::PageAllocation::allocateAt): + (WTF::PageAllocation::allocateAligned): + (WTF::PageAllocation::deallocate): + (WTF::PageAllocation::pageSize): + (WTF::PageAllocation::systemAllocate): + (WTF::PageAllocation::systemAllocateAt): + (WTF::PageAllocation::systemAllocateAligned): + (WTF::PageAllocation::systemDeallocate): + (WTF::PageAllocation::systemPageSize): + * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h. + (WTF::PageReservation::PageReservation): + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::reserve): + (WTF::PageReservation::reserveAt): + (WTF::PageReservation::deallocate): + (WTF::PageReservation::systemCommit): + (WTF::PageReservation::systemDecommit): + (WTF::PageReservation::systemReserve): + (WTF::PageReservation::systemReserveAt): * wtf/Platform.h: -2009-08-14 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - [ES5] Arguments object should inherit from Array - https://bugs.webkit.org/show_bug.cgi?id=28298 - - Make the Arguments object conform to the behaviour specified in ES5. - The simple portion of this is to make Arguments use Array.prototype - as its prototype rather than Object.prototype. +2010-08-04 Sheriff Bot <webkit.review.bot@gmail.com> - The spec then requires us to set instance.constructor to the pristine - Object constructor, and instance.toString and instance.toLocaleString - to the pristine versions from Object.prototype. To do this we now - make the ObjectPrototype constructor return its toString and - toLocaleString functions (similar to the call and apply functions - from FunctionPrototype). + Unreviewed, rolling out r64655. + http://trac.webkit.org/changeset/64655 + https://bugs.webkit.org/show_bug.cgi?id=43496 - Oddly enough this reports itself as a slight win, but given the code - isn't hit in the tests that claim to have improved I put this down to - code motion. + JavaScriptCore references patch seems to have caused + regressions in QT and GTK builds (Requested by nlawrence on + #webkit). - * runtime/Arguments.h: - (JSC::Arguments::Arguments): - (JSC::Arguments::initializeStandardProperties): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * runtime/Collector.cpp: + (JSC::Heap::markConservatively): + * runtime/JSCell.h: + (JSC::JSValue::asCell): + (JSC::MarkStack::append): * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::objectConstructor): - (JSC::JSGlobalObject::objectToStringFunction): - (JSC::JSGlobalObject::objectToLocaleStringFunction): - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::ObjectPrototype): - * runtime/ObjectPrototype.h: - * tests/mozilla/ecma_3/Function/arguments-001.js: - Update test to new es5 behaviour - -2009-08-14 Oliver Hunt <oliver@apple.com> - - Remove MarkStack::drain from the JSC exports file - - MarkStack::drain is now marked inline, the including it in the exports file - produces an ld warning - - * JavaScriptCore.exp: - -2009-08-13 Sam Weinig <sam@webkit.org> - - Reviewed by Oliver Hunt. - - Remove accidentally left in debugging statement. - - * runtime/JSArray.h: - (JSC::MarkStack::drain): + (JSC::markIfNeeded): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::object): + * runtime/JSObject.h: + (JSC::JSObject::prototype): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSValue.h: + (JSC::JSValue::): + (JSC::JSValue::JSValue): + (JSC::JSValue::asCell): + * runtime/MarkStack.h: + * runtime/NativeErrorConstructor.cpp: + * runtime/NativeErrorConstructor.h: + * runtime/Structure.h: + (JSC::Structure::storedPrototype): -2009-08-13 Oliver Hunt <oliver@apple.com> +2010-08-04 Gavin Barraclough <barraclough@apple.com> - Reviewed by Maciej Stachowiak. + Rubber stamped by Sam Weinig. - [ES5] Implement Array.isArray - https://bugs.webkit.org/show_bug.cgi?id=28296 + Enable JSVALUE64 for CPU(PPC64). + Basic browsing seems to work. - Add support for Array.isArray to the Array constructor + * wtf/Platform.h: - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::arrayConstructorIsArray): - * runtime/ArrayConstructor.h: - * runtime/CommonIdentifiers.h: - * runtime/JSArray.h: - (JSC::MarkStack::drain): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): +2010-08-04 Nathan Lawrence <nlawrence@apple.com> -2009-08-13 Oliver Hunt <oliver@apple.com> + Reviewed by Darin Adler. - Reviewed by NOBODY (Buildfix). + Refactoring MarkStack::append to take a reference. This is in + preparation for movable objects when we will need to update pointers. + http://bugs.webkit.org/show_bug.cgi?id=41177 - Attempt to fix windows build + Unless otherwise noted, all changes are to either return by reference + or pass a reference to MarkStack::append. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): * runtime/Collector.cpp: - -2009-08-13 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Devirtualise marking - https://bugs.webkit.org/show_bug.cgi?id=28294 - - Add a bit to TypeInfo to indicate that an object uses the standard - JSObject::markChildren method. This allows us to devirtualise marking - of most objects (though a branch is still needed). We also add a branch - to identify arrays thus devirtualising marking in that case as well. - - In order to make the best use of this devirtualisation I've also reworked - the MarkStack::drain() logic to make the iteration more efficient. - - * API/JSCallbackConstructor.h: - (JSC::JSCallbackConstructor::createStructure): - * API/JSCallbackFunction.h: - (JSC::JSCallbackFunction::createStructure): - * JavaScriptCore.exp: - * runtime/BooleanObject.h: - (JSC::BooleanObject::createStructure): - * runtime/FunctionPrototype.h: - (JSC::FunctionPrototype::createStructure): - * runtime/InternalFunction.h: - (JSC::InternalFunction::createStructure): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): - * runtime/JSArray.cpp: - (JSC::JSArray::markChildren): - * runtime/JSArray.h: - (JSC::JSArray::markChildrenDirect): - (JSC::MarkStack::drain): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::createStructure): + (JSC::Heap::markConservatively): + Added a temporary variable to prevent marking from changing an + unknown value on the stack * runtime/JSCell.h: + (JSC::JSValue::asCell): (JSC::MarkStack::append): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSNumberCell.h: - (JSC::JSNumberCell::createStructure): - * runtime/JSONObject.h: - (JSC::JSONObject::createStructure): - * runtime/JSObject.cpp: - (JSC::JSObject::markChildren): + (JSC::MarkStack::appendInternal): + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::object): * runtime/JSObject.h: - (JSC::JSObject::markChildrenDirect): - (JSC::JSObject::createStructure): - * runtime/JSString.h: - (JSC::JSString::createStructure): - * runtime/JSType.h: - (JSC::): + (JSC::JSObject::prototype): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSValue.h: + (JSC::JSValue::JSValue): + (JSC::JSValue::asCell): * runtime/MarkStack.h: - (JSC::MarkStack::MarkStack): - (JSC::MarkStack::MarkSet::MarkSet): - (JSC::MarkStack::MarkStackArray::last): - * runtime/MathObject.h: - (JSC::MathObject::createStructure): - * runtime/NumberConstructor.h: - (JSC::NumberConstructor::createStructure): - * runtime/NumberObject.h: - (JSC::NumberObject::createStructure): - * runtime/RegExpConstructor.h: - (JSC::RegExpConstructor::createStructure): - * runtime/RegExpObject.h: - (JSC::RegExpObject::createStructure): - * runtime/StringObjectThatMasqueradesAsUndefined.h: - (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): - * runtime/TypeInfo.h: - (JSC::TypeInfo::hasDefaultMark): - -2009-08-13 Darin Adler <darin@apple.com> - - Reviewed by Mark Rowe. - - Some small bits of housekeeping. - - * JavaScriptCore.xcodeproj/project.pbxproj: Make Parser.h - project instead of private. Remove JSONObject.lut.h. - - * assembler/ARMAssembler.h: Remove unneeded WTF prefix. - * assembler/AssemblerBufferWithConstantPool.h: Ditto. - * bytecompiler/BytecodeGenerator.h: Ditto. - - * wtf/SegmentedVector.h: Add a "using" statement as we do - with the other WTF headers. - -2009-08-13 Darin Adler <darin@apple.com> - - Fix Tiger build. - - * parser/Grammar.y: Use a template function so we can compile - setStatementLocation even if it comes before YYLTYPE is defined. - -2009-08-13 Darin Adler <darin@apple.com> - - Reviewed by George Staikos. - - Too much use of void* in Grammar.y - https://bugs.webkit.org/show_bug.cgi?id=28287 - - * parser/Grammar.y: Changed all the helper functions to - take a JSGlobalData* instead of a void*. A couple formatting - tweaks that I missed when breaking this into pieces. - -2009-08-13 Darin Adler <darin@apple.com> + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::createStructure): + Changed the structure flags to include a custom markChildren. + (JSC::NativeErrorConstructor::markChildren): + Update the prototype of the stored structure. + * runtime/NativeErrorConstructor.h: + Added structure flags. + * runtime/Structure.h: + (JSC::Structure::storedPrototype): - Reviewed by George Staikos. +2010-08-03 Nathan Lawrence <nlawrence@apple.com> - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 + Reviewed by Oliver Hunt. - * parser/Grammar.y: Reduced and sorted includes. Tweaked comment - format. Marked a few more functions inline. + Tightened up some get_by_id_chain* code generation + https://bugs.webkit.org/show_bug.cgi?id=40935 -2009-08-13 Darin Adler <darin@apple.com> + This is in the style of + https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to + call accessor functions when it was not necessary to directly access + the private variables. - Reviewed by George Staikos. + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 +2010-08-03 Adam Roben <aroben@apple.com> - * parser/Grammar.y: Pass the number to the PropertyNode instead of - first turning it into an Identifier. + Turn on PLATFORM_STRATEGIES on Windows - * parser/NodeConstructors.h: - (JSC::PropertyNode::PropertyNode): Add an overload that takes a double - so the code to convert to a string can be here instead of Grammar.y. - * parser/Nodes.h: Ditto. + Fixes <http://webkit.org/b/43431>. -2009-08-13 Darin Adler <darin@apple.com> + Reviewed by Anders Carlsson. - Reviewed by George Staikos. + * wtf/Platform.h: - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 +2010-08-04 Gabor Loki <loki@webkit.org> - * parser/Grammar.y: Eliminate the DBG macro. + Reviewed by Geoffrey Garen. -2009-08-13 Darin Adler <darin@apple.com> + Enable JSValue32_64 for GCC on ARM by default + https://bugs.webkit.org/show_bug.cgi?id=43410 - Reviewed by George Staikos. + * wtf/Platform.h: - Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 +2010-08-03 Gavin Barraclough <barraclough@apple.com> - * parser/Grammar.y: Eliminate the SET_EXCEPTION_LOCATION macro. + Speculative windows build fix. -2009-08-13 Darin Adler <darin@apple.com> + * wtf/Bitmap.h: - Reviewed by George Staikos. +2010-08-03 Gavin Barraclough <barraclough@apple.com> - George asked me to break the patch from - https://bugs.webkit.org/show_bug.cgi?id=28287 - into smaller pieces and land it in stages. + Build fix following r64624. - * parser/Grammar.y: Eliminate the LEXER macro. + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/PageAllocation.h: -2009-08-13 Mark Rowe <mrowe@apple.com> +2010-08-03 Nathan Lawrence <nlawrence@apple.com> - Try some more to fix the Windows build. + Reviewed by Gavin Barraclough. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto. + https://bugs.webkit.org/show_bug.cgi?id=43269 -2009-08-13 Mark Rowe <mrowe@apple.com> + Added new allocateAligned methods to PageAllocation. In order to + prevent a regress in performance, the function needs to be inlined. - Try and fix the Windows build. + Additionally, I ported the symbian block allocator to use + PageAllocation and added a new WTF::Bitmap class to support this. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto. + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/AlignedMemoryAllocator.h: Added. + (JSC::AlignedMemory::deallocate): + (JSC::AlignedMemory::base): + (JSC::AlignedMemory::AlignedMemory): + (JSC::AlignedMemoryAllocator::destroy): + (JSC::AlignedMemoryAllocator::allocate): + (JSC::AlignedMemoryAllocator::AlignedMemoryAllocator): + (JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator): + (JSC::AlignedMemoryAllocator::free): + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + (JSC::Heap::freeBlocks): + (JSC::Heap::allocate): + (JSC::Heap::shrinkBlocks): + (JSC::Heap::markConservatively): + (JSC::Heap::clearMarkBits): + (JSC::Heap::markedCells): + * runtime/Collector.h: + (JSC::CollectorHeap::collectorBlock): + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::operator*): + (JSC::LiveObjectIterator::operator++): + (JSC::DeadObjectIterator::operator++): + * wtf/Bitmap.h: Added. + (WTF::Bitmap::get): + (WTF::Bitmap::set): + (WTF::Bitmap::clear): + (WTF::Bitmap::clearAll): + (WTF::Bitmap::advanceToNextFreeBit): + (WTF::Bitmap::count): + (WTF::Bitmap::isEmpty): + (WTF::Bitmap::isFull): + * wtf/PageAllocation.h: + (WTF::PageAllocation::operator UnspecifiedBoolType): + (WTF::PageAllocation::allocateAligned): + (WTF::PageAllocation::reserveAligned): + * wtf/Platform.h: + * wtf/symbian: Removed. + * wtf/symbian/BlockAllocatorSymbian.cpp: Removed. + * wtf/symbian/BlockAllocatorSymbian.h: Removed. -2009-08-13 Darin Adler <darin@apple.com> +2010-08-03 Michael Saboff <msaboff@apple.com> - Reviewed by David Levin. + Reviewed by Gavin Barraclough. - JavaScriptCore tweaks to get ready for the parser arena - https://bugs.webkit.org/show_bug.cgi?id=28243 + Fix for https://bugs.webkit.org/show_bug.cgi?id=43314. The prior code + was using the wrong "length" value to move array contents when adding + space to the beginning of an array for an unshift() or similar + operation. Instead of using m_vectorLength, the length of the + allocated JSValue array, the code was using m_length, the declared + length of the array. These two values do not need to match. - Eliminate dependencies on Nodes.h outside JavaScriptCore, - and cut down on them inside JavaScriptCore. + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSArray.cpp: + (JSC::JSArray::increaseVectorPrefixLength): - Change regular expression parsing to use identifiers as - with other strings we parse. +2010-08-03 Chao-ying Fu <fu@mips.com> - Fix a couple things that are needed to use const Identifier - more, which will be part of the parser arena work. + Reviewed by Gavin Barraclough. - * JavaScriptCore.exp: Resorted and updated. + Fix following https://bugs.webkit.org/show_bug.cgi?id=43089 + (accidentally inverted a compiler version check). - * JavaScriptCore.xcodeproj/project.pbxproj: Changed - CollectorHeapIterator.h to be project-internal. + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitPushNewScope): Added const. - * bytecompiler/BytecodeGenerator.h: Ditto. +2010-08-03 Patrick Gansterer <paroga@paroga.com> - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): Moved this function - here from WebCore. Here is better since it uses so many internals. - Removed unimportant optimization for the no listener case. - * debugger/Debugger.h: Ditto. Also removed unneeded include - and tweaked formatting and comments. + Reviewed by Gavin Barraclough. - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): Call asFunction instead - of doing the unchecked static_cast. - (JSC::DebuggerCallFrame::calculatedFunctionName): Ditto. + Implement DEFINE_STUB_FUNCTION for WinCE. + https://bugs.webkit.org/show_bug.cgi?id=34953 * jit/JITStubs.cpp: - (JSC::op_call_JSFunction): Call isHostFunction on the body rather - than on the JSFunction. - (JSC::vm_lazyLinkCall): Ditto. - (JSC::op_construct_JSConstruct): Ditto. - - * parser/Grammar.y: Changed callers to use new scanRegExp with - out arguments instead of relying on state in the Lexer. And - callers that just want to skip a regular expression to use - skipRegExp. - - * parser/Lexer.cpp: - (JSC::Lexer::scanRegExp): Changed to use out arguments, and to - add a prefix argument so we can add in the "=" character as needed. - Also rewrote to streamline the logic a bit inspired by suggestions - by David Levin. - (JSC::Lexer::skipRegExp): Added. Version of the function above that - does not actually put the regular expression into a string. - (JSC::Lexer::clear): Removed code to clear m_pattern and m_flags. - * parser/Lexer.h: Changed scanRegExp to have out arguments. Added - skipRegExp. Eliminated pattern, flags, m_pattern, and m_flags. - - * parser/NodeConstructors.h: - (JSC::RegExpNode::RegExpNode): Changed to take const Identifier&. - * parser/Nodes.cpp: - (JSC::RegExpNode::emitBytecode): Changed since m_pattern and - m_flags are now Identifier instead of UString. - (JSC::FunctionBodyNode::make): Moved this function here instead - of putting it in the JSFunction.h header. - * parser/Nodes.h: Changed RegExpNode to use Identifier. - - * profiler/Profiler.cpp: - (JSC::Profiler::createCallIdentifier): Changed to use isHostFunction - on the body instead of on the JSFunction object. - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): Ditto. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::isHostFunction): Moved here from header. - (JSC::JSFunction::isHostFunctionNonInline): Added. - (JSC::JSFunction::JSFunction): Removed unneeded initialization of - m_body to 0. - (JSC::JSFunction::setBody): Moved here from header. - - * runtime/JSFunction.h: Removed unneeded includes. Moved private - constructor down to the private section. Made virtual functions - private. Removed unneeded overload of setBody and moved the body - of the function into the .cpp file. Changed assertions to use - the non-inline version of isHostFunction. - - * runtime/PropertySlot.cpp: - (JSC::PropertySlot::functionGetter): Use asFunction instead - of doing the unchecked static_cast. - - * wtf/SegmentedVector.h: - (WTF::SegmentedVector::isEmpty): Added. - -2009-08-13 Mark Rowe <mrowe@apple.com> - - Rubber-stamped by Darin Adler. - - Use the version of operator new that takes a JSGlobalData when allocating FuncDeclNode and FuncExprNode - from within the grammar to prevent these nodes from being leaked. - - * parser/Grammar.y: - -2009-08-13 Simon Hausmann <simon.hausmann@nokia.com> - - Reviewed by Ariya Hidayat. - - Remove the special-case for Qt wrt JSVALUE_32 introduced in - r46709. It must've been a dependency issue on the bot, as - after a manual build all the tests pass on amd64 and ia32. - - * wtf/Platform.h: + (JSC::): + (JSC::DEFINE_STUB_FUNCTION): -2009-08-12 Gabor Loki <loki@inf.u-szeged.hu> +2010-08-02 Gavin Barraclough <barraclough@apple.com> - Reviewed by Gavin Barraclough. + Reviewed by Oliver Hunt. - Add optimize call and property access support for ARM JIT. - https://bugs.webkit.org/show_bug.cgi?id=24986 + Bug 43390 - Do not CRASH if we run out of room for jit code. - For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and - END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure - space for instructions and constants of the named sequence. This - method is vital for those architecture which are using constant pool. + Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated. + The assemblers should pass this through without trying to use it in executableCopy. + Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this. - The 'latePatch' method - which was linked to JmpSrc - is replaced with - a port specific solution (each calls are marked to place their address - on the constant pool). + Change the JIT to throw an exception if allocation fails. + Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path). + Change YARR JIT to fallback to PCRE * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::linkBranch): - (JSC::ARMAssembler::executableCopy): Add extra align for constant pool. - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::JmpSrc::JmpSrc): - (JSC::ARMAssembler::sizeOfConstantPool): - (JSC::ARMAssembler::jmp): - (JSC::ARMAssembler::linkCall): + (JSC::ARMAssembler::executableCopy): * assembler/ARMv7Assembler.h: - * assembler/AbstractMacroAssembler.h: - * assembler/AssemblerBufferWithConstantPool.h: - (JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the - computation of the remaining space. - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branch32): - (JSC::MacroAssemblerARM::nearCall): - (JSC::MacroAssemblerARM::call): - (JSC::MacroAssemblerARM::branchPtrWithPatch): - (JSC::MacroAssemblerARM::ensureSpace): - (JSC::MacroAssemblerARM::sizeOfConstantPool): - (JSC::MacroAssemblerARM::prepareCall): + (JSC::ARMv7Assembler::executableCopy): + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::allocationSuccessful): + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::executableCopy): * assembler/X86Assembler.h: + (JSC::X86Assembler::executableCopy): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initGetByIdSelfList): + (JSC::StructureStubInfo::initGetByIdProtoList): + (JSC::StructureStubInfo::initPutByIdTransition): + * jit/ExecutableAllocator.cpp: + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::allocInternal): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::beginUninterruptedSequence): - (JSC::JIT::endUninterruptedSequence): + (JSC::JIT::compileGetByIdProto): + (JSC::JIT::compileGetByIdSelfList): + (JSC::JIT::compileGetByIdProtoList): + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + (JSC::JIT::compilePutByIdTransition): + (JSC::JIT::compilePatchGetArrayLength): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::emit_op_put_by_id): - -2009-08-12 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Dave Kilzer. - - Disable WTF_USE_JSVALUE32_64 on iPhone for now (support not yet added for ARMv7). - - * wtf/Platform.h: - -2009-08-12 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Maciej Stachoviak. - - Ooops - moved code that had been accidentally added to op_new_func instead of - op_new_func_exp, to where it shoulds be. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * wtf/Platform.h: - -2009-08-12 Ada Chan <adachan@apple.com> + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + (JSC::setupPolymorphicProtoList): + * jit/JITStubs.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::finalize): + * runtime/ExceptionHelpers.cpp: + (JSC::createOutOfMemoryError): + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::compile): - Added workaround for the limitation that VirtualFree with MEM_RELEASE - can only accept the base address returned by VirtualAlloc when the region - was reserved and it can only free the entire region, and not a part of it. +2010-08-03 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt. - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackWin.cpp: - (JSC::MarkStack::releaseStack): - -2009-08-12 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu> - - Reviewed by Ariya Hidayat. - - Build fix: use std::numeric_limits<long long>::min() instead of LLONG_MIN - since LLONG_MIN is not defined in standard c++. - - * runtime/UString.cpp: - (JSC::UString::from): - -2009-08-12 Benjamin Otte <otte@gnome.org> - - Reviewed by Jan Alonzo. - - Buildfix for Gtk platforms debug builds. + Fixed a crash seen on the GTK 64bit buildbot. + + When JSArray is allocated for the vptr stealing hack, it's not allocated + in the heap, so the JSArray constructor can't safely call Heap::heap(). + + Since this was subtle enough to confuse smart people, I've changed JSArray + to have an explicit vptr stealing constructor. - * GNUmakefile.am: Choose MarkStackPosix.cpp or MarkStackWin.cpp - depending on platform. + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + * runtime/JSArray.h: + (JSC::JSArray::): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): -2009-08-12 Simon Hausmann <simon.hausmann@nokia.com> +2010-08-03 Alex Milowski <alex@milowski.com> - Prospective build fix for Mac and 32-bit Windows. + Reviewed by Beth Dakin. - * runtime/UString.cpp: Include wtf/StringExtras.h for snprintf. - (JSC::UString::from): Use %lld instead of %I64d for snprintf - on non-windows platforms. + Changed the ENABLE_MATHML value to enable MathML by default. -2009-08-12 Prasanth Ullattil <prasanth.ullattil@nokia.com> + * Configurations/FeatureDefines.xcconfig: - Reviewed by Simon Hausmann. +2010-08-03 Michael Saboff <msaboff@apple.com> - Fix compile error on 64Bit Windows, when UString::from - is called with an intptr_t. + Reviewed by Gavin Barraclough. - Added new UString::From overload with long long parameter. + Change to keep returned pointer from malloc family functions to + quiet memory leak detect. The pointer is saved in the new m_allocBase + member of the ArrayStorage structure. This fixes the issue found in + https://bugs.webkit.org/show_bug.cgi?id=43229. - Thanks to Holger for the long long idea. + As part of this change, we use m_allocBase when reallocating and + freeing the memory associated with ArrayStorage. - * runtime/UString.cpp: - (JSC::UString::from): - * runtime/UString.h: + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + * runtime/JSArray.h: -2009-08-11 Oliver Hunt <oliver@apple.com> +2010-08-03 Geoffrey Garen <ggaren@apple.com> Reviewed by Mark Rowe. - Minor style fixes. - - * runtime/UString.h: - (JSC::UString::Rep::createEmptyBuffer): - * wtf/FastMalloc.h: - (WTF::TryMallocReturnValue::getValue): - -2009-08-11 Oliver Hunt <oliver@apple.com> + https://bugs.webkit.org/show_bug.cgi?id=43444 + PLATFORM(CF) is false on Windows in JavaScriptCore - Reviewed by Gavin Barraclough. + Moved some PLATFORM(WIN) #defines down into JavaScriptCore. - Make it harder to misuse try* allocation routines - https://bugs.webkit.org/show_bug.cgi?id=27469 + * wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited + from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h + just #undefined that later. - Jump through a few hoops to make it much harder to accidentally - miss null-checking of values returned by the try-* allocation - routines. +2010-08-03 Geoffrey Garen <ggaren@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/UString.cpp: - (JSC::allocChars): - (JSC::reallocChars): - (JSC::expandCapacity): - (JSC::UString::Rep::reserveCapacity): - (JSC::UString::expandPreCapacity): - (JSC::createRep): - (JSC::concatenate): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::append): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::Rep::createEmptyBuffer): - * wtf/FastMalloc.cpp: - (WTF::tryFastZeroedMalloc): - (WTF::tryFastMalloc): - (WTF::tryFastCalloc): - (WTF::tryFastRealloc): - (WTF::TCMallocStats::tryFastMalloc): - (WTF::TCMallocStats::tryFastCalloc): - (WTF::TCMallocStats::tryFastRealloc): - * wtf/FastMalloc.h: - (WTF::TryMallocReturnValue::TryMallocReturnValue): - (WTF::TryMallocReturnValue::~TryMallocReturnValue): - (WTF::TryMallocReturnValue::operator PossiblyNull<T>): - (WTF::TryMallocReturnValue::getValue): - * wtf/Platform.h: - * wtf/PossiblyNull.h: Added. - (WTF::PossiblyNull::PossiblyNull): - (WTF::PossiblyNull::~PossiblyNull): - (WTF::::getValue): + Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since + PLATFORM(CF) is not defined on Windows. + + We'll need to enable the GC activity callback some other way, but this + change should get the build back to normal. -2009-08-11 Gavin Barraclough <barraclough@apple.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Reviewed by NOBODY (build fix part deux). + * runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error + in the future with an explicit error message. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: +2010-08-03 Geoffrey Garen <ggaren@apple.com> -2009-08-11 Gavin Barraclough <barraclough@apple.com> + Try to fix Windows build: update .def file. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: -2009-08-11 Gavin Barraclough <barraclough@apple.com> +2010-08-03 Nathan Lawrence <nlawrence@apple.com> Reviewed by Oliver Hunt. - Restrict use of FuncDeclNode & FuncExprNode to the parser. - https://bugs.webkit.org/show_bug.cgi?id=28209 + https://bugs.webkit.org/show_bug.cgi?id=41318 + GC should reclaim garbage even when new objects are not being allocated rapidly - These objects were also being referenced from the CodeBlock. By changing this - to just retain pointers to FunctionBodyNodes these classes can be restricted to - use during parsing. + Added a callback in JavaScriptCore that gets triggered after an + allocation causes the heap to reset. This is useful for adding a + timer that will trigger garbage collection after the "last" allocation. - No performance impact (or sub-percent progression). + Also needed was to add lock and unlock methods to JSLock that needed + only a JSGlobalData object versus an ExecState object. + * CMakeLists.txt: + * GNUmakefile.am: * JavaScriptCore.exp: - Update symbols. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::mark): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addFunction): - (JSC::CodeBlock::function): - Unify m_functions & m_functionExpressions into a single Vector<RefPtr<FuncExprNode> >. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::addConstant): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - * bytecompiler/BytecodeGenerator.h: - FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - Update to reflect chnages in CodeBlock. + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_put_by_val): + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::reset): + (JSC::Heap::setActivityCallback): + * runtime/Collector.h: + * runtime/GCActivityCallback.cpp: Added. + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::operator()): + * runtime/GCActivityCallback.h: Added. + (JSC::GCActivityCallback::~GCActivityCallback): + (JSC::GCActivityCallback::operator()): + (JSC::GCActivityCallback::GCActivityCallback): + (JSC::DefaultGCActivityCallback::create): + * runtime/GCActivityCallbackCF.cpp: Added. + (JSC::DefaultGCActivityCallbackPlatformData::trigger): + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::operator()): + * runtime/JSLock.cpp: + (JSC::JSLock::JSLock): + * runtime/JSLock.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_func_exp): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - Update to reflect chnages in CodeBlock. +2010-08-02 Kevin Ollivier <kevino@theolliviers.com> - * parser/Grammar.y: - FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes. + [wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp - * parser/NodeConstructors.h: - (JSC::FuncExprNode::FuncExprNode): - (JSC::FuncDeclNode::FuncDeclNode): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::mark): - (JSC::FunctionBodyNode::finishParsing): - * parser/Nodes.h: - (JSC::FunctionBodyNode::ident): - Move m_ident & make methods from FuncDeclNode & FuncExprNode to FunctionBodyNode. + * wscript: - * runtime/JSFunction.h: - (JSC::FunctionBodyNode::make): - Make this method inline (was FuncDeclNode::makeFunction). +2010-08-02 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> -2009-08-11 Oliver Hunt <oliver@apple.com> + Reviewed by Simon Hausmann. - Reviewed by Gavin Barraclough. + [QT] build fix for symbian + https://bugs.webkit.org/show_bug.cgi?id=43234 - Native JSON.stringify does not omit functions - https://bugs.webkit.org/show_bug.cgi?id=28117 + 1) wrong order of passing param's + 2) static_cast complains on symbian so using reinterpret_cast - Objects that are callable should be treated as undefined when - serialising to JSON. + No new tests added. Just a build fix for qt symbian - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendStringifiedValue): + * wtf/PageAllocation.cpp: + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): + (WTF::PageAllocation::reserve): -2009-08-11 Oliver Hunt <oliver@apple.com> +2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> - Reviewed by Geoff Garen. + Reviewed by Simon Fraser. - REGRESSION: Hang/crash in BytecodeGenerator::constRegisterFor loading simple page - https://bugs.webkit.org/show_bug.cgi?id=28169 + Enabling view modes to all platforms + https://bugs.webkit.org/show_bug.cgi?id=37505 - Handle the case where someone has attempted to shadow a property - on the global object with a constant. + Removing ENABLE_WIDGETS_10_SUPPORT flag. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::constRegisterFor): - * parser/Nodes.cpp: - (JSC::ConstDeclNode::emitCodeSingle): + As view mode media feature is not part of widget 1.0 specification + any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use + of this flag was related to view mode media feature implementation in Qt. -2009-08-11 John Gregg <johnnyg@google.com> + * wtf/Platform.h: - Reviewed by Maciej Stachowiak. +2010-07-30 Andy Estes <aestes@apple.com> - Desktop Notifications API - https://bugs.webkit.org/show_bug.cgi?id=25463 + Reviewed by David Kilzer. - Adds ENABLE_NOTIFICATION flag. + Add Xcode support for compiling WebKit against iOS SDKs. + https://bugs.webkit.org/show_bug.cgi?id=42796 + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: - -2009-08-11 Maxime Simon <simon.maxime@gmail.com> - - Reviewed by Eric Seidel. - Modifications on JavaScriptCore to allow Haiku port. - https://bugs.webkit.org/show_bug.cgi?id=28121 +2010-07-30 Dumitru Daniliuc <dumi@chromium.org> - * runtime/Collector.cpp: Haiku doesn't have sys/mman.h, using OS.h instead. - (JSC::currentThreadStackBase): Haiku uses its own threading system. - * wtf/Platform.h: Defining all Haiku platform values. - * wtf/haiku/MainThreadHaiku.cpp: Adding a missing header (NotImplemented.h). + Reviewed by Davin Levin. -2009-08-11 Jessie Berlin <jberlin@apple.com> + Added a yield() function. + https://bugs.webkit.org/show_bug.cgi?id=42843 - Reviewed by Adam Roben. - - Fix windows build. + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + (WTF::yield): + * wtf/ThreadingWin.cpp: + (WTF::yield): + * wtf/gtk/ThreadingGtk.cpp: + (WTF::yield): + * wtf/qt/ThreadingQt.cpp: + (WTF::yield): - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: +2010-07-30 Rafael Antognolli <antognolli@profusion.mobi> -2009-08-11 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + Reviewed by Antonio Gomes. - Reviewed by Tor Arne Vestbø. + [EFL] Add library version and soname to EFL generated libraries and binary. + https://bugs.webkit.org/show_bug.cgi?id=43212 - Buildfix for Qt-win platforms. + Add version and soname to libjavascriptcore.so and libwtf.so in case of + linking as shared libraries, and version to jsc executable. - * JavaScriptCore.pri: Choose MarkStackPosix.cpp or MarkStackWin.cpp depend on platform. + * CMakeLists.txt: + * jsc/CMakeLists.txt: + * wtf/CMakeLists.txt: -2009-08-10 Oliver Hunt <oliver@apple.com> +2010-07-30 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> - Reviewed by NOBODY (And another build fix). + Reviewed by Simon Hausmann. - Add new exports for MSVC + [QT] build fix for symbian + https://bugs.webkit.org/show_bug.cgi?id=43234 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): -2009-08-10 Oliver Hunt <oliver@apple.com> +2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com> - Reviewed by NOBODY (yet another build fix). + Unreviewed, rolling out r64313. + http://trac.webkit.org/changeset/64313 + https://bugs.webkit.org/show_bug.cgi?id=43233 - Remove obsolete entries from MSVC exports file + Some Chromium bots are not happy with it for some unknown + reason. (Requested by dumi on #webkit). + * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-10 Oliver Hunt <oliver@apple.com> - - Add includes needed for non-allinonefile builds - - * runtime/GetterSetter.h: - * runtime/ScopeChain.h: - -2009-08-10 Oliver Hunt <oliver@apple.com> - - Fix export file for last build fix + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + * wtf/ThreadingWin.cpp: + * wtf/gtk/ThreadingGtk.cpp: + * wtf/qt/ThreadingQt.cpp: - * JavaScriptCore.exp: +2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com> -2009-08-10 Oliver Hunt <oliver@apple.com> + Unreviewed, rolling out r64302. + http://trac.webkit.org/changeset/64302 + https://bugs.webkit.org/show_bug.cgi?id=43223 - Hoist page size initialization into platform specific code. + Assertion is bogus (Requested by olliej on #webkit). - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorWin.cpp: - * runtime/MarkStack.h: - (JSC::MarkStack::pageSize): - * runtime/MarkStackPosix.cpp: - (JSC::MarkStack::initializePagesize): - * runtime/MarkStackWin.cpp: - (JSC::MarkStack::initializePagesize): + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putShortUnchecked): + (JSC::AssemblerBuffer::putIntUnchecked): + (JSC::AssemblerBuffer::putInt64Unchecked): + * jit/JITStubs.cpp: + * pcre/pcre_compile.cpp: + (jsRegExpCompile): + * wtf/FastMalloc.cpp: + (WTF::PageHeapAllocator::New): + (WTF::TCMalloc_Central_FreeList::Populate): + * wtf/MD5.cpp: + (WTF::reverseBytes): + (WTF::MD5::addBytes): + (WTF::MD5::checksum): + * wtf/StdLibExtras.h: + * wtf/Vector.h: + (WTF::VectorBuffer::inlineBuffer): + * wtf/qt/StringQt.cpp: + (WebCore::String::String): -2009-08-07 Oliver Hunt <oliver@apple.com> +2010-07-29 Michael Saboff <msaboff@apple.com> Reviewed by Gavin Barraclough. - Stack overflow crash in JavaScript garbage collector mark pass - https://bugs.webkit.org/show_bug.cgi?id=12216 - - Make the GC mark phase iterative by using an explicit mark stack. - To do this marking any single object is performed in multiple stages - * The object is appended to the MarkStack, this sets the marked - bit for the object using the new markDirect() function, and then - returns - * When the MarkStack is drain()ed the object is popped off the stack - and markChildren(MarkStack&) is called on the object to collect - all of its children. drain() then repeats until the stack is empty. - - Additionally I renamed a number of methods from 'mark' to 'markAggregate' - in order to make it more clear that marking of those object was not - going to result in an actual recursive mark. - - * GNUmakefile.am - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::markAggregate): - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::markChildren): - * debugger/DebuggerActivation.h: - * interpreter/Register.h: - * interpreter/RegisterFile.h: - (JSC::RegisterFile::markGlobals): - (JSC::RegisterFile::markCallFrames): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::markAggregate): - (JSC::EvalNode::markAggregate): - (JSC::FunctionBodyNode::markAggregate): - * parser/Nodes.h: - (JSC::ScopeNode::markAggregate): - * runtime/ArgList.cpp: - (JSC::MarkedArgumentBuffer::markLists): - * runtime/ArgList.h: - * runtime/Arguments.cpp: - (JSC::Arguments::markChildren): - * runtime/Arguments.h: - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): - (JSC::Heap::markCurrentThreadConservativelyInternal): - (JSC::Heap::markCurrentThreadConservatively): - (JSC::Heap::markOtherThreadConservatively): - (JSC::Heap::markStackObjectsConservatively): - (JSC::Heap::markProtectedObjects): - (JSC::Heap::collect): - * runtime/Collector.h: - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): - * runtime/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - (JSC::GetterSetter::createStructure): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::markChildren): - * runtime/GlobalEvalFunction.h: - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - * runtime/JSActivation.h: + Changed the handling for removing and adding elements at the front + of an array. The code now keeps a bias that indicates the amount of + JSValue sized holes are prior to the ArrayStorage block. This means + that shift operations are now memmove's of the header part of + the ArrayStorage and unshift operations are similar, but may require a + realloc first to create the space. Similar operations are performed + for special cases of splice and slice. + Also optimized the new Array(size) case so that we don't allocate and + initialize array elements until the JS code starts using elements. + The array growth code is slightly more aggressive for initial growth + based on size growth of any previous array. + + * Configurations/JavaScriptCore.xcconfig: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): * runtime/JSArray.cpp: - (JSC::JSArray::markChildren): + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::getNewVectorLength): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): * runtime/JSArray.h: - * runtime/JSCell.h: - (JSC::JSCell::markCellDirect): - (JSC::JSCell::markChildren): - (JSC::JSValue::markDirect): - (JSC::JSValue::markChildren): - (JSC::JSValue::hasChildren): - (JSC::MarkStack::append): - (JSC::MarkStack::drain): - * runtime/JSFunction.cpp: - (JSC::JSFunction::markChildren): - * runtime/JSFunction.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::markChildren): - * runtime/JSNotAnObject.h: - * runtime/JSONObject.cpp: - (JSC::Stringifier::markAggregate): - (JSC::JSONObject::markStringifiers): - * runtime/JSONObject.h: - * runtime/JSObject.cpp: - (JSC::JSObject::markChildren): - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - * runtime/JSObject.h: - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::markChildren): - * runtime/JSPropertyNameIterator.h: - (JSC::JSPropertyNameIterator::createStructure): - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::create): - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::markChildren): - * runtime/JSStaticScopeObject.h: - * runtime/JSType.h: - (JSC::): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::markChildren): - * runtime/JSWrapperObject.h: - * runtime/MarkStack.cpp: Added. - (JSC::MarkStack::compact): - * runtime/MarkStack.h: Added. - (JSC::): - (JSC::MarkStack::MarkStack): - (JSC::MarkStack::append): - (JSC::MarkStack::appendValues): - (JSC::MarkStack::~MarkStack): - (JSC::MarkStack::MarkSet::MarkSet): - (JSC::MarkStack::pageSize): - - MarkStackArray is a non-shrinking, mmap-based vector type - used for storing objects to be marked. - (JSC::MarkStack::MarkStackArray::MarkStackArray): - (JSC::MarkStack::MarkStackArray::~MarkStackArray): - (JSC::MarkStack::MarkStackArray::expand): - (JSC::MarkStack::MarkStackArray::append): - (JSC::MarkStack::MarkStackArray::removeLast): - (JSC::MarkStack::MarkStackArray::isEmpty): - (JSC::MarkStack::MarkStackArray::size): - (JSC::MarkStack::MarkStackArray::shrinkAllocation): - * runtime/MarkStackPosix.cpp: Added. - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): - * runtime/MarkStackWin.cpp: Added. - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): - - * runtime/ScopeChain.h: - * runtime/ScopeChainMark.h: - (JSC::ScopeChain::markAggregate): - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::mark): - * runtime/Structure.h: - (JSC::Structure::markAggregate): + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::arrayStorage): + (JSC::JSArray::setArrayStorage): + (JSC::JSArray::markChildrenDirect): -2009-08-10 Mark Rowe <mrowe@apple.com> - - Reviewed by Darin Adler. +2010-07-29 Michael Saboff <msaboff@apple.com> - Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot. + Reviewed by Darin Adler. - * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since - we implement the nothrow variants of new and new[]. The nothrow variant of delete is called - explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated - memory being passed to the system allocator to free. + Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes. -2009-08-10 Jan Michael Alonzo <jmalonzo@webkit.org> + * runtime/Collector.h: - [Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug - section. This file is already part of AllInOneFile in Release builds. +2010-07-28 Dumitru Daniliuc <dumi@chromium.org> - * GNUmakefile.am: + Reviewed by David Levin. -2009-08-10 Darin Adler <darin@apple.com> + Added a yield() function. + https://bugs.webkit.org/show_bug.cgi?id=42843 - * wtf/FastMalloc.h: Fix build. + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + (WTF::yield): + * wtf/ThreadingWin.cpp: + (WTF::yield): + * wtf/gtk/ThreadingGtk.cpp: + (WTF::yield): + * wtf/qt/ThreadingQt.cpp: + (WTF::yield): -2009-08-10 Darin Adler <darin@apple.com> +2010-07-29 Michael Saboff <msaboff@apple.com> - Reviewed by Mark Rowe. + Reviewed by Oliver Hunt. - FastMalloc.h has cross-platform code but marked as WinCE-only - https://bugs.webkit.org/show_bug.cgi?id=28160 + Fixed issue where RegExp greedy jit code loops when no input is + consumed. Changed the code to only loop if some input was consumed, + but fall through if we successfully match an alternative that + doesn't consume any input. + https://bugs.webkit.org/show_bug.cgi?id=42664 - 1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is - not platform-specific. - 2) The code tried to override operator delete nothrow, which does not exist. - 3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code - in FastMalloc.cpp checks only if the macro is defined. + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): - * wtf/FastMalloc.h: See above. - * wtf/FastMalloc.cpp: Ditto. +2010-07-29 Gabor Loki <loki@webkit.org> -2009-08-10 Sam Weinig <sam@webkit.org> + Reviewed by Gavin Barraclough. - Reviewed by Anders Carlsson. + Avoid increasing required alignment of target type warning on ARM + https://bugs.webkit.org/show_bug.cgi?id=38045 - Fix an annoying indentation issue. + The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where + sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM: + increases required alignment of target type warnings. + Casting the type of [pointer to Type2] object to void* bypasses the + warning. - * runtime/DateConstructor.cpp: - (JSC::constructDate): + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putShortUnchecked): + (JSC::AssemblerBuffer::putIntUnchecked): + (JSC::AssemblerBuffer::putInt64Unchecked): + * jit/JITStubs.cpp: + * pcre/pcre_compile.cpp: + (jsRegExpCompile): + * wtf/FastMalloc.cpp: + (WTF::PageHeapAllocator::New): + (WTF::TCMalloc_Central_FreeList::Populate): + * wtf/MD5.cpp: + (WTF::reverseBytes): + (WTF::MD5::addBytes): + (WTF::MD5::checksum): + * wtf/StdLibExtras.h: + (reinterpret_cast_ptr): + * wtf/Vector.h: + (WTF::VectorBuffer::inlineBuffer): + * wtf/qt/StringQt.cpp: + (WebCore::String::String): -2009-08-10 Xan Lopez <xlopez@igalia.com> +2010-07-29 Martin Robinson <mrobinson@igalia.com> Unreviewed build fix. - Add new files to makefile. - - * GNUmakefile.am: - -2009-08-10 Simon Hausmann <simon.hausmann@nokia.com> + Include a missing header in the source list to fix 'make dist.' - Fix compilation with the interpreter instead of the JIT by including - PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h. + * GNUmakefile.am: Include missing header. - * runtime/ObjectConstructor.cpp: - -2009-08-09 Oliver Hunt <oliver@apple.com> - - Reviewed by George Staikos. - - JSON.stringify replacer returning undefined does not omit object properties - https://bugs.webkit.org/show_bug.cgi?id=28118 - - Correct behaviour of stringify when using a replacer function that returns - undefined. This is a simple change to move the undefined value check to - after the replacer function is called. This means that the replacer function - is now called for properties with the value undefined, however i've confirmed - that this behaviour is correct. - - In addition I've made the cyclic object exception have a more useful error - message. - - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendStringifiedValue): - -2009-08-08 Oliver Hunt <oliver@apple.com> +2010-07-28 Gavin Barraclough <barraclough@apple.com> - Reviewed by Eric Seidel and Sam Weinig. + Reviewed by Darin Adler. - [ES5] Implement Object.getPrototypeOf - https://bugs.webkit.org/show_bug.cgi?id=28114 + Bug 43162 - Add support for MADV_FREE to PageAllocation. - Implement getPrototypeOf + * wtf/PageAllocation.cpp: + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): - * runtime/CommonIdentifiers.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConsGetPrototypeOf): - * runtime/ObjectConstructor.h: +2010-07-27 Kinuko Yasuda <kinuko@chromium.org> -2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Reviewed by Ojan Vafai. - Reviewed by Eric Seidel. + Add FILE_SYSTEM build flag for FileSystem API + https://bugs.webkit.org/show_bug.cgi?id=42915 - Allow custom memory allocation control for Noncopyable class - https://bugs.webkit.org/show_bug.cgi?id=27879 + * Configurations/FeatureDefines.xcconfig: - Several classes which are inherited from Noncopyable are instantiated by - operator new, so Noncopyable class has been inherited from FastAllocBase. +2010-07-27 Gavin Barraclough <barraclough@apple.com> - * wtf/Noncopyable.h: + Temporarily rolling out http://trac.webkit.org/changeset/64177, + this seems to give QT ARM/Win a headache (specifically, looks + like structure layour differs, objects get too large - + "..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:" + "error: size of array 'dummyclass_fits_in_cell' is negative"). -2009-08-07 George Staikos <george.staikos@torchmobile.com> + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + * runtime/JSArray.cpp: + (JSC::increasedVectorLength): + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): + * runtime/JSArray.h: + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): - Reviewed by Eric Seidel. +2010-07-27 Gavin Barraclough <barraclough@apple.com> - https://bugs.webkit.org/show_bug.cgi?id=27305 - Implement WinCE-specific unicode layer. - Written by George Staikos <george.staikos@torchmobile.com> - with bug fixes by Yong Li <yong.li@torchmobile.com> - refactored by Joe Mason <joe.mason@torchmobile.com> + Speculative build fix for Chromium/Win * wtf/Platform.h: - * wtf/unicode/Unicode.h: - * wtf/unicode/wince/UnicodeWince.cpp: Added. - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::foldCase): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isSpace): - (WTF::Unicode::isLetter): - (WTF::Unicode::isUpper): - (WTF::Unicode::isLower): - (WTF::Unicode::isDigit): - (WTF::Unicode::isPunct): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::direction): - (WTF::Unicode::category): - (WTF::Unicode::decompositionType): - (WTF::Unicode::combiningClass): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::digitValue): - * wtf/unicode/wince/UnicodeWince.h: Added. - (WTF::Unicode::): - (WTF::Unicode::isSeparatorSpace): - (WTF::Unicode::isHighSurrogate): - (WTF::Unicode::isLowSurrogate): - (WTF::Unicode::isArabicChar): - (WTF::Unicode::hasLineBreakingPropertyComplexContext): - (WTF::Unicode::umemcasecmp): - (WTF::Unicode::surrogateToUcs4): - -2009-08-07 Yongjun Zhang <yongjun.zhang@nokia.com> - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=28069 - Add inline to help winscw compiler resolve specialized argument in - templated functions. +2010-07-27 Gavin Barraclough <barraclough@apple.com> - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexString): + Oh! that makes more sense! Maybe C++-style comments are bringing teh bad mojo. -2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu> - - Reviewed by Eric Seidel. - - Allow custom memory allocation control for RegExpObjectData struct - http://bugs.webkit.org/show_bug.cgi?id=26750 - - Inherits RegExpObjectData struct from FastAllocBase because - it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62 - - * runtime/RegExpObject.h: - -2009-08-06 Norbert Leser <norbert.leser@nokia.com> + * wtf/Platform.h: - Reviewed by Darin Adler. +2010-07-27 Gavin Barraclough <barraclough@apple.com> - Updated patch for bug #27059: - Symbian platform always uses little endian encoding, - regardless of compiler. - We need to make sure that we correctly detect EABI architecture - for armv5 targets on Symbian, - where __EABI__ is set but not __ARM_EABI__ + Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O * wtf/Platform.h: -2009-08-06 Adam Barth <abarth@webkit.org> - - Unreviewed revert. +2010-07-27 Michael Saboff <msaboff@apple.com> - http://bugs.webkit.org/show_bug.cgi?id=27879 - - Revert 46877 because it broke GTK. + Reviewed by Gavin Barraclough. - * wtf/Noncopyable.h: + Changed the handling for removing and adding elements at the front + of an array. The code now keeps a bias that indicates the amount of + JSValue sized holes are prior to the ArrayStorage block. This means + that shift operations are now memmove's of the header part of + the ArrayStorage and unshift operations are similar, but may require a + realloc first to create the space. Similar operations are performed + for special cases of splice and slice. + Also optimized the new Array(size) case so that we don't allocate and + initialize array elements until the JS code starts using elements. + The array growth code is slightly more aggressive for initial growth + based on size growth of any previous array. + + * Configurations/JavaScriptCore.xcconfig: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::getNewVectorLength): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): + * runtime/JSArray.h: + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::arrayStorage): + (JSC::JSArray::setArrayStorage): + (JSC::JSArray::markChildrenDirect): -2009-08-06 Gavin Barraclough <barraclough@apple.com> +2010-07-27 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. - Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification. - ( https://bugs.webkit.org/show_bug.cgi?id=27635 ) + Bug 43089 - Cleanup JIT related switched in Platform.h - This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%. - (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled). + The code the enable to JIT checks every permutation of platform & OS individually, but + now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems. It should + be cleaner to just enable by default on these platforms, and explicitly disable on configs + that don't aren't supported. - * bytecode/CodeBlock.cpp: - (JSC::printStructureStubInfo): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/CodeBlock.h: - (JSC::): - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once. - - * bytecode/StructureStubInfo.cpp: - (JSC::StructureStubInfo::deref): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::StructureStubInfo::initGetByIdSelf): - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::initGetByIdSelfList): - (JSC::StructureStubInfo::initGetByIdProtoList): - (JSC::StructureStubInfo::initPutByIdTransition): - (JSC::StructureStubInfo::initPutByIdReplace): - (JSC::StructureStubInfo::seenOnce): - (JSC::StructureStubInfo::setSeen): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetById): - (JSC::BytecodeGenerator::emitPutById): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::unlinkCall): - - Remove the "don't lazy link" stage of calls. + Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO. I always find this + confusing since enabling this "optimization" would be possible, but would be a regression + on x86/x86-64 systems! I think it's clearer to reserve "JIT_OPTIMIZE" for compiler + technologies applicable to all platforms, and make a more optional behaviour like this a + "USE". + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - - Remove the "don't lazy link" stage of calls. - - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSlowCase): - - Remove the "don't lazy link" stage of calls. - - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - (JSC::JITStubs::getPolymorphicAccessStructureListSlot): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - - * jit/JITStubs.h: - (JSC::JITThunks::ctiStringLengthTrampoline): - (JSC::JITStubs::): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - (WTF::PtrAndFlags::operator!): - (WTF::PtrAndFlags::operator->): - - Add ! and -> operators, add constuctor with pointer argument. - -2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu> - - Reviewed by Adam Barth. - - Allow custom memory allocation control for Noncopyable class - https://bugs.webkit.org/show_bug.cgi?id=27879 - - Several classes which inherited from Noncopyable are instantiated by - operator new, so Noncopyable class has been inherited from FastAllocBase. - - * wtf/Noncopyable.h: - -2009-08-06 Mark Rowe <mrowe@apple.com> - - Rubber-stamped by Sam Weinig. - - Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2009-08-06 Mark Rowe <mrowe@apple.com> - - Bring a little order to our otherwise out of control lives. - - * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * wtf/Platform.h: -2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu> +2010-07-27 James Robinson <jamesr@chromium.org> - Reviewed by Darin Adler. + Reviewed by Darin Fisher. - Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct - https://bugs.webkit.org/show_bug.cgi?id=27877 + [chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on + https://bugs.webkit.org/show_bug.cgi?id=43084 - Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by - 'new' in JavaScriptCore/jit/JITStubs.cpp:1229. + This turns USE(GLES2_RENDERING) on for chromium on windows/linux. This causes no + change in behavior, that's all controlled by ENABLE() macros that are currently off. - * bytecode/Instruction.h: + * wtf/Platform.h: -2009-08-05 Zoltan Horvath <hzoltan@inf.u-szeged.hu> +2010-07-23 Helder Correia <heldercorreia@codeaurora.org> Reviewed by Darin Adler. - Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct - https://bugs.webkit.org/show_bug.cgi?id=27875 - - Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by - 'new' in JavaScriptCore/parser/Nodes.cpp:1848. - - * parser/Nodes.h: - -2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Add floating point support for generic ARM port. - https://bugs.webkit.org/show_bug.cgi?id=24986 + Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are + failing. For canvas image data manipulation, the values passed should + be truncated and wrapped. Also fix the canvas-ImageData-behaviour test + to expect wrapping rather than clamping, and add some new checkings. + https://bugs.webkit.org/show_bug.cgi?id=40272 - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::doubleTransfer): - * assembler/ARMAssembler.h: - (JSC::ARM::): - (JSC::ARMAssembler::): - (JSC::ARMAssembler::faddd_r): - (JSC::ARMAssembler::fsubd_r): - (JSC::ARMAssembler::fmuld_r): - (JSC::ARMAssembler::fcmpd_r): - (JSC::ARMAssembler::fdtr_u): - (JSC::ARMAssembler::fdtr_d): - (JSC::ARMAssembler::fmsr_r): - (JSC::ARMAssembler::fsitod_r): - (JSC::ARMAssembler::fmstat): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::): - (JSC::MacroAssemblerARM::supportsFloatingPoint): - (JSC::MacroAssemblerARM::loadDouble): - (JSC::MacroAssemblerARM::storeDouble): - (JSC::MacroAssemblerARM::addDouble): - (JSC::MacroAssemblerARM::subDouble): - (JSC::MacroAssemblerARM::mulDouble): - (JSC::MacroAssemblerARM::convertInt32ToDouble): - (JSC::MacroAssemblerARM::branchDouble): - * jit/JIT.h: - -2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Add JIT support for generic ARM port without optimizations. - https://bugs.webkit.org/show_bug.cgi?id=24986 - - All JIT optimizations are disabled. + * runtime/JSByteArray.h: + (JSC::JSByteArray::setIndex): + (JSC::JSByteArray::JSByteArray): - Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - Signed off by Gabor Loki <loki@inf.u-szeged.hu> +2010-07-27 Gavin Barraclough <barraclough@apple.com> - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::baseIndexTransfer32): - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Imm32::Imm32): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::store32): - (JSC::MacroAssemblerARM::move): - (JSC::MacroAssemblerARM::branch32): - (JSC::MacroAssemblerARM::add32): - (JSC::MacroAssemblerARM::sub32): - (JSC::MacroAssemblerARM::load32): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getBytecodeIndex): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - * jit/JITOpcodes.cpp: - * jit/JITStubs.cpp: - * jit/JITStubs.h: - (JSC::JITStackFrame::returnAddressSlot): - * wtf/Platform.h: + Reviewed by Oliver Hunt. -2009-08-04 Gavin Barraclough <barraclough@apple.com> + Bug 42621 - Add a bump allocator for the YARR interpreter - Rubber Stamped by Oiver Hunt. + The regex engine requires lifo allocation, however currently uses the general purpose + malloc/free memory allocation. A simple bump pointer allocator should provide a lower + overhead allocation solution. - Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests. - https://bugs.webkit.org/show_bug.cgi?id=27874 + When using YARR interpreter, 15% progression on v8-regex. + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + * wtf/BumpPointerAllocator.h: Added. + (WTF::BumpPointerPool::ensureCapacity): + (WTF::BumpPointerPool::alloc): + (WTF::BumpPointerPool::dealloc): + (WTF::BumpPointerPool::operator new): + (WTF::BumpPointerPool::BumpPointerPool): + (WTF::BumpPointerPool::create): + (WTF::BumpPointerPool::shrink): + (WTF::BumpPointerPool::destroy): + (WTF::BumpPointerPool::ensureCapacityCrossPool): + (WTF::BumpPointerPool::deallocCrossPool): + (WTF::BumpPointerAllocator::BumpPointerAllocator): + (WTF::BumpPointerAllocator::~BumpPointerAllocator): + (WTF::BumpPointerAllocator::startAllocator): + (WTF::BumpPointerAllocator::stopAllocator): * yarr/RegexInterpreter.cpp: (JSC::Yarr::Interpreter::allocDisjunctionContext): (JSC::Yarr::Interpreter::freeDisjunctionContext): (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::interpret): + (JSC::Yarr::Interpreter::Interpreter): + (JSC::Yarr::ByteCompiler::compile): + (JSC::Yarr::byteCompileRegex): + * yarr/RegexInterpreter.h: + (JSC::Yarr::BytecodePattern::BytecodePattern): -2009-08-04 Oliver Hunt <oliver@apple.com> - - PPC64 Build fix - - * wtf/Platform.h: - -2009-08-04 Benjamin C Meyer <benjamin.meyer@torchmobile.com> - - Reviewed by Adam Treat - - Explicitly include limits.h header when using INT_MAX and INT_MIN - - * interpreter/Interpreter.cpp +2010-07-26 Gavin Barraclough <barraclough@apple.com> -2009-08-03 Harald Fernengel <harald.fernengel@nokia.com> + Windows build fix from Chromium/GTK build fix! - Reviewed by Darin Adler. + * wtf/PageAllocation.cpp: - Fix compile error for ambigous call to abs() - https://bugs.webkit.org/show_bug.cgi?id=27873 +2010-07-26 Gavin Barraclough <barraclough@apple.com> - Fix ambiguity in abs(long int) call by calling labs() instead + Chromium/GTK build fix - * wtf/DateMath.cpp: replace call to abs() with labs() + * wtf/PageAllocation.cpp: -2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Eric Seidel. +2010-07-26 Gavin Barraclough <barraclough@apple.com> - [Qt] Consolidate common gcc flags to WebKit.pri - https://bugs.webkit.org/show_bug.cgi?id=27934 + Build fix for !Mac platforms. + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: * JavaScriptCore.pro: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: -2009-08-03 Ada Chan <adachan@apple.com> - - Fixed the Tiger build. - - * wtf/FastMalloc.cpp: - -2009-08-03 Ada Chan <adachan@apple.com> - - Reviewed by Darin Adler. - - Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash. - https://bugs.webkit.org/show_bug.cgi?id=27900 - - * wtf/FastMalloc.cpp: - -2009-08-03 Fumitoshi Ukai <ukai@chromium.org> - - Reviewed by Jan Alonzo. - - Fix build break on Gtk/x86_64. - https://bugs.webkit.org/show_bug.cgi?id=27936 - - Use JSVALUE64 for X86_64 LINUX, except Qt. - - * wtf/Platform.h: - -2009-08-02 Xan Lopez <xlopez@igalia.com> - - Fix the GTK+ build. - - * wtf/Platform.h: - -2009-08-02 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously - crash with it enabled. - - * wtf/Platform.h: - -2009-08-02 Geoffrey Garen <ggaren@apple.com> - - Qt build fix. - - Added JSAPIValueWrapper.cpp to the build. - - * JavaScriptCore.pri: - -2009-08-02 Geoffrey Garen <ggaren@apple.com> - - Windows build fix. - - Exported symbols for JSAPIValueWrapper. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-08-02 Geoffrey Garen <ggaren@apple.com> - - GTK build fix. - - * jit/JITStubs.cpp: #include <stdarg.h>, for a definition of va_start. - -2009-08-02 Geoffrey Garen <ggaren@apple.com> - - Qt build fix. - - * runtime/Collector.cpp: #include <limits.h>, for a definition of ULONG_MAX. - -2009-08-02 Geoffrey Garen <ggaren@apple.com> - - Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject, - and JSImmediate::toThisObject, and removed their exported symbols. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * runtime/JSImmediate.cpp: - * runtime/JSImmediate.h: - -2009-08-02 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Mark Rowe. +2010-07-26 Gavin Barraclough <barraclough@apple.com> - Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64). + Reviewed by Oliver Hunt. - * wtf/Platform.h: + Bug 43009 - Abstract out page allocation from executable allocators -2009-08-02 Kevin Ollivier <kevino@theolliviers.com> + It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. - Reviewed by Jan Alonzo. + In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory. + I think this will match current behaviour for the next client we will want to port across (RegisterFile & + Collector). - Script for building the JavaScriptCore library for wx. - https://bugs.webkit.org/show_bug.cgi?id=27619 + * CMakeListsEfl.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: Removed. + * jit/ExecutableAllocatorSymbian.cpp: Removed. + * jit/ExecutableAllocatorWin.cpp: Removed. + * wscript: + * wtf/PageAllocator.cpp: Added. + (WTF::protection): + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): + (WTF::PageAllocator::allocate): + (WTF::PageAllocator::reserve): + (WTF::PageAllocator::deallocate): + (WTF::PageAllocator::pagesize): + * wtf/PageAllocator.h: Added. + (WTF::PageAllocation::PageAllocation): + (WTF::PageAllocation::base): + (WTF::PageAllocation::size): + (WTF::PageAllocation::chunk): + (WTF::PageAllocation::operator!): + (WTF::PageAllocator::): + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry! + + * CMakeListsEfl.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: Added. + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocatorSymbian.cpp: Added. + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocatorWin.cpp: Added. + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * wscript: + * wtf/PageAllocation.cpp: Removed. + * wtf/PageAllocation.h: Removed. - * wscript: Added. +2010-07-26 Gavin Barraclough <barraclough@apple.com> -2009-08-02 Yong Li <yong.li@torchmobile.com> + Speculative !debug build fix II. - Reviewed by George Staikos. + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): - DateMath depends on strftime and localtime, which need to be imported manually on WinCE - https://bugs.webkit.org/show_bug.cgi?id=26558 +2010-07-26 Gavin Barraclough <barraclough@apple.com> - * wtf/DateMath.cpp: + Speculative !debug build fix. -2009-08-01 David Kilzer <ddkilzer@apple.com> + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): - wtf/Threading.h: added include of Platform.h +2010-07-26 Gavin Barraclough <barraclough@apple.com> - Reviewed by Mark Rowe. + Reviewed by Oliver Hunt. - * wtf/Threading.h: Added #include "Platform.h" since this header - uses PLATFORM() and other macros. + Bug 43009 - Abstract out page allocation from executable allocators -2009-08-01 Mark Rowe <mrowe@apple.com> + It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. - Rubber-stamped by Oliver Hunt. + In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory. + I think this will match current behaviour for the next client we will want to port across (RegisterFile & + Collector). - Roll out r46668 as it was misinformed. ScopeChain is only used with placement new. + * CMakeListsEfl.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: Removed. + * jit/ExecutableAllocatorSymbian.cpp: Removed. + * jit/ExecutableAllocatorWin.cpp: Removed. + * wscript: + * wtf/PageAllocator.cpp: Added. + (WTF::protection): + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): + (WTF::PageAllocator::allocate): + (WTF::PageAllocator::reserve): + (WTF::PageAllocator::deallocate): + (WTF::PageAllocator::pagesize): + * wtf/PageAllocator.h: Added. + (WTF::PageAllocation::PageAllocation): + (WTF::PageAllocation::base): + (WTF::PageAllocation::size): + (WTF::PageAllocation::chunk): + (WTF::PageAllocation::operator!): + (WTF::PageAllocator::): + +2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> - * runtime/ScopeChain.h: + Reviewed by Kenneth Rohde Christiansen. -2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() - Allow custom memory allocation control for JavaScriptCore's HashMap class - http://bugs.webkit.org/show_bug.cgi?id=27871 + This ensures that long-running JavaScript (for example due to a modal alert() dialog), + will not trigger a deferred load after only 500ms (the default tokenizer delay) while + still giving a reasonable timeout (10 seconds) to prevent deadlock. - Inherits HashMap class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148. + https://bugs.webkit.org/show_bug.cgi?id=29381 - * wtf/RefPtrHashMap.h: - (WTF::): + * runtime/TimeoutChecker.h: Add getter for the timeout interval -2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu> +2010-07-25 Patrick Gansterer <paroga@paroga.com> - Allow custom memory allocation control for JavaScriptCore's ScopeChain class - https://bugs.webkit.org/show_bug.cgi?id=27834 + Reviewed by Kent Tamura. - Inherits ScopeChain class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109. + [WINCE] Buildfix for JSC in release mode + https://bugs.webkit.org/show_bug.cgi?id=42934 - * runtime/ScopeChain.h: + * jsc.cpp: Don't use __try on WinCE. -2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu> +2010-07-24 Patrick Gansterer <paroga@paroga.com> Reviewed by Darin Adler. - Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct - https://bugs.webkit.org/show_bug.cgi?id=27833 - - Inherits RegExpConstructorPrivate class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152. + [MSVC] Ensure 4 byte alignment on ARM + https://bugs.webkit.org/show_bug.cgi?id=42935 - * runtime/RegExpConstructor.cpp: + * jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame. -2009-07-31 Yong Li <yong.li@torchmobile.com> +2010-07-24 Patrick Gansterer <paroga@paroga.com> - Reviewed by George Staikos. + Reviewed by Darin Adler. - Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER - currentSystemTime taken from older WebKit; currentTime written by Yong Li <yong.li@torchmobile.com>; cleanup by Joe Mason <joe.mason@torchmobile.com> - https://bugs.webkit.org/show_bug.cgi?id=27848 + [WINCE] Cleanup defines in Platform.h + https://bugs.webkit.org/show_bug.cgi?id=42933 - * wtf/CurrentTime.cpp: - (WTF::currentSystemTime): get current time with GetCurrentFT - (WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount * wtf/Platform.h: -2009-07-31 Ada Chan <adachan@apple.com> - - Fixes the Windows release-PGO build. +2010-07-23 Rafael Antognolli <antognolli@profusion.mobi> - Reviewed by Jon Honeycutt. + Reviewed by Antonio Gomes. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread(). - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build. - -2009-07-31 Zoltan Horvath <hzoltan@inf.u-szeged.hu> - - Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp - https://bugs.webkit.org/show_bug.cgi?id=27874 + [EFL] Cleanup glib support (make it optional) + https://bugs.webkit.org/show_bug.cgi?id=42480 - Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::allocDisjunctionContext): - (JSC::Yarr::Interpreter::freeDisjunctionContext): - (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): + Remove gobject/GRefPtr.cpp if not using soup/glib. -2009-07-30 Xan Lopez <xlopez@igalia.com> + * wtf/CMakeListsEfl.txt: - Reviewed by Jan Alonzo. +2010-07-23 Patrick Gansterer <paroga@paroga.com> - Fix compiler warning. + Reviewed by Adam Roben. - GCC does not like C++-style comments in preprocessor directives. + [WINCE] Implement TCSpinLock. + https://bugs.webkit.org/show_bug.cgi?id=41792 - * wtf/Platform.h: + Implement the SpinLock with InterlockedExchange from the Windows API. -2009-07-30 John McCall <rjmccall@apple.com> + * wtf/TCSpinLock.h: + (TCMalloc_SpinLock::Lock): + (TCMalloc_SpinLock::Unlock): + (TCMalloc_SpinLock::IsHeld): + (TCMalloc_SpinLock::Init): + (TCMalloc_SlowLock): - Reviewed by Gavin Barraclough. +2010-07-22 Csaba Osztrogonác <ossy@webkit.org> - Optimize the X86_64 trampolines: avoid the need for filler arguments - and move the stub-args area closer to the stack pointer. + Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build. - * jit/JIT.h: adjust patch offsets because of slight code-size change - * jit/JITCode.h: - (JSC::JITCode::execute): don't pass filler args * jit/JITStubs.cpp: - (ctiTrampoline): (X86_64): push args onto stack, use args directly - (ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement - (ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement * jit/JITStubs.h: - (JITStackFrame): (X86_64): move args area earlier - (ctiTrampoline): remove filler args from prototype - -2009-07-30 Gavin Barraclough <barraclough@apple.com> - Temporarily revert r46618 since this is b0rking on Linux. +2010-07-22 Gavin Barraclough <barraclough@apple.com> -2009-07-23 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. + Eeeep! r63947 hosed all non-x86 builds! - Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification. - ( https://bugs.webkit.org/show_bug.cgi?id=27635 ) - - This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%. - (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled). - - * bytecode/CodeBlock.cpp: - (JSC::printStructureStubInfo): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/CodeBlock.h: - (JSC::): - (JSC::CallLinkInfo::seenOnce): - (JSC::CallLinkInfo::setSeen): - (JSC::MethodCallLinkInfo::seenOnce): - (JSC::MethodCallLinkInfo::setSeen): - - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once. - - * bytecode/StructureStubInfo.cpp: - (JSC::StructureStubInfo::deref): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. - - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::StructureStubInfo): - (JSC::StructureStubInfo::initGetByIdSelf): - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::initGetByIdSelfList): - (JSC::StructureStubInfo::initGetByIdProtoList): - (JSC::StructureStubInfo::initPutByIdTransition): - (JSC::StructureStubInfo::initPutByIdReplace): - (JSC::StructureStubInfo::seenOnce): - (JSC::StructureStubInfo::setSeen): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetById): - (JSC::BytecodeGenerator::emitPutById): - - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. + * jit/JITStubs.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::unlinkCall): - - Remove the "don't lazy link" stage of calls. +2010-07-22 Gavin Barraclough <barraclough@apple.com> - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - - Remove the "don't lazy link" stage of calls. + Reviewed by Oliver Hunt. - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSlowCase): - - Remove the "don't lazy link" stage of calls. + Bug 42818 - [Qt] REGRESSION(63348): jsc is broken + Speculative fix, need fastcall conventions on Qt/Win. * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - (JSC::JITStubs::getPolymorphicAccessStructureListSlot): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - * jit/JITStubs.h: - (JSC::JITThunks::ctiStringLengthTrampoline): - (JSC::JITStubs::): - - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. - - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::PtrAndFlags): - (WTF::PtrAndFlags::operator!): - (WTF::PtrAndFlags::operator->): - - Add ! and -> operators, add constuctor with pointer argument. -2009-07-30 Geoffrey Garen <ggaren@apple.com> +2010-07-22 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. - Fixed failing tests seen on Windows buildbot. + Do more constant folding + https://bugs.webkit.org/show_bug.cgi?id=42867 - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): Use "int" instead of "bool" to guarantee a 32-bit result, - regardless of compiler. gcc on mac uses 32-bit values for bool, - but gcc on linux and MSVC on Windows use 8-bit values. + Constant fold a few more operations. SunSpider says this is + a win but I suspect that's just code motion at play. -2009-07-30 Geoffrey Garen <ggaren@apple.com> + * parser/ASTBuilder.h: + (JSC::ASTBuilder::makeModNode): + (JSC::ASTBuilder::makeURightShiftNode): + (JSC::ASTBuilder::makeBitOrNode): + (JSC::ASTBuilder::makeBitAndNode): + (JSC::ASTBuilder::makeBitXOrNode): + (JSC::ASTBuilder::makeBinaryNode): - Windows build fix: added missing symbols on Windows. +2010-07-22 Kent Hansen <kent.hansen@nokia.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by Kent Tamura. -2009-07-30 Geoffrey Garen <ggaren@apple.com> + Error properties of the Global Object are missing the DontEnum attribute + https://bugs.webkit.org/show_bug.cgi?id=28771 - Windows build fix: removed stale symbols on Windows. + Add the attributes to become spec compliant. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): -=== End merge of nitro-extreme branch 2009-07-30 === +2010-07-20 Steve Falkenburg <sfalken@apple.com> -2009-07-20 Geoffrey Garen <ggaren@apple.com> + Reviewed by Adam Roben. - Fixed a post-review typo in r46066 that caused tons of test failures. + WebKit on Windows should build optionally with an unversioned ICU DLL + https://bugs.webkit.org/show_bug.cgi?id=42722 + <rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU - SunSpider reports no change. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid - uninitialized members at the end. - -2009-07-20 Geoffrey Garen <ggaren@apple.com> - - Windows WebKit build fix: Added some missing exports. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-17 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Get the branch working on windows. - https://bugs.webkit.org/show_bug.cgi?id=27391 + Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh. + Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API + should be namespaced with the current ICU version number. Proper value is determined + by checking for the presence of libicuuc.lib, the unversioned copy of ICU. - SunSpider says 0.3% faster. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated - MSVC export lists to fix linker errors. + To get the proper value for U_DISABLE_RENAMING into all source files, we force + the include of ICUVersion.h (our generated header) via the compiler options. + + Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib) + we copy the ICU lib to an intermediate location under obj with a common name. This + allows us to link properly with either without adding a new build configuration. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed - new / old project files. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + Copy ICU libs into a common location with a common name. + Add additional library search path to pick up icu lib. + Change ICU library filename specified to linker. + Add forced include of ICUVersion.h. + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h. + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + Copy ICU libs into a common location with a common name. + Add additional library search path to pick up icu lib. + Change ICU library filename specified to linker. + Add forced include of ICUVersion.h. + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + Copy ICU libs into a common location with a common name. + Add additional library search path to pick up icu lib. + Change ICU library filename specified to linker. + Add forced include of ICUVersion.h. - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell - MSVC that these structures represent actual memory layout, and should not be - automatically aligned. Changed the return value load to load a 64bit quantity - into the canonical registers. +2010-07-20 Steve Falkenburg <sfalken@apple.com> - * jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because - it's needed by more than just the JIT, and it supplements a standard library - macro (offsetof). + Re-save vsprops files after no-op edits in Visual Studio + to fix manual edit issues. - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed - cast to resolve an MSVC warning. +2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> - * jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures - represent actual memory layout, and should not be automatically aligned. + Reviewed by Steve Block. - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since - memset_pattern8 is not portable. (I verified that this version of the loop - gives the best performance / generated code in GCC.) + Need to be able to configure Geolocation policy regarding user permissions + https://bugs.webkit.org/show_bug.cgi?id=42068 - * runtime/JSObject.h: - (JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET -- - OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a - definition in winnt.h.) + If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy + by default - * runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds. + * wtf/Platform.h: - * runtime/JSValue.h: - (JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values. - (GCC doesn't seem to care one way or the other.) - - * wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a - while ago to resolve a conflict with winnt.h. I can't remember if it's truly - still needed, but what the heck. +2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com> - * wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here. + Unreviewed, rolling out r63742. + http://trac.webkit.org/changeset/63742 + https://bugs.webkit.org/show_bug.cgi?id=42641 -2009-07-06 Geoffrey Garen <ggaren@apple.com> + Broke Leopard Intel build. (Requested by bbandix on #webkit). - Reviewed by Sam Weinig (?). - - Fixed an assertion seen during the stress test. - - Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly, - not all constants get folded. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - -2009-07-06 Geoffrey Garen <ggaren@apple.com> + * wtf/Platform.h: - Reviewed by Sam Weinig. - - Include op_convert_this in result caching. - - No change on SunSpider or v8. +2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_convert_this): + Reviewed by Steve Block. - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so - to maintain the result caching contract that { tag, payload } can be - found in { regT1, regT0 }. + Need to be able to configure Geolocation policy regarding user permissions + https://bugs.webkit.org/show_bug.cgi?id=42068 -2009-07-06 Geoffrey Garen <ggaren@apple.com> + If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy + by default - Reviewed by Sam Weinig. - - Implemented result chaining. + * wtf/Platform.h: - 1% faster on SunSpider. 4%-5% faster on v8. - - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::move): - * assembler/X86Assembler.h: - (JSC::X86Assembler::movl_rr): Added an optimization to eliminate - no-op mov instructions, to simplify chaining. +2010-07-19 Dirk Schulze <krit@webkit.org> - * jit/JIT.cpp: - (JSC::JIT::JIT): - * jit/JIT.h: Added data members and helper functions for recording - chained results. We record both a mapping from virtual to machine register - and the opcode for which the mapping is valid, to help ensure that the - mapping isn't used after the mapped register has been stomped by other - instructions. + Reviewed by Nikolas Zimmermann. - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): Chain function call results. + SVG CleanUp of SVGPathData parsing + https://bugs.webkit.org/show_bug.cgi?id=41410 - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadTag): - (JSC::JIT::emitLoadPayload): - (JSC::JIT::emitLoad): - (JSC::JIT::emitLoad2): - (JSC::JIT::isLabeled): - (JSC::JIT::map): - (JSC::JIT::unmap): - (JSC::JIT::isMapped): - (JSC::JIT::getMappedPayload): - (JSC::JIT::getMappedTag): Use helper functions when loading virtual - registers into machine registers, in case the loads can be eliminated - by chaining. + Added piOverTwo to MathExtras. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_mov): - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_catch): Chain results from these opcodes. + * wtf/MathExtras.h: - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to - avoid stomping a chained result. +2010-07-19 Mike Moretti <mike.moretti@nokia.com> - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_get_by_id): Chain results from these opcodes. + Reviewed by Laszlo Gombos. - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate - chaining. + [Symbian] Build fix after r63404. - (JSC::JITStubCall::call): Unmap all mapped registers, since our callee - stub might stomp them. + Implement isValid() function for the Symbian executable allocator. -2009-07-01 Sam Weinig <sam@webkit.org> + * jit/ExecutableAllocatorSymbian.cpp: + (JSC::ExecutableAllocator::isValid): - Reviewed by Gavin Barraclough. +2010-07-19 Chris Marrin <cmarrin@apple.com> - Don't reload values in emitBinaryDoubleOp. + Reviewed by Darin Adler. - SunSpider reports a 0.6% progression. + https://bugs.webkit.org/show_bug.cgi?id=42118 + Disable WebGL on Leopard for now. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitBinaryDoubleOp): + LayoutTests fail on some graphics hardware on Leopard because one of the features we use, + GL_ARB_framebuffer_object, is not universally available in Leopard like it is in + SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a + software OpenGL driver on machines without this support. -2009-07-01 Sam Weinig <sam@webkit.org> + * Configurations/FeatureDefines.xcconfig: - Reviewed by Geoffrey Garen. +2010-07-16 Darin Adler <darin@apple.com> - Convert op_div to load op1 and op2 up front. + Reviewed by Sam Weinig. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_div): + Use OwnPtr for CodeBlock objects + https://bugs.webkit.org/show_bug.cgi?id=42490 -2009-07-01 Sam Weinig <sam@webkit.org> + * runtime/Executable.cpp: + (JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline. + Eliminated the code that used to initialize the raw pointer since it's now + an OwnPtr. + (JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here. + (JSC::ProgramExecutable::ProgramExecutable): Ditto. + (JSC::ProgramExecutable::~ProgramExecutable): Ditto. + (JSC::FunctionExecutable::FunctionExecutable): Ditto. + (JSC::FunctionExecutable::~FunctionExecutable): Ditto. + (JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get. + (JSC::ProgramExecutable::compileInternal): Ditto. + (JSC::FunctionExecutable::compileForCallInternal): Ditto. + (JSC::FunctionExecutable::compileForConstructInternal): Ditto. + (JSC::FunctionExecutable::recompile): Use clear instead of delete followed + by assignment of 0. + + * runtime/Executable.h: Moved constructors to the cpp file and changed + raw pointers to OwnPtr. + +2010-07-19 Lucas De Marchi <lucas.demarchi@profusion.mobi> - Reviewed by Geoffrey Garen. + Reviewed by Kenneth Rohde Christiansen. - Don't emit code in emitBinaryDoubleOp if code is unreachable, observable - via an empty (unlinked) jumplist passed in. This only effects op_jnless - and op_jnlesseq at present. + [EFL] Fix build on 64-bit systems. According to + JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which + needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build + system. + https://bugs.webkit.org/show_bug.cgi?id=42559 - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emitBinaryDoubleOp): + * CMakeListsEfl.txt: add missing file for x86_64. -2009-07-01 Geoffrey Garen <ggaren@apple.com> +2010-07-16 Leandro Pereira <leandro@profusion.mobi> - Reviewed by Sam Weinig. + [EFL] Unreviewed build system cleanup. - Converted op_mod to put { tag, payload } in { regT1, regT0 }, and - tidied up its constant case. - - SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod - shows a 12% speedup, and the SunSpider test that uses op_mod most should - benefit a lot from result caching in the end, since it almost always - performs (expression) % constant. + Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from + root CMakeLists.txt to the platform CMakeLists.txt. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): + * CMakeLists.txt: + * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp. -2009-06-30 Sam Weinig <sam@webkit.org> +2010-07-16 Oliver Hunt <oliver@apple.com> Reviewed by Geoffrey Garen. - Converted some more arithmetic ops to put { tag, payload } in - { regT1, regT0 }. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - -2009-06-30 Geoffrey Garen <ggaren@apple.com> + ES5 allows use of reserved words as IdentifierName + https://bugs.webkit.org/show_bug.cgi?id=42471 - Reviewed by Sam Weinig. - - Converted some more arithmetic ops to put { tag, payload } in - { regT1, regT0 }, and added a case for subtract constant. - - SunSpider says no change. v8 says 0.3% slower. + Modify the lexer to allow us to avoid identifying reserved + words in those contexts where they are valid identifiers, and + we know it's safe. Additionally tag the reserved word tokens + so we can easily identify them in those cases where we can't + guarantee that we've skipped reserved word identification. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSub32Constant): - (JSC::JIT::emitSlow_op_sub): + * parser/JSParser.cpp: + (JSC::JSParser::next): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseMemberExpression): + * parser/JSParser.h: + (JSC::): + * parser/Lexer.cpp: + (JSC::Lexer::lex): + * parser/Lexer.h: + (JSC::Lexer::): -2009-06-30 Gavin Barraclough <barraclough@apple.com> +2010-07-16 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. - Remove more uses of addressFor(), load double constants directly from - the constantpool in the CodeBlock, rather than from the register file. + clang++ build fixes for JavaScriptCore and WebCore + https://bugs.webkit.org/show_bug.cgi?id=42478 - * jit/JITArithmetic.cpp: - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitBinaryDoubleOp): - -2009-06-30 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Fixed a bug in postfix ops, where we would treat x = x++ and x = x-- - as a no-op, even if x were not an int, and the ++/-- could have side-effects. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): + * runtime/RegExpKey.h: + (JSC::operator==): + Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL. -2009-06-30 Geoffrey Garen <ggaren@apple.com> +2010-07-16 Anders Carlsson <andersca@apple.com> - Reviewed by Sam Weinig. - - Converted some arithmetic ops to put { tag, payload } in - { regT1, regT0 }. - - SunSpider says 0.7% faster. v8 says no change. + Reviewed by David Levin. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emit_op_bitxor): - * jit/JITInlineMethods.h: - (JSC::JIT::isOperandConstantImmediateInt): - (JSC::JIT::getOperandConstantImmediateInt): + Really add WARN_UNUSED_RESULT to leakRef + https://bugs.webkit.org/show_bug.cgi?id=42464 -2009-06-30 Gavin Barraclough <barraclough@apple.com> + * wtf/PassRefPtr.h: + (WTF::PassRefPtr::): + (WTF::NonNullPassRefPtr::): + Put the WARN_UNUSED_RESULT attribute at the right place. - Reviewed by Sam Weinig. + * wtf/RetainPtr.h: + (WTF::RetainPtr::releaseRef): + Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need + to be fixed first. - Start removing cases of addressFor(). +2010-07-15 Victor Wang <victorw@chromium.org> - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadDouble): - (JSC::JIT::emitLoadInt32ToDouble): - (JSC::JIT::emitStoreDouble): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): + Reviewed by David Levin. -2009-06-30 Geoffrey Garen <ggaren@apple.com> + [Chromium] Disable c4291 for chromium windows multi dll build. - Rolled back in my last patch with regression fixed. + https://bugs.webkit.org/show_bug.cgi?id=42177 - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): + * JavaScriptCore.gyp/JavaScriptCore.gyp: -2009-06-30 Geoffrey Garen <ggaren@apple.com> +2010-07-15 Geoffrey Garen <ggaren@apple.com> - Rolled out my last patch because it was a 2% SunSpider regression. + Reviewed by Maciej Stachowiak. - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): + Crash entering mail.yahoo.com + https://bugs.webkit.org/show_bug.cgi?id=42394 + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the + identifier we're resolving is not a local variable, registerFor returns + NULL. -2009-06-30 Geoffrey Garen <ggaren@apple.com> + * bytecompiler/NodesCodegen.cpp: + (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I + noticed this while working on it: No need to NULL-check returnNode, + since an early return has already done so. - Reviewed by Gavin "Sam Weinig" Barraclough. - - Standardized the rest of our opcodes to put { tag, payload } in - { regT1, regT0 } where possible. +2010-07-15 Martin Robinson <mrobinson@igalia.com> - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): + Reviewed by Oliver Hunt. -2009-06-30 Gavin Barraclough <barraclough@apple.com> + [GTK] Simplify the distribution step + https://bugs.webkit.org/show_bug.cgi?id=42414 - Reviewed by Geoffrey Garen. + * GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead + of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list. + Refer to create_hash_table and create_regexp_tables directly, as is the + behavior with other code generation scripts. - Replace calls to store32(tagFor()) and store32(payloadFor()) - with emitStoreInt32(), emitStoreBool(), and emitStoreCell(). +2010-07-15 Oliver Hunt <oliver@apple.com> - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitBitAnd32Constant): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emitBitOr32Constant): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emitBitXor32Constant): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSub32ConstantLeft): - (JSC::JIT::emitSub32ConstantRight): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emit_op_div): - (JSC::JIT::emit_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::emit_op_load_varargs): - * jit/JITInlineMethods.h: - (JSC::JIT::emitStoreInt32): - (JSC::JIT::emitStoreCell): - (JSC::JIT::emitStoreBool): - (JSC::JIT::emitStore): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_not): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - * jit/JITStubCall.h: - (JSC::JITStubCall::call): + Reviewed by Geoff Garen. -2009-06-30 Geoffrey Garen <ggaren@apple.com> + Fix dumping of op_put_by_id. - Reviewed by Sam Weinig. - - Standardized the rest of the property access instructions to put { tag, - payload } in { regT1, regT0 }. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printPutByIdOp): - Small v8 speedup, 0.2% SunSpider slowdown. +2010-07-15 Zoltan Herczeg <zherczeg@webkit.org> - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoad): - (JSC::JIT::emitLoad2): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::patchPutByIdReplace): + Reviewed by Darin Adler. -2009-06-29 Sam Weinig <sam@webkit.org> + Refactoring some parts of the lexer + https://bugs.webkit.org/show_bug.cgi?id=41845 - Reviewed by Gavin Barraclough. + This patch is a precursor of refactoring the identifier + parsing, which currently slows down the lexer, and not + ready for landing. This patch contains those sources, + which does not slow down the lexer (mainly style changes). - Various cleanups. - - Use fpRegT* instead of X86::xmm*. - - Use a switch statement in emitBinaryDoubleOp instead of a bunch of - if/elses. + SunSpider: no change (529.4ms to 528.7ms) + --parse-only: no change (31.0ms to 31.2ms) - * jit/JITArithmetic.cpp: - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): + * parser/Lexer.cpp: + (JSC::isIdentStart): using typesOfASCIICharacters to determine + whether the current character is in identifier start + (JSC::isIdentPart): using typesOfASCIICharacters to determine + whether the current character is in identifier part + (JSC::Lexer::parseString): style fix + (JSC::Lexer::lex): removing the else after the main which + which reduces code duplication -2009-06-29 Sam Weinig <sam@webkit.org> +2010-07-15 Mark Rowe <mrowe@apple.com> - Reviewed by Geoffrey Garen. + Update the sorting in the Xcode project files. - Add inline code dealing with doubles for op_jfalse and op_jtrue. + * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::): - (JSC::MacroAssemblerX86Common::zeroDouble): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): +2010-07-14 Oliver Hunt <oliver@apple.com> -2009-06-28 Geoffrey Garen <ggaren@apple.com> + Reviewed by Gavin Barraclough. - Reviewed by Sam Weinig. + Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails + https://bugs.webkit.org/show_bug.cgi?id=42310 - Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }. - - SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization - this enables will win much more than that back. + Add some null checks to deal with the Fixed VM allocator failing + to get the requested executable region, delay the creation of the + JITStubs in JSGlobalData until after we know whether we're using + the JIT. + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::ExecutableAllocator): + (JSC::ExecutableAllocator::poolForSize): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::ExecutableAllocator::isValid): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocatorWin.cpp: + (JSC::ExecutableAllocator::isValid): * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::linkCall): + (JSC::JIT::linkConstruct): * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compileGetByIdSlowCase): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2009-06-26 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Maciej Stachowiak. - - Standardized op_call to put { tag, payload } in { regT1, regT0 }. - - SunSpider and v8 report no change. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::compileCTIMachineTrampolines): + (JSC::JIT::compileCTINativeCall): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): (JSC::JIT::compileOpCallVarargs): (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::tryCacheGetByID): + (JSC::JITThunks::hostFunctionStub): + * jit/ThunkGenerators.cpp: + (JSC::charCodeAtThunkGenerator): + (JSC::charAtThunkGenerator): + (JSC::fromCharCodeThunkGenerator): + (JSC::sqrtThunkGenerator): + (JSC::powThunkGenerator): + * runtime/Executable.h: + (JSC::NativeExecutable::create): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::getHostFunction): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::getCTIStub): + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): -2009-06-26 Sam Weinig <sam@webkit.org> +2010-07-14 Gavin Barraclough <barraclough@apple.com> - Reviewed by Geoffrey Garen. + Speculative Qt/Windows build fix. - Handle multiplying by zero a little better by - inlining the case that both operands are non-negative - into the slowpath. + * jit/JITStubs.h: - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branchOr32): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): +2010-07-14 Gavin Barraclough <barraclough@apple.com> -2009-06-25 Geoffrey Garen <ggaren@apple.com> + Reviewed by Oliver Hunt. - Reviewed by Sam Weinig. - - Optimize x++ to ++x inside for loops. - - Sadly, no measurable speedup, but this should help with result chaining. + https://bugs.webkit.org/show_bug.cgi?id=42280 + JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it! - * parser/Nodes.cpp: - (JSC::ForNode::emitBytecode): + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::restoreArgumentReferenceForTrampoline): + * jit/JITStubs.cpp: + * jit/JITStubs.h: + * wtf/Platform.h: -2009-06-25 Geoffrey Garen <ggaren@apple.com> +2010-07-14 Oliver Hunt <oliver@apple.com> - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. + RS=Geoff Garen. - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_bitnot): - (JSC::JIT::emit_op_post_inc): + Guard the CF path of interpreter vs. jit selection with PLATFORM(CF) -2009-06-25 Geoffrey Garen <ggaren@apple.com> + This allows the code to work on windows as well. Also unifies the + environment variable with the preference name. - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): +2010-07-14 Oliver Hunt <oliver@apple.com> -2009-06-25 Geoffrey Garen <ggaren@apple.com> + Reviewed by Don Melton. - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. + Crash when trying to enable JIT and Interpreter in a single build. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emitSlow_op_negate): - * jit/JITCall.cpp: - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emitSlow_op_construct_verify): + CFPreferences code added at the last minute failed to account for + the preference not being present and then attempted to CFRelease + a null value. -2009-06-25 Geoffrey Garen <ggaren@apple.com> + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): - Reviewed by Sam Weinig. - - Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. +2010-07-14 Zoltan Herczeg <zherczeg@webkit.org> - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_true): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): + Reviewed by Darin Adler. -2009-06-25 Geoffrey Garen <ggaren@apple.com> + Change indentations in the lexer + https://bugs.webkit.org/show_bug.cgi?id=41845 - Reviewed by Sam Weinig (sort of, maybe). - - Fixed some ASSERTs in http/tests/security. - - These ASSERTs were introduced by http://trac.webkit.org/changeset/45057, - but the underlying problem was actually older. http://trac.webkit.org/changeset/45057 - just exposed the problem by enabling optimization in more cases. - - The ASSERTs fired because we tested PropertySlot::slotBase() for validity, - but slotBase() ASSERTs if it's invalid, so we would ASSERT before - the test could happen. Solution: Remove the ASSERT. Maybe it was valid - once, but it clearly goes against a pattern we've deployed of late. - - The underlying problem was that WebCore would re-use a PropertySlot in - the case of a forwarding access, and the second use would not completely - overwrite the first use. Solution: Make sure to overwrite m_offset when - setting a value on a PropertySlot. (Other values already get implicitly - overwritten during reuse.) - - * runtime/PropertySlot.h: - (JSC::PropertySlot::PropertySlot): - (JSC::PropertySlot::setValueSlot): - (JSC::PropertySlot::setValue): - (JSC::PropertySlot::setRegisterSlot): - (JSC::PropertySlot::setUndefined): - (JSC::PropertySlot::slotBase): - (JSC::PropertySlot::clearOffset): - -2009-06-24 Gavin Barraclough <barraclough@apple.com> + This patch fixes an old, indentation error comes from kjs, + as webkit has a different style rule for switches, and change + the indentation of the main switch, which is a temporary + style error. This change makes easier to see the behavioural + changes in the follow-up patch. - Reviewed by Geoff Garen. + No behavioural changes. - Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT. + * parser/Lexer.cpp: + (JSC::singleEscape): + (JSC::Lexer::lex): - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_method_check): - (JSC::JIT::emitSlow_op_method_check): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::compileGetByIdSlowCase): +2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com> -2009-06-23 Geoffrey Garen <ggaren@apple.com> + Unreviewed, rolling out r63262. + http://trac.webkit.org/changeset/63262 + https://bugs.webkit.org/show_bug.cgi?id=42229 - Reviewed by Sam Weinig. + broke Windows compile (Requested by bweinstein on #webkit). - Bit off a tiny bit more of standardizing opcode behavior to help with result - caching. - - SunSpider reports no change, v8 maybe a tiny speedup. + * API/tests/testapi.c: + (assertEqualsAsCharactersPtr): + (main): + * testapi.pro: Removed. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emitSlow_op_to_jsnumber): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emitSlow_op_convert_this): +2010-07-13 Oliver Hunt <oliver@apple.com> -2009-06-23 Geoffrey Garen <ggaren@apple.com> + Reviewed by Gavin Barraclough. - Reviewed by Sam Weinig. + ES5 requires BOMs to be treated as whitespace + https://bugs.webkit.org/show_bug.cgi?id=42218 - Bit off a tiny bit more of standardizing opcode behavior to help with result - caching -- including removing my old enemy, op_resolve_function, because - it was non-standard, and removing it felt better than helping it limp along. - - SunSpider reports no change, v8 maybe a tiny speedup. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emitSlow_op_to_primitive): - * jit/JITStubs.cpp: - * jit/JITStubs.h: - * parser/Nodes.cpp: - (JSC::FunctionCallResolveNode::emitBytecode): + Add BOM character to the Lexer's definition of whitespace, + and remove the logic that dealt with stripping BOMs and + caching the cleaned string. -2009-06-23 Geoffrey Garen <ggaren@apple.com> + * parser/Lexer.h: + (JSC::Lexer::isWhiteSpace): + * parser/SourceProvider.h: + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: - Reviewed by Sam Weinig. - - Bit off a tiny bit of standardizing opcode behavior to help with result - caching. - - 0.6% SunSpider speedup. 0.3% v8 speedup. +2010-07-13 Andreas Kling <andreas.kling@nokia.com> - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload - by loading tag before payload, to avoid stomping base/payload. + Reviewed by Darin Adler. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in - regT0" semantics. + Avoid slow-path for put() in Array.splice() + https://bugs.webkit.org/show_bug.cgi?id=41920 - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent - loads while I was at it. The global object's "d" pointer never changes - after construction. + Defer creation of the returned array until its final size is known + to avoid growing it while adding elements. + + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old) + and CreateCompact (which should only be used when constructing arrays whose + size and contents are known at the time of creation.) + (JSC::JSArray::setLength): Skip first consistency check if in CreateCompact + initialization mode. (Only applies to non-empty arrays.) + (JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone) + * runtime/JSArray.h: + (JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact + arrays. Does no bounds or other sanity checking. + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray. + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor. + * runtime/JSGlobalObject.h: + (JSC::constructEmptyArray): Pass CreateInitialized to ctor. + * runtime/RegExpConstructor.cpp: + (JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor. -2009-06-23 Gavin Barraclough <barraclough@apple.com> +2010-07-13 Gavin Barraclough <barraclough@apple.com> - Reviewed by Sam Weinig. + Reviewed by Oliver Hunt. - Remove 'arguments' field from Register union (again). - This time do so without breaking tests (radical, I know). + Bug 42207 - Clean up interface to compile executables, always check for exceptions + + Presently interface to compile executable is inconsistent between eval/program and + function code, and is error prone in allowing a caller to byte compile without JIT + compiling an executable (we rely on all executables with codeblocks having JIT code). + Unify on an interface where all compilation is performed by a single compile (with + ForCall|ForConstruct variants) method, and make all clients check for errors. - * interpreter/CallFrame.h: - (JSC::ExecState::optionalCalleeArguments): - (JSC::ExecState::setArgumentCount): - (JSC::ExecState::init): * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - * interpreter/Register.h: - (JSC::Register::withInt): - (JSC::Register::): - (JSC::Register::Register): - (JSC::Register::i): * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_tear_off_arguments): - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): - (JSC::Register::arguments): + (JSC::DEFINE_STUB_FUNCTION): + * parser/Parser.h: + (JSC::Parser::isFunctionBodyNode): + (JSC::Parser::parse): + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/ExceptionHelpers.cpp: + (JSC::createStackOverflowError): + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + * runtime/Executable.h: + (JSC::EvalExecutable::compile): + (JSC::EvalExecutable::generatedBytecode): + (JSC::EvalExecutable::generatedJITCode): + (JSC::ProgramExecutable::compile): + (JSC::ProgramExecutable::generatedBytecode): + (JSC::ProgramExecutable::generatedJITCode): + (JSC::FunctionExecutable::generatedBytecode): + (JSC::FunctionExecutable::compileForCall): + (JSC::FunctionExecutable::compileForConstruct): + (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): * runtime/JSActivation.cpp: (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::canUseJIT): -2009-06-23 Geoffrey Garen <ggaren@apple.com> +2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> - Reviewed by Sam Weinig. - - Removed some result register tracking cruft in preparation for a new - result tracking mechanism. - - SunSpider reports no change. + Reviewed by Oliver Hunt. - * assembler/AbstractMacroAssembler.h: - * assembler/X86Assembler.h: - (JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in - machine code; we already do this in bytecode. + testapi.c depends on the Core Foundation. + https://bugs.webkit.org/show_bug.cgi?id=40058 - * jit/JIT.cpp: - (JSC::JIT::JIT): - (JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result - registers, so an opcode with a timeout check can still benefit from result - register caching. + Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it + to compile in Qt environments. - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister() - in preparation for something new. + All tests should work except for the JSStringCreateWithCharacters() function, + because its tests depend on Core Foundation specific functions. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetFromCallFrameHeaderPtr): - (JSC::JIT::emitGetFromCallFrameHeader32): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_jsr): - (JSC::JIT::emit_op_sret): - (JSC::JIT::emit_op_jmp_scopes): ditto + * API/tests/testapi.c: + (testJSStringRefCF): moved CoreFoundation specific tests to this function. + (main): The moves plus some minor tweaks. + * testapi.pro: Added. - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::getArgument): added a mechanism for reloading an argument - you passed to a JIT stub, for use in emitTimeoutCheck. +2010-07-13 Gavin Barraclough <barraclough@apple.com> -2009-06-23 Sam Weinig <sam@webkit.org> + Reviewed by Oliver Hunt. - Reviewed by Geoffrey Garen. + Bug 42182 - Change how numeric compare functions are detected + + There are three problems with the current mechanism: + * It requires that a function executable be bytecode compiled without + being JIT generated (in order to copy the bytecode from the numeric + compare function). This is a problem since we have an invariant when + running with the JIT that functions are never bytecode compiled without + also being JIT generated (after checking the codeblock we assume the + function has JIT code). To help maintain this invariant + * This implementation will prevent us from experimenting with alternate + compilation paths which do not compile via bytecode. + * It doesn't work. Functions passing more than two arguments will match + if they are comparing their last two arguments, not the first two. + Generally the mapping back from bytecode to semantics may be more + complex then initially expected. - Remove now-useless inplace variants of binary ops. + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + (JSC::BytecodeGenerator::setIsNumericCompareFunction): + (JSC::BytecodeGenerator::argumentNumberFor): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::BlockNode::singleStatement): + (JSC::FunctionBodyNode::emitBytecode): + * parser/Nodes.h: + (JSC::ExpressionNode::isSubtract): + (JSC::BinaryOpNode::lhs): + (JSC::BinaryOpNode::rhs): + (JSC::SubNode::isSubtract): + (JSC::ReturnNode::value): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emit_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emit_op_mul): +2010-07-12 Oliver Hunt <oliver@apple.com> -2009-06-23 Sam Weinig <sam@webkit.org> + Reviewed by Gavin Barraclough. - Reviewed by Geoffrey Garen. + REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*) + https://bugs.webkit.org/show_bug.cgi?id=41763 - Move off memory operands to aid in re-enabling result caching. + There are two parts to this patch, the first is to fix the actual + problem. When calling copyStringWithoutBOMs on a string we know + to contain BOMs we return a value indicating that there are no + BOMs. - - No regression measured. + The second part of this fix is simply to harden the path that + led to a crash when parsing failed. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitBitAnd32Constant): - (JSC::JIT::emitBitAnd32InPlace): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emitBitOr32Constant): - (JSC::JIT::emitBitOr32InPlace): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emitBitXor32Constant): - (JSC::JIT::emitBitXor32InPlace): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitAdd32InPlace): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32Constant): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSub32ConstantLeft): - (JSC::JIT::emitSub32ConstantRight): - (JSC::JIT::emitSub32InPlaceLeft): - (JSC::JIT::emitSub32InPlaceRight): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitMul32InPlace): - (JSC::JIT::emit_op_div): - (JSC::JIT::emit_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emit_op_not): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emit_op_to_jsnumber): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - -2009-06-23 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Fixed some missing and/or misplaced labels in bytecode generation, so - we don't have to work around them in JIT code generation. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitJumpSubroutine): - * parser/Nodes.cpp: - (JSC::TryNode::emitBytecode): - -2009-06-22 Geoffrey Garen <ggaren@apple.com> + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + Harden compilation stubs against parser failure. + * parser/Lexer.cpp: + (JSC::Lexer::sourceCode): + Add assertions to ensure that subranges into a source provider + are always actually braces. Hopefully this should catch similar + failures in future. These assertions fire on existing tests + without this fix. + * runtime/Executable.h: + (JSC::FunctionExecutable::tryJitCodeForCall): + (JSC::FunctionExecutable::tryJitCodeForConstruct): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::copyStringWithoutBOMs): + Make copyStringWithBOMs do the right thing. - Reviewed by Sam Weinig. - - For member function calls, emit "this" directly into the "this" slot - for the function call, instead of moving it there later. This reduces - time spent in op_mov during certain calls, like "a.b.c()". - - 1%-2% speedup on v8, mostly richards and delta-blue. +2010-07-13 Gabor Loki <loki@webkit.org> - * parser/Nodes.cpp: - (JSC::FunctionCallDotNode::emitBytecode): + Reviewed by Gavin Barraclough. -2009-06-22 Gavin Barraclough <barraclough@apple.com> + Fix the constant encoding in data transfer instructions on ARM + https://bugs.webkit.org/show_bug.cgi?id=42166 - Reviewed by Sam Weinig. + The getImm function is designed to produce modified immediate constant + for data processing instructions. It should not be used to encode + any constant for data transfer. In the current situation there is no + way to use any immediate constant for data transfer. So, the moveImm + function is the desired method to pass the offset value to the data + transfer instructions. - Remove 'arguments' field from Register union. Having JSCell derived types in the union is - dangerous since it opens the possibility for the field to be written as a raw pointer but - then read as a JSValue. This will lead to statle data being read for the tag, which may - be dangerous. Having removed Arguments* types form Register, all arguments objects must - always explicitly be stored in the register file as JSValues. + Reported by Jacob Bramley. - * interpreter/CallFrame.h: - (JSC::ExecState::optionalCalleeArguments): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - * interpreter/Register.h: - (JSC::Register::): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_tear_off_arguments): - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * runtime/JSActivation.h: + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::dataTransfer32): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::call32): -2009-06-03 Sam Weinig <sam@webkit.org> +2010-07-09 Darin Adler <darin@apple.com> Reviewed by Geoffrey Garen. - Add back known this value optimization by abstracting - slow case if not JSCell jumps. - - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::emitJumpSlowCaseIfNotJSCell): - (JSC::JIT::linkSlowCaseIfNotJSCell): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - -2009-06-01 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Fixed some of the regression in crypto-aes.js. (8.5% speedup in - crypto-aes.js.) - - SunSpider reports no change overall. - - Division was producing double results, which took the slow path through - array access code. - - Strangely, all my attempts at versions of this patch that modified array - access code to accept ints encoded as doubles along the fast or slow paths - were regressions. So I did this instead. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try - to turn the result into an int. Don't just do int division, though, because - testing shows it to be slower than SSE double division, and the corner - cases are pretty complicated / lengthy on top of that. Also, don't try - to canonicalize division of known tiny numerators into ints, since that's a - waste of time. - -2009-05-26 Geoffrey Garen <ggaren@apple.com> + String to number coercion is not spec compliant + https://bugs.webkit.org/show_bug.cgi?id=31349 - Reviewed by Oliver Hunt. - - Fixed a regression caused by my recent fix for NaN. + ToNumber should ignore NBSP (\u00a0) + https://bugs.webkit.org/show_bug.cgi?id=25490 - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse - order, like the ChangeLog said we would, bokay? + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseIntOverflow): Added a version that works on UChar. + * runtime/JSGlobalObjectFunctions.h: Ditto. -2009-05-26 Geoffrey Garen <ggaren@apple.com> + * runtime/UString.cpp: + (JSC::isInfinity): Added helper functions. + (JSC::UString::toDouble): Use isStrWhiteSpace instead of + isSASCIISpace to define what we should skip. Got rid of the + code that used CString and UTF8String, instead processing the + UChar of the string directly, except for when we call strtod. + For strtod, use our own home-grown conversion function that + does not try to do any UTF-16 processing. Tidied up the logic + a bit as well. - Reviewed by Sam Weinig and Oliver Hunt. - - Fixed two edge cases in %: - - - Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1, - which will signal a hardware exception due to overflow. +2010-07-12 Martin Robinson <mrobinson@igalia.com> - - In the case of a zero remainder, be sure to store negative zero if the - dividend was zero. - - SunSpider reports no change. + Reviewed by Xan Lopez. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): + [GTK] make dist is broken because of missing headers and other miscellaneous reasons + https://bugs.webkit.org/show_bug.cgi?id=42107 -2009-05-25 Geoffrey Garen <ggaren@apple.com> + * GNUmakefile.am: Add missing header to the sources list. - Reviewed by Maciej Stachowiak. - - Fixed a regression when comparing to NaN. +2010-07-12 Adam Roben <aroben@apple.com> - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the - comparison in reverse order, and jump if the result is below or - below-or-equal. This ensures that we do jump in the case of NaN. + Stop generating stripped symbols for Release builds -2009-05-25 Geoffrey Garen <ggaren@apple.com> + It turns out we can strip the symbols after-the-fact using PDBCopy. - Reviewed by Oliver Hunt. - - SunSpider says no change. - - Fixed regressions in fast/js/var-declarations-shadowing.html and - fast/js/equality.html, caused by recent == and != optimizations. + Fixes <http://webkit.org/b/42085>. - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always - numeric or string comparison. If the second operand is an object, you - need to ToPrimitive it, and start all over again. Also, I wrote out each - of the possible cases explicitly, to cut down on redundant branching. + Reviewed by Steve Falkenburg. -2009-05-25 Sam Weinig <sam@webkit.org> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + Removed the pre-link event, which just created the public\sym + directory. - Reviewed by Mark Rowe. +2010-07-12 Anders Carlsson <andersca@apple.com> - Fix bug in fast/js/constant-folding.html where we were not negating - -0 properly. + Reviewed by Dan Bernstein. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): + Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions + https://bugs.webkit.org/show_bug.cgi?id=42086 -2009-05-23 Geoffrey Garen <ggaren@apple.com> + * wtf/OwnPtr.h: + * wtf/PassOwnPtr.h: + * wtf/PassRefPtr.h: + (WTF::PassRefPtr::releaseRef): + (WTF::NonNullPassRefPtr::leakRef): + (WTF::NonNullPassRefPtr::releaseRef): + * wtf/RetainPtr.h: + (WTF::RetainPtr::releaseRef): - Reviewed by Oliver Hunt. - - Refactored new slow case codegen for == and !=. - - SunSpider reports no change, maybe a tiny speedup. +2010-07-10 Oliver Hunt <oliver@apple.com> - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation, - instead of *32, to make it portable to 64bit. Reorganized the string - and generic cases to make their control flow a little clearer. + Reviewed by Maciej Stachowiak. -2009-05-23 Geoffrey Garen <ggaren@apple.com> + HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled + https://bugs.webkit.org/show_bug.cgi?id=42039 - Reviewed by Maciej Stachowiak. - - Optimized == and != for our new value representation -- especially for strings. - - 14% speedup on date-format-tofte. + Separate the existence of computed goto support in the compiler + from whether or not we are using the interpreter. All the current + HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like + the option of using it elsewhere. The interpreter now uses + ENABLE(COMPUTED_GOTO_INTERPRETER) - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_eq_strings): - (JSC::JITStubs::cti_op_call_eval): - * jit/JITStubs.h: - (JSC::): - * runtime/JSValue.h: + * bytecode/Instruction.h: + (JSC::Instruction::Instruction): + * bytecode/Opcode.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::isOpcode): + (JSC::Interpreter::privateExecute): + * interpreter/Interpreter.h: + (JSC::Interpreter::getOpcode): + (JSC::Interpreter::getOpcodeID): + * wtf/Platform.h: -2009-05-22 Sam Weinig <sam@webkit.org> +2010-07-10 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. - Fix non-SSE enabled builds. + Remove switches from inner expression loops in the parser + https://bugs.webkit.org/show_bug.cgi?id=42035 - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub. - (JSC::JIT::emitSlow_op_sub): Ditto. + Use bitmasks and flags on the token types to identify unary and + binary operators, rather than switching on the token type to + identify them. -2009-05-22 Geoffrey Garen <ggaren@apple.com> + * parser/JSParser.cpp: + (JSC::isUnaryOp): + (JSC::JSParser::isBinaryOperator): + * parser/JSParser.h: + (JSC::): - Reviewed by Sam Weinig. - - Here's a thought: let's not take a jit stub call just to multiply by 1, - bokay? - - imul doesn't set the zero flag, so to test for a zero result, we need - an explicit instruction. (Luckily, it does set the overflow flag, so - we can still use that.) +2010-07-09 Leon Clarke <leonclarke@google.com> - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitMul32InPlace): + Reviewed by Adam Barth. -2009-05-22 Sam Weinig <sam@webkit.org> + add support for link prefetching + https://bugs.webkit.org/show_bug.cgi?id=3652 - Reviewed by Geoffrey "Premature Commit" Garen. + * Configurations/FeatureDefines.xcconfig: - Add back constant integer cases for op_add. +2010-07-09 Oliver Hunt <oliver@apple.com> - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32Constant): - * jit/JITInlineMethods.h: - (JSC::JIT::getConstantOperandImmediateDouble): - (JSC::JIT::isOperandConstantImmediateDouble): + Reviewed by Darin Adler. -2009-05-22 Geoffrey Garen <ggaren@apple.com> + Tidy up lexer token ids + https://bugs.webkit.org/show_bug.cgi?id=42014 + + Stop using character literals to identify single character tokens + and instead use symbolic names for all tokens. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::makeBinaryNode): + * parser/JSParser.cpp: + (JSC::JSParser::consume): + (JSC::JSParser::match): + (JSC::JSParser::autoSemiColon): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::allowAutomaticSemicolon): + (JSC::JSParser::parseDoWhileStatement): + (JSC::JSParser::parseWhileStatement): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseForStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseSwitchStatement): + (JSC::JSParser::parseSwitchClauses): + (JSC::JSParser::parseSwitchDefaultClause): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseDebuggerStatement): + (JSC::JSParser::parseStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parseIfStatement): + (JSC::JSParser::parseExpression): + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseConditionalExpression): + (JSC::isUnaryOp): + (JSC::JSParser::isBinaryOperator): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseObjectLiteral): + (JSC::JSParser::parseStrictObjectLiteral): + (JSC::JSParser::parseArrayLiteral): + (JSC::JSParser::parsePrimaryExpression): + (JSC::JSParser::parseArguments): + (JSC::JSParser::parseMemberExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: + (JSC::): + * parser/Lexer.cpp: + (JSC::): + (JSC::Lexer::lex): + * parser/Lexer.h: - Reviewed by Sam Weinig. - - Added fast double cases for op_jnless and op_jnlesseq. +2010-07-09 Gavin Barraclough <barraclough@apple.com> - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by - addSlowCase. + Reviewed by Oliver Hunt. - * assembler/X86Assembler.h: - (JSC::X86Assembler::ucomisd_rm): New method for comparing register to - memory. + Bug 42015 - Enable JSValue32_64 on ARMv7 + * Configurations/JavaScriptCore.xcconfig: * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump - operations in addition to operations with explicit result registers. + * jit/JITStubs.cpp: + * wtf/Platform.h: - * jit/JITInlineMethods.h: - (JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients - can track multiple jumps to the same slow case condition together. +2010-07-09 Kenneth Russell <kbr@google.com> -2009-05-21 Sam Weinig <sam@webkit.org> + Reviewed by Dimitri Glazkov. - Reviewed by Gavin Barraclough. + Assertion failure in String::utf8() for certain invalid UTF16 inputs + https://bugs.webkit.org/show_bug.cgi?id=41983 - Implement op_negate inline fast cases. + * wtf/text/WTFString.cpp: + (WebCore::String::utf8): + - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8. - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::neg32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::negl_m): - (JSC::X86Assembler::xorpd_rr): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emitSlow_op_negate): +2010-07-09 Oliver Hunt <oliver@apple.com> -2009-05-20 Sam Weinig <sam@webkit.org> + Reviewed by Geoffrey Garen. - Reviewed by Gavin Barraclough. + Remove a couple of excess writes from the lexer + https://bugs.webkit.org/show_bug.cgi?id=41981 - Update the patchOffsetGetByIdSlowCaseCall constant for the - case that OPCODE_SAMPLING is enabled. + Remove a couple of fields from JSTokenInfo, and rename the remaining ones + to something more accurate - * jit/JIT.h: + * parser/JSParser.cpp: + (JSC::JSParser::next): + (JSC::JSParser::tokenStart): + (JSC::JSParser::tokenLine): + (JSC::JSParser::tokenEnd): + * parser/JSParser.h: + (JSC::JSTokenInfo::JSTokenInfo): + * parser/Lexer.cpp: + (JSC::Lexer::lex): -2009-05-20 Geoffrey Garen <ggaren@apple.com> +2010-07-08 Oliver Hunt <oliver@apple.com> Reviewed by Sam Weinig. - Added support for inline subtraction of doubles. + Property declarations in an object literal should not consider the prototype chain when being added to the new object + https://bugs.webkit.org/show_bug.cgi?id=41929 - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSlowSub32InPlaceLeft): - (JSC::JIT::emitBinaryDoubleOp): + To fix this all we need to do is ensure that all new properties are + added with putDirect rather than a fully generic call to put. This + is safe as an object literal is by definition going to produce a + completely normal object. -2009-05-20 Sam Weinig <sam@webkit.org> + Rather than duplicating all the put_by_id logic we add an additional + flag to op_put_by_id to indicate it should be using putDirect. In + the interpreter this adds a runtime branch, but in the jit this is + essentially free as the branch is taken at compile time. This does + actually improve object literal creation time even in the interpreter + as we no longer need to walk the prototype chain to verify that the + cached put is safe. - Reviewed by Geoffrey Garen. + We still emit normal put_by_id code when emitting __proto__ as we want + to get the correct handling for changing the prototype. - Added support for inline division. + Sunspider claims this is a 0.7% speedup which is conceivably real due + to the performance improvement in object literals, but I suspect its + really just the result of code motion. - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::divsd_rr): - (JSC::X86Assembler::divsd_mr): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): * bytecode/Opcode.h: * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitBinaryOp): + (JSC::BytecodeGenerator::emitPutById): + (JSC::BytecodeGenerator::emitDirectPutById): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::PropertyListNode::emitBytecode): * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_div): - (JSC::JIT::emitSlow_op_div): + (JSC::JIT::compilePutByIdTransition): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchPutByIdReplace): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchPutByIdReplace): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSObject.h: + (JSC::JSObject::putDirect): + (JSC::JSValue::putDirect): + * runtime/JSValue.h: -2009-05-20 Geoffrey Garen <ggaren@apple.com> +2010-07-08 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. - Added support for inline addition of doubles. + String.prototype methods should CheckObjectCoercible (test this is not null or undefined). - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_add): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32InPlace): - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::trimString): -2009-05-20 Geoffrey Garen <ggaren@apple.com> +2010-07-08 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. - - Factored inline double operations into a helper function, so that we - can reuse this code for other math operations. - - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitBinaryDoubleOp): - (JSC::JIT::emit_op_mul): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): -2009-05-20 Geoffrey Garen <ggaren@apple.com> + Date.prototype.toJSON takes one argument, report this correctly. - Reviewed by Sam Weinig. - - Added support for inline multiplication of doubles. + * runtime/DatePrototype.cpp: - * assembler/X86Assembler.h: - (JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an - int32 into a double register. +2010-07-08 Gavin Barraclough <barraclough@apple.com> - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic. + Reviewed by Sam Weinig. - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::addressFor): New function, useful for addressing a JSValue's - full 64bits as a double. + RegExp's prototype should be an object of type RegExp. -2009-05-19 Sam Weinig <sam@webkit.org> + * runtime/RegExpPrototype.cpp: + (JSC::RegExpPrototype::RegExpPrototype): + * runtime/RegExpPrototype.h: - Reviewed by Geoffrey Garen. +2010-07-08 Oliver Hunt <oliver@apple.com> - Implement and enable optimized calls. + Reviewed by Gavin Barraclough. - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards - around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink). - Update the trampolines to account for the new JSValue representation. - (JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue. + JavaScript parser violates ECMA automatic semicolon insertion rule + https://bugs.webkit.org/show_bug.cgi?id=41844 - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): Update to account for the new JSValue representation - (JSC::JIT::compileOpCallSlowCase): Ditto. + Remove (very) old and bogus logic that automatically inserted a semicolon + at the end of a script's source. - * jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard. + * parser/Lexer.cpp: + (JSC::Lexer::lex): - * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL. +2010-07-08 Oliver Hunt <oliver@apple.com> -2009-05-19 Sam Weinig <sam@webkit.org> + Reviewed by Anders Carlson. - Reviewed by Geoffrey Garen. + Tidy up the lexer - Implement and enable optimized property access. + Remove some of the old yacc/lex-isms still present in the lexer - * assembler/AbstractMacroAssembler.h: Fix comment. - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline - and implement the string length trampoline. - * jit/JIT.h: Add new constants for patch offsets. - * jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h. - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::compilePutDirectOffset): - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): Add version of addArgument that takes - two registers for the tag and payload. - * jit/JITStubs.cpp: - (JSC::JITStubs::JITStubs): Remove array length trampoline pointer. - (JSC::JITStubs::cti_op_get_by_id_self_fail): - * jit/JITStubs.h: - * runtime/JSObject.h: - (JSC::JSObject::JSObject): Move m_inheritorID below the property storage - to align it to a 16 byte boundary. - * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS - * wtf/StdLibExtras.h: Move FIELD_OFFSET here. + * parser/JSParser.h: + (JSC::): + * parser/Lexer.cpp: + (JSC::Lexer::parseString): + (JSC::Lexer::lex): + * parser/Lexer.h: -2009-05-17 Sam Weinig <sam@webkit.org> +2010-07-08 Oliver Hunt <oliver@apple.com> - Reviewed by Geoffrey Garen. + Reviewed by Gavin Barraclough. - Remove unneeded ExecState parameter from the number JSValue constructors. + Make object-literal parsing conformant with the spec. + https://bugs.webkit.org/show_bug.cgi?id=41892 + + Bring our parsing of object literals into conformance with the ES5 spec. + Basically disallow conflicting accessor vs. normal property definitions + The bulk of this patch is just fiddling to maintain performance. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createGetterOrSetterProperty): + (JSC::ASTBuilder::createProperty): + (JSC::ASTBuilder::getName): + (JSC::ASTBuilder::getType): + * parser/JSParser.cpp: + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseObjectLiteral): + (JSC::JSParser::parseStrictObjectLiteral): + * parser/JSParser.h: + * parser/Lexer.cpp: + (JSC::Lexer::clear): + * parser/Lexer.h: + (JSC::Lexer::currentOffset): + (JSC::Lexer::setOffset): + Add logic to allow us to roll the lexer back in the input stream. + * parser/Nodes.h: + (JSC::PropertyNode::): + (JSC::PropertyNode::type): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/SourceProvider.h: + (JSC::SourceProvider::SourceProvider): + (JSC::SourceProvider::isValid): + (JSC::SourceProvider::setValid): + SourceProvider now records whether the input text + has already been validated. + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::Property::Property): + (JSC::SyntaxChecker::Property::operator!): + (JSC::SyntaxChecker::createProperty): + (JSC::SyntaxChecker::createPropertyList): + (JSC::SyntaxChecker::createGetterOrSetterProperty): + The SyntaxChecker mode now needs to maintain a bit more information + to ensure that we can validate object literals correctly. + +2010-07-08 Darin Adler <darin@apple.com> - * runtime/JSValue.h: - (JSC::jsNumber): - (JSC::jsNaN): - (JSC::JSValue::JSValue): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::sharedInstance): Fix typo. -2009-05-15 Sam Weinig <sam@webkit.org> +2010-07-08 Darin Adler <darin@apple.com> - Reviewed by Geoffrey Garen. + Reviewed by Oliver Hunt. - Implemented fast path for op_put_by_val when putting to arrays. + Fix assertion seen on the Leopard buildbot. + The single shared instance of JSGlobalData was not being + adopted after creation. - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef. -2009-05-15 Geoffrey Garen <ggaren@apple.com> (Mostly by Sam) +2010-07-08 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. - - Implemented fast path for op_get_by_val when accessing array. - - * jit/JIT.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): -2009-05-14 Geoffrey Garen <ggaren@apple.com> + BOMs are whitespace. - Reviewed by Sam Weinig. - - Fixed a failure in fast/js/math-transforms.html caused by failing to - preserve -0 in multiplication. - - * assembler/X86Assembler.h: - (JSC::X86Assembler::jz): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitMul32Constant): - (JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when - doing multiplication. Use a slow case to get these right. + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::isStrWhiteSpace): -2009-05-14 Geoffrey Garen <ggaren@apple.com> +2010-07-08 Martin Robinson <mrobinson@igalia.com> - Reviewed by Sam Weinig. - - Fixed a bug in the varargs calling convention. + Unreviewed. - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): Move the argument count into regT1, - since that's where ctiVirtualCall expects it to be. + Try fix the GTK+ build by touching this file. -2009-05-14 Geoffrey Garen <ggaren@apple.com> + * jit/ExecutableAllocatorFixedVMPool.cpp: - Reviewed by Sam Weinig. +2010-07-08 Gavin Barraclough <barraclough@apple.com> - Fixed a small bug in instanceof's looping code. + GTK build fix take two. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): NULL means the object has no prototype, - so only loop when *not* equal to NULL. + * GNUmakefile.am: -2009-05-14 Geoffrey Garen <ggaren@apple.com> +2010-07-08 Gavin Barraclough <barraclough@apple.com> - Reviewed by Sam Weinig. - - Fixed a small bug in instanceof's result writing code. + GTK build fix. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits - in all cases. + * GNUmakefile.am: -2009-05-14 Sam Weinig <sam@webkit.org> +2010-07-08 Gavin Barraclough <barraclough@apple.com> - Reviewed by Geoffrey Garen. + Reviewed by Sam Weinig. - Removed an invalid assertion in cti_op_urshift which - depended on a fast path for op_urshift which has - never existed. + https://bugs.webkit.org/show_bug.cgi?id=41641 - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_urshift): + Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms + other than x86-64 (this may be useful on 32-bit platforms, too). -2009-05-14 Geoffrey Garen <ggaren@apple.com> + Simplify ifdefs by dividing into thwo broad allocation strategies + (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). - Reviewed by Sam Weinig. - - Fixed loop_if_true, which had the same reversed test that jtrue had. + Rename constant used in the code to have names descriptive of their purpose, + rather than their specific value on a given platform. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_true): + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::free): + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorPosix.cpp: + * jit/ExecutableAllocatorSymbian.cpp: + * jit/ExecutableAllocatorWin.cpp: + * wtf/Platform.h: -2009-05-14 Sam Weinig <sam@webkit.org> +2010-07-08 Xan Lopez <xlopez@igalia.com> - Reviewed by Geoffrey Garen. + Reviewed by Gustavo Noronha. - In op_neq, we apparently want to check that one value - does *not* equal another. Go figure. + Silence a few noisy build rules. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_neq): + * GNUmakefile.am: -2009-05-14 Sam Weinig <sam@webkit.org> +2010-07-08 Sheriff Bot <webkit.review.bot@gmail.com> - Reviewed by Geoffrey Garen. + Unreviewed, rolling out r62765. + http://trac.webkit.org/changeset/62765 + https://bugs.webkit.org/show_bug.cgi?id=41840 - The slow case of op_mod should call op_mod's jit stub, - not op_mul. That would be dumb. + All jscore and layout tests crash on Qt bot (Requested by Ossy + on #webkit). - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_mod): + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): + (WTF::TCMalloc_PageHeap::signalScavenger): + (WTF::TCMalloc_PageHeap::scavengerThread): -2009-05-14 Geoffrey Garen <ggaren@apple.com> +2010-07-08 Andreas Kling <andreas.kling@nokia.com> - Reviewed by Sam Weinig. - - Fixed problems when using 'arguments' due to a half-initialized register. + Reviewed by Oliver Hunt. - * interpreter/CallFrame.h: - (JSC::ExecState::setCalleeArguments): - (JSC::ExecState::init): Require a full JSValue when setting up the - 'arguments' virtual register, since this register is accessible from JIT - code and bytecode, and needs to be a true JSValue. + Interpreter: Crash in op_load_varargs on 64-bit + https://bugs.webkit.org/show_bug.cgi?id=41795 - * interpreter/CallFrameClosure.h: - (JSC::CallFrameClosure::resetCallFrame): ditto + Added missing cast of argCount to int32_t in op_load_varargs. * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): ditto - - * interpreter/Register.h: Removed the constructor that allowed assignment - of a JSArguments* to a register. That is not safe. See above. - - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_create_arguments): - (JSC::JITStubs::cti_op_create_arguments_no_params): ditto + (JSC::Interpreter::privateExecute): -2009-05-14 Sam Weinig <sam@webkit.org> +2010-07-08 Patrick Gansterer <paroga@paroga.com> Reviewed by Geoffrey Garen. - We really want to go to the slow case in op_jfalse and - op_jtrue if the value is *not* boolean. + Make FastMalloc more portable. + https://bugs.webkit.org/show_bug.cgi?id=41790 - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): + Use WTF::Mutex instead of pthread_mutex_t and + replace pthread_cond_t with WTF::ThreadCondition. -2009-05-14 Sam Weinig <sam@webkit.org> + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): + (WTF::TCMalloc_PageHeap::signalScavenger): + (WTF::TCMalloc_PageHeap::scavengerThread): - Reviewed by Geoffrey Garen. +2010-07-08 Patrick Gansterer <paroga@paroga.com> - Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq - if the first operand is a constant. + Reviewed by Darin Adler. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): + Remove needless #include <fcntl.h> from TCSystemAlloc.cpp. + https://bugs.webkit.org/show_bug.cgi?id=41777 -2009-05-14 Sam Weinig <sam@webkit.org> + * wtf/TCSystemAlloc.cpp: - Reviewed by Geoffrey Garen. +2010-07-07 Darin Adler <darin@apple.com> - Added missing return in op_jnless and op_jnlesseq. + Fixed build in configurations like PowerPC. - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emit_op_jnlesseq): + * runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h. + * runtime/RegExpObject.cpp: Ditto. + * wtf/SizeLimits.cpp: Changed compile time assertion to work + even on platforms where two bool members do not end up taking + the same size as one int member! -2009-05-14 Sam Weinig <sam@webkit.org> +2010-07-07 Oliver Hunt <oliver@apple.com> Reviewed by Geoffrey Garen. - Load constants into the the register file as a temporary measure to - aid bring up. This allows us to use to treat constants like any - other virtual register. + Lazy mode of parser allows invalid syntax in object literals. + https://bugs.webkit.org/show_bug.cgi?id=41809 - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_enter): - (JSC::JIT::emit_op_enter_with_activation): + Make the parser itself validate getter and setter syntax rather + than offloading it to the AST builder. -2009-05-14 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin. + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createGetterOrSetterProperty): + * parser/JSParser.cpp: + (JSC::JSParser::parseProperty): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly - faster than set32, and the new value representation usually doesn't - need set32. +2010-07-07 Dumitru Daniliuc <dumi@chromium.org> - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadTag): - (JSC::JIT::emitLoadPayload): Added helper functions for dealing with - constants. Eventually, we should write special cases for all constants, - but these are helpful in the short term. + Reviewed by Adam Roben. - * jit/JITOpcodes.cpp: - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emitSlow_op_stricteq): - (JSC::JIT::emitSlow_op_nstricteq): teh opcodez. + Revert r62689. + https://bugs.webkit.org/show_bug.cgi?id=41804 - * runtime/JSValue.h: - (JSC::JSValue::): - (JSC::JSValue::isDouble): Added a LowestTag for clarity. + * runtime/Collector.cpp: + (JSC::Heap::freeBlocks): -2009-05-13 Geoffrey Garen <ggaren@apple.com> +2010-07-07 Adam Barth <abarth@webkit.org> Reviewed by Sam Weinig. - - Fixed some bugs in host function calls. - - testapi now passes! - * jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax, - which is how JSValues are now returned. Also changed the code that - passes thisValue to pass the full 64bits of the value. Also added - an #error compiler directive to other platform builds, since the JSValue - return signature probably won't return in edx:eax on those platforms, - and we'll have to investigate a solution. + Add reverseFind to Vector and deploy in HTML5 parser + https://bugs.webkit.org/show_bug.cgi?id=41778 -2009-05-13 Geoffrey Garen <ggaren@apple.com> + This method seems generally useful. I'm slightly surprised we don't + have it already. - Reviewed by Sam Weinig. - - Removed parameters from functions that are intended never to use their - parameters. + * wtf/Vector.h: + (WTF::::reverseFind): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emitSlow_op_put_by_val): +2010-07-07 Darin Adler <darin@apple.com> -2009-05-13 Geoffrey Garen <ggaren@apple.com> + Reviewed by Adam Barth. - Reviewed by Sam Weinig. - - Ported op_instance_of from TOT. It's basically the same, but some register - stuff changed to memory stuff. + Turn on adoptRef assertion for RefCounted + https://bugs.webkit.org/show_bug.cgi?id=41547 - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - (JSC::JIT::emitStore): Changed to use helper functions. + * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other + WTF headers should use "" includes; consistent in most WTF headers. + Added a call to relaxAdoptionRequirement. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): Ported from TOT. + * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED. + Added relaxAdoptionRequirement. -2009-05-13 Geoffrey Garen <ggaren@apple.com> +2010-07-07 Anders Carlsson <andersca@apple.com> - Reviewed by Gavin Barraclough. - - Added a comment to explain an exception-handling subtelty that we found - hard to remember when reviewing my last patch. + Try to fix the Windows build. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_catch): + * runtime/Collector.cpp: + (JSC::Heap::freeBlocks): -2009-05-13 Geoffrey Garen <ggaren@apple.com> +2010-07-07 Darin Adler <darin@apple.com> - Reviewed by Sam Weinig. - - Implemented try/catch. + Reviewed by Adam Barth. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction. - (JSC::JIT::emit_op_catch): Filled out. + More OwnPtr work + https://bugs.webkit.org/show_bug.cgi?id=41727 -2009-05-13 Sam Weinig <sam@webkit.org> + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr. + * API/JSCallbackObjectFunctions.h: + (JSC::JSCallbackObject::JSCallbackObject): Ditto. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): Ditto. + * bytecode/CodeBlock.h: + (JSC::CodeBlock::createRareDataIfNecessary): Ditto. + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): Ditto. + * parser/ParserArena.cpp: + (JSC::ParserArena::ParserArena): Ditto. + * runtime/Arguments.h: + (JSC::Arguments::Arguments): Ditto. + * runtime/Executable.cpp: + (JSC::EvalExecutable::compile): Ditto. + (JSC::ProgramExecutable::compile): Ditto. + (JSC::FunctionExecutable::compileForCall): Ditto. + (JSC::FunctionExecutable::compileForConstruct): Ditto. + (JSC::FunctionExecutable::reparseExceptionInfo): Ditto. + (JSC::EvalExecutable::reparseExceptionInfo): Ditto. + * runtime/JSArray.cpp: + (JSC::JSArray::sort): Ditto. + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): Ditto. + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::RegExpObject): Ditto. + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::createSingleCharacterString): Ditto. + (JSC::SmallStrings::singleCharacterStringRep): Ditto. - Reviewed by Geoffrey Garen. + * wtf/unicode/icu/CollatorICU.cpp: + (WTF::Collator::userDefault): Use adoptPtr. + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto. + (JSC::Yarr::ByteCompiler::compile): Ditto. + (JSC::Yarr::ByteCompiler::regexBegin): Ditto. + (JSC::Yarr::byteCompileRegex): Ditto. + * yarr/RegexInterpreter.h: + (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto. - Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null +2010-07-07 Darin Adler <darin@apple.com> - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its - fast brother. + Reviewed by Adam Barth. - (JSC::JIT::emit_op_loop_if_true): Similar to the old version - in that it tries to do the integer case first and reduce the - number of jumps you might need to take. - (JSC::JIT::emitSlow_op_loop_if_true): + Make clear set the pointer to 0 before deletion + https://bugs.webkit.org/show_bug.cgi?id=41727 - (JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only - the inverse and without a timeout check. - (JSC::JIT::emitSlow_op_jfalse): + * wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new + value before deleting the old one, including in the set function and the + clear function. This required changing safeDelete. + * wtf/OwnPtr.h: Ditto. Also removed some extra null checks. + * wtf/PassOwnPtr.h: Ditto. - (JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except - without the timeout check. - (JSC::JIT::emitSlow_op_jtrue): + * wtf/PassRefPtr.h: Changed code so we always set the pointer to its new + value before deref'ing the old one in the clear function. Also added a + leakRef function for NonNullPassRefPtr. + * wtf/RefPtr.h: Ditto. - (JSC::JIT::emit_op_jeq_null): Very similar to the implementation - of op_eq, except it takes jumps instead of copying the condition - to a dst. - (JSC::JIT::emit_op_jneq_null): Ditto but for op_neq. + * wtf/gobject/GOwnPtr.h: More of the same. + * wtf/gobject/GRefPtr.h: Ditto. -2009-05-13 Geoffrey Garen <ggaren@apple.com> +2010-07-07 Zoltan Herczeg <zherczeg@webkit.org> - Reviewed by Sam Weinig. - - Implemented op_call_varargs. + Reviewed by Oliver Hunt. - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::emit_op_call): - (JSC::JIT::emit_op_call_eval): - (JSC::JIT::emit_op_load_varargs): - (JSC::JIT::emit_op_call_varargs): - (JSC::JIT::emit_op_construct): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jneq_ptr): + Refactored string parsing inside the lexer + https://bugs.webkit.org/show_bug.cgi?id=41606 -2009-05-13 Geoffrey Garen <ggaren@apple.com> + Does not use goto. Although the last sunspider + parse-only tests yields 1.044x speedup, I think the + patch can have a slight improvement at most. - Reviewed by Sam Weinig. - - Implemented op_call_eval. + * parser/Lexer.cpp: + (JSC::singleEscape): + (JSC::Lexer::parseString): + (JSC::Lexer::lex): + * parser/Lexer.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpCall): - * jit/JITStubCall.h: - (JSC::CallEvalJITStub::CallEvalJITStub): +2010-07-06 Oliver Hunt <oliver@apple.com> -2009-05-13 Sam Weinig <sam@webkit.org> + Reviewed by Maciej Stachowiak. - Reviewed by Gavin Barraclough. + Make it possible to have both the JIT and Interpreter available in a single build + https://bugs.webkit.org/show_bug.cgi?id=41722 - Implemented op_not. (Gavin did most of the work!) + Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible + to have both JIT and INTERPRETER enabled at the same time. This doesn't add + support for mix mode execution, but it does allow a single build to contain all + the code needed to use either the interpreter or the jit. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_not): - (JSC::JIT::emitSlow_op_not): + If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment + variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter. -2009-05-13 Geoffrey Garen <ggaren@apple.com> + This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER), + or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif + #if ENABLE(INTERPRETER), etc. There are also a few functions that need to be + renamed to resolve return type ambiguity. - Reviewed by Sam Weinig. - - Implemented op_global_resolve. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + * interpreter/CallFrame.h: + (JSC::ExecState::returnVPC): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveLastCaller): + * interpreter/Interpreter.h: + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/Executable.cpp: + (JSC::EvalExecutable::generateJITCode): + (JSC::ProgramExecutable::generateJITCode): + (JSC::FunctionExecutable::generateJITCodeForCall): + (JSC::FunctionExecutable::generateJITCodeForConstruct): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * runtime/JSFunction.cpp: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::canUseJIT): + * wtf/Platform.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed - early returns. +2010-07-06 Darin Adler <darin@apple.com> - (JSC::JIT::emit_op_resolve_global): - * jit/JITStubs.cpp: - (JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code, - but we need two reads and a TimesEight step in order to account for the - 64bit value size. + Reviewed by Adam Barth. - * jit/JITStubs.h: - (JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*, - to avoid having to pass an irrelevant tag pointer to the stub. + Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr + https://bugs.webkit.org/show_bug.cgi?id=41320 -2009-05-13 Sam Weinig <sam@webkit.org> + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment + instead of set since the result of reparseExceptionInfo is now a + PassOwnPtr. - Reviewed by Geoffrey Garen. + * bytecode/CodeBlock.h: Change extractExceptionInfo to return a + PassOwnPtr instead of a raw pointer. - Implemented op_to_jsnumber. + * runtime/Executable.cpp: + (JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr. + (JSC::EvalExecutable::reparseExceptionInfo): Ditto. + (JSC::ProgramExecutable::reparseExceptionInfo): Added. This was + in the header before, but it's better to not have it there to reduce + header dependencies. Return a PassOwnPtr. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emitSlow_op_to_jsnumber): + * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr, + and put it in the private sections of classes other than the base class. -2009-05-13 Sam Weinig <sam@webkit.org> + * wtf/MessageQueue.h: + (WTF::MessageQueue::append): Use leakPtr instead of release. + (WTF::MessageQueue::appendAndCheckEmpty): Ditto. + (WTF::MessageQueue::prepend): Ditto. - Reviewed by Geoffrey Garen. + * wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return + a PassOwnPtr rather than a raw pointer. Added a leakPtr function that + returns a raw pointer. Put the constructor that takes a raw pointer and + the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the + new adoptPtr function from PassOwnPtr.h. - Implemented op_convert_this. + * wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function + to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr. + Put the constructor and assignment operators that take a raw pointer + into a section guarded by LOOSE_PASS_OWN_PTR. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emitSlow_op_convert_this): +2010-07-06 Sam Weinig <sam@webkit.org> -2009-05-13 Geoffrey Garen <ggaren@apple.com> + Reviewed by Darin Adler - Reviewed by Sam Weinig. - - Got basic JS function and constructor calls working. + Update comment in StringExtras.h to be more accurate. - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallSetupArgs): - (JSC::JIT::compileOpCallVarargsSetupArgs): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emitSlow_op_construct_verify): - (JSC::JIT::emitSlow_op_call): - (JSC::JIT::emitSlow_op_call_eval): - (JSC::JIT::emitSlow_op_call_varargs): - (JSC::JIT::emitSlow_op_construct): - (JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out. + * wtf/StringExtras.h: - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutJITStubArgFromVirtualRegister): - (JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions, - since I wanted to avoid the complexity of revamping the API here while - trying to bring it up. Eventually, we should re-remove all of these functions. +2010-07-06 Sheriff Bot <webkit.review.bot@gmail.com> - (JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will - not silence me, Sam Weinig! The world will know that you are a crufty, - crufty, crufty programmer!!! + Unreviewed, rolling out r62511. + http://trac.webkit.org/changeset/62511 + https://bugs.webkit.org/show_bug.cgi?id=41686 - * jit/JITOpcodes.cpp: - * jit/JITStubs.cpp: - (JSC::): - * jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since - and off-by-one error was causing stack misalignment. + Breaks Linux/64bit compilation (Requested by xan_ on #webkit). -2009-05-13 Sam Weinig <sam@webkit.org> + * jit/ExecutableAllocator.cpp: + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::free): + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocatorSymbian.cpp: + * jit/ExecutableAllocatorWin.cpp: + * wtf/Platform.h: - Reviewed by Geoffrey Garen. +2010-07-05 Gavin Barraclough <barraclough@apple.com> - Implement op_eq_null and op_neq_null. + Reviewed by Sam Weinig. - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::set8): - (JSC::MacroAssemblerX86Common::setTest8): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_stricteq): - (JSC::JIT::emitSlow_op_stricteq): - (JSC::JIT::emit_op_nstricteq): - (JSC::JIT::emitSlow_op_nstricteq): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - * jsc.cpp: + https://bugs.webkit.org/show_bug.cgi?id=41641 -2009-05-12 Sam Weinig <sam@webkit.org> + Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms + other than x86-64 (this may be useful on 32-bit platforms, too). - Reviewed by Geoffrey Garen. + Simplify ifdefs by dividing into thwo broad allocation strategies + (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). - Implement op_new_error. + Rename constant used in the code to have names descriptive of their purpose, + rather than their specific value on a given platform. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_error): - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): Add a version of addArgument - that takes a constant JSValue. + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::free): + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorPosix.cpp: + * jit/ExecutableAllocatorSymbian.cpp: + * jit/ExecutableAllocatorWin.cpp: + * wtf/Platform.h: -2009-05-12 Sam Weinig <sam@webkit.org> +2010-07-05 Steve Block <steveblock@google.com> - Reviewed by Geoffrey Garen. + Reviewed by Darin Adler. - Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister. + ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h + https://bugs.webkit.org/show_bug.cgi?id=41594 - * jit/JIT.cpp: - * jit/JIT.h: + * wtf/ThreadingPthreads.cpp: -2009-05-12 Sam Weinig <sam@webkit.org> +2010-07-04 Mark Rowe <mrowe@apple.com> - Reviewed by Geoffrey Garen. + Build fix after r62456. - Implement op_to_primitive and op_next_pname. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent + warnings about comparisons between signed and unsigned types, and attempts to call an overload + of std::min that doesn't exist. - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_construct_verify): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emitSlow_op_to_primitive): - (JSC::JIT::emitSlow_op_loop_if_true): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_next_pname): +2010-07-02 Sam Weinig <sam@webkit.org> -2009-05-12 Sam Weinig <sam@webkit.org> + Reviewed by Darin Adler. - Reviewed by Geoffrey Garen. + Patch for https://bugs.webkit.org/show_bug.cgi?id=41553 + Make StringExtras.h versions of snprintf and vsnprintf match the unix versions. - Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and - op_unexpected_load. + - MSVC does not ensure the buffers are null terminated as the unix versions do. - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::tagFor): - (JSC::JIT::payloadFor): - (JSC::JIT::emitLoad): - (JSC::JIT::emitStore): - (JSC::JIT::emitLoadReturnValue): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_unexpected_load): + * runtime/JSGlobalObjectFunctions.cpp: Cleanup includes. + * runtime/UString.cpp: Clean up includes. + (JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong. + * wtf/StringExtras.h: + (snprintf): Ensure null termination of buffer. + (vsnprintf): Ditto. -2009-05-12 Geoffrey Garen <ggaren@apple.com> +2010-07-03 Yong Li <yoli@rim.com> - Reviewed by Sam Weinig. + Reviewed by Darin Adler. - Added overflow handling to op_sub. + Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in + the interpreter as well as the JIT. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSlowSub32InPlaceLeft): + https://bugs.webkit.org/show_bug.cgi?id=41351 + rdar://problem/8142141 -2009-05-12 Sam Weinig <sam@webkit.org> + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Fix signed integer overflow problem + in op_load_varargs handling. 0xFFFFFFFF was read as -1. - Reviewed by Geoffrey Garen. +2010-06-26 Jeremy Orlow <jorlow@chromium.org> - Remove a function call by folding op_get_by_id and op_put_by_id into - their respective compile functions. + Reviewed by Dumitru Daniliuc. - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): + Support for keys and in-memory storage for IndexedDB + https://bugs.webkit.org/show_bug.cgi?id=41252 -2009-05-12 Sam Weinig <sam@webkit.org> + Set the role to Private. - Reviewed by Geoffrey Garen. + * JavaScriptCore.xcodeproj/project.pbxproj: - Make JITStubCall work in 64bit by making the stack index - step dependent on the size of void*. +2010-07-02 Oliver Hunt <oliver@apple.com> - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::addArgument): + Reviewed by Geoffrey Garen. -2009-05-12 Sam Weinig <sam@webkit.org> + Move BOM handling out of the lexer and parser + https://bugs.webkit.org/show_bug.cgi?id=41539 - Reviewed by Geoffrey Garen. + Doing the BOM stripping in the lexer meant that we could + end up having to strip the BOMs from a source multiple times. + To deal with this we now require all strings provided by + a SourceProvider to already have had the BOMs stripped. + This also simplifies some of the lexer logic. - Implement simple version of property access opcodes - which just call a stub functions. + * parser/Lexer.cpp: + (JSC::Lexer::setCode): + (JSC::Lexer::sourceCode): + * parser/SourceProvider.h: + (JSC::SourceProvider::SourceProvider): + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::getRange): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::copyStringWithoutBOMs): - * jit/JITOpcodes.cpp: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emit_op_put_by_index): - (JSC::JIT::emit_op_put_getter): - (JSC::JIT::emit_op_put_setter): - (JSC::JIT::emit_op_del_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - * jit/JITStubCall.h: - (JSC::JITStubCall::addArgument): - * jsc.cpp: +2010-07-03 Patrick Gansterer <paroga@paroga.com> -2009-05-12 Geoffrey Garen <ggaren@apple.com> + Reviewed by Kent Tamura. - Reviewed by Sam Weinig. - - Added work-around for XCode debugging echo problem. + [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar. + https://bugs.webkit.org/show_bug.cgi?id=41411 - * jsc.cpp: - (runInteractive): + * wtf/unicode/wince/UnicodeWince.cpp: + (WTF::Unicode::isAlphanumeric): + * wtf/unicode/wince/UnicodeWince.h: + (WTF::Unicode::isArabicChar): -2009-05-12 Geoffrey Garen <ggaren@apple.com> +2010-07-03 Kwang Yul Seo <skyul@company100.net> - Reviewed by Sam Weinig. - - Added overflow handling to op_add. + Reviewed by Kent Tamura. - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlowAdd32InPlace): + [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log. + https://bugs.webkit.org/show_bug.cgi?id=41524 -2009-05-12 Sam Weinig <sam@webkit.org> + Print "WebKit CRASH" before crashing. - Reviewed by Geoffrey Garen. + * wtf/Assertions.h: - Add slow cases for op_jnless or emit_op_jnlesseq. +2010-07-02 Gavin Barraclough <barraclough@apple.com> - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): + Reviewed by Oliver Hunt. -2009-05-12 Sam Weinig <sam@webkit.org> + Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken - Reviewed by Geoffrey Garen. + This method tried to repatch a LDR (T2) into an ADD (T3) - but it only + repatches the first instruction word. The layout of the fields in the + second word is different, and also needs repatching. - Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq. - No slow cases for op_jnless or emit_op_jnlesseq yet. + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::repatchLoadPtrToLEA): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emitSlow_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emitSlow_op_loop_if_lesseq): +2010-07-02 Oliver Hunt <oliver@apple.com> -2009-05-12 Sam Weinig <sam@webkit.org> + Reviewed by Gavin Barraclough. - Reviewed by Geoffrey Garen. + Clamp the number of arguments supported by function.apply + https://bugs.webkit.org/show_bug.cgi?id=41351 + <rdar://problem/8142141> - Turn the RECORD_JUMP_TARGET macro into an inline function. + Add clamping logic to function.apply similar to that + enforced by firefox. We have a smaller clamp than + firefox as our calling convention means that stack + usage is proportional to argument count -- the firefox + limit is larger than you could actually call. - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::recordJumpTarget): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_jsr): - (JSC::JIT::emit_op_jmp_scopes): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Arguments.h: + (JSC::Arguments::): -2009-05-12 Sam Weinig <sam@webkit.org> +2010-07-02 Chao-ying Fu <fu@mips.com> - Add MacroAssemblerX86Common::set8 to fix the build. + Reviewed by Oliver Hunt. - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::set8): + Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS + https://bugs.webkit.org/show_bug.cgi?id=40179 -2009-05-12 Geoffrey Garen <ggaren@apple.com> + Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL. - Reviewed by Sam Weinig. - - Added overflow recovery for pre_inc and pre_dec. - - Turned some short-circuit code into early returns, as is the WebKit style. + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * wtf/Platform.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_dec): +2010-07-02 Gavin Barraclough <barraclough@apple.com> -2009-05-12 Sam Weinig <sam@webkit.org> + Reviewed by Oliver Hunt. - Reviewed by Geoffrey Garen. + Bug 41552 - Clean up ARMv7 vfp code generation + Emit separate opcode individually, remove magic numbers. - Implement op_jmp, op_loop, op_eq and op_neq. + Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned). - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_loop): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emitSlow_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emitSlow_op_neq): - (JSC::JIT::emit_op_enter): - (JSC::JIT::emit_op_enter_with_activation): + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::vadd_F64): + (JSC::ARMv7Assembler::vcmp_F64): + (JSC::ARMv7Assembler::vcvt_F64_S32): + (JSC::ARMv7Assembler::vcvtr_S32_F64): + (JSC::ARMv7Assembler::vdiv_F64): + (JSC::ARMv7Assembler::vldr): + (JSC::ARMv7Assembler::vmov_F64_0): + (JSC::ARMv7Assembler::vmov): + (JSC::ARMv7Assembler::vmrs): + (JSC::ARMv7Assembler::vmul_F64): + (JSC::ARMv7Assembler::vstr): + (JSC::ARMv7Assembler::vsub_F64): + (JSC::ARMv7Assembler::VFPOperand::VFPOperand): + (JSC::ARMv7Assembler::VFPOperand::bits1): + (JSC::ARMv7Assembler::VFPOperand::bits4): + (JSC::ARMv7Assembler::vcvtOp): + (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp): + (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::branchDouble): + * runtime/JSImmediate.h: + (JSC::JSValue::isCell): -2009-05-12 Sam Weinig <sam@webkit.org> +2010-07-02 Sheriff Bot <webkit.review.bot@gmail.com> - Reviewed by Geoffrey Garen. + Unreviewed, rolling out r62410. + http://trac.webkit.org/changeset/62410 + https://bugs.webkit.org/show_bug.cgi?id=41549 - Implement the slow cases for arithmetic opcodes. + accursed last minute changes (Requested by olliej on #webkit). - * jit/JITArithmetic.cpp: - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emitSlow_op_bitand): - (JSC::JIT::emitSlow_op_bitor): - (JSC::JIT::emitSlow_op_bitxor): - (JSC::JIT::emitSlow_op_bitnot): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitSlow_op_mod): - (JSC::JIT::emit_op_mod): + * parser/Lexer.cpp: + (JSC::Lexer::setCode): + (JSC::Lexer::copyCodeWithoutBOMs): + (JSC::Lexer::sourceCode): + * parser/SourceProvider.h: + (JSC::): + (JSC::SourceProvider::SourceProvider): + (JSC::SourceProvider::hasBOMs): + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::getRange): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: -2009-05-12 Sam Weinig <sam@webkit.org> +2010-07-02 Sam Weinig <sam@webkit.org> Reviewed by Geoffrey Garen. - Implement op_bitnot. + Patch for https://bugs.webkit.org/show_bug.cgi?id=41548 + Use snprintf instead of sprintf everywhere in JavaScriptCore - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::not32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::notl_m): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_bitnot): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::globalFuncEscape): + * runtime/UString.cpp: + (JSC::UString::from): -2009-05-12 Sam Weinig <sam@webkit.org> +2010-07-02 Oliver Hunt <oliver@apple.com> Reviewed by Geoffrey Garen. - Add arithmetic opcode implementations from the old nitro-extreme branch. + Move BOM handling out of the lexer and parser + https://bugs.webkit.org/show_bug.cgi?id=41539 - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitBitAnd32Constant): - (JSC::JIT::emitBitAnd32InPlace): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emitSlow_op_bitor): - (JSC::JIT::emitBitOr32Constant): - (JSC::JIT::emitBitOr32InPlace): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emitSlow_op_bitxor): - (JSC::JIT::emitBitXor32Constant): - (JSC::JIT::emitBitXor32InPlace): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emitSlow_op_bitnot): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - (JSC::JIT::emit_op_add): - (JSC::JIT::emitAdd32Constant): - (JSC::JIT::emitAdd32InPlace): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emit_op_sub): - (JSC::JIT::emitSlow_op_sub): - (JSC::JIT::emitSub32ConstantLeft): - (JSC::JIT::emitSub32ConstantRight): - (JSC::JIT::emitSub32InPlaceLeft): - (JSC::JIT::emitSub32InPlaceRight): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emitSlow_op_mul): - (JSC::JIT::emitMul32Constant): - (JSC::JIT::emitMul32InPlace): - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - * jit/JITOpcodes.cpp: + Doing the BOM stripping in the lexer meant that we could + end up having to strip the BOMs from a source multiple times. + To deal with this we now require all strings provided by + a SourceProvider to already have had the BOMs stripped. + This also simplifies some of the lexer logic. -2009-05-12 Geoffrey Garen <ggaren@apple.com> + * parser/Lexer.cpp: + (JSC::Lexer::setCode): + (JSC::Lexer::sourceCode): + * parser/SourceProvider.h: + (JSC::SourceProvider::SourceProvider): + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::getRange): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::copyStringWithoutBOMs): + +2010-07-02 Renata Hodovan <reni@inf.u-szeged.hu> - Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit - value representations. + Reviewed by Oliver Hunt. - Added JSAPIValueWrapper to the repository. + [ Updated after rollout. ] - * jit/JIT.h: - * jit/JITArithmetic.cpp: - * runtime/JSAPIValueWrapper.cpp: Added. - (JSC::JSAPIValueWrapper::toPrimitive): - (JSC::JSAPIValueWrapper::getPrimitiveNumber): - (JSC::JSAPIValueWrapper::toBoolean): - (JSC::JSAPIValueWrapper::toNumber): - (JSC::JSAPIValueWrapper::toString): - (JSC::JSAPIValueWrapper::toObject): - * runtime/JSAPIValueWrapper.h: Added. - (JSC::JSAPIValueWrapper::value): - (JSC::JSAPIValueWrapper::isAPIValueWrapper): - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): - (JSC::jsAPIValueWrapper): - * wtf/Platform.h: + Merged RegExp constructor and RegExp::create methods. + Both functions are called with three parameters and check whether + flags (the third param) is given or not. + Avoid extra hash lookups in RegExpCache::create by passing a pre-computed + iterator parameter. + https://bugs.webkit.org/show_bug.cgi?id=41055 -2009-05-12 Geoffrey Garen <ggaren@apple.com> - - Turned on the JIT and got it building and running the most trivial of - programs. - - All configurable optimizations are turned off, and a few opcodes are ad - hoc #if'd out. - - So far, I've only merged op_mov and op_end, but some stub-reliant - opcodes work as-is from TOT. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - * bytecode/CodeBlock.h: - * jit/JIT.cpp: - (JSC::JIT::compileOpStrictEq): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jnlesseq): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emitSlow_op_bitand): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emitSlow_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emitSlow_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emitSlow_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emitSlow_op_pre_dec): - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - (JSC::JIT::emit_op_add): - (JSC::JIT::emit_op_mul): - (JSC::JIT::emit_op_sub): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emitSlow_op_add): - (JSC::JIT::emitSlow_op_mul): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpConstructSetupArgs): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - (JSC::JIT::getConstantOperandImmediateInt): - (JSC::JIT::isOperandConstantImmediateInt): - (JSC::JIT::emitInitRegister): - (JSC::JIT::addSlowCase): - (JSC::JIT::addJump): - (JSC::JIT::emitJumpSlowToHot): - (JSC::JIT::tagFor): - (JSC::JIT::payloadFor): - (JSC::JIT::emitLoad): - (JSC::JIT::emitLoadReturnValue): - (JSC::JIT::emitStore): - (JSC::JIT::emitStoreReturnValue): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_mov): - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_jmp): - (JSC::JIT::emit_op_loop): - (JSC::JIT::emit_op_loop_if_less): - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emit_op_to_primitive): - (JSC::JIT::emit_op_loop_if_true): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_not): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jneq_ptr): - (JSC::JIT::emit_op_unexpected_load): - (JSC::JIT::emit_op_eq): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_neq): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emit_op_throw): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::emit_op_push_scope): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_push_new_scope): - (JSC::JIT::emit_op_catch): - (JSC::JIT::emit_op_switch_imm): - (JSC::JIT::emit_op_switch_char): - (JSC::JIT::emit_op_switch_string): - (JSC::JIT::emit_op_new_error): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): - (JSC::JIT::emitSlow_op_construct_verify): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emitSlow_op_loop_if_less): - (JSC::JIT::emitSlow_op_loop_if_lesseq): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::emitSlow_op_not): - (JSC::JIT::emitSlow_op_instanceof): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emit_op_put_by_index): - (JSC::JIT::emit_op_put_getter): - (JSC::JIT::emit_op_put_setter): - (JSC::JIT::emit_op_del_by_id): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::compilePutByIdHotPath): - * jit/JITStubCall.h: - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::addArgument): - (JSC::JITStubCall::call): - (JSC::JITStubCall::): - (JSC::CallEvalJITStub::CallEvalJITStub): - * jit/JITStubs.cpp: - (JSC::): - (JSC::JITStubs::cti_op_add): - (JSC::JITStubs::cti_op_pre_inc): - (JSC::JITStubs::cti_op_mul): - (JSC::JITStubs::cti_op_get_by_val): - (JSC::JITStubs::cti_op_get_by_val_string): - (JSC::JITStubs::cti_op_get_by_val_byte_array): - (JSC::JITStubs::cti_op_sub): - (JSC::JITStubs::cti_op_put_by_val): - (JSC::JITStubs::cti_op_put_by_val_array): - (JSC::JITStubs::cti_op_put_by_val_byte_array): - (JSC::JITStubs::cti_op_negate): - (JSC::JITStubs::cti_op_div): - (JSC::JITStubs::cti_op_pre_dec): - (JSC::JITStubs::cti_op_post_inc): - (JSC::JITStubs::cti_op_eq): - (JSC::JITStubs::cti_op_lshift): - (JSC::JITStubs::cti_op_bitand): - (JSC::JITStubs::cti_op_rshift): - (JSC::JITStubs::cti_op_bitnot): - (JSC::JITStubs::cti_op_mod): - (JSC::JITStubs::cti_op_neq): - (JSC::JITStubs::cti_op_post_dec): - (JSC::JITStubs::cti_op_urshift): - (JSC::JITStubs::cti_op_bitxor): - (JSC::JITStubs::cti_op_bitor): - (JSC::JITStubs::cti_op_switch_imm): - * jit/JITStubs.h: - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - * runtime/JSValue.h: - (JSC::JSValue::payload): - * wtf/Platform.h: + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: -2009-05-07 Sam Weinig <sam@webkit.org> +2010-07-02 Martin Robinson <mrobinson@igalia.com> - Reviewed by Geoffrey Garen. + Unreviewed. Build fix for GTK+. - Add some new MacroAssembler and assembler functions that will be needed shortly. + Build Lexer.lut.h with the rest of the .lut.h files. Later these should + all probably be moved to DerivedSources. - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::add32): - (JSC::MacroAssemblerX86Common::and32): - (JSC::MacroAssemblerX86Common::mul32): - (JSC::MacroAssemblerX86Common::neg32): - (JSC::MacroAssemblerX86Common::or32): - (JSC::MacroAssemblerX86Common::sub32): - (JSC::MacroAssemblerX86Common::xor32): - (JSC::MacroAssemblerX86Common::branchAdd32): - (JSC::MacroAssemblerX86Common::branchMul32): - (JSC::MacroAssemblerX86Common::branchSub32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::): - (JSC::X86Assembler::addl_rm): - (JSC::X86Assembler::andl_mr): - (JSC::X86Assembler::andl_rm): - (JSC::X86Assembler::andl_im): - (JSC::X86Assembler::negl_r): - (JSC::X86Assembler::notl_r): - (JSC::X86Assembler::orl_rm): - (JSC::X86Assembler::orl_im): - (JSC::X86Assembler::subl_rm): - (JSC::X86Assembler::xorl_mr): - (JSC::X86Assembler::xorl_rm): - (JSC::X86Assembler::xorl_im): - (JSC::X86Assembler::imull_mr): - -2009-05-11 Sam Weinig <sam@webkit.org> + * GNUmakefile.am: - Reviewed by Cameron Zwarich. +2010-06-23 Martin Robinson <mrobinson@igalia.com> - Remove the NumberHeap. + Reviewed by Gustavo Noronha Silva. - * JavaScriptCore.exp: - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::recordExtraCost): - (JSC::Heap::heapAllocate): - (JSC::Heap::markConservatively): - (JSC::Heap::sweep): - (JSC::Heap::collect): - (JSC::Heap::objectCount): - (JSC::Heap::statistics): - (JSC::typeName): - (JSC::Heap::isBusy): - * runtime/Collector.h: - (JSC::Heap::globalData): - * runtime/JSCell.h: + [GTK] Separate DerivedSources per-project + https://bugs.webkit.org/show_bug.cgi?id=41109 -2009-05-11 Geoffrey Garen <ggaren@apple.com> + Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore. - Reviewed by Sam Weinig. + * GNUmakefile.am: - Land initial commit of new number representation for 32 bit platforms, - with JIT disabled. +2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu> - * API/APICast.h: - (toJS): - (toRef): - * API/JSCallbackObjectFunctions.h: - (JSC::::hasInstance): - (JSC::::toNumber): - (JSC::::toString): - * API/tests/testapi.c: - (EvilExceptionObject_convertToType): - * AllInOneFile.cpp: - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::valueToSourceString): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::emitUnexpectedLoad): - (JSC::keyForImmediateSwitch): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::privateExecute): - * parser/Nodes.cpp: - (JSC::ArrayNode::emitBytecode): - (JSC::processClauseList): - * runtime/ArgList.h: - * runtime/Collector.h: - (JSC::sizeof): - * runtime/DateMath.cpp: - * runtime/ExceptionHelpers.h: - * runtime/InitializeThreading.cpp: - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSCell.cpp: - * runtime/JSCell.h: - (JSC::JSCell::isAPIValueWrapper): - (JSC::JSValue::isString): - (JSC::JSValue::isGetterSetter): - (JSC::JSValue::isObject): - (JSC::JSValue::getString): - (JSC::JSValue::getObject): - (JSC::JSValue::getCallData): - (JSC::JSValue::getConstructData): - (JSC::JSValue::getUInt32): - (JSC::JSValue::marked): - (JSC::JSValue::toPrimitive): - (JSC::JSValue::getPrimitiveNumber): - (JSC::JSValue::toBoolean): - (JSC::JSValue::toNumber): - (JSC::JSValue::toString): - (JSC::JSValue::needsThisConversion): - (JSC::JSValue::toThisString): - (JSC::JSValue::getJSNumber): - (JSC::JSValue::toObject): - (JSC::JSValue::toThisObject): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.h: - (JSC::Structure::prototypeForLookup): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - * runtime/JSImmediate.h: - * runtime/JSNumberCell.cpp: Removed. - * runtime/JSNumberCell.h: Removed. - * runtime/JSObject.h: - (JSC::JSValue::get): - (JSC::JSValue::put): - * runtime/JSString.h: - (JSC::JSValue::toThisJSString): - * runtime/JSValue.cpp: - (JSC::JSValue::toInteger): - (JSC::JSValue::toIntegerPreserveNaN): - (JSC::JSValue::toObjectSlowCase): - (JSC::JSValue::toThisObjectSlowCase): - (JSC::JSValue::synthesizeObject): - (JSC::JSValue::synthesizePrototype): - (JSC::JSValue::description): - (JSC::nonInlineNaN): - * runtime/JSValue.h: - (JSC::JSValue::): - (JSC::EncodedJSValueHashTraits::emptyValue): - (JSC::jsNaN): - (JSC::operator==): - (JSC::operator!=): - (JSC::toInt32): - (JSC::toUInt32): - (JSC::JSValue::encode): - (JSC::JSValue::decode): - (JSC::JSValue::JSValue): - (JSC::JSValue::operator bool): - (JSC::JSValue::operator==): - (JSC::JSValue::operator!=): - (JSC::JSValue::isUndefined): - (JSC::JSValue::isNull): - (JSC::JSValue::isUndefinedOrNull): - (JSC::JSValue::isCell): - (JSC::JSValue::isInt32): - (JSC::JSValue::isUInt32): - (JSC::JSValue::isDouble): - (JSC::JSValue::isTrue): - (JSC::JSValue::isFalse): - (JSC::JSValue::tag): - (JSC::JSValue::asInt32): - (JSC::JSValue::asUInt32): - (JSC::JSValue::asDouble): - (JSC::JSValue::asCell): - (JSC::JSValue::isNumber): - (JSC::JSValue::isBoolean): - (JSC::JSValue::getBoolean): - (JSC::JSValue::uncheckedGetNumber): - (JSC::JSValue::toJSNumber): - (JSC::JSValue::getNumber): - (JSC::JSValue::toInt32): - (JSC::JSValue::toUInt32): - * runtime/Operations.h: - (JSC::JSValue::equal): - (JSC::JSValue::equalSlowCaseInline): - (JSC::JSValue::strictEqual): - (JSC::JSValue::strictEqualSlowCaseInline): - (JSC::jsLess): - (JSC::jsLessEq): - (JSC::jsAdd): - * runtime/PropertySlot.h: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncIndexOf): - * wtf/Platform.h: + Reviewed by Oliver Hunt. -=== Start merge of nitro-extreme branch 2009-07-30 === + The alternativeFrameLocation value is wrong in the emitDisjunction function in + case of PatternTerm::TypeParentheticalAssertion. This value needs to be + computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc + memory corruption in some cases. + Layout test added for checking of TypeParentheticalAssertion case. + https://bugs.webkit.org/show_bug.cgi?id=41458 -2009-07-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): - Reviewed by George Staikos. +2010-07-01 Oliver Hunt <oliver@apple.com> - Resolve class/struct mixup in forward declarations - https://bugs.webkit.org/show_bug.cgi?id=27708 + Reviewed by Maciej Stachowiak. - * API/JSClassRef.h: - * bytecode/SamplingTool.h: - * interpreter/Interpreter.h: - * jit/JIT.h: - * profiler/ProfileGenerator.h: - * profiler/Profiler.h: - * runtime/ClassInfo.h: - * runtime/ExceptionHelpers.h: - * runtime/JSByteArray.h: - * runtime/JSCell.h: - * runtime/JSFunction.h: - * runtime/JSGlobalData.h: - * runtime/JSObject.h: - * runtime/JSString.h: + Add a FixedArray template to encapsulate fixed length arrays + https://bugs.webkit.org/show_bug.cgi?id=41506 -2009-07-28 Ada Chan <adachan@apple.com> + This new type is used in place of fixed length C arrays so + that debug builds can guard against attempts to go beyond + the end of the array. - Reviewed by Darin Adler. + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/Opcode.cpp: + (JSC::OpcodeStats::~OpcodeStats): + * pcre/pcre_compile.cpp: + (calculateCompiledPatternLength): + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + (JSC::Heap::allocate): + * runtime/Collector.h: + (JSC::CollectorBitmap::clearAll): + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::operator*): + * runtime/DateInstanceCache.h: + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + * runtime/JSString.h: + (JSC::RopeBuilder::JSStringFinalizerStruct::): + * runtime/NumericStrings.h: + * runtime/RegExpCache.h: + * runtime/SmallStrings.h: + (JSC::SmallStrings::singleCharacterStrings): + * wtf/AVLTree.h: + * wtf/FixedArray.h: Added. + (WTF::FixedArray::operator[]): + (WTF::FixedArray::data): - https://bugs.webkit.org/show_bug.cgi?id=27236 - - Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows. - - Use a background thread to periodically scavenge memory to release back to the system. +2010-07-01 Zoltan Herczeg <zherczeg@webkit.org> - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::init): - (WTF::TCMalloc_PageHeap::runScavengerThread): - (WTF::TCMalloc_PageHeap::scavenge): - (WTF::TCMalloc_PageHeap::shouldContinueScavenging): - (WTF::TCMalloc_PageHeap::New): - (WTF::TCMalloc_PageHeap::AllocLarge): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::GrowHeap): - (WTF::sleep): - (WTF::TCMalloc_PageHeap::scavengerThread): - * wtf/TCSystemAlloc.cpp: - (TCMalloc_SystemRelease): - (TCMalloc_SystemCommit): - * wtf/TCSystemAlloc.h: + Reviewed by Oliver Hunt. -2009-07-28 Xan Lopez <xlopez@igalia.com> + Improve the main lexer switch by mapping input characters to their type + https://bugs.webkit.org/show_bug.cgi?id=41459 - Add new files, fixes distcheck. + Sunsipder: no change (from 532.9ms to 531.5ms) + SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms) - * GNUmakefile.am: + * parser/Lexer.cpp: + (JSC::): + (JSC::Lexer::lex): -2009-07-28 Csaba Osztrogonac <oszi@inf.u-szeged.hu> +2010-07-01 Sam Weinig <sam@webkit.org> - Reviewed by Simon Hausmann. + Rubber-stamped by Ander Carlsson. - [Qt] Determining whether to use JIT or interpreter - moved from JavaScriptCore.pri to Platform.h + Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard. - * JavaScriptCore.pri: * wtf/Platform.h: -2009-07-27 Brian Weinstein <bweinstein@apple.com> - - Fix of misuse of sort command. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - -2009-07-27 Brian Weinstein <bweinstein@apple.com> - - Build fix for Windows. +2010-07-01 Gavin Barraclough <barraclough@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by Oliver Hunt. -2009-07-27 Gavin Barraclough <barraclough@apple.com> + Bug 41490 - Add missing operations to MacroAssemblerARMv7 + Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed. - Rubber stamped by Oliver Hunt. + * assembler/ARMv7Assembler.h: + (JSC::ARMRegisters::): + (JSC::ARMRegisters::asSingle): + (JSC::ARMRegisters::asDouble): + (JSC::VFPImmediate::VFPImmediate): + (JSC::VFPImmediate::isValid): + (JSC::VFPImmediate::value): + (JSC::ARMv7Assembler::singleRegisterMask): + (JSC::ARMv7Assembler::doubleRegisterMask): + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::add_S): + (JSC::ARMv7Assembler::neg): + (JSC::ARMv7Assembler::orr_S): + (JSC::ARMv7Assembler::sub): + (JSC::ARMv7Assembler::sub_S): + (JSC::ARMv7Assembler::vadd_F64): + (JSC::ARMv7Assembler::vcmp_F64): + (JSC::ARMv7Assembler::vcvt_F64_S32): + (JSC::ARMv7Assembler::vcvtr_S32_F64): + (JSC::ARMv7Assembler::vdiv_F64): + (JSC::ARMv7Assembler::vldr): + (JSC::ARMv7Assembler::vmov_F64_0): + (JSC::ARMv7Assembler::vmov): + (JSC::ARMv7Assembler::vmul_F64): + (JSC::ARMv7Assembler::vstr): + (JSC::ARMv7Assembler::vsub_F64): + (JSC::ARMv7Assembler::vcvt): + (JSC::ARMv7Assembler::vmem): + * assembler/AbstractMacroAssembler.h: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle): + (JSC::MacroAssemblerARMv7::neg32): + (JSC::MacroAssemblerARMv7::loadDouble): + (JSC::MacroAssemblerARMv7::divDouble): + (JSC::MacroAssemblerARMv7::convertInt32ToDouble): + (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32): + (JSC::MacroAssemblerARMv7::zeroDouble): + (JSC::MacroAssemblerARMv7::branchOr32): + (JSC::MacroAssemblerARMv7::set32): + (JSC::MacroAssemblerARMv7::set8): + * assembler/MacroAssemblerMIPS.h: + * assembler/MacroAssemblerX86Common.h: - Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall. +2010-07-01 Oliver Hunt <oliver@apple.com> - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::preserveReturnAddressAfterCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): + Reviewed by Geoff Garen. -2009-07-27 Alexey Proskuryakov <ap@webkit.org> + Improve reentrancy logic in polymorphic cache stubs + <https://bugs.webkit.org/show_bug.cgi?id=41482> + <rdar://problem/8094380> - Gtk build fix. + Make the polymorphic cache stubs handle reentrancy + better. - * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case. + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC::getPolymorphicAccessStructureListSlot): -2009-07-27 Alexey Proskuryakov <ap@webkit.org> +2010-07-01 Antti Koivisto <koivisto@iki.fi> - Release build fix. + Revert accidental commit. - * runtime/JSLock.h: (JSC::JSLock::~JSLock): + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): -2009-07-27 Alexey Proskuryakov <ap@webkit.org> +2010-06-30 Darin Adler <darin@apple.com> - Reviewed by Darin Adler. + Reviewed by Adam Barth. - https://bugs.webkit.org/show_bug.cgi?id=27735 - Give a helpful name to JSLock constructor argument + Add assertion, off by default, for when you forget to do adoptRef + https://bugs.webkit.org/show_bug.cgi?id=41422 - * API/JSBase.cpp: - (JSGarbageCollect): - * API/JSContextRef.cpp: - * API/JSObjectRef.cpp: - (JSPropertyNameArrayRelease): - (JSPropertyNameAccumulatorAddName): - * JavaScriptCore.exp: - * jsc.cpp: - (functionGC): - (cleanupGlobalData): - (jscmain): - * runtime/Collector.cpp: - (JSC::Heap::destroy): - * runtime/JSLock.cpp: - (JSC::JSLock::JSLock): - (JSC::JSLock::lock): - (JSC::JSLock::unlock): - (JSC::JSLock::DropAllLocks::DropAllLocks): - (JSC::JSLock::DropAllLocks::~DropAllLocks): - * runtime/JSLock.h: - (JSC::): - (JSC::JSLock::JSLock): - (JSC::JSLock::~JSLock): + * wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted + function, called on the pointer by adoptRef, with an empty inline + default version, meant to be overloaded. Unified the inlining + with a macro named REF_DEREF_INLINE to make it clearer what's + going on in the refIfNotNull/derefIfNotNull functions. Renamed + releaseRef to leakRef, but left the old name in for compatibility + for now. -2009-07-25 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + * wtf/RefCounted.h: Added code to require adoption and assert if + you don't call adoptRef. For now, it is turned off because of the + LOOSE_REF_COUNTED define in this header. Later we can turn it on + once we get everything working without asserting. - Reviewed by Eric Seidel. +2010-06-29 Michael Saboff <msaboff@apple.com> - Allow custom memory allocation control for OpaqueJSPropertyNameArray struct - https://bugs.webkit.org/show_bug.cgi?id=27342 + Reviewed by Darin Adler. - Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been - instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473. + Bug 41238 - RegExp performance slow on Dromaeo benchmark - * API/JSObjectRef.cpp: + Other javascript engines appear to cache prior results of regular + expression operations. -2009-07-24 Ada Chan <adachan@apple.com> + Suggest adding some sort of caching mechanism to regular expression + processing. - In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236: - Remove TCMALLOC_TRACK_DECOMMITED_SPANS. We'll always track decommitted spans. - We have tested this and show it has little impact on performance. + Added a single entry cache of match() results to RegExp class. - Reviewed by Mark Rowe. + Also added performance improvements to UString == operator. + First check the impls for equality. Then get the length of + each of the non-null impls. Next check the sizes for equality. + Then check the data for the case of different impls that point + to the same data (most likely due to substrings from the beginning of + another string). Lastly we check the underlying data for equality. - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::New): - (WTF::TCMalloc_PageHeap::AllocLarge): - (WTF::propagateDecommittedState): - (WTF::mergeDecommittedStates): - (WTF::TCMalloc_PageHeap::Delete): - (WTF::TCMalloc_PageHeap::IncrementalScavenge): + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::match): + * runtime/RegExp.h: + * runtime/UString.h: + (JSC::operator==): -2009-07-24 Csaba Osztrogonac <oszi@inf.u-szeged.hu> +2010-06-29 Nathan Lawrence <nlawrence@apple.com> - Reviewed by Darin Adler and Adam Barth. + Reviewed by Geoffrey Garen. - Build fix for x86 platforms. - https://bugs.webkit.org/show_bug.cgi?id=27602 + WTF::HashSet iterators are quasi-mutable. Changing the value through + dereferencing an iterator will not change the behavior of methods like + contains or find, but will change the behavior of iterating. - * jit/JIT.cpp: + * wtf/HashSet.h: + (WTF::::begin): + (WTF::::end): + (WTF::::find): + (WTF::::remove): + * wtf/HashTable.h: -2009-07-23 Kevin Ollivier <kevino@theolliviers.com> +2010-06-29 Martin Robinson <mrobinson@igalia.com> - wx build fix, adding missing header. + Reviewed by Xan Lopez. - * jit/JIT.cpp: + [GTK] Clean up the source lists in the GNUMakefile.am files + https://bugs.webkit.org/show_bug.cgi?id=41229 -2009-07-22 Yong Li <yong.li@torchmobile.com> + Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate + the source lists. - Reviewed by George Staikos. + * GNUmakefile.am: - Add wince specific memory files into wtf/wince - https://bugs.webkit.org/show_bug.cgi?id=27550 +2010-06-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> - * wtf/wince/FastMallocWince.h: Added. - * wtf/wince/MemoryManager.cpp: Added. - * wtf/wince/MemoryManager.h: Added. + Reviewed by Kenneth Rohde Christiansen. -2009-07-23 Norbert Leser <norbert.leser@nokia.com> + [Qt] Fix QtScript build after QScriptValuePrivate ctor changes + https://bugs.webkit.org/show_bug.cgi?id=41307 - Reviewed by Simon Hausmann. + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::prototype): + * qt/benchmarks/qscriptengine/qscriptengine.pro: - Fix for missing mmap features in Symbian - https://bugs.webkit.org/show_bug.cgi?id=24540 +2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> - Fix, conditionally for PLATFORM(SYMBIAN), as an alternative - to missing support for the MAP_ANON property flag in mmap. - It utilizes Symbian specific memory allocation features. + Reviewed by Kenneth Rohde Christiansen. - * runtime/Collector.cpp + [Qt] QScriptEngine API should contain a newArray function + https://bugs.webkit.org/show_bug.cgi?id=39115 -2009-07-22 Gavin Barraclough <barraclough@apple.com> + * qt/api/qscriptengine.cpp: + (QScriptEngine::newArray): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::newArray): + * qt/api/qscriptengine_p.h: + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::newArray): - Reviewed by Sam Weinig. +2010-06-28 Xan Lopez <xlopez@igalia.com> - With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event. - ( https://bugs.webkit.org/show_bug.cgi?id=27564 ) + Reviewed by Gustavo Noronha. - Currently we change permissions forwards and backwards for each instruction modified, - instead we should only change permissions once per complete repatching event. + Install jsc as jsc-X where X is the major API version to allow + parallel installation of both GTK+ 2.x and 3.x versions. - 2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled, - which recoups 1/3 of the penalty of running with this mode enabled. + * GNUmakefile.am: - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::linkBranch): - - Replace usage of MakeWritable with cacheFlush. - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::patchPointerInternal): - (JSC::ARMAssembler::repatchLoadPtrToLEA): - - Replace usage of MakeWritable with cacheFlush. +2010-06-28 John Gregg <johnnyg@google.com> - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::relinkJump): - (JSC::ARMv7Assembler::relinkCall): - (JSC::ARMv7Assembler::repatchInt32): - (JSC::ARMv7Assembler::repatchPointer): - (JSC::ARMv7Assembler::repatchLoadPtrToLEA): - (JSC::ARMv7Assembler::setInt32): - - Replace usage of MakeWritable with cacheFlush. + Reviewed by Kent Tamura. - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::performFinalization): - - Make explicit call to cacheFlush. + add ENABLE_DIRECTORY_UPLOAD build support + https://bugs.webkit.org/show_bug.cgi?id=41100 - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef): - - Make size always available. + * Configurations/FeatureDefines.xcconfig: - * assembler/RepatchBuffer.h: - (JSC::RepatchBuffer::RepatchBuffer): - (JSC::RepatchBuffer::~RepatchBuffer): - - Add calls to MakeWritable & makeExecutable. +2010-06-28 Xan Lopez <xlopez@igalia.com> - * assembler/X86Assembler.h: - (JSC::X86Assembler::relinkJump): - (JSC::X86Assembler::relinkCall): - (JSC::X86Assembler::repatchInt32): - (JSC::X86Assembler::repatchPointer): - (JSC::X86Assembler::repatchLoadPtrToLEA): - - Remove usage of MakeWritable. + Revert to build jsc, since the tests expect this. - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getJITCode): - - Provide access to CodeBlock's JITCode. + * GNUmakefile.am: - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::makeExecutable): - (JSC::ExecutableAllocator::cacheFlush): - - Remove MakeWritable, make cacheFlush public. +2010-06-28 Zoltan Herczeg <zherczeg@webkit.org> - * jit/JIT.cpp: - (JSC::ctiPatchNearCallByReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - (JSC::JIT::privateCompile): - (JSC::JIT::unlinkCall): - (JSC::JIT::linkCall): - - Add CodeBlock argument to RepatchBuffer. + Reviewed by Oliver Hunt. - * jit/JIT.h: - - Pass CodeBlock argument for use by RepatchBuffer. + Only one character lookahead should be enough for the lexer + https://bugs.webkit.org/show_bug.cgi?id=41213 - * jit/JITCode.h: - (JSC::JITCode::start): - (JSC::JITCode::size): - - Provide access to code start & size. + The lexer had 4 character lookahead before, which required + a complex shifting mechanism. This can be improved by using + only one character lookahead for most decisions, and a + peek() function as a fallback when it is absolutely necessary. - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchMethodCallProto): - (JSC::JIT::patchPutByIdReplace): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - - Add CodeBlock argument to RepatchBuffer. + * parser/Lexer.cpp: + (JSC::Lexer::currentCharacter): + (JSC::Lexer::currentOffset): + (JSC::Lexer::setCode): + (JSC::Lexer::shift): + (JSC::Lexer::peek): + (JSC::Lexer::getUnicodeCharacter): + (JSC::Lexer::shiftLineTerminator): + (JSC::Lexer::lastTokenWasRestrKeyword): + (JSC::Lexer::lex): + (JSC::Lexer::scanRegExp): + (JSC::Lexer::skipRegExp): + * parser/Lexer.h: - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - - Pass CodeBlock argument for use by RepatchBuffer. +2010-06-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> -2009-07-21 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + Unreviewed build fix. - Reviewed by Gavin Barraclough. + [EFL] Build fix for latest version of Ecore library. + Ecore recently changed return type of callbacks from int to Eina_Bool. - Cache not only the structure of the method, but the - structure of its prototype as well. - https://bugs.webkit.org/show_bug.cgi?id=27077 + * wtf/efl/MainThreadEfl.cpp: + (WTF::timeoutFired): Return Eina_Bool instead of int. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - * bytecode/CodeBlock.h: - (JSC::MethodCallLinkInfo::MethodCallLinkInfo): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::patchMethodCallProto): +2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> -2009-07-21 Gavin Barraclough <barraclough@apple.com> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by Sam Weinig. + [Qt] QScriptValue should have API for accessing object properties + https://bugs.webkit.org/show_bug.cgi?id=40903 - Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes. - ( https://bugs.webkit.org/show_bug.cgi?id=27527 ) + Make possible to access properties inside QScriptValues. While this + still doesn't support the ResolveLocal parameter, it is already useful + for testing the API. - This allows the implementation to be defined per architecture. Specifically this addresses the - fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call - to register. Patching the call actually requires the pointer load to be patched, rather than - the call to be patched. This is implementation detail specific to MacroAssemblerX86_64, and as - such is best handled there. + The tests from upstream QtScript weren't imported since most of them + depend on the setProperty() function as well. A simple test was created. - * assembler/AbstractMacroAssembler.h: - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::linkCall): - (JSC::MacroAssemblerARM::repatchCall): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::linkCall): - (JSC::MacroAssemblerARMv7::repatchCall): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::linkCall): - (JSC::MacroAssemblerX86::repatchCall): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::linkCall): - (JSC::MacroAssemblerX86_64::repatchCall): + * qt/api/qscriptvalue.cpp: + (QScriptValue::property): + * qt/api/qscriptvalue.h: + (QScriptValue::): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::property): + * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: + (tst_QScriptValue::propertySimple): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: -2009-07-21 Adam Treat <adam.treat@torchmobile.com> +2010-06-28 Xan Lopez <xlopez@igalia.com> - Reviewed by George Staikos. + Reviewed by Gustavo Noronha. - Every wtf file includes other wtf files with <> style includes - except this one. Fix the exception. + [GTK] Add support for GTK+3 + https://bugs.webkit.org/show_bug.cgi?id=41253 - * wtf/ByteArray.h: + Suffix jsc with the API version of the library, so that + libwebkitgtk 1.x and 3.x can install jsc. -2009-07-21 Gavin Barraclough <barraclough@apple.com> + * GNUmakefile.am: - Reviewed by Oliver Hunt. +2010-06-27 Kwang Yul Seo <skyul@company100.net> - Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler. - ( https://bugs.webkit.org/show_bug.cgi?id=27485 ) + Reviewed by Kent Tamura. - This change is the first step in a process to move code that should be in - the architecture-specific MacroAssembler classes up out of Assmbler and - AbstractMacroAssembler. + [BREWMP] Turn ENABLE(SINGLE_THREADED) on. + https://bugs.webkit.org/show_bug.cgi?id=41135 - * JavaScriptCore.xcodeproj/project.pbxproj: - - added new files - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::linkPointer): - - rename patchPointer to bring it in line with the current link/repatch naming scheme - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::linkCall): - (JSC::ARMv7Assembler::linkPointer): - (JSC::ARMv7Assembler::relinkCall): - (JSC::ARMv7Assembler::repatchInt32): - (JSC::ARMv7Assembler::repatchPointer): - (JSC::ARMv7Assembler::setInt32): - (JSC::ARMv7Assembler::setPointer): - - rename patchPointer to bring it in line with the current link/repatch naming scheme + Brew MP does not support preemptive multi-threading. + Disable threading for Brew MP. - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::linkJump): - (JSC::AbstractMacroAssembler::linkCall): - (JSC::AbstractMacroAssembler::linkPointer): - (JSC::AbstractMacroAssembler::getLinkerAddress): - (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset): - (JSC::AbstractMacroAssembler::repatchJump): - (JSC::AbstractMacroAssembler::repatchCall): - (JSC::AbstractMacroAssembler::repatchNearCall): - (JSC::AbstractMacroAssembler::repatchInt32): - (JSC::AbstractMacroAssembler::repatchPointer): - (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA): - - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler - - * assembler/LinkBuffer.h: Added. - (JSC::LinkBuffer::LinkBuffer): - (JSC::LinkBuffer::~LinkBuffer): - (JSC::LinkBuffer::link): - (JSC::LinkBuffer::patch): - (JSC::LinkBuffer::locationOf): - (JSC::LinkBuffer::locationOfNearCall): - (JSC::LinkBuffer::returnAddressOffset): - (JSC::LinkBuffer::finalizeCode): - (JSC::LinkBuffer::finalizeCodeAddendum): - (JSC::LinkBuffer::code): - (JSC::LinkBuffer::performFinalization): - - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler - - * assembler/RepatchBuffer.h: Added. - (JSC::RepatchBuffer::RepatchBuffer): - (JSC::RepatchBuffer::relink): - (JSC::RepatchBuffer::repatch): - (JSC::RepatchBuffer::repatchLoadPtrToLEA): - (JSC::RepatchBuffer::relinkCallerToTrampoline): - (JSC::RepatchBuffer::relinkCallerToFunction): - (JSC::RepatchBuffer::relinkNearCallerToTrampoline): - - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler + * wtf/Platform.h: - * assembler/X86Assembler.h: - (JSC::X86Assembler::linkJump): - (JSC::X86Assembler::linkCall): - (JSC::X86Assembler::linkPointerForCall): - (JSC::X86Assembler::linkPointer): - (JSC::X86Assembler::relinkJump): - (JSC::X86Assembler::relinkCall): - (JSC::X86Assembler::repatchInt32): - (JSC::X86Assembler::repatchPointer): - (JSC::X86Assembler::setPointer): - (JSC::X86Assembler::setInt32): - (JSC::X86Assembler::setRel32): - - rename patchPointer to bring it in line with the current link/repatch naming scheme +2010-06-26 Tony Gentilcore <tonyg@chromium.org> - * jit/JIT.cpp: - (JSC::ctiPatchNearCallByReturnAddress): - (JSC::ctiPatchCallByReturnAddress): - - include new headers - - remove MacroAssembler:: specification from RepatchBuffer usage + Reviewed by Dimitri Glazkov. - * jit/JITPropertyAccess.cpp: - * yarr/RegexJIT.cpp: - - include new headers + Add an ENABLE_WEB_TIMING option for enabling Web Timing support. + https://bugs.webkit.org/show_bug.cgi?id=38924 -2009-07-21 Robert Agoston <Agoston.Robert@stud.u-szeged.hu> + * Configurations/FeatureDefines.xcconfig: - Reviewed by David Levin. +2010-06-25 Nathan Lawrence <nlawrence@apple.com> - Fixed #undef typo. - https://bugs.webkit.org/show_bug.cgi?id=27506 + Reviewed by Geoffrey Garen. - * bytecode/Opcode.h: + We assume in testapi.c that the value aHeapRef refers to will not be + moved. When we have movable objects, this will not be the case. -2009-07-21 Adam Roben <aroben@apple.com> + * API/tests/testapi.c: + (main): - Roll out r46153, r46154, and r46155 +2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> - These changes were causing build failures and assertion failures on - Windows. + Unreviewed, rolling out r61924. + http://trac.webkit.org/changeset/61924 + https://bugs.webkit.org/show_bug.cgi?id=41240 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - * runtime/StringPrototype.cpp: - * runtime/UString.cpp: - * runtime/UString.h: - * wtf/FastMalloc.cpp: - * wtf/FastMalloc.h: - * wtf/Platform.h: - * wtf/PossiblyNull.h: Removed. + It was rolled out, but cq+ wasn't removed (Requested by Ossy_ + on #webkit). -2009-07-21 Roland Steiner <rolandsteiner@google.com> + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: - Reviewed by David Levin. +2010-06-25 Renata Hodovan <reni@inf.u-szeged.hu> - Add ENABLE_RUBY to list of build options - https://bugs.webkit.org/show_bug.cgi?id=27324 + Reviewed by Geoffrey Garen. - * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY. + Merge RegExp constructor and RegExp::create methods into one. + Both of function are called with tree parameters and check whether + flags (the third param) is given or not. + Simplify hash lookups in RegExpCache::create with giving them an extra + iterator parameter. + https://bugs.webkit.org/show_bug.cgi?id=41055 -2009-07-20 Oliver Hunt <oliver@apple.com> + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: - Build fix attempt #2 +2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by Simon Hausmann. -2009-07-20 Oliver Hunt <oliver@apple.com> + Introduce QtScript benchmarks. + + The QtScript performance should be tested regularly. The patch introduces + micro benchmarks for existing API. + + [Qt] Performance of the QtScript API is not tested. + https://bugs.webkit.org/show_bug.cgi?id=40911 + + * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri. + * qt/benchmarks/benchmarks.pro: Added. + * qt/benchmarks/qscriptengine/qscriptengine.pro: Added. + * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added. + (tst_QScriptEngine::checkSyntax_data): + (tst_QScriptEngine::checkSyntax): + (tst_QScriptEngine::constructor): + (tst_QScriptEngine::evaluateString_data): + (tst_QScriptEngine::evaluateString): + (tst_QScriptEngine::evaluateProgram_data): + (tst_QScriptEngine::evaluateProgram): + (tst_QScriptEngine::newObject): + (tst_QScriptEngine::nullValue): + (tst_QScriptEngine::undefinedValue): + (tst_QScriptEngine::globalObject): + (tst_QScriptEngine::toStringHandle): + * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added. + * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added. + (tst_QScriptValue::tst_QScriptValue): + (tst_QScriptValue::~tst_QScriptValue): + (tst_QScriptValue::values_data): + (tst_QScriptValue::ctorBool): + (tst_QScriptValue::ctorReal): + (tst_QScriptValue::ctorNumber): + (tst_QScriptValue::ctorQString): + (tst_QScriptValue::ctorCString): + (tst_QScriptValue::ctorSpecial): + (tst_QScriptValue::ctorQScriptValue): + (tst_QScriptValue::isValid_data): + (tst_QScriptValue::isValid): + (tst_QScriptValue::isBool_data): + (tst_QScriptValue::isBool): + (tst_QScriptValue::isNumber_data): + (tst_QScriptValue::isNumber): + (tst_QScriptValue::isFunction_data): + (tst_QScriptValue::isFunction): + (tst_QScriptValue::isNull_data): + (tst_QScriptValue::isNull): + (tst_QScriptValue::isString_data): + (tst_QScriptValue::isString): + (tst_QScriptValue::isUndefined_data): + (tst_QScriptValue::isUndefined): + (tst_QScriptValue::isObject_data): + (tst_QScriptValue::isObject): + (tst_QScriptValue::isError_data): + (tst_QScriptValue::isError): + (tst_QScriptValue::toString_data): + (tst_QScriptValue::toString): + (tst_QScriptValue::toNumber_data): + (tst_QScriptValue::toNumber): + (tst_QScriptValue::toBool_data): + (tst_QScriptValue::toBool): + (tst_QScriptValue::toInteger_data): + (tst_QScriptValue::toInteger): + (tst_QScriptValue::toInt32_data): + (tst_QScriptValue::toInt32): + (tst_QScriptValue::toUInt32_data): + (tst_QScriptValue::toUInt32): + (tst_QScriptValue::toUInt16_data): + (tst_QScriptValue::toUInt16): + (tst_QScriptValue::toObject_data): + (tst_QScriptValue::toObject): + (tst_QScriptValue::equals_data): + (tst_QScriptValue::equals): + (tst_QScriptValue::strictlyEquals_data): + (tst_QScriptValue::strictlyEquals): + (tst_QScriptValue::instanceOf_data): + (tst_QScriptValue::instanceOf): + +2010-06-25 Oliver Hunt <oliver@apple.com> - Build fix attempt #1 + Reviewed by Geoffrey Garen. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Remove old js parser + https://bugs.webkit.org/show_bug.cgi?id=41222 -2009-07-20 Oliver Hunt <oliver@apple.com> + Remove the old yacc parser, this also solves the tiger problem. Which + was a conflict between yacc generated token values and those in the + custom parser - Reviewed by Gavin Barraclough. + * Android.mk: + * CMakeLists.txt: + * DerivedSources.make: + * DerivedSources.pro: + * GNUmakefile.am: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * parser/Grammar.y: Removed. + * parser/JSParser.cpp: + * parser/JSParser.h: + * parser/Lexer.cpp: + * parser/NodeConstructors.h: + (JSC::Node::Node): + * parser/Parser.cpp: + (JSC::Parser::parse): + * wtf/Platform.h: - Make it harder to misuse try* allocation routines - https://bugs.webkit.org/show_bug.cgi?id=27469 +2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - Jump through a few hoops to make it much harder to accidentally - miss null-checking of values returned by the try-* allocation - routines. + Reviewed by Simon Hausmann. - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/UString.cpp: - (JSC::allocChars): - (JSC::reallocChars): - (JSC::expandCapacity): - (JSC::UString::Rep::reserveCapacity): - (JSC::UString::expandPreCapacity): - (JSC::createRep): - (JSC::concatenate): - (JSC::UString::spliceSubstringsWithSeparators): - (JSC::UString::replaceRange): - (JSC::UString::append): - (JSC::UString::operator=): - * runtime/UString.h: - (JSC::UString::Rep::createEmptyBuffer): - * wtf/FastMalloc.cpp: - (WTF::tryFastZeroedMalloc): - (WTF::tryFastMalloc): - (WTF::tryFastCalloc): - (WTF::tryFastRealloc): - (WTF::TCMallocStats::tryFastMalloc): - (WTF::TCMallocStats::tryFastCalloc): - (WTF::TCMallocStats::tryFastRealloc): - * wtf/FastMalloc.h: - (WTF::TryMallocReturnValue::TryMallocReturnValue): - (WTF::TryMallocReturnValue::~TryMallocReturnValue): - (WTF::TryMallocReturnValue::operator Maybe<T>): - (WTF::TryMallocReturnValue::getValue): - * wtf/PossiblyNull.h: - (WTF::PossiblyNull::PossiblyNull): - (WTF::PossiblyNull::~PossiblyNull): - (WTF::PossiblyNull::getValue): - * wtf/Platform.h: + New QtScript API; setPrototype() and prototype(). -2009-07-20 Gavin Barraclough <barraclough@apple.com> + This patch implements QScriptValue's prototype accessors. - RS Oliver Hunt. + [Qt] QScriptValue should have accessors to a prototype. + https://bugs.webkit.org/show_bug.cgi?id=39356 - Add ARM assembler files to xcodeproj, for convenience editing. + * qt/api/qscriptvalue.cpp: + (QScriptValue::prototype): + (QScriptValue::setPrototype): + * qt/api/qscriptvalue.h: + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::prototype): + (QScriptValuePrivate::setPrototype): + * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: + (tst_QScriptValue::getSetPrototype): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * JavaScriptCore.xcodeproj/project.pbxproj: +2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi> -2009-07-20 Jessie Berlin <jberlin@apple.com> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by David Levin. + [CMake] Add option to enable JIT. + JIT is disabled by default, but now it's possible to enable it through + an option to CMake: -DENABLE_JIT will enable it. + https://bugs.webkit.org/show_bug.cgi?id=40936 - Fix an incorrect assertion in Vector::remove. - - https://bugs.webkit.org/show_bug.cgi?id=27477 + * CMakeLists.txt: Add missing files and re-sort. - * wtf/Vector.h: - (WTF::::remove): - Assert that the position at which to start removing elements + the - length (the number of elements to remove) is less than or equal to the - size of the entire Vector. +2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi> -2009-07-20 Peter Kasting <pkasting@google.com> + Reviewed by Gustavo Noronha Silva. - Reviewed by Mark Rowe. + [CMake] Remove unused variable in EFL build system. It was previously + being used to set the flags of each port but it was superseded by + other flags. + https://bugs.webkit.org/show_bug.cgi?id=40931 - https://bugs.webkit.org/show_bug.cgi?id=27468 - Back out r46060, which caused problems for some Apple developers. + * jsc/CMakeLists.txt: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: +2010-06-25 Nathan Lawrence <nlawrence@apple.com> -2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Reviewed by Geoffrey Garen. - Reviewed by Oliver Hunt. + Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on + sunspider. - Allow custom memory allocation control in NewThreadContext - https://bugs.webkit.org/show_bug.cgi?id=27338 + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::AssemblerBuffer): - Inherits NewThreadContext struct from FastAllocBase because it - has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76. +2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> - * wtf/Threading.cpp: + Unreviewed, rolling out r61842. + http://trac.webkit.org/changeset/61842 + https://bugs.webkit.org/show_bug.cgi?id=41208 -2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + It broke Windows build (Requested by Ossy_ on #webkit). - Reviewed by Oliver Hunt. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Removed. + * wtf/win/OwnPtrWin.h: Removed. - Allow custom memory allocation control in JavaScriptCore's JSClassRef.h - https://bugs.webkit.org/show_bug.cgi?id=27340 +2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> - Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these - have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153 - and in JavaScriptCore/API/JSClassRef.cpp:166. + Unreviewed, rolling out r61833. + http://trac.webkit.org/changeset/61833 + https://bugs.webkit.org/show_bug.cgi?id=41205 - * API/JSClassRef.h: + It broke Leopard and GTK (Requested by Ossy_ on #webkit). -2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: - Reviewed by Darin Adler. +2010-06-25 Kwang Yul Seo <skyul@company100.net> - Allow custom memory allocation control in JavaScriptCore's RegexPattern.h - https://bugs.webkit.org/show_bug.cgi?id=27343 + Reviewed by Adam Barth. - Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase: + Change OwnPtrCommon to include platform-specific headers + https://bugs.webkit.org/show_bug.cgi?id=40279 - CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144) - PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221) - PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446) + Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds. + Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds. - * yarr/RegexPattern.h: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Added. + * wtf/win/OwnPtrWin.h: Added. -2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu> +2010-06-25 Patrick Gansterer <paroga@paroga.com> Reviewed by Darin Adler. - Allow custom memory allocation control for JavaScriptCore's MatchFrame struct - https://bugs.webkit.org/show_bug.cgi?id=27344 - - Inherits MatchFrame struct from FastAllocBase because it has - been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359. + Add the possibility for a head and footer section to create_jit_stubs. + https://bugs.webkit.org/show_bug.cgi?id=36050 - * pcre/pcre_exec.cpp: + * create_jit_stubs: -2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-06-24 Renata Hodovan <reni@inf.u-szeged.hu> - Reviewed by Holger Freyther. + Reviewed by Geoffrey Garen. - Remove some outdated S60 platform specific code - https://bugs.webkit.org/show_bug.cgi?id=27423 + Merge RegExp constructor and RegExp::create methods into one. + Both of function are called with tree parameters and check whether + flags (the third param) is given or not. + Simplify hash lookups in RegExpCache::create with giving them an extra + iterator parameter. + https://bugs.webkit.org/show_bug.cgi?id=41055 - * wtf/Platform.h: + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: -2009-07-20 Csaba Osztrogonac <oszi@inf.u-szeged.hu> +2010-06-24 Oliver Hunt <oliver@apple.com> - Reviewed by Simon Hausmann. + Reviewed by Maciej Stachowiak. - Qt build fix with MSVC and MinGW. + Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64 + https://bugs.webkit.org/show_bug.cgi?id=41193 - * jsc.pro: Make sure jsc is a console application, and turn off - exceptions and stl support to fix the build. + I noticed a use of '+ 4' in some of the 32_64 code paths and realised there + were a few places where endianness was being hardcoded. This patch fixes + the errors i could find through code inspection. -2009-07-20 Xan Lopez <xlopez@igalia.com> + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_resolve_global): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): - Reviewed by Gustavo Noronha. +2010-06-24 Oliver Hunt <oliver@apple.com> - Do not use C++-style comments in preprocessor directives. + Build fix - GCC does not like this in some configurations, using C-style - comments is safer. + Temporarily get the tiger bot working again by disabling the + new JS parser. GCC on tiger is miscompiling the parser and + I don't have access to a tiger machine right now. * wtf/Platform.h: -2009-07-17 Peter Kasting <pkasting@google.com> + 2010-06-21 Nathan Lawrence <nlawrence@apple.com> - Reviewed by Steve Falkenburg. + Reviewed by Geoff Garen. - https://bugs.webkit.org/show_bug.cgi?id=27323 - Only add Cygwin to the path when it isn't already there. This avoids - causing problems for people who purposefully have non-Cygwin versions of - executables like svn in front of the Cygwin ones in their paths. + https://bugs.webkit.org/show_bug.cgi?id=40128 + Fixed broken debug functionality. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + Fixed to work with updated call frame. + * runtime/JSImmediate.h: + (JSC::JSValue::isCell): + Added assert for aligned cell. + * runtime/JSValue.cpp: + (JSC::JSValue::description): + Fixed to work with current JSValue implementation. + * runtime/JSZombie.cpp: + (JSC::JSZombie::leakedZombieStructure): + JSombies compile again. -2009-07-17 Gabor Loki <loki@inf.u-szeged.hu> +2010-06-24 Leandro Pereira <leandro@profusion.mobi> - Reviewed by Gavin Barraclough. + Unreviewed build fix. - Add YARR support for generic ARM platforms (disabled by default). - https://bugs.webkit.org/show_bug.cgi?id=24986 + * CMakeLists.txt: Add JSParser.cpp. - Add generic ARM port for MacroAssembler. It supports the whole - MacroAssembler functionality except floating point. +2010-06-24 Oliver Hunt <oliver@apple.com> - The class JmpSrc is extended with a flag which enables to patch - the jump destination offset during execution. This feature is - required for generic ARM port. + Reviewed by Maciej Stachowiak. - Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu> - Signed off by Gabor Loki <loki@inf.u-szeged.hu> + Single character string replacement may replace too many characters + https://bugs.webkit.org/show_bug.cgi?id=41138 + <rdar://problem/8097496> - * JavaScriptCore.pri: - * assembler/ARMAssembler.cpp: Added. - (JSC::ARMAssembler::getLdrImmAddress): - (JSC::ARMAssembler::linkBranch): - (JSC::ARMAssembler::patchConstantPoolLoad): - (JSC::ARMAssembler::getOp2): - (JSC::ARMAssembler::genInt): - (JSC::ARMAssembler::getImm): - (JSC::ARMAssembler::moveImm): - (JSC::ARMAssembler::dataTransfer32): - (JSC::ARMAssembler::baseIndexTransfer32): - (JSC::ARMAssembler::executableCopy): - * assembler/ARMAssembler.h: Added. - (JSC::ARM::): - (JSC::ARMAssembler::ARMAssembler): - (JSC::ARMAssembler::): - (JSC::ARMAssembler::JmpSrc::JmpSrc): - (JSC::ARMAssembler::JmpSrc::enableLatePatch): - (JSC::ARMAssembler::JmpDst::JmpDst): - (JSC::ARMAssembler::JmpDst::isUsed): - (JSC::ARMAssembler::JmpDst::used): - (JSC::ARMAssembler::emitInst): - (JSC::ARMAssembler::and_r): - (JSC::ARMAssembler::ands_r): - (JSC::ARMAssembler::eor_r): - (JSC::ARMAssembler::eors_r): - (JSC::ARMAssembler::sub_r): - (JSC::ARMAssembler::subs_r): - (JSC::ARMAssembler::rsb_r): - (JSC::ARMAssembler::rsbs_r): - (JSC::ARMAssembler::add_r): - (JSC::ARMAssembler::adds_r): - (JSC::ARMAssembler::adc_r): - (JSC::ARMAssembler::adcs_r): - (JSC::ARMAssembler::sbc_r): - (JSC::ARMAssembler::sbcs_r): - (JSC::ARMAssembler::rsc_r): - (JSC::ARMAssembler::rscs_r): - (JSC::ARMAssembler::tst_r): - (JSC::ARMAssembler::teq_r): - (JSC::ARMAssembler::cmp_r): - (JSC::ARMAssembler::orr_r): - (JSC::ARMAssembler::orrs_r): - (JSC::ARMAssembler::mov_r): - (JSC::ARMAssembler::movs_r): - (JSC::ARMAssembler::bic_r): - (JSC::ARMAssembler::bics_r): - (JSC::ARMAssembler::mvn_r): - (JSC::ARMAssembler::mvns_r): - (JSC::ARMAssembler::mul_r): - (JSC::ARMAssembler::muls_r): - (JSC::ARMAssembler::mull_r): - (JSC::ARMAssembler::ldr_imm): - (JSC::ARMAssembler::ldr_un_imm): - (JSC::ARMAssembler::dtr_u): - (JSC::ARMAssembler::dtr_ur): - (JSC::ARMAssembler::dtr_d): - (JSC::ARMAssembler::dtr_dr): - (JSC::ARMAssembler::ldrh_r): - (JSC::ARMAssembler::ldrh_d): - (JSC::ARMAssembler::ldrh_u): - (JSC::ARMAssembler::strh_r): - (JSC::ARMAssembler::push_r): - (JSC::ARMAssembler::pop_r): - (JSC::ARMAssembler::poke_r): - (JSC::ARMAssembler::peek_r): - (JSC::ARMAssembler::clz_r): - (JSC::ARMAssembler::bkpt): - (JSC::ARMAssembler::lsl): - (JSC::ARMAssembler::lsr): - (JSC::ARMAssembler::asr): - (JSC::ARMAssembler::lsl_r): - (JSC::ARMAssembler::lsr_r): - (JSC::ARMAssembler::asr_r): - (JSC::ARMAssembler::size): - (JSC::ARMAssembler::ensureSpace): - (JSC::ARMAssembler::label): - (JSC::ARMAssembler::align): - (JSC::ARMAssembler::jmp): - (JSC::ARMAssembler::patchPointerInternal): - (JSC::ARMAssembler::patchConstantPoolLoad): - (JSC::ARMAssembler::patchPointer): - (JSC::ARMAssembler::repatchInt32): - (JSC::ARMAssembler::repatchPointer): - (JSC::ARMAssembler::repatchLoadPtrToLEA): - (JSC::ARMAssembler::linkJump): - (JSC::ARMAssembler::relinkJump): - (JSC::ARMAssembler::linkCall): - (JSC::ARMAssembler::relinkCall): - (JSC::ARMAssembler::getRelocatedAddress): - (JSC::ARMAssembler::getDifferenceBetweenLabels): - (JSC::ARMAssembler::getCallReturnOffset): - (JSC::ARMAssembler::getOp2Byte): - (JSC::ARMAssembler::placeConstantPoolBarrier): - (JSC::ARMAssembler::RM): - (JSC::ARMAssembler::RS): - (JSC::ARMAssembler::RD): - (JSC::ARMAssembler::RN): - (JSC::ARMAssembler::getConditionalField): - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::JmpSrc::enableLatePatch): - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Call::enableLatePatch): - (JSC::AbstractMacroAssembler::Jump::enableLatePatch): - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerARM.h: Added. - (JSC::MacroAssemblerARM::): - (JSC::MacroAssemblerARM::add32): - (JSC::MacroAssemblerARM::and32): - (JSC::MacroAssemblerARM::lshift32): - (JSC::MacroAssemblerARM::mul32): - (JSC::MacroAssemblerARM::not32): - (JSC::MacroAssemblerARM::or32): - (JSC::MacroAssemblerARM::rshift32): - (JSC::MacroAssemblerARM::sub32): - (JSC::MacroAssemblerARM::xor32): - (JSC::MacroAssemblerARM::load32): - (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch): - (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA): - (JSC::MacroAssemblerARM::load16): - (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch): - (JSC::MacroAssemblerARM::store32): - (JSC::MacroAssemblerARM::pop): - (JSC::MacroAssemblerARM::push): - (JSC::MacroAssemblerARM::move): - (JSC::MacroAssemblerARM::swap): - (JSC::MacroAssemblerARM::signExtend32ToPtr): - (JSC::MacroAssemblerARM::zeroExtend32ToPtr): - (JSC::MacroAssemblerARM::branch32): - (JSC::MacroAssemblerARM::branch16): - (JSC::MacroAssemblerARM::branchTest32): - (JSC::MacroAssemblerARM::jump): - (JSC::MacroAssemblerARM::branchAdd32): - (JSC::MacroAssemblerARM::mull32): - (JSC::MacroAssemblerARM::branchMul32): - (JSC::MacroAssemblerARM::branchSub32): - (JSC::MacroAssemblerARM::breakpoint): - (JSC::MacroAssemblerARM::nearCall): - (JSC::MacroAssemblerARM::call): - (JSC::MacroAssemblerARM::ret): - (JSC::MacroAssemblerARM::set32): - (JSC::MacroAssemblerARM::setTest32): - (JSC::MacroAssemblerARM::tailRecursiveCall): - (JSC::MacroAssemblerARM::makeTailRecursiveCall): - (JSC::MacroAssemblerARM::moveWithPatch): - (JSC::MacroAssemblerARM::branchPtrWithPatch): - (JSC::MacroAssemblerARM::storePtrWithPatch): - (JSC::MacroAssemblerARM::supportsFloatingPoint): - (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): - (JSC::MacroAssemblerARM::loadDouble): - (JSC::MacroAssemblerARM::storeDouble): - (JSC::MacroAssemblerARM::addDouble): - (JSC::MacroAssemblerARM::subDouble): - (JSC::MacroAssemblerARM::mulDouble): - (JSC::MacroAssemblerARM::convertInt32ToDouble): - (JSC::MacroAssemblerARM::branchDouble): - (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerARM::ARMCondition): - (JSC::MacroAssemblerARM::prepareCall): - (JSC::MacroAssemblerARM::call32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::JmpSrc::enableLatePatch): - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - * wtf/Platform.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): + Simple fix to stop the rope path of single character replacement + once the first replacement occurs. -2009-07-17 Gabor Loki <loki@inf.u-szeged.hu> + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + +2010-06-24 Gabor Loki <loki@webkit.org> Reviewed by Gavin Barraclough. - Extend AssemblerBuffer with constant pool handling mechanism. - https://bugs.webkit.org/show_bug.cgi?id=24986 + Fix the length of instruction stream controlled by constant pool + https://bugs.webkit.org/show_bug.cgi?id=40293 - Add a platform independed constant pool framework. - This pool can store 32 or 64 bits values which is enough to hold - any integer, pointer or double constant. + The initial/maximum length of instruction stream (m_maxDistance) should + be set when the first constant arrives to the constant pool. Otherwise + the constant pool could be placed into an uninterrupted sequence. - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::putIntUnchecked): - (JSC::AssemblerBuffer::putInt64Unchecked): - (JSC::AssemblerBuffer::append): - (JSC::AssemblerBuffer::grow): - * assembler/AssemblerBufferWithConstantPool.h: Added. + * assembler/AssemblerBufferWithConstantPool.h: (JSC::): -2009-07-17 Eric Roman <eroman@chromium.org> - - Reviewed by Darin Adler. +2010-06-24 Oliver Hunt <oliver@apple.com> - Build fix for non-Darwin. - Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h + Reviewed by Gavin Barraclough. - https://bugs.webkit.org/show_bug.cgi?id=27382 + We assume bytecodeOffset will always return a value > 1, + so we adjust the failure case to return 1 instead of 0. - * wtf/unicode/icu/CollatorICU.cpp: + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): -2009-07-17 Alexey Proskuryakov <ap@webkit.org> +2010-06-23 Oliver Hunt <oliver@apple.com> - Reviewed by John Sullivan. + Reviewed by Gavin Barraclough. - Get user default collation order via a CFLocale API when available. + Custom-written JavaScript parser + https://bugs.webkit.org/show_bug.cgi?id=34019 - * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault): + Implement a recursive descent parser similar to that used by V8 and + SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests. -2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com> + The parser consists of a JSParser class that uses a TreeBuilder to actually + build the AST. There are currently two builders -- the ASTBuilder and + SyntaxChecker which separate the job of building an AST for code generation + and simply checking syntactic correctness. - Reviewed by Simon Hausmann. + There's still some less than ideal code remaining in the parser to allow + us to retain the existing lexing code with minimal changes. We'll tidy + this up at a later date. - [Qt] Fix the include path for the Symbian port - https://bugs.webkit.org/show_bug.cgi?id=27358 + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * parser/ASTBuilder.h: Added. + (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo): + (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo): + (JSC::ASTBuilder::ASTBuilder): + (JSC::ASTBuilder::createSourceElements): + (JSC::ASTBuilder::varDeclarations): + (JSC::ASTBuilder::funcDeclarations): + (JSC::ASTBuilder::features): + (JSC::ASTBuilder::numConstants): + (JSC::ASTBuilder::appendToComma): + (JSC::ASTBuilder::createCommaExpr): + (JSC::ASTBuilder::createLogicalNot): + (JSC::ASTBuilder::createUnaryPlus): + (JSC::ASTBuilder::createVoid): + (JSC::ASTBuilder::thisExpr): + (JSC::ASTBuilder::createResolve): + (JSC::ASTBuilder::createObjectLiteral): + (JSC::ASTBuilder::createArray): + (JSC::ASTBuilder::createNumberExpr): + (JSC::ASTBuilder::createString): + (JSC::ASTBuilder::createBoolean): + (JSC::ASTBuilder::createNull): + (JSC::ASTBuilder::createBracketAccess): + (JSC::ASTBuilder::createDotAccess): + (JSC::ASTBuilder::createRegex): + (JSC::ASTBuilder::createNewExpr): + (JSC::ASTBuilder::createConditionalExpr): + (JSC::ASTBuilder::createAssignResolve): + (JSC::ASTBuilder::createFunctionExpr): + (JSC::ASTBuilder::createFunctionBody): + (JSC::ASTBuilder::createGetterOrSetterProperty): + (JSC::ASTBuilder::createArguments): + (JSC::ASTBuilder::createArgumentsList): + (JSC::ASTBuilder::createProperty): + (JSC::ASTBuilder::createPropertyList): + (JSC::ASTBuilder::createElementList): + (JSC::ASTBuilder::createFormalParameterList): + (JSC::ASTBuilder::createClause): + (JSC::ASTBuilder::createClauseList): + (JSC::ASTBuilder::setUsesArguments): + (JSC::ASTBuilder::createFuncDeclStatement): + (JSC::ASTBuilder::createBlockStatement): + (JSC::ASTBuilder::createExprStatement): + (JSC::ASTBuilder::createIfStatement): + (JSC::ASTBuilder::createForLoop): + (JSC::ASTBuilder::createForInLoop): + (JSC::ASTBuilder::createEmptyStatement): + (JSC::ASTBuilder::createVarStatement): + (JSC::ASTBuilder::createReturnStatement): + (JSC::ASTBuilder::createBreakStatement): + (JSC::ASTBuilder::createContinueStatement): + (JSC::ASTBuilder::createTryStatement): + (JSC::ASTBuilder::createSwitchStatement): + (JSC::ASTBuilder::createWhileStatement): + (JSC::ASTBuilder::createDoWhileStatement): + (JSC::ASTBuilder::createLabelStatement): + (JSC::ASTBuilder::createWithStatement): + (JSC::ASTBuilder::createThrowStatement): + (JSC::ASTBuilder::createDebugger): + (JSC::ASTBuilder::createConstStatement): + (JSC::ASTBuilder::appendConstDecl): + (JSC::ASTBuilder::appendStatement): + (JSC::ASTBuilder::addVar): + (JSC::ASTBuilder::combineCommaNodes): + (JSC::ASTBuilder::evalCount): + (JSC::ASTBuilder::appendBinaryExpressionInfo): + (JSC::ASTBuilder::operatorStackPop): + (JSC::ASTBuilder::operatorStackHasHigherPrecedence): + (JSC::ASTBuilder::getFromOperandStack): + (JSC::ASTBuilder::shrinkOperandStackBy): + (JSC::ASTBuilder::appendBinaryOperation): + (JSC::ASTBuilder::operatorStackAppend): + (JSC::ASTBuilder::popOperandStack): + (JSC::ASTBuilder::appendUnaryToken): + (JSC::ASTBuilder::unaryTokenStackLastType): + (JSC::ASTBuilder::unaryTokenStackLastStart): + (JSC::ASTBuilder::unaryTokenStackRemoveLast): + (JSC::ASTBuilder::assignmentStackAppend): + (JSC::ASTBuilder::createAssignment): + (JSC::ASTBuilder::Scope::Scope): + (JSC::ASTBuilder::setExceptionLocation): + (JSC::ASTBuilder::incConstants): + (JSC::ASTBuilder::usesThis): + (JSC::ASTBuilder::usesCatch): + (JSC::ASTBuilder::usesClosures): + (JSC::ASTBuilder::usesArguments): + (JSC::ASTBuilder::usesAssignment): + (JSC::ASTBuilder::usesWith): + (JSC::ASTBuilder::usesEval): + (JSC::ASTBuilder::createNumber): + (JSC::ASTBuilder::makeTypeOfNode): + (JSC::ASTBuilder::makeDeleteNode): + (JSC::ASTBuilder::makeNegateNode): + (JSC::ASTBuilder::makeBitwiseNotNode): + (JSC::ASTBuilder::makeMultNode): + (JSC::ASTBuilder::makeDivNode): + (JSC::ASTBuilder::makeAddNode): + (JSC::ASTBuilder::makeSubNode): + (JSC::ASTBuilder::makeLeftShiftNode): + (JSC::ASTBuilder::makeRightShiftNode): + (JSC::ASTBuilder::makeFunctionCallNode): + (JSC::ASTBuilder::makeBinaryNode): + (JSC::ASTBuilder::makeAssignNode): + (JSC::ASTBuilder::makePrefixNode): + (JSC::ASTBuilder::makePostfixNode): + * parser/JSParser.cpp: Added. + (JSC::JSParser::AllowInOverride::AllowInOverride): + (JSC::JSParser::AllowInOverride::~AllowInOverride): + (JSC::JSParser::token): + (JSC::JSParser::next): + (JSC::JSParser::consume): + (JSC::JSParser::match): + (JSC::JSParser::tokenStart): + (JSC::JSParser::tokenLine): + (JSC::JSParser::tokenEnd): + (JSC::JSParser::): + (JSC::JSParser::autoSemiColon): + (JSC::JSParser::canRecurse): + (JSC::JSParser::lastTokenEnd): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::allowAutomaticSemicolon): + (JSC::JSParser::parseSourceElements): + (JSC::JSParser::parseVarDeclaration): + (JSC::JSParser::parseConstDeclaration): + (JSC::JSParser::parseDoWhileStatement): + (JSC::JSParser::parseWhileStatement): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseForStatement): + (JSC::JSParser::parseBreakStatement): + (JSC::JSParser::parseContinueStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseThrowStatement): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseSwitchStatement): + (JSC::JSParser::parseSwitchClauses): + (JSC::JSParser::parseSwitchDefaultClause): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseDebuggerStatement): + (JSC::JSParser::parseBlockStatement): + (JSC::JSParser::parseStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionBody): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parseExpressionStatement): + (JSC::JSParser::parseIfStatement): + (JSC::JSParser::parseExpression): + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseConditionalExpression): + (JSC::isUnaryOp): + (JSC::JSParser::isBinaryOperator): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseObjectLiteral): + (JSC::JSParser::parseArrayLiteral): + (JSC::JSParser::parsePrimaryExpression): + (JSC::JSParser::parseArguments): + (JSC::JSParser::parseMemberExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: Added. + (JSC::): + (JSC::JSTokenInfo::JSTokenInfo): + * parser/Lexer.cpp: + (JSC::Lexer::lex): + * parser/Lexer.h: + (JSC::Lexer::setLastLineNumber): + (JSC::Lexer::lastLineNumber): + * parser/NodeConstructors.h: + (JSC::Node::Node): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: Added. + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::createSourceElements): + (JSC::SyntaxChecker::makeFunctionCallNode): + (JSC::SyntaxChecker::appendToComma): + (JSC::SyntaxChecker::createCommaExpr): + (JSC::SyntaxChecker::makeAssignNode): + (JSC::SyntaxChecker::makePrefixNode): + (JSC::SyntaxChecker::makePostfixNode): + (JSC::SyntaxChecker::makeTypeOfNode): + (JSC::SyntaxChecker::makeDeleteNode): + (JSC::SyntaxChecker::makeNegateNode): + (JSC::SyntaxChecker::makeBitwiseNotNode): + (JSC::SyntaxChecker::createLogicalNot): + (JSC::SyntaxChecker::createUnaryPlus): + (JSC::SyntaxChecker::createVoid): + (JSC::SyntaxChecker::thisExpr): + (JSC::SyntaxChecker::createResolve): + (JSC::SyntaxChecker::createObjectLiteral): + (JSC::SyntaxChecker::createArray): + (JSC::SyntaxChecker::createNumberExpr): + (JSC::SyntaxChecker::createString): + (JSC::SyntaxChecker::createBoolean): + (JSC::SyntaxChecker::createNull): + (JSC::SyntaxChecker::createBracketAccess): + (JSC::SyntaxChecker::createDotAccess): + (JSC::SyntaxChecker::createRegex): + (JSC::SyntaxChecker::createNewExpr): + (JSC::SyntaxChecker::createConditionalExpr): + (JSC::SyntaxChecker::createAssignResolve): + (JSC::SyntaxChecker::createFunctionExpr): + (JSC::SyntaxChecker::createFunctionBody): + (JSC::SyntaxChecker::createArguments): + (JSC::SyntaxChecker::createArgumentsList): + (JSC::SyntaxChecker::createProperty): + (JSC::SyntaxChecker::createPropertyList): + (JSC::SyntaxChecker::createElementList): + (JSC::SyntaxChecker::createFormalParameterList): + (JSC::SyntaxChecker::createClause): + (JSC::SyntaxChecker::createClauseList): + (JSC::SyntaxChecker::setUsesArguments): + (JSC::SyntaxChecker::createFuncDeclStatement): + (JSC::SyntaxChecker::createBlockStatement): + (JSC::SyntaxChecker::createExprStatement): + (JSC::SyntaxChecker::createIfStatement): + (JSC::SyntaxChecker::createForLoop): + (JSC::SyntaxChecker::createForInLoop): + (JSC::SyntaxChecker::createEmptyStatement): + (JSC::SyntaxChecker::createVarStatement): + (JSC::SyntaxChecker::createReturnStatement): + (JSC::SyntaxChecker::createBreakStatement): + (JSC::SyntaxChecker::createContinueStatement): + (JSC::SyntaxChecker::createTryStatement): + (JSC::SyntaxChecker::createSwitchStatement): + (JSC::SyntaxChecker::createWhileStatement): + (JSC::SyntaxChecker::createWithStatement): + (JSC::SyntaxChecker::createDoWhileStatement): + (JSC::SyntaxChecker::createLabelStatement): + (JSC::SyntaxChecker::createThrowStatement): + (JSC::SyntaxChecker::createDebugger): + (JSC::SyntaxChecker::createConstStatement): + (JSC::SyntaxChecker::appendConstDecl): + (JSC::SyntaxChecker::createGetterOrSetterProperty): + (JSC::SyntaxChecker::appendStatement): + (JSC::SyntaxChecker::addVar): + (JSC::SyntaxChecker::combineCommaNodes): + (JSC::SyntaxChecker::evalCount): + (JSC::SyntaxChecker::appendBinaryExpressionInfo): + (JSC::SyntaxChecker::operatorStackPop): + * runtime/JSGlobalData.h: + * wtf/Platform.h: + * wtf/ThreadSpecific.h: + (WTF::T): - * JavaScriptCore.pri: +2010-06-23 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> -2009-07-17 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + Reviewed by Simon Hausmann. - Reviewed by David Levin. + Optimization of the QScriptValuePrivate. - Build fix on platforms don't have MMAP. - https://bugs.webkit.org/show_bug.cgi?id=27365 + Patch change only internals of the QScriptValuePrivate. + Most of the QScriptValuePrivate's attributes were moved + into an union. - * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP) + [Qt] Optimization of the QScriptVAluePrivate. + https://bugs.webkit.org/show_bug.cgi?id=40415 -2009-07-16 Fumitoshi Ukai <ukai@chromium.org> + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::globalObject): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::): + (QScriptValuePrivate::~QScriptValuePrivate): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::toObject): + (QScriptValuePrivate::equals): + (QScriptValuePrivate::strictlyEquals): + (QScriptValuePrivate::assignEngine): + (QScriptValuePrivate::operator JSValueRef): + (QScriptValuePrivate::operator JSObjectRef): + (QScriptValuePrivate::refinedJSValue): - Reviewed by David Levin. +2010-06-23 Kwang Yul Seo <skyul@company100.net> - Add --web-sockets flag and ENABLE_WEB_SOCKETS define. - https://bugs.webkit.org/show_bug.cgi?id=27206 - - Add ENABLE_WEB_SOCKETS + Reviewed by Oliver Hunt. - * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS + [GTK] Implement ThreadSpecific with glib + https://bugs.webkit.org/show_bug.cgi?id=39829 -2009-07-16 Maxime Simon <simon.maxime@gmail.com> + Implement ThreadSpecific with glib's GStaticPrivate. + This patch makes it possible to build GTK port without pthread. - Reviewed by Eric Seidel. + * wtf/ThreadSpecific.h: + (WTF::::ThreadSpecific): + (WTF::::~ThreadSpecific): + (WTF::::get): + (WTF::::set): + (WTF::::destroy): - Added Haiku-specific files for JavaScriptCore. - https://bugs.webkit.org/show_bug.cgi?id=26620 +2010-06-23 Leandro Pereira <leandro@profusion.mobi> - * wtf/haiku/MainThreadHaiku.cpp: Added. - (WTF::initializeMainThreadPlatform): - (WTF::scheduleDispatchFunctionsOnMainThread): + Unreviewed build fix. -2009-07-16 Gavin Barraclough <barraclough@apple.com> + * CMakeLists.txt: Add runtime/RegExpCache.cpp. - RS by Oliver Hunt. +2010-06-22 Renata Hodovan <hodovan@inf.u-szeged.hu> - Revert r45969, this fix does not appear to be valid. - https://bugs.webkit.org/show_bug.cgi?id=27077 + Reviewed by Geoffrey Garen. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::unlinkCallers): - * jit/JIT.cpp: - * jit/JIT.h: + Adding regular expression caching to JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=38142 -2009-07-16 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + The cache is based on Round Robin eviction policy, and + can cache at most 256 character long regular expressions, + and at most 256 of them. These values can be changed at compile time. - Reviewed by Oliver Hunt. + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecompiler/NodesCodegen.cpp: + (JSC::RegExpNode::emitBytecode): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::regExpCache): + * runtime/RegExpCache.cpp: Added. + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + (JSC::RegExpCache::RegExpCache): + * runtime/RegExpCache.h: Added. + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpKey.h: Added. + (JSC::RegExpKey::RegExpKey): + (JSC::RegExpKey::getFlagsValue): + (WTF::operator==): + (WTF::): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncCompile): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): - Allow custom memory allocation control in ExceptionInfo and RareData struct - https://bugs.webkit.org/show_bug.cgi?id=27336 +2010-06-22 Gabor Loki <loki@webkit.org> - Inherits ExceptionInfo and RareData struct from FastAllocBase because these - have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and - in JavaScriptCore/bytecode/CodeBlock.h:453. + Reviewed by Geoffrey Garen. - Remove unnecessary WTF:: namespace from CodeBlock inheritance. - - * bytecode/CodeBlock.h: + Add native call support for ARM and Thumb-2 JIT. + https://bugs.webkit.org/show_bug.cgi?id=40231 -2009-07-16 Mark Rowe <mrowe@apple.com> + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * wtf/Platform.h: - Rubber-stamped by Geoff Garen. +2010-06-21 Oliver Hunt <oliver@apple.com> - Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world. + Reviewed by Geoffrey Garen. - * Configurations/FeatureDefines.xcconfig: + Make JSC more resilient in the face of parse failures + https://bugs.webkit.org/show_bug.cgi?id=40951 -2009-07-16 Yong Li <yong.li@torchmobile.com> + A number of recent bugs have occurred due to issues like miscounting + BOMs, etc which lead to interesting crashes later on. Adding this + logic hardens JSC in the face of these errors, and has no impact on + performance (32bit jit actually gets 0.7% faster but I put that down + to cache effects). - Reviewed by George Staikos. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::lineNumberForBytecodeOffset): + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::compileForCall): + (JSC::FunctionExecutable::compileForConstruct): + (JSC::FunctionExecutable::generateJITCodeForCall): + (JSC::FunctionExecutable::generateJITCodeForConstruct): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * runtime/Executable.h: + (JSC::FunctionExecutable::bytecodeForCall): + (JSC::FunctionExecutable::bytecodeForConstruct): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::numericCompareFunction): - https://bugs.webkit.org/show_bug.cgi?id=27320 - _countof is only included in CE6; for CE5 we need to define it ourself +2010-06-21 John Sullivan <sullivan@apple.com> - * wtf/Platform.h: + Reviewed by Adam Roben. -2009-07-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> + RetainPtr can't be used in HashMaps or HashSets + <https://bugs.webkit.org/show_bug.cgi?id=40938> + + Added hashing knowledge similar to that in COMPtr.h. - Reviewed by Oliver Hunt. + * wtf/RetainPtr.h: + (WTF::RetainPtr::RetainPtr): + New function, copied from COMPtr.h but for the type change. + (WTF::RetainPtr::isHashTableDeletedValue): + Ditto. + (WTF::RetainPtr::hashTableDeletedValue): + Ditto. + Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change. + The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h) + rather than the COMPtr implementation. - Workers + garbage collector: weird crashes - https://bugs.webkit.org/show_bug.cgi?id=27077 +2010-06-19 Oliver Hunt <oliver@apple.com> - We need to unlink cached method call sites when a function is destroyed. + Reviewed by Geoffrey Garen. - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::unlinkCallers): - * jit/JIT.cpp: - (JSC::JIT::unlinkMethodCall): - * jit/JIT.h: + Need to ensure that we grow the RegisterFile when creating a callframe for host code + https://bugs.webkit.org/show_bug.cgi?id=40858 + <rdar://problem/8108986> -2009-07-15 Steve Falkenburg <sfalken@apple.com> + In the past the use of the callframe in hostcode was much more + limited. Now that we expect the callframe to always be valid + we need to grow the RegisterFile so that this is actually the + case. In this particular case the problem was failing to grow + the registerfile could lead to a callframe that extended beyond + RegisterFiler::end(), so vm re-entry would clobber the callframe + other scenarios could also lead to badness. - Windows Build fix. + I was unable to construct a simple testcase to trigger badness, + and any such testcase would be so dependent on exact vm stack + layout that it would be unlikely to work as a testcase following + any callframe or register allocation changes anyway. - Visual Studio reset our intermediate directory on us. - This sets it back. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: + Thankfully the new assertion I added should help to catch these + failures in future, and triggers on a couple of tests currently. -2009-07-15 Kwang Yul Seo <skyul@company100.net> + * interpreter/CallFrame.cpp: + (JSC::CallFrame::registerFile): + * interpreter/CallFrame.h: + (JSC::ExecState::init): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): - Reviewed by Eric Seidel. +2010-06-21 Satish Sampath <satish@chromium.org> - https://bugs.webkit.org/show_bug.cgi?id=26794 - Make Yacc-generated parsers to use fastMalloc/fastFree. - - Define YYMALLOC and YYFREE to fastMalloc and fastFree - respectively. + Reviewed by Steve Block. - * parser/Grammar.y: + Speech Input Patch 0: Added compilation argument to conditionally compile pending patches. + https://bugs.webkit.org/show_bug.cgi?id=40878 -2009-07-15 Darin Adler <darin@apple.com> + * Configurations/FeatureDefines.xcconfig: - Fix a build for a particular Apple configuration. +2010-06-21 Kwang Yul Seo <skyul@company100.net> - * wtf/FastAllocBase.h: Change include to use "" style for - including another wtf header. This is the style we use for - including other public headers in the same directory. + Reviewed by Kent Tamura. -2009-07-15 George Staikos <george.staikos@torchmobile.com> + [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1 + https://bugs.webkit.org/show_bug.cgi?id=40653 - Reviewed by Adam Treat. + Currently, other ports do not use global new/delete operator overloading + when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable + "global fastMalloc new" because the default new/delete causes crash on device. + We need to replace them with Brew MP's MALLOC/FREE. - https://bugs.webkit.org/show_bug.cgi?id=27303 - Implement createThreadInternal for WinCE. - Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com> + * wtf/FastMalloc.h: - * wtf/ThreadingWin.cpp: - (WTF::createThreadInternal): +2010-06-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> -2009-07-15 Joe Mason <joe.mason@torchmobile.com> + Reviewed by Simon Hausmann. - Reviewed by George Staikos. + [Qt] Work around a build problem with libjscore on Symbian. + https://bugs.webkit.org/show_bug.cgi?id=40840 - https://bugs.webkit.org/show_bug.cgi?id=27298 - Platform defines for WINCE. - Contains changes by Yong Li <yong.li@torchmobile.com>, - George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com> + Sbsv2 sometimes have problems with debug/release configuration + determination causing QtWebKit in release to try linking with the debug + JavaScriptCore static library. This patch limit the jscore/jscored + r58306 fix necessary for mac builds only to the mac platform to prevent the + different name problem. - * wtf/Platform.h: + The real fix would be to fix qmake or the toolchain, this patch might + help meanwhile. -2009-07-15 Yong Li <yong.li@torchmobile.com> + * JavaScriptCore.pri: - Reviewed by Adam Treat. +2010-06-21 Patrick Gansterer <paroga@paroga.com> - https://bugs.webkit.org/show_bug.cgi?id=27306 - Use RegisterClass instead of RegisterClassEx on WinCE. + Reviewed by Kent Tamura. - * wtf/win/MainThreadWin.cpp: - (WTF::initializeMainThreadPlatform): + Buildfix after r61338. + https://bugs.webkit.org/show_bug.cgi?id=40888 -2009-07-15 Yong Li <yong.li@torchmobile.com> + roundUpAllocationSize is needed in RegisterFile.h. - Reviewed by George Staikos. + * jit/ExecutableAllocator.h: - https://bugs.webkit.org/show_bug.cgi?id=27301 - Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported - Originally written by Yong Li <yong.li@torchmobile.com> and refactored by - Joe Mason <joe.mason@torchmobile.com> +2010-06-19 Kwang Yul Seo <skyul@company100.net> - * wtf/Assertions.cpp: vprintf_stderr_common + Reviewed by Darin Adler. -2009-07-15 Yong Li <yong.li@torchmobile.com> + Include <string.h> in StringExtras.h + https://bugs.webkit.org/show_bug.cgi?id=40808 - Reviewed by George Staikos. + Without string.h, RVCT 2.2 can't compile StringExtras.h. + It can't find strlen and strncmp. - https://bugs.webkit.org/show_bug.cgi?id=27020 - msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false + * wtf/StringExtras.h: - * wtf/DateMath.cpp: - (WTF::gregorianDateTimeToMS): +2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> -2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by Simon Hausmann. + Don't use __attribute__((may_alias)) with the Intel compiler, + as it doesn't understand it. - [Qt] Cleanup - Remove obsolete code from the make system - https://bugs.webkit.org/show_bug.cgi?id=27299 + * wtf/Vector.h: - * JavaScriptCore.pro: - * jsc.pro: +2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> -2009-07-07 Norbert Leser <norbert.leser@nokia.com> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by Simon Hausmann. + Fix compilation with the Intel C++ compiler (11.1.072). - https://bugs.webkit.org/show_bug.cgi?id=27056 + Like RVCT, label pointers must be void*, not const void*. - Alternate bool operator for codewarrior compiler (WINSCW). - Compiler (latest b482) reports error for UnspecifiedBoolType construct: - "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'" + * bytecode/Opcode.h: - Same fix as in r38391. +2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> - * JavaScriptCore/wtf/OwnArrayPtr.h: + Reviewed by Kenneth Rohde Christiansen. -2009-07-15 Norbert Leser <norbert.leser@nokia.com> + Add the WTF_COMPILER_INTEL for when the Intel compiler is used + for building. Usually, the Intel compiler masquerades as + another compiler in the system and gets away with it, but some + times specific fixes are required (such as when using language + extensions). - Reviewed by Darin Adler. + * wtf/Platform.h: - Qualify include path with wtf to fix compilation - on Symbian. - https://bugs.webkit.org/show_bug.cgi?id=27055 +2010-06-18 Oliver Hunt <oliver@apple.com> - * interpreter/Interpreter.h: + Reviewed by Geoffrey Garen. -2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> + Incorrect handling of multiple BOMs scattered through a file. + https://bugs.webkit.org/show_bug.cgi?id=40865 - Reviewed by Dave Kilzer. + When determining the offset of open and close braces in a source + with BOMs we were finishing our count early as we failed to account + for BOMs prior to the open/close brace positions effecting those + positions. - Turn off non-portable date manipulations for SYMBIAN - https://bugs.webkit.org/show_bug.cgi?id=27064 + * parser/Lexer.cpp: + (JSC::Lexer::sourceCode): - Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards - and place the rules for controlling the guards in Platform.h. - Turn off these newly introduced guards for SYMBIAN. +2010-06-17 Oliver Hunt <oliver@apple.com> - * wtf/DateMath.cpp: - (WTF::calculateUTCOffset): - * wtf/DateMath.h: - (WTF::GregorianDateTime::GregorianDateTime): - (WTF::GregorianDateTime::operator tm): - * wtf/Platform.h: + Reviewed by Sam Weinig. -2009-07-15 Norbert Leser <norbert.leser@nokia.com> + Don't throw away exception information for functions that use exceptions + https://bugs.webkit.org/show_bug.cgi?id=40786 - Reviewed by Simon Hausmann. + Simple patch to stop JSC from throwing away the exception information + of a function that uses "exceptiony" features like try and throw. This + is a speed up for catching expressions but it's difficult to quantify as + the old cost of reparsing is amortised over all exceptions caught in the + effected function. - Undef ASSERT on Symbian, to avoid excessive warnings - https://bugs.webkit.org/show_bug.cgi?id=27052 + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + (JSC::BytecodeGenerator::emitCatch): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitThrow): - * wtf/Assertions.h: +2010-06-18 Anders Carlsson <andersca@apple.com> -2009-07-15 Oliver Hunt <oliver@apple.com> + Reviewed by Sam Weinig. - Reviewed by Simon Hausmann. + Add PlatformStrategies and PluginStrategy classes. + https://bugs.webkit.org/show_bug.cgi?id=40850 - REGRESSION: fast/js/postfix-syntax.html fails with interpreter - https://bugs.webkit.org/show_bug.cgi?id=27294 + * wtf/Platform.h: - When postfix operators operating on locals assign to the same local - the order of operations has to be to store the incremented value, then - store the unmodified number. Rather than implementing this subtle - semantic in the interpreter I've just made the logic explicit in the - bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a - local var x). +2010-06-18 Leandro Pereira <leandro@profusion.mobi> - * parser/Nodes.cpp: - (JSC::emitPostIncOrDec): + [EFL] Unreviewed build fix. -2009-07-15 Oliver Hunt <oliver@apple.com> + * wtf/CMakeLists.txt: Add MD5.cpp. - Reviewed by Simon Hausmann. +2010-06-17 Shu Chang <chang.shu@nokia.com> - REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter - https://bugs.webkit.org/show_bug.cgi?id=27259 + Reviewed by Kenneth Rohde Christiansen. - The interpreter was incorrectly basing its need to create the arguments object - based on the presence of the callframe's argument reference rather than the local - arguments reference. Based on this it then overrode the local variable reference. + [Qt] Fix the link error on symbian with ENABLE_JIT=0. + 1. Add "#if ENABLE(JIT)" in the header file; + 2. Put feature enable/disable logic to a common.pri so + that both JavaScriptCore.pri and WebCore.pri can share. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): + https://bugs.webkit.org/show_bug.cgi?id=40780 -2009-07-14 Steve Falkenburg <sfalken@apple.com> + * JavaScriptCore.pri: + * jit/ExecutableAllocator.h: - Reorganize JavaScriptCore headers into: - API: include/JavaScriptCore/ - Private: include/private/JavaScriptCore/ +2010-06-17 Darin Adler <darin@apple.com> - Reviewed by Darin Adler. + Reviewed by Sam Weinig. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + Use adoptRef and create functions in more code paths + https://bugs.webkit.org/show_bug.cgi?id=40760 -2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + * API/JSClassRef.h: Removed unneeded include of RefCounted.h. + * API/JSWeakObjectMapRefPrivate.cpp: Ditto. - Reviewed by Darin Adler. + * bytecode/CodeBlock.h: + (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the + SharedSymbolTable::create function instead of calling new directly. - Change JSCell's superclass to NoncopyableCustomAllocated - https://bugs.webkit.org/show_bug.cgi?id=27248 + * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable + class and made the constructor private. - JSCell class customizes operator new, since Noncopyable will be - inherited from FastAllocBase, NoncopyableCustomAllocated has - to be used. +2010-06-17 Mark Brand <mabrand@mabrand.nl> - * runtime/JSCell.h: + Reviewed by Simon Hausmann. -2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + [Qt] use "win32-g++*" scope to match all MinGW makespecs - Reviewed by Darin Adler. + The scope "win32-g++" comes from the name of the makespec. However, it + is frequently used to check for MinGW. This works fine as long as + win32-g++ is the only makespec for MinGW. Now we need the wildcard + to cover "win32-g++-cross" as well. - Change all Noncopyable inheriting visibility to public. - https://bugs.webkit.org/show_bug.cgi?id=27225 + * JavaScriptCore.pro: - Change all Noncopyable inheriting visibility to public because - it is needed to the custom allocation framework (bug #20422). +2010-06-16 Darin Adler <darin@apple.com> - * bytecode/SamplingTool.h: - * bytecompiler/RegisterID.h: - * interpreter/CachedCall.h: - * interpreter/RegisterFile.h: - * parser/Lexer.h: - * parser/Parser.h: - * runtime/ArgList.h: - * runtime/BatchedTransitionOptimizer.h: - * runtime/Collector.h: - * runtime/CommonIdentifiers.h: - * runtime/JSCell.h: - * runtime/JSGlobalObject.h: - * runtime/JSLock.h: - * runtime/JSONObject.cpp: - * runtime/SmallStrings.cpp: - * runtime/SmallStrings.h: - * wtf/CrossThreadRefCounted.h: - * wtf/GOwnPtr.h: - * wtf/Locker.h: - * wtf/MessageQueue.h: - * wtf/OwnArrayPtr.h: - * wtf/OwnFastMallocPtr.h: - * wtf/OwnPtr.h: - * wtf/RefCounted.h: - * wtf/ThreadSpecific.h: - * wtf/Threading.h: - * wtf/Vector.h: - * wtf/unicode/Collator.h: + Reviewed by David Levin. -2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Deploy adoptRef in more places, including all HTML and MathML elements + https://bugs.webkit.org/show_bug.cgi?id=39941 - Reviewed by Darin Adler. + * wtf/ThreadSafeShared.h: Made the constructor protected and removed the + unneeded support for initial reference counts other than 1. - Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated - https://bugs.webkit.org/show_bug.cgi?id=27249 +2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu> - ParserArenaDeletable customizes operator new, to avoid double inheritance - ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated. + Reviewed by Geoffrey Garen. - * parser/Nodes.h: + Store matchBegin directly in the array of output instead of the stack. + https://bugs.webkit.org/show_bug.cgi?id=38988 -2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + (JSC::Yarr::RegexGenerator::generate): - Reviewed by Darin Adler. +2010-06-15 Anders Carlsson <andersca@apple.com> - Add RefCountedCustomAllocated to RefCounted.h - https://bugs.webkit.org/show_bug.cgi?id=27232 + Reviewed by Sam Weinig. - Some class which are inherited from RefCounted customize - operator new, but RefCounted is inherited from Noncopyable - which will be inherited from FastAllocBase. To avoid - conflicts Noncopyable inheriting was moved down to RefCounted - and to avoid double inheritance this class has been added. + Make JavaScriptCore build with clang++. - * wtf/RefCounted.h: - (WTF::RefCountedCustomAllocated::deref): - (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated): + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutVirtualRegister): + Explicitly cast to an int. -2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + * yarr/RegexCompiler.cpp: + (JSC::Yarr::compileRegex): + Return 0 instead of false. - Reviewed by Darin Adler. +2010-06-15 Adam Roben <aroben@apple.com> - Add NoncopyableCustomAllocated to Noncopyable.h. - https://bugs.webkit.org/show_bug.cgi?id=27228 - - Some classes which inherited from Noncopyable overrides operator new - since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h - needs to be extended with this new class to support the overriding. + Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds - * wtf/Noncopyable.h: - (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated): - (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated): + Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>. -2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Reviewed by Sam Weinig. - Reviewed by Darin Adler. + * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of + JavaScriptCore's DerivedSources directory to + AppleInternal/Sources/JavaScriptCore. - Allow custom memory allocation control for JavaScriptCore's IdentifierTable class - https://bugs.webkit.org/show_bug.cgi?id=27260 +2010-06-15 Gabor Loki <loki@webkit.org> - Inherits IdentifierTable class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70. + Rubber-stamped by Eric Seidel. - * runtime/Identifier.cpp: + Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM + https://bugs.webkit.org/show_bug.cgi?id=40423 -2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Using OBJECT_OFFSETOF macro instead of objectof to bypass access to + non-static data member warning. - Reviewed by Darin Adler. + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompilePutByIdTransition): - Allow custom memory allocation control for JavaScriptCore's Profiler class - https://bugs.webkit.org/show_bug.cgi?id=27253 +2010-06-11 Eric Seidel <eric@webkit.org> - Inherits Profiler class from FastAllocBase because it has been instantiated by - 'new' in JavaScriptCore/profiler/Profiler.cpp:56. + Reviewed by Adam Barth. - * profiler/Profiler.h: + Rename the rest of the *Tokenizer classes to *DocumentParser + https://bugs.webkit.org/show_bug.cgi?id=40507 -2009-07-06 George Staikos <george.staikos@torchmobile.com> + * wtf/Platform.h: + - fixed a comment to match new names. - Reviewed by Adam Treat. +2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura + Reviewed by Simon Hausmann. - https://bugs.webkit.org/show_bug.cgi?id=27030 - Implement custom RNG for WinCE using Mersenne Twister + [Qt] Explicit conversions from QtScript types to JSC opaque types were removed. + https://bugs.webkit.org/show_bug.cgi?id=40412 - * wtf/RandomNumber.cpp: - (WTF::randomNumber): - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - * wtf/wince/mt19937ar.c: Added. - (init_genrand): - (init_by_array): - (genrand_int32): - (genrand_int31): - (genrand_real1): - (genrand_real2): - (genrand_real3): - (genrand_res53): + Conversion between a JSC C types and a QtScript private types, takes + main part of the source code. In most cases a mapping between the types + is one to one. New cast operators were added to simplify the code. -2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef. + The QScriptEnginePrivate could be casted to the JSGlobalContext. + The QScriptProgramPrivate could be casted to the JSStringRef. - Unreviewed make dist build fix. + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::evaluate): + (QScriptEnginePrivate::newObject): + (QScriptEnginePrivate::globalObject): + * qt/api/qscriptengine_p.h: + (QScriptEnginePrivate::operator JSGlobalContextRef): + * qt/api/qscriptprogram_p.h: + (QScriptProgramPrivate::operator JSStringRef): + * qt/api/qscriptsyntaxcheckresult.cpp: + (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate): + (QScriptSyntaxCheckResultPrivate::errorMessage): + (QScriptSyntaxCheckResultPrivate::errorLineNumber): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::~QScriptValuePrivate): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::isBool): + (QScriptValuePrivate::isNumber): + (QScriptValuePrivate::isNull): + (QScriptValuePrivate::isString): + (QScriptValuePrivate::isUndefined): + (QScriptValuePrivate::isFunction): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::toObject): + (QScriptValuePrivate::equals): + (QScriptValuePrivate::strictlyEquals): + (QScriptValuePrivate::instanceOf): + (QScriptValuePrivate::call): + (QScriptValuePrivate::operator JSValueRef): + (QScriptValuePrivate::operator JSObjectRef): + (QScriptValuePrivate::setValue): + (QScriptValuePrivate::inherits): + (QScriptValuePrivate::refinedJSValue): - * GNUmakefile.am: +2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> -2009-07-13 Drew Wilson <atwilson@google.com> + Reviewed by Simon Hausmann. - Reviewed by David Levin. + [Qt] Implement the simple text code path. + https://bugs.webkit.org/show_bug.cgi?id=40077 - Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs - https://bugs.webkit.org/show_bug.cgi?id=26932 + Remove the FONT_FAST_PATH macro and use the Qt's + fast text implementation instead of the one of WebKit. - Added ENABLE(SHARED_WORKERS) flag (off by default). + The Qt::TextBypassShaping flag is used to tell Qt to + only use the glyph advances. - * Configurations/FeatureDefines.xcconfig: + Qt 4.7 is needed to get this flag thus the complex path is always + used if QtWebKit is compiled against an earlier version. -2009-07-07 Norbert Leser <norbert.leser@nokia.com> + Contrary to the WebKit's implementation, the complex code path + is taken if the text is RightToLeft, justified or is formatted + with non-zero letter or word spacing. - Reviewed by Maciej Stachoviak. + * wtf/Platform.h: - https://bugs.webkit.org/show_bug.cgi?id=27058 +2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org> - Removed superfluous parenthesis around single expression. - Compilers on Symbian platform fail to properly parse and compile. + Reviewed by Kenneth Rohde Christiansen. - * JavaScriptCore/wtf/Platform.h: + add codePointCompare to JavaScriptCore.exp + https://bugs.webkit.org/show_bug.cgi?id=40426 -2009-07-13 Norbert Leser <norbert.leser@nokia.com> + * JavaScriptCore.exp: - Reviewed by Maciej Stachoviak. +2010-06-10 Oliver Hunt <oliver@apple.com> - https://bugs.webkit.org/show_bug.cgi?id=27054 + Reviewed by Maciej Stachowiak. - Renamed Translator to HashTranslator + Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode + https://bugs.webkit.org/show_bug.cgi?id=40367 - Codewarrior compiler (WINSCW) latest b482 cannot resolve typename - mismatch between template declaration and definition - (HashTranslator / Translator) + If we're in the slow case of right shift we must write the type tag as + the only reason we hit this code path is because we know we're working + with a double. eg. we are guaranteed that the tag cannot be reused. - * wtf/HashSet.h: + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emitRightShiftSlowCase): -2009-07-13 Norbert Leser <norbert.leser@nokia.com> +2010-06-10 Kwang Yul Seo <skyul@company100.net> Reviewed by Eric Seidel. - https://bugs.webkit.org/show_bug.cgi?id=27053 - - Ambiguity in LabelScope initialization + Remove weakRandomNumber + https://bugs.webkit.org/show_bug.cgi?id=40291 - Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve - type of "0" unambiguously. Set expression explicitly to - PassRefPtr<Label>::PassRefPtr() + weakRandomNumber is used nowhere. Currently, WeakRandom is used instead. - * bytecompiler/BytecodeGenerator.cpp - -2009-07-11 Simon Fraser <simon.fraser@apple.com> + * wtf/RandomNumber.cpp: + * wtf/RandomNumber.h: - Enable support for accelerated compositing and 3d transforms on Leopard. - <https://bugs.webkit.org/show_bug.cgi?id=20166> - <rdar://problem/6120614> +2010-06-09 Alexey Proskuryakov <ap@apple.com> - Reviewed by Oliver Hunt. + Reviewed by Brady Eidson. - * Configurations/FeatureDefines.xcconfig: - * wtf/Platform.h: + Export StringImpl::ascii(). It might be not very useful, but it's a public function. -2009-07-10 Mark Rowe <mrowe@apple.com> + * JavaScriptCore.exp: - Second part of the "make Windows happier" dance. +2010-06-09 Leandro Pereira <leandro@profusion.mobi> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by Adam Treat. -2009-07-10 Mark Rowe <mrowe@apple.com> + [EFL] Allow building core libraries as shared objects to speed up + linking time on machines with small amounts of memory. + http://webkit.org/b/39899 - Try and make the Windows build happy. + * CMakeLists.txt: If building with shared core, install the lib. + * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically. + * wtf/CMakeLists.txt: If building with shared core, install the lib. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: +2010-06-09 Gabor Loki <loki@webkit.org> -2009-07-10 Kevin McCullough <kmccullough@apple.com> + Reviewed by David Levin. - Reviewed by Geoffrey Garen. + Remove some unused variable warnings from JITOpcodes + https://bugs.webkit.org/show_bug.cgi?id=40298 - * debugger/Debugger.h: Made this function virtual for use in WebCore's - WebInspector. + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): -2009-07-10 Kwang Yul Seo <skyul@company100.net> +2010-05-18 Yuzo Fujishima <yuzo@google.com> - Reviewed by Darin Adler. + Reviewed by Shinichiro Hamaji. - ParserArenaDeletable should override delete - https://bugs.webkit.org/show_bug.cgi?id=26790 + Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText + Add U16_LENGTH that is needed to implement CSS character serialization. + https://bugs.webkit.org/show_bug.cgi?id=34529 - ParserArenaDeletable overrides new, but it does not override delete. - ParserArenaDeletable must be freed by fastFree - because it is allocated by fastMalloc. + * wtf/unicode/qt4/UnicodeQt4.h: + * wtf/unicode/wince/UnicodeWince.h: - * parser/NodeConstructors.h: - (JSC::ParserArenaDeletable::operator delete): - * parser/Nodes.h: +2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com> -2009-07-10 Adam Roben <aroben@apple.com> + Unreviewed, rolling out r60830. + http://trac.webkit.org/changeset/60830 + https://bugs.webkit.org/show_bug.cgi?id=40305 - Sort all our Xcode projects + Broke the Windows build (Requested by abarth on #webkit). - Accomplished using sort-Xcode-project-file. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Removed. + * wtf/win/OwnPtrWin.h: Removed. - Requested by Dave Kilzer. +2010-06-08 MORITA Hajime <morrita@google.com> - * JavaScriptCore.xcodeproj/project.pbxproj: + Unreviewed. An attempt to fix test break. -2009-07-09 Maciej Stachowiak <mjs@apple.com> + * Configurations/FeatureDefines.xcconfig: - Not reviewed, build fix. +2010-06-08 Kwang Yul Seo <skyul@company100.net> - Windows build fix for the last change. + Reviewed by Adam Barth. - * wtf/dtoa.cpp: Forgot to include Vector.h + Change OwnPtrCommon to include platform-specific headers + https://bugs.webkit.org/show_bug.cgi?id=40279 -2009-07-09 Maciej Stachowiak <mjs@apple.com> + Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds. + Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds. - Reviewed by Darin Adler. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Added. + * wtf/win/OwnPtrWin.h: Added. - REGRESSION: crash in edge cases of floating point parsing. - https://bugs.webkit.org/show_bug.cgi?id=27110 - <rdar://problem/7044458> - - Tests: fast/css/number-parsing-crash.html - fast/css/number-parsing-crash.html - fast/js/number-parsing-crash.html +2010-06-07 MORITA Hajime <morrita@google.com> - * wtf/dtoa.cpp: - (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector - with inline capacity - - (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts. - Added an assertion to verify that invariants are maintained. - - All other functions are adapted fairly mechanically to the above changes. - (WTF::BigInt::clear): - (WTF::BigInt::size): - (WTF::BigInt::resize): - (WTF::BigInt::words): - (WTF::BigInt::append): - (WTF::multadd): - (WTF::s2b): - (WTF::i2b): - (WTF::mult): - (WTF::cmp): - (WTF::diff): - (WTF::b2d): - (WTF::d2b): - (WTF::ratio): - (WTF::strtod): - (WTF::quorem): - (WTF::dtoa): - -2009-07-09 Drew Wilson <atwilson@google.com> + Reviewed by Kent Tamura. - Reviewed by Alexey Proskuryakov. - - Turned on CHANNEL_MESSAGING by default because the MessageChannel API - can now be implemented for Web Workers and is reasonably stable. + https://bugs.webkit.org/show_bug.cgi?id=40219 + [Mac] ENABLE_METER_TAG should be enabled + + Added ENABLE_METER_TAG. * Configurations/FeatureDefines.xcconfig: -2009-07-09 Oliver Hunt <oliver@apple.com> +2010-06-07 Kwang Yul Seo <skyul@company100.net> - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): + Reviewed by Eric Seidel. -2009-07-09 Oliver Hunt <oliver@apple.com> + [BREWMP] Add more types to OwnPtr + https://bugs.webkit.org/show_bug.cgi?id=39667 - Reviewed by Darin Adler. + Add ISSL and ISocket to the list of OwnPtr-ed type. - Bug 27016 - Interpreter crashes due to invalid array indexes - <https://bugs.webkit.org/show_bug.cgi?id=27016> + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.cpp: + (WTF::deleteOwnedPtr): - Unsigned vs signed conversions results in incorrect behaviour in - 64bit interpreter builds. +2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com> - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): + Reviewed by Simon Hausmann. -2009-07-09 Dimitri Glazkov <dglazkov@chromium.org> + [Qt] Crash when compiling on Snow Leopard and running on Leopard + https://bugs.webkit.org/show_bug.cgi?id=31403 - Reviewed by Darin Fisher. + Disable the use of pthread_setname_np and other symbols + when targetting Leopard. - [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build. - https://bugs.webkit.org/show_bug.cgi?id=27135 + Use the defines TARGETING_XX instead of BUILDING_ON_XX + for features that cannot be used before Snow Leopard. - * JavaScriptCore.gypi: Added. + * wtf/Platform.h: -2009-07-09 Joe Mason <joe.mason@torchmobile.com> +2010-06-07 Gabor Loki <loki@webkit.org> - Reviewed by George Staikos. - - Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com> + Reviewed by NOBODY (JSVALUE32_64 build fix). - https://bugs.webkit.org/show_bug.cgi?id=27031 - Add an override for deleteOwnedPtr(HDC) on Windows - - * wtf/OwnPtrCommon.h: - * wtf/OwnPtrWin.cpp: - (WTF::deleteOwnedPtr): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): -2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> +2010-06-06 Gavin Barraclough <barraclough@apple.com> - Reviewed by Darin Adler. + Reviewed by NOBODY (windows build fix pt 2). - Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc - on SYMBIAN. + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - https://bugs.webkit.org/show_bug.cgi?id=27026 +2010-06-06 Gavin Barraclough <barraclough@apple.com> - Based on Norbert Leser's work. + Reviewed by NOBODY (windows build fix pt 1). - * jsc.cpp: - (printUsageStatement): - (parseArguments): - * wtf/Platform.h: + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-07-07 Gavin Barraclough <barraclough@apple.com> +2010-06-06 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. - Stop loading constants into the register file. + Bug 40214 - Clean up error construction / throwing in JSC. + + The one egregious insanity here is that creating an error requires + a VM-entry-esqe-host call (the string argument is wrapped as a JS + object & pushed on the RegisterFile, then unwrapped back to a + UString). Changing this also means you only require a global + object, not an ExecState, to create an error. - Instead, use high register values (highest bit bar the sign bit set) to indicate - constants in the instruction stream, and when we encounter such a value load it - directly from the CodeBlock. + The methods to create error objects are also parameterized + requiring a switch on the type, which can be made cleaner and + faster by moving to a separate method per error type. Code to add + divot information to error had been duplicated, and is coalesced + back into a single function. - Since constants are no longer copied into the register file, this patch renders - the 'unexpected constant' mechanism redundant, and removes it. + Convenience methods added to create & throw type & syntax error + with a default error message, since this is a common case. - 2% improvement, thanks to Sam Weinig. + Also, errors are currently thrown either using + "throwError(exec, error)" or "exec->setException(error)" - unify + on the former, since this is more commonly used. Add + "throwVMError(exec, error)" equivalents, as a convenience for + cases where the result was being wrapped in "JSValue::encode(...)". - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::mark): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isTemporaryRegisterIndex): - (JSC::CodeBlock::constantRegister): - (JSC::CodeBlock::isConstantRegisterIndex): - (JSC::CodeBlock::getConstant): - (JSC::ExecState::r): - * bytecode/Opcode.h: + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::construct): + (JSC::::hasInstance): + (JSC::::call): + (JSC::::toNumber): + (JSC::::toString): + (JSC::::staticValueGetter): + (JSC::::staticFunctionGetter): + (JSC::::callbackGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeError): + * JavaScriptCore.exp: * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::preserveLastVar): - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::addConstantValue): - (JSC::BytecodeGenerator::emitEqualityOp): - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveWithBase): (JSC::BytecodeGenerator::emitNewError): + (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNode): + * bytecompiler/NodesCodegen.cpp: + (JSC::ThrowableExpressionData::emitThrowError): + (JSC::RegExpNode::emitBytecode): + (JSC::PostfixErrorNode::emitBytecode): + (JSC::PrefixErrorNode::emitBytecode): + (JSC::AssignErrorNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + (JSC::LabelNode::emitBytecode): * interpreter/CallFrame.h: - (JSC::ExecState::noCaller): - (JSC::ExecState::hasHostCallFrameFlag): - (JSC::ExecState::addHostCallFrameFlag): - (JSC::ExecState::removeHostCallFrameFlag): * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::resolveBaseAndFunc): - (JSC::Interpreter::dumpRegisters): (JSC::Interpreter::throwException): - (JSC::Interpreter::createExceptionScope): (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveArguments): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JITInlineMethods.h: - (JSC::JIT::emitLoadDouble): - (JSC::JIT::emitLoadInt32ToDouble): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_error): - (JSC::JIT::emit_op_enter): - (JSC::JIT::emit_op_enter_with_activation): - * parser/Nodes.cpp: - (JSC::DeleteResolveNode::emitBytecode): - (JSC::DeleteValueNode::emitBytecode): - (JSC::PrefixResolveNode::emitBytecode): - * runtime/JSActivation.cpp: - (JSC::JSActivation::JSActivation): - * wtf/Platform.h: - -2009-07-07 Mark Rowe <mrowe@apple.com> + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (functionRun): + (functionLoad): + (functionCheckSyntax): + * parser/Nodes.h: + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + (JSC::dateProtoFuncToJSON): + * runtime/Error.cpp: + (JSC::createError): + (JSC::createEvalError): + (JSC::createRangeError): + (JSC::createReferenceError): + (JSC::createSyntaxError): + (JSC::createTypeError): + (JSC::createURIError): + (JSC::addErrorSourceInfo): + (JSC::addErrorDivotInfo): + (JSC::addErrorInfo): + (JSC::hasErrorInfo): + (JSC::throwError): + (JSC::throwTypeError): + (JSC::throwSyntaxError): + * runtime/Error.h: + (JSC::throwVMError): + (JSC::throwVMTypeError): + * runtime/ErrorConstructor.cpp: + (JSC::constructWithErrorConstructor): + (JSC::callErrorConstructor): + * runtime/ErrorConstructor.h: + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + (JSC::ErrorInstance::create): + * runtime/ErrorInstance.h: + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/ExceptionHelpers.cpp: + (JSC::createStackOverflowError): + (JSC::createUndefinedVariableError): + (JSC::createInvalidParamError): + (JSC::createNotAConstructorError): + (JSC::createNotAFunctionError): + (JSC::createNotAnObjectError): + (JSC::throwOutOfMemoryError): + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compile): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compile): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/Identifier.cpp: + (JSC::Identifier::from): + * runtime/Identifier.h: + * runtime/JSArray.cpp: + (JSC::JSArray::put): + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEval): + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendStringifiedValue): + (JSC::Walker::walk): + (JSC::JSONProtoFuncParse): + (JSC::JSONProtoFuncStringify): + * runtime/JSObject.cpp: + (JSC::throwSetterError): + (JSC::JSObject::put): + (JSC::JSObject::putWithAttributes): + (JSC::JSObject::defaultValue): + (JSC::JSObject::hasInstance): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + * runtime/JSValue.cpp: + (JSC::JSValue::toObjectSlowCase): + (JSC::JSValue::synthesizeObject): + (JSC::JSValue::synthesizePrototype): + * runtime/NativeErrorConstructor.cpp: + (JSC::constructWithNativeErrorConstructor): + (JSC::callNativeErrorConstructor): + * runtime/NativeErrorConstructor.h: + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::objectConstructorGetPrototypeOf): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::objectConstructorGetOwnPropertyNames): + (JSC::objectConstructorKeys): + (JSC::toPropertyDescriptor): + (JSC::objectConstructorDefineProperty): + (JSC::objectConstructorDefineProperties): + (JSC::objectConstructorCreate): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncToString): - Reviewed by Darin Adler. +2010-06-05 Kwang Yul Seo <skyul@company100.net> - Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>. - Bug 27025: Crashes and regression test failures related to regexps in 64-bit + Reviewed by Eric Seidel. - For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but - neglects to save and restore it. The change in handling of the output vector in r45545 - altered code generation so that the RegExp::match was now storing important data in rbx, - which caused crashes and bogus results when it was clobbered. + [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx + https://bugs.webkit.org/show_bug.cgi?id=39710 - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): Save rbx. - (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx. + Build fix for BREW MP. -2009-07-06 Ada Chan <adachan@apple.com> + * wtf/MathExtras.h: - Reviewed by Darin Adler and Mark Rowe. +2010-06-04 Adam Barth <abarth@webkit.org> - Decommitted spans are added to the list of normal spans rather than - the returned spans in TCMalloc_PageHeap::Delete(). - https://bugs.webkit.org/show_bug.cgi?id=26998 - - In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in - the process of merging with neighboring spans that are also decommitted. - The merged span needs to be placed in the list of returned spans (spans - whose memory has been returned to the system). Right now it's always added - to the list of the normal spans which can theoretically cause thrashing. + Reviewed by Darin Adler. - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::Delete): + HTML5 parser should be within 1% of old parser performance + https://bugs.webkit.org/show_bug.cgi?id=40172 -2009-07-05 Lars Knoll <lars.knoll@nokia.com> + Fix cast in this operator= to allow for assignment between vectors with + different inline capacities (as clearly intended by its author). - Reviewed by Maciej Stachowiak. + * wtf/Vector.h: + (WTF::::operator): - https://bugs.webkit.org/show_bug.cgi?id=26843 +2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian. + Reviewed by Kenneth Rohde Christiansen. - The Metrowerks compiler on the Symbian platform moves the globally - defined Hashtables into read-only memory, despite one of the members - being mutable. This causes crashes at run-time due to write access to - read-only memory. + New QtScript API; QScriptValue::instanceOf. - Avoid the use of const with this compiler by introducing the - JSC_CONST_HASHTABLE macro. + New function create an easy way to check value's prototype hierarchy. - Based on idea by Norbert Leser. + [Qt] QScriptValue should have an instanceOf method + https://bugs.webkit.org/show_bug.cgi?id=40120 - * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW. - * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables. - * runtime/JSGlobalData.cpp: Import various global hashtables via the macro. + * qt/api/qscriptvalue.cpp: + (QScriptValue::instanceOf): + * qt/api/qscriptvalue.h: + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::instanceOf): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: + (tst_QScriptValue::instanceOf_initData): + (tst_QScriptValue::instanceOf_makeData): + (tst_QScriptValue::instanceOf_test): -2009-07-04 Dan Bernstein <mitz@apple.com> +2010-06-04 Gavin Barraclough <barraclough@apple.com> - - debug build fix + Reviewed by NOBODY (interpreter build fix). - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::getLastParen): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): -2009-07-03 Yong Li <yong.li@torchmobile.com> +2010-06-04 Mark Rowe <mrowe@apple.com> - Reviewed by Maciej Stachowiak (and revised slightly) + Silence some warnings seen on the build bot. - RegExp::match to be optimized - https://bugs.webkit.org/show_bug.cgi?id=26957 + * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline. + * JavaScriptCore.JSVALUE32only.exp: Ditto. + * JavaScriptCore.JSVALUE64only.exp: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't + complain about not knowing how to compile them. - Allow regexp matching to use Vectors with inline capacity instead of - allocating a new ovector buffer every time. - - ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall. +2010-06-04 Gavin Barraclough <barraclough@apple.com> - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * runtime/RegExp.h: - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate): - (JSC::RegExpConstructorPrivate::lastOvector): - (JSC::RegExpConstructorPrivate::tempOvector): - (JSC::RegExpConstructorPrivate::changeLastOvector): - (JSC::RegExpConstructor::performMatch): - (JSC::RegExpMatchesArray::RegExpMatchesArray): - (JSC::RegExpMatchesArray::fillArrayInstance): - (JSC::RegExpConstructor::getBackref): - (JSC::RegExpConstructor::getLastParen): - (JSC::RegExpConstructor::getLeftContext): - (JSC::RegExpConstructor::getRightContext): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncSplit): + Reviewed by Oliver Hunt. -2009-06-30 Kwang Yul Seo <skyul@company100.net> + Bug 40187 - Change function signature of NativeConstructor to match NativeFunction - Reviewed by Eric Seidel. + Mostly for consistency, but constructor & args arguments are redundant, + and this will help if we wish to be able to JIT calls to more constructors. - Override operator new/delete with const std::nothrow_t& as the second - argument. - https://bugs.webkit.org/show_bug.cgi?id=26792 + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::construct): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::executeConstruct): + * interpreter/Interpreter.h: + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayConstructor.cpp: + (JSC::constructWithArrayConstructor): + * runtime/BooleanConstructor.cpp: + (JSC::constructWithBooleanConstructor): + * runtime/ConstructData.cpp: + (JSC::construct): + * runtime/ConstructData.h: + * runtime/DateConstructor.cpp: + (JSC::constructWithDateConstructor): + * runtime/Error.cpp: + (JSC::constructNativeError): + (JSC::Error::create): + * runtime/ErrorConstructor.cpp: + (JSC::constructWithErrorConstructor): + * runtime/FunctionConstructor.cpp: + (JSC::constructWithFunctionConstructor): + * runtime/NativeErrorConstructor.cpp: + (JSC::constructWithNativeErrorConstructor): + * runtime/NativeErrorConstructor.h: + (JSC::NativeErrorConstructor::errorStructure): + * runtime/NumberConstructor.cpp: + (JSC::constructWithNumberConstructor): + * runtime/ObjectConstructor.cpp: + (JSC::constructWithObjectConstructor): + * runtime/RegExpConstructor.cpp: + (JSC::constructWithRegExpConstructor): + * runtime/StringConstructor.cpp: + (JSC::constructWithStringConstructor): - On Windows CE, operator new/delete, new[]/delete[] with const - std::nothrow_t& must be overrided because some standard template - libraries use these operators. +2010-06-04 Tony Gentilcore <tonyg@chromium.org> - The problem occurs when memory allocated by new(size_t s, const - std::nothrow_t&) is freed by delete(void* p). This causes the umatched - malloc/free problem. + Reviewed by Adam Barth. - The patch overrides all new, delete, new[] and delete[] to use - fastMaloc and fastFree consistently. + Add a takeFirst() method to Deque and use it where appropriate. + https://bugs.webkit.org/show_bug.cgi?id=40089 - * wtf/FastMalloc.h: - (throw): + * wtf/Deque.h: + (WTF::::takeFirst): + * wtf/MainThread.cpp: + (WTF::dispatchFunctionsFromMainThread): + * wtf/MessageQueue.h: + (WTF::::tryGetMessage): -2009-06-30 Gabor Loki <loki@inf.u-szeged.hu> +2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - Reviewed by Sam Weinig. + Reviewed by Kenneth Rohde Christiansen. - <https://bugs.webkit.org/show_bug.cgi?id=24986> + Remove a QEXPECT_FAIL flag from an autotest. - Remove unnecessary references to AssemblerBuffer. + Test tst_QScriptEngine::globalObject pass after 36600 bug + fix have been applied. - * interpreter/Interpreter.cpp: - * interpreter/Interpreter.h: + [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed. + https://bugs.webkit.org/show_bug.cgi?id=40114 -2009-06-29 David Levin <levin@chromium.org> + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::globalObject): - Reviewed by Oliver Hunt. +2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - Still seeing occasional leaks from UString::sharedBuffer code - https://bugs.webkit.org/show_bug.cgi?id=26420 + Reviewed by Kenneth Rohde Christiansen. - The problem is that the pointer to the memory allocation isn't visible - by "leaks" due to the lower bits being used as flags. The fix is to - make the pointer visible in memory (in debug only). The downside of - this fix that the memory allocated by sharedBuffer will still look like - a leak in non-debug builds when any flags are set. + Fix QScriptValue::equals. - * wtf/PtrAndFlags.h: - (WTF::PtrAndFlags::set): + Handling for a few edge cases were added. Now comparison between + NaN, an invalid objects should works as supposed. -2009-06-29 Sam Weinig <sam@webkit.org> + [Qt] QScriptValue::equals problems + https://bugs.webkit.org/show_bug.cgi?id=40110 - Reviewed by Mark Rowe. + * qt/api/qscriptvalue.cpp: + (QScriptValue::equals): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::equals): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: + (tst_QScriptValue::equals_initData): + (tst_QScriptValue::equals_makeData): + (tst_QScriptValue::equals_test): - Remove more unused scons support. +2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - * SConstruct: Removed. + Reviewed by Kenneth Rohde Christiansen. -2009-06-29 Oliver Hunt <oliver@apple.com> + New states in QScriptValuePrivate. - Reviewed by Gavin Barraclough. + The CSpecial state was divided into CNull and CUndefined. It simplify + the QScriptValue code by avoiding a few "cast" and "if". + Moreover the MSVS compiler didn't like casting between a double and an + enum which is avoided now. - <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters - <https://bugs.webkit.org/show_bug.cgi?id=26802> + [Qt] The QScriptValuePrivate::CSpecial is too generic. + https://bugs.webkit.org/show_bug.cgi?id=40067 - In the original JSON.parse patch unicode was handled correctly, however in some last - minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug. + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::isNull): + (QScriptValuePrivate::isUndefined): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::toObject): + (QScriptValuePrivate::assignEngine): + (QScriptValuePrivate::isNumberBased): - * runtime/LiteralParser.cpp: - (JSC::isSafeStringCharacter): - (JSC::LiteralParser::Lexer::lexString): +2010-06-03 Gavin Barraclough <barraclough@apple.com> -2009-06-26 Oliver Hunt <oliver@apple.com> + Reviewed by NOBODY (Qt build fix). - Reviewed by Dan Bernstein. + * wtf/Platform.h: - <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746) - <https://bugs.webkit.org/show_bug.cgi?id=26746> +2010-06-03 Gavin Barraclough <barraclough@apple.com> - Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id. Clearly this - is less than correct. This patch corrects that error. + Reviewed by Mark Rowe. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCacheGetByID): + Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms + This was fixed in bug #40094. -2009-06-26 Eric Seidel <eric@webkit.org> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Platform.h: - No review, only rolling out r45259. +2010-06-03 Gavin Barraclough <barraclough@apple.com> - Roll out r45259 after crash appeared on the bots: - plugins/undefined-property-crash.html - ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize - (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278 - void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap]) + Reviewed by NOBODY (Interpreter build fix). - * runtime/DateInstance.cpp: - * runtime/Identifier.cpp: - * runtime/Lookup.h: - * runtime/RegExpConstructor.cpp: - * runtime/RegExpObject.h: - * runtime/ScopeChain.h: - * runtime/UString.h: + * JavaScriptCore.JSVALUE32_64only.exp: + * JavaScriptCore.JSVALUE32only.exp: + * JavaScriptCore.JSVALUE64only.exp: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): -2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> +2010-06-03 Gavin Barraclough <barraclough@apple.com> - Reviewed by Simon Hausmann. + Reviewed by NOBODY (windows build fix II). - Add support for QDataStream operators to Vector. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/Vector.h: - (WTF::operator<<): - (WTF::operator>>): +2010-06-03 Gavin Barraclough <barraclough@apple.com> -2009-06-24 Sam Weinig <sam@webkit.org> + Reviewed by NOBODY (windows build fix). - Reviewed by Gavin Barraclough. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Make the opcode sampler work once again. +2010-06-02 Gavin Barraclough <barraclough@apple.com> - * jit/JIT.h: - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdSelfList): - (JSC::JIT::compileGetByIdProtoList): - (JSC::JIT::compileGetByIdChainList): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdTransition): - (JSC::JIT::compileCTIMachineTrampolines): - (JSC::JIT::compilePatchGetArrayLength): - * jit/JITStubCall.h: - (JSC::JITStubCall::call): + Reviewed by Oliver Hunt. -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Bug 40094 - The return type of NativeFunction should be EncodedJSValue + On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not. - Reviewed by Maciej Stachowiak. + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackFunction.h: + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::call): + * JavaScriptCore.exp: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::executeCall): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * jsc.cpp: + (functionPrint): + (functionDebug): + (functionGC): + (functionVersion): + (functionRun): + (functionLoad): + (functionCheckSyntax): + (functionSetSamplingFlags): + (functionClearSamplingFlags): + (functionReadline): + (functionQuit): + * runtime/ArrayConstructor.cpp: + (JSC::callArrayConstructor): + (JSC::arrayConstructorIsArray): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::callBooleanConstructor): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/CallData.h: + * runtime/DateConstructor.cpp: + (JSC::callDate): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + (JSC::dateProtoFuncToJSON): + * runtime/ErrorConstructor.cpp: + (JSC::callErrorConstructor): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/FunctionConstructor.cpp: + (JSC::callFunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::callFunctionPrototype): + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/JSCell.h: + (JSC::getCallData): + (JSC::getConstructData): + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSFunction.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + (JSC::globalFuncIsNaN): + (JSC::globalFuncIsFinite): + (JSC::globalFuncDecodeURI): + (JSC::globalFuncDecodeURIComponent): + (JSC::globalFuncEncodeURI): + (JSC::globalFuncEncodeURIComponent): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + (JSC::globalFuncJSCPrint): + * runtime/JSGlobalObjectFunctions.h: + * runtime/JSONObject.cpp: + (JSC::JSONProtoFuncParse): + (JSC::JSONProtoFuncStringify): + * runtime/JSObject.cpp: + (JSC::callDefaultValueFunction): + * runtime/JSValue.h: + * runtime/MathObject.cpp: + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::callNativeErrorConstructor): + * runtime/NumberConstructor.cpp: + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::callObjectConstructor): + (JSC::objectConstructorGetPrototypeOf): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::objectConstructorGetOwnPropertyNames): + (JSC::objectConstructorKeys): + (JSC::toPropertyDescriptor): + (JSC::objectConstructorDefineProperty): + (JSC::objectConstructorDefineProperties): + (JSC::objectConstructorCreate): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncValueOf): + (JSC::objectProtoFuncHasOwnProperty): + (JSC::objectProtoFuncIsPrototypeOf): + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + (JSC::objectProtoFuncLookupGetter): + (JSC::objectProtoFuncLookupSetter): + (JSC::objectProtoFuncPropertyIsEnumerable): + (JSC::objectProtoFuncToLocaleString): + (JSC::objectProtoFuncToString): + * runtime/ObjectPrototype.h: + * runtime/RegExpConstructor.cpp: + (JSC::callRegExpConstructor): + * runtime/RegExpObject.cpp: + (JSC::callRegExpObject): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCode): + (JSC::callStringConstructor): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToString): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + (JSC::stringProtoFuncTrim): + (JSC::stringProtoFuncTrimLeft): + (JSC::stringProtoFuncTrimRight): - Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid - unnecessary WTF:: usings. - Remove existing unnecessary WTF:: usings. +2010-06-02 Mark Rowe <mrowe@apple.com> - * interpreter/Interpreter.h: - * profiler/CallIdentifier.h: - * runtime/ScopeChain.h: - * wtf/FastAllocBase.h: + Reviewed by Gavin Barraclough. -2009-06-24 David Levin <levin@chromium.org> + Add value-representation specific sections to the mac export file. - Fix all builds. + * Configurations/JavaScriptCore.xcconfig: + * DerivedSources.make: + * JavaScriptCore.JSVALUE32_64only.exp: Added. + * JavaScriptCore.JSVALUE32only.exp: Added. + * JavaScriptCore.JSVALUE64only.exp: Added. + * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.h: - * bytecompiler/BytecodeGenerator.h: - * interpreter/Register.h: +2010-06-02 Mark Rowe <mrowe@apple.com> -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Reviewed by Gavin Barraclough. - Reviewed by Maciej Stachowiak. - - https://bugs.webkit.org/show_bug.cgi?id=26677 + <rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE. - Inherits CodeBlock class from FastAllocBase because it - has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217. + * pcre/pcre_exec.cpp: + (repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good + reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug. - * bytecode/CodeBlock.h: +2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Reviewed by Kenneth Rohde Christiansen. - Reviewed by Maciej Stachowiak. - - https://bugs.webkit.org/show_bug.cgi?id=26676 + Fix the QScriptValue::strictlyEquals function. - Inherits BytecodeGenerator class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892. + Handling for a few edge cases was added. - * bytecompiler/BytecodeGenerator.h: + New autotest that covers the QScriptValue::strictlyEquals function. -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + [Qt] QScriptValue::strictlyEquals is broken + https://bugs.webkit.org/show_bug.cgi?id=36600 - Reviewed by Maciej Stachowiak. - - https://bugs.webkit.org/show_bug.cgi?id=26675 + * qt/api/qscriptvalue.cpp: + (QScriptValue::strictlyEquals): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::strictlyEquals): + * qt/tests/qscriptvalue/qscriptvalue.pro: + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added. + (tst_QScriptValue::strictlyEquals_initData): + (tst_QScriptValue::strictlyEquals_makeData): + (tst_QScriptValue::strictlyEquals_test): - Inherits Register class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149. +2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - * interpreter/Register.h: + Reviewed by Kenneth Rohde Christiansen. -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + New function QScriptEngine::newObject. - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=26674 + The function creates a object of class Object and returns it + as a QScriptValue. - Inherits HashMap class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458. + [Qt] QScriptEngine API should contain a newObject function + https://bugs.webkit.org/show_bug.cgi?id=39114 - * wtf/HashMap.h: + * qt/api/qscriptengine.cpp: + (QScriptEngine::newObject): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::newObject): + * qt/api/qscriptengine_p.h: + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::newObject): -2009-06-24 Oliver Hunt <oliver@apple.com> +2010-06-02 Gabor Loki <loki@webkit.org> - Reviewed by Darin Adler. + Reviewed by Gavin Barraclough. + https://bugs.webkit.org/show_bug.cgi?id=40011 - <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research' + Thumb-2 build fix: The offset parameter of ldrh should be encoded as an + imm12 immediate constant in load16. If it is not fit in the instruction + a temporary register has to be used. - The problem was caused by the page returned with a function using a - var declaration list containing around ~3000 variables. The solution - to this is to flatten the comma expression representation and make - codegen comma expressions and initializer lists iterative rather than - recursive. + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::load16): - * parser/Grammar.y: - * parser/NodeConstructors.h: - (JSC::CommaNode::CommaNode): - * parser/Nodes.cpp: - (JSC::CommaNode::emitBytecode): - * parser/Nodes.h: - (JSC::ExpressionNode::isCommaNode): - (JSC::CommaNode::isCommaNode): - (JSC::CommaNode::append): +2010-06-02 Sterling Swigart <sswigart@google.com> -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Reviewed by David Levin. - Reviewed by Maciej Stachowiak. + Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches. + https://bugs.webkit.org/show_bug.cgi?id=39906 - https://bugs.webkit.org/show_bug.cgi?id=26645 + * Configurations/FeatureDefines.xcconfig: - Inherits ScopeChainNode class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95. +2010-06-01 Gavin Barraclough <barraclough@apple.com> - * wtf/RefPtr.h: + Reviewed by Sam Weinig. -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together - Reviewed by Darin Adler. + This is a useful stepping stone towards reversing argument order. - https://bugs.webkit.org/show_bug.cgi?id=26648 + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::addParameter): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallEval): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::CallArguments::thisRegister): + (JSC::CallArguments::argumentRegister): + (JSC::CallArguments::callFrame): + (JSC::CallArguments::count): + (JSC::BytecodeGenerator::shouldEmitProfileHooks): + * bytecompiler/NodesCodegen.cpp: + (JSC::NewExprNode::emitBytecode): + (JSC::CallArguments::CallArguments): + (JSC::EvalFunctionCallNode::emitBytecode): + (JSC::FunctionCallValueNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::FunctionCallBracketNode::emitBytecode): + (JSC::FunctionCallDotNode::emitBytecode): + (JSC::CallFunctionCallDotNode::emitBytecode): + (JSC::ApplyFunctionCallDotNode::emitBytecode): - Inherits Deque class from FastAllocBase because it has been - instantiated by 'new' with DEFINE_STATIC_LOCAL macro in - JavaScriptCore/wtf/MainThread.cpp:62. +2010-06-01 Yong Li <yoli@rim.com> - * wtf/Deque.h: + Reviewed by Darin Adler. -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex. + https://bugs.webkit.org/show_bug.cgi?id=39893 - Reviewed by Darin Adler. + * wtf/ThreadingPthreads.cpp: + (WTF::Mutex::Mutex): - https://bugs.webkit.org/show_bug.cgi?id=26644 +2010-06-01 Kwang Yul Seo <skyul@company100.net> - Inherits RefPtr class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41. + Reviewed by Xan Lopez. - * wtf/RefPtr.h: + [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap + https://bugs.webkit.org/show_bug.cgi?id=39831 -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Use DEFINE_STATIC_LOCAL for static local variables. - Reviewed by Darin Adler. + * wtf/gtk/ThreadingGtk.cpp: + (WTF::threadMapMutex): + (WTF::threadMap): + (WTF::identifierByGthreadHandle): - Inherits HashSet class from FastAllocBase, because it has been - instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116. +2010-06-01 Kent Tamura <tkent@chromium.org> - * wtf/HashSet.h: + Reviewed by Shinichiro Hamaji. -2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Fix style errors of dtoa + https://bugs.webkit.org/show_bug.cgi?id=39972 - Reviewed by Darin Adler. + Fix all errors reported by check-webkit-style. - Inherits Vector class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633. + * wtf/dtoa.cpp: + * wtf/dtoa.h: - * wtf/Vector.h: +2010-05-30 Darin Adler <darin@apple.com> -2009-06-24 Norbert Leser <norbert.leser@nokia.com> + Reviewed by Sam Weinig. - Reviewed by Maciej Stachoviak. + * wtf/OwnArrayPtr.h: + (WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr. + At some point someone fixed the "asserts when assigning to 0 and the pointer is + already 0" issue in OwnPtr but forgot to do it here. - The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance - (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.). - Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode), - the stack overflows immediately on Symbian hardware (max. 80 kB). - Proposed change allocates generator objects on heap. - Performance impact (if any) should be negligible and change is proposed as general fix, - rather than ifdef'd for SYMBIAN. +2010-05-29 Geoffrey Garen <ggaren@apple.com> - * parser/Nodes.cpp: - (JSC::ProgramNode::generateBytecode): - (JSC::EvalNode::generateBytecode): - (JSC::EvalNode::bytecodeForExceptionInfoReparse): - (JSC::FunctionBodyNode::generateBytecode): - (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse): + Windows build fix: Updated exported symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-06-23 Oliver Hunt <oliver@apple.com> +2010-05-29 Geoffrey Garen <ggaren@apple.com> - Reviewed by Gavin Barraclough. + Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I + can figure out why it's crashing. - <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593) - <https://bugs.webkit.org/show_bug.cgi?id=26593> + * wtf/Platform.h: - Do not attempt to cache structure chains if they contain a dictionary at any level. +2010-05-29 Geoffrey Garen <ggaren@apple.com> - * interpreter/Interpreter.cpp: - (JSC::Interpreter::tryCachePutByID): - (JSC::Interpreter::tryCacheGetByID): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - * runtime/Structure.cpp: - (JSC::Structure::getEnumerablePropertyNames): - (JSC::Structure::addPropertyTransition): - * runtime/StructureChain.cpp: - (JSC::StructureChain::isCacheable): - * runtime/StructureChain.h: + Fixed Windows crash seen on buildbot. -2009-06-23 Yong Li <yong.li@torchmobile.com> + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first + argument in ecx. - Reviewed by George Staikos. +2010-05-28 Geoffrey Garen <ggaren@apple.com> - https://bugs.webkit.org/show_bug.cgi?id=26654 - Add the proper export define for the JavaScriptCore API when building for WINCE. + Windows build fix: Updated exported symbols. - * API/JSBase.h: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-06-23 Joe Mason <joe.mason@torchmobile.com> +2010-05-28 Geoffrey Garen <ggaren@apple.com> - Reviewed by Adam Treat. + Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL + is disabled. - Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com> + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + * wtf/Platform.h: - https://bugs.webkit.org/show_bug.cgi?id=26611 - Implement currentThreadStackBase on WINCE by adding a global, - g_stackBase, which must be set to the address of a local variable - by the caller before calling any WebKit function that invokes JSC. +2010-05-28 Geoffrey Garen <ggaren@apple.com> - * runtime/Collector.cpp: - (JSC::isPageWritable): - (JSC::getStackBase): - Starts at the top of the stack and returns the entire range of - consecutive writable pages as an estimate of the actual stack. - This will be much bigger than the actual stack range, so some - dead objects can't be collected, but it guarantees live objects - aren't collected prematurely. + Windows build fix: Updated exported symbols. - (JSC::currentThreadStackBase): - On WinCE, returns g_stackBase if set or call getStackBase as a - fallback if not. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: -2009-06-23 Oliver Hunt <oliver@apple.com> +2010-05-28 Geoffrey Garen <ggaren@apple.com> - Reviewed by Alexey Proskuryakov. + Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt. - Fix stupid performance problem in the LiteralParser + Simplified the host calling convention. + + 22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host + function calls. + + No change on SunSpider. + + All JS calls (but not constructs, yet) now go through the normal JS + calling convention via the RegisterFile. As a result, the host calling + convention, which used to be this - The LiteralParser was making a new UString in order to use - toDouble, however UString's toDouble allows a much wider range - of numberic strings than the LiteralParser accepts, and requires - an additional heap allocation or two for the construciton of the - UString. To rectify this we just call WTF::dtoa directly using - a stack allocated buffer to hold the validated numeric literal. + JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&) + + is now this - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexNumber): - (JSC::LiteralParser::parse): - * runtime/LiteralParser.h: + JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*) + + Callee, 'this', and argument access all hapen relative to the ExecState*, + which is a pointer into the RegisterFile. + + This patch comes in two parts. + + PART ONE: Functional code changes. + + * wtf/Platform.h: Disabled optimized calls on platforms I didn't test. + We can re-enable once we verify that host calls on these platforms are + correct. -2009-06-22 Oliver Hunt <oliver@apple.com> + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::functionName): + (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to + ExecState::callee(). - Reviewed by Alexey Proskuryakov. + (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue(). - Bug 26640: JSON.stringify needs to special case Boolean objects - <https://bugs.webkit.org/show_bug.cgi?id=26640> + * interpreter/CallFrame.cpp: + * interpreter/CallFrame.h: + (JSC::ExecState::callee): + (JSC::ExecState::scopeChain): + (JSC::ExecState::init): Changed callee() to be JSObject* instead of + JSFunction* -- now, it might be some other callable host object. + + (JSC::ExecState::hostThisRegister): + (JSC::ExecState::hostThisValue): + (JSC::ExecState::argumentCount): + (JSC::ExecState::argumentCountIncludingThis): + (JSC::ExecState::argument): + (JSC::ExecState::setArgumentCountIncludingThis): + (JSC::ExecState::setCallee): Added convenient accessors for arguments + from within a host function. Removed thisValue() because it was too + tempting to use incorrectly, and it only had one or two clients, anyway. - Add special case handling of the Boolean object so we match current - ES5 errata. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue(). - * runtime/JSONObject.cpp: - (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString - (JSC::gap): - (JSC::Stringifier::appendStringifiedValue): + (JSC::Interpreter::throwException): Be sure to shrink the register file + before invoking the exception handler, to reduce the chances that the + handler will re-throw in the case of stack overflow. (Re-throwing is now + more likely than it used to be, since standardizing the calling convention + implicitly added stack overflow checks to some places where they used to be missing.) -2009-06-22 Oliver Hunt <oliver@apple.com> + (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope. + Updated for CallFrame::init API change. - Reviewed by Darin Adler. + (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope. + Updated for CallFrame::init API change. Added support for calling a host + function. - Bug 26591: Support revivers in JSON.parse - <https://bugs.webkit.org/show_bug.cgi?id=26591> + (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope. + Updated for CallFrame::init API change. - Add reviver support to JSON.parse. This completes the JSON object. + (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. - * runtime/JSONObject.cpp: - (JSC::Walker::Walker): - (JSC::Walker::callReviver): - (JSC::Walker::walk): - (JSC::JSONProtoFuncParse): + (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change. + Added some explicit JSValue(JSObject*) initialization, since relaxing + the JSFunction* restriction on callee has made register types more ambiguous. + Removed toThisObject() conversion, since all callees do it themselves now. + Updated host function call for new host function signature. Updated for + change to ExecState::argumentCount() API. -2009-06-21 Oliver Hunt <oliver@apple.com> + * interpreter/Register.h: + (JSC::Register::): + (JSC::Register::operator=): + (JSC::Register::function): Changed callee() to be JSObject* instead of + JSFunction* -- now, it might be some other callable host object. - Reviewed by Darin Adler. + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that + set up the arguments to host functions -- all but one of the arguments + are gone now. This is the actual optimization. - Bug 26592: Support standard toJSON functions - <https://bugs.webkit.org/show_bug.cgi?id=26592> + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API + changes noted above. Removed toThisObject() conversion, since all callees + do it themselves now. + + * runtime/ArgList.h: + (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a + temporary shim for converting from ExecState* to ArgList where it's still + necessary. - Add support for the standard Date.toJSON function. + * runtime/Arguments.h: + (JSC::Arguments::getArgumentsData): + (JSC::Arguments::Arguments): Updated for ExecState and Register API + changes noted above. - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToJSON): + * runtime/CallData.cpp: + (JSC::call): Changed call always to call Interpreter::executeCall, even + for host functions. This ensures that the normal calling convention is + set up in the RegsiterFile when calling from C++ to host function. -2009-06-21 Oliver Hunt <oliver@apple.com> + * runtime/CallData.h: Changed host function signature as described above. - Reviewed by Sam Weinig. + * runtime/ConstructData.cpp: + (JSC::construct): Moved JSFunction::construct code here so I could nix + JSFunction::call and JSFunction::call. We want a JSFunction-agnostic + way to call and construct, so that everything works naturally for non- + JSFunction objects. - Bug 26594: JSC needs to support Date.toISOString - <https://bugs.webkit.org/show_bug.cgi?id=26594> + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSFunction.h: Updated for ExecState and Register API changes + noted above. Nixed JSFunction::call and JSFunction::construct, noted above. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::init): Ditto. - Add support for Date.toISOString. + PART TWO: Global search and replace. + + In the areas below, I used global search-and-replace to change + (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*) + args.size() => exec->argumentCount() + args.at(i) => exec->argument(i) + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackFunction.h: + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::call): + * JavaScriptCore.exp: + * jsc.cpp: + (functionPrint): + (functionDebug): + (functionGC): + (functionVersion): + (functionRun): + (functionLoad): + (functionCheckSyntax): + (functionSetSamplingFlags): + (functionClearSamplingFlags): + (functionReadline): + (functionQuit): + * runtime/ArrayConstructor.cpp: + (JSC::callArrayConstructor): + (JSC::arrayConstructorIsArray): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::callBooleanConstructor): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/DateConstructor.cpp: + (JSC::callDate): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + (JSC::fillStructuresUsingTimeArgs): + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): (JSC::dateProtoFuncToISOString): - -2009-06-21 Oliver Hunt <oliver@apple.com> - - Remove dead code. - - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - -2009-06-21 Oliver Hunt <oliver@apple.com> - - Reviewed by Darin Adler and Cameron Zwarich. - - Bug 26587: Support JSON.parse - <https://bugs.webkit.org/show_bug.cgi?id=26587> - - Extend the LiteralParser to support the full strict JSON - grammar, fix a few places where the grammar was incorrectly - lenient. Doesn't yet support the JSON.parse reviver function - but that does not block the JSON.parse functionality itself. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + (JSC::dateProtoFuncToJSON): + * runtime/ErrorConstructor.cpp: + (JSC::callErrorConstructor): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/FunctionConstructor.cpp: + (JSC::callFunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::callFunctionPrototype): + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): (JSC::globalFuncEval): + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + (JSC::globalFuncIsNaN): + (JSC::globalFuncIsFinite): + (JSC::globalFuncDecodeURI): + (JSC::globalFuncDecodeURIComponent): + (JSC::globalFuncEncodeURI): + (JSC::globalFuncEncodeURIComponent): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + (JSC::globalFuncJSCPrint): + * runtime/JSGlobalObjectFunctions.h: * runtime/JSONObject.cpp: (JSC::JSONProtoFuncParse): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lex): - (JSC::isSafeStringCharacter): - (JSC::LiteralParser::Lexer::lexString): - (JSC::LiteralParser::parse): - * runtime/LiteralParser.h: - (JSC::LiteralParser::LiteralParser): - (JSC::LiteralParser::tryJSONParse): - (JSC::LiteralParser::): - (JSC::LiteralParser::Lexer::Lexer): - -2009-06-21 David Levin <levin@chromium.org> - - Reviewed by NOBODY (speculative build fix for windows). - - Simply removed some whitespace form this file to make windows build wtf and - hopefully copy the new MessageQueque.h so that WebCore picks it up. - - * wtf/Assertions.cpp: + (JSC::JSONProtoFuncStringify): + * runtime/JSString.h: + * runtime/MathObject.cpp: + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::callNativeErrorConstructor): + * runtime/NumberConstructor.cpp: + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::callObjectConstructor): + (JSC::objectConstructorGetPrototypeOf): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::objectConstructorGetOwnPropertyNames): + (JSC::objectConstructorKeys): + (JSC::objectConstructorDefineProperty): + (JSC::objectConstructorDefineProperties): + (JSC::objectConstructorCreate): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncValueOf): + (JSC::objectProtoFuncHasOwnProperty): + (JSC::objectProtoFuncIsPrototypeOf): + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + (JSC::objectProtoFuncLookupGetter): + (JSC::objectProtoFuncLookupSetter): + (JSC::objectProtoFuncPropertyIsEnumerable): + (JSC::objectProtoFuncToLocaleString): + (JSC::objectProtoFuncToString): + * runtime/ObjectPrototype.h: + * runtime/Operations.h: + (JSC::jsString): + * runtime/RegExpConstructor.cpp: + (JSC::callRegExpConstructor): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::test): + (JSC::RegExpObject::exec): + (JSC::callRegExpObject): + (JSC::RegExpObject::match): + * runtime/RegExpObject.h: + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + (JSC::stringFromCharCode): + (JSC::callStringConstructor): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToString): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + (JSC::stringProtoFuncTrim): + (JSC::stringProtoFuncTrimLeft): + (JSC::stringProtoFuncTrimRight): -2009-06-21 Drew Wilson <atwilson@google.com> +2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - Reviewed by David Levin. + Reviewed by Geoffrey Garen. - <https://bugs.webkit.org/show_bug.cgi?id=25043> - Added support for multi-threaded MessagePorts. + Fix the JSObjectSetPrototype function. - * wtf/MessageQueue.h: - (WTF::::appendAndCheckEmpty): - Added API to test whether the queue was empty before adding an element. - -2009-06-20 David D. Kilzer <ddkilzer@webkit.org> + A cycle in a prototype chain can cause an application hang or + even crash. + A check for a prototype chain cycles was added to + the JSObjectSetPrototype. - Fix namespace comment in SegmentedVector.h + JSObjectSetPrototype doesn't check for cycle in prototype chain. + https://bugs.webkit.org/show_bug.cgi?id=39360 - * wtf/SegmentedVector.h: Updated namespace comment to reflect - new namespace after r44897. + * API/JSObjectRef.cpp: + (JSObjectSetPrototype): + * API/tests/testapi.c: + (assertTrue): + (checkForCycleInPrototypeChain): + (main): + * runtime/JSObject.cpp: + (JSC::JSObject::put): + * runtime/JSObject.h: + (JSC::JSObject::setPrototypeWithCycleCheck): -2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> +2010-05-28 Chao-ying Fu <fu@mips.com> - Bug 24986: ARM JIT port - <https://bugs.webkit.org/show_bug.cgi?id=24986> + Reviewed by Eric Seidel. - Reviewed by Oliver Hunt. + Fix MIPS JIT DoubleGreaterThanOrEqual Operands + https://bugs.webkit.org/show_bug.cgi?id=39504 - An Iterator added for SegmentedVector. Currently - only the pre ++ operator is supported. + Swapped two operands of left and right for DoubleGreaterThanOrEqual. + This patch fixed two layout tests as follows. + fast/js/comparison-operators-greater.html + fast/js/comparison-operators-less.html - * wtf/SegmentedVector.h: - (WTF::SegmentedVectorIterator::~SegmentedVectorIterator): - (WTF::SegmentedVectorIterator::operator*): - (WTF::SegmentedVectorIterator::operator->): - (WTF::SegmentedVectorIterator::operator++): - (WTF::SegmentedVectorIterator::operator==): - (WTF::SegmentedVectorIterator::operator!=): - (WTF::SegmentedVectorIterator::operator=): - (WTF::SegmentedVectorIterator::SegmentedVectorIterator): - (WTF::SegmentedVector::alloc): - (WTF::SegmentedVector::begin): - (WTF::SegmentedVector::end): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::branchDouble): -2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> +2010-05-28 Gavin Barraclough <barraclough@apple.com> - Bug 24986: ARM JIT port - <https://bugs.webkit.org/show_bug.cgi?id=24986> + Reviewed by Geoff Garen. - Reviewed by Oliver Hunt. + Move jit compilation from linking thunks into cti_vm_lazyLink methods. - Move SegmentedVector to /wtf subdirectory - and change "namespace JSC" to "namespace WTF" + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): - Additional build file updates by David Kilzer. +2010-05-28 Gavin Barraclough <barraclough@apple.com> - * GNUmakefile.am: Updated path to SegmentedVector.h. - * JavaScriptCore.order: Updated SegmentedVector namespace from - JSC to WTF in mangled C++ method name. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Removed reference to bytecompiler\SegmentedVector.h. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to - wtf\SegmentedVector.h. - * JavaScriptCore.xcodeproj/project.pbxproj: Moved - SegmentedVector.h definition from bytecompiler subdirectory to - wtf subdirectory. - * bytecompiler/BytecodeGenerator.h: Updated #include path to - SegmentedVector.h and prepended WTF:: namespace to its use. - * parser/Lexer.h: Ditto. - * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h. - (WTF::SegmentedVector::SegmentedVector): - (WTF::SegmentedVector::~SegmentedVector): - (WTF::SegmentedVector::size): - (WTF::SegmentedVector::at): - (WTF::SegmentedVector::operator[]): - (WTF::SegmentedVector::last): - (WTF::SegmentedVector::append): - (WTF::SegmentedVector::removeLast): - (WTF::SegmentedVector::grow): - (WTF::SegmentedVector::clear): - (WTF::SegmentedVector::deleteAllSegments): - (WTF::SegmentedVector::segmentExistsFor): - (WTF::SegmentedVector::segmentFor): - (WTF::SegmentedVector::subscriptFor): - (WTF::SegmentedVector::ensureSegmentsFor): - (WTF::SegmentedVector::ensureSegment): - -2009-06-19 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h). + Reviewed by Sam Weinig. + Bug 39898 - Move arity check into callee. + + We can reduce the size of the virtual call trampolines by moving the arity check + into the callee functions. As a following step we will be able to remove the + check for native function / codeblocks by performing translation in a lazy stub. + + * interpreter/CallFrame.h: + (JSC::ExecState::init): + (JSC::ExecState::setReturnPC): * jit/JIT.cpp: (JSC::JIT::privateCompile): - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::emitGetVariableObjectRegister): - (JSC::JIT::emitPutVariableObjectRegister): + (JSC::JIT::linkCall): + (JSC::JIT::linkConstruct): * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emitSlow_op_jnlesseq): - (JSC::JIT::compileBinaryArithOp): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - (JSC::JIT::checkStructure): + (JSC::JIT::compile): * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_construct_verify): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_to_jsnumber): - (JSC::JIT::emit_op_catch): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): - (JSC::JIT::emitSlow_op_get_by_val): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emit_op_method_check): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::compilePutDirectOffset): - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - -2009-06-19 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (Windows build fix). - - * jit/JIT.h: - * jit/JITInlineMethods.h: - -2009-06-19 Gabor Loki <loki@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::generateJITCodeForCall): + (JSC::FunctionExecutable::generateJITCodeForConstruct): + (JSC::FunctionExecutable::reparseExceptionInfo): + * runtime/Executable.h: + (JSC::NativeExecutable::NativeExecutable): + (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck): + (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck): - Reorganize ARM architecture specific macros. - Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7). +2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org> - Bug 24986: ARM JIT port - <https://bugs.webkit.org/show_bug.cgi?id=24986> + Reviewed by Darin Adler. - * assembler/ARMv7Assembler.h: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Imm32::Imm32): - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerCodeRef.h: - (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReferenceForTrampoline): - * jit/JITStubs.cpp: - * jit/JITStubs.h: - * wtf/Platform.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): + UTF-16 code points compare() for String objects + https://bugs.webkit.org/show_bug.cgi?id=39701 -2009-06-19 Gavin Barraclough <barraclough@apple.com> + Moving compare() implementation from UString to StringImpl for it to be shared + with String. Adding overloaded free functions codePointCompare() in StringImpl + and WTFString. Renaming function compare in UString to codePointCompare to be + consistent. - Reviewed by Oliver Hunt. + * runtime/JSArray.cpp: + (JSC::compareByStringPairForQSort): + * runtime/UString.cpp: + * runtime/UString.h: + (JSC::codePointCompare): + * wtf/text/StringImpl.cpp: + (WebCore::codePointCompare): + * wtf/text/StringImpl.h: + * wtf/text/WTFString.cpp: + (WebCore::codePointCompare): + * wtf/text/WTFString.h: - Fix armv7 JIT build issues. +2010-05-26 Darin Adler <darin@apple.com> - Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types), - and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros. + Reviewed by Kent Tamura. - * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects). - * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor. + Null characters handled incorrectly in ToNumber conversion + https://bugs.webkit.org/show_bug.cgi?id=38088 - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReference): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_catch): - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseInt): Changed code to use UTF8String().data() instead of + ascii() to fix the thread safety issue. Code path is covered by existing + tests in run-javascriptcore-tests. + (JSC::parseFloat): Moved comment to UString::toDouble since the issue + affects all clients, not just parseFloat. Specifically, this also affects + standard JavaScript numeric conversion, ToNumber. -2009-06-19 Adam Treat <adam.treat@torchmobile.com> + * runtime/UString.cpp: + (JSC::UString::toDouble): Added a comment about incorrect space skipping. + Changed trailing junk check to use the length of the CString instead of + checking for a null character. Also got rid of a little unneeded logic + in the case where we tolerate trailing junk. - Blind attempt at build fix. +2010-05-27 Nathan Lawrence <nlawrence@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Reviewed by Geoffrey Garen. -2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + Search for the new allocation one word at a time. Improves + performance on SunSpider by approximately 1%. + http://bugs.webkit.org/show_bug.cgi?id=39758 - Reviewed by Oliver Hunt. + * runtime/Collector.cpp: + (JSC::Heap::allocate): + * runtime/Collector.h: + (JSC::CollectorBitmap::advanceToNextPossibleFreeCell): - Inherits CallIdentifier struct from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86. +2010-05-27 Kevin Ollivier <kevino@theolliviers.com> - * wtf/HashCountedSet.h: + [wx] Build fixes for Windows after recent changes. -2009-06-19 Adam Treat <adam.treat@torchmobile.com> + * wscript: - Reviewed by Oliver Hunt. +2010-05-27 Gustavo Noronha Silva <gns@gnome.org> - https://bugs.webkit.org/show_bug.cgi?id=26540 - Modify the test shell to add a new function 'checkSyntax' that will - only parse the source instead of executing it. In this way we can test - pure parsing performance against some of the larger scripts in the wild. + More build fixage for make dist. - * jsc.cpp: - (GlobalObject::GlobalObject): - (functionCheckSyntax): + * GNUmakefile.am: -2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu> +2010-05-27 Kwang Yul Seo <skyul@company100.net> Reviewed by Darin Adler. - - Inherits HashCountedSet class from FastAllocBase because it has been - instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095. - - * wtf/HashCountedSet.h: -2009-06-19 Yong Li <yong.li@torchmobile.com> + RVCT does not have strnstr. + https://bugs.webkit.org/show_bug.cgi?id=39719 - Reviewed by George Staikos. + Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr. - https://bugs.webkit.org/show_bug.cgi?id=26558 - Declare these symbols extern for WINCE as they are provided by libce. + * wtf/StringExtras.h: - * runtime/DateConstructor.cpp: - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): +2010-05-26 Gavin Barraclough <barraclough@apple.com> -2009-06-19 Oliver Hunt <oliver@apple.com> + Reviewed by Oliver Hunt. - Reviewed by Maciej Stachowiak. + Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction. + (relanding r60267) + + If the last item in a main disjunction is a quantified set of parentheses, + this is easier to code generate for than the general case for quantified + parentheses. This is because we never need to backtrack into the parentheses + - the first match will be the final and accepted match. + + This patch also somewhat reverts a recent change to when fallback to PCRE + occurs. At the minute the compiler is tracking on patterns which will + require JIT fallback. This is handy from a performance perspective (it saves + the failed attempt at JIT compilation), but it means introducing knowledge + of the JITs capabilities into the other layers of the regex compilers. For + the specific feature of back-references, add a flag tracking their presence + on the pattern, and make these expressions fallback without attempting to + JIT. For parentheses, return to detecting which cases are have or have not + been handled during JIT compilation. + + 18% progression on tagcloud, ~1.5% overall on sunspidey. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction): + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::RegexGenerator::shouldFallBack): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): - <rdar://problem/6988973> ScopeChain leak in interpreter builds +2010-05-26 Gavin Barraclough <barraclough@apple.com> - Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT) - path. + Reviewed by NOBODY (revert). - * runtime/JSFunction.cpp: - (JSC::JSFunction::~JSFunction): - * wtf/Platform.h: + Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing. -2009-06-19 Yong Li <yong.li@torchmobile.com> + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::TermGenerationState::term): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): - Reviewed by George Staikos. +2010-05-26 Gustavo Noronha Silva <gns@gnome.org> - https://bugs.webkit.org/show_bug.cgi?id=26543 - Windows CE uses 'GetLastError' instead of 'errno.' + Build fixes for make distcheck. - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::grow): + * GNUmakefile.am: -2009-06-19 David Levin <levin@chromium.org> +2010-05-26 Gavin Barraclough <barraclough@apple.com> - Reviewed by NOBODY (Windows build fix). + Reviewed by Oliver Hunt. - Add export for Windows corresponding to OSX export done in r44844. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction. -2009-06-18 Oliver Hunt <oliver@apple.com> + If the last item in a main disjunction is a quantified set of parentheses, + this is easier to code generate for than the general case for quantified + parentheses. This is because we never need to backtrack into the parentheses + - the first match will be the final and accepted match. - Reviewed by Gavin "Viceroy of Venezuela" Barraclough. + This patch also somewhat reverts a recent change to when fallback to PCRE + occurs. At the minute the compiler is tracking on patterns which will + require JIT fallback. This is handy from a performance perspective (it saves + the failed attempt at JIT compilation), but it means introducing knowledge + of the JITs capabilities into the other layers of the regex compilers. For + the specific feature of back-references, add a flag tracking their presence + on the pattern, and make these expressions fallback without attempting to + JIT. For parentheses, return to detecting which cases are have or have not + been handled during JIT compilation. - Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected - <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385> + 18% progression on tagcloud, ~1.5% overall on sunspidey. - We need to make sure that each native function instance correctly unlinks any references to it - when it is collected. Allowing this to happen required a few changes: - * Every native function needs a codeblock to track the link information - * To have this codeblock, every function now also needs its own functionbodynode - so we no longer get to have a single shared instance. - * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction): + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::RegexGenerator::shouldFallBack): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - Constructor for NativeCode CodeBlock - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::refStructures): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::handlerForBytecodeOffset): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - (JSC::CodeBlock::functionRegisterForBytecodeOffset): - (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset): - (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): - (JSC::CodeBlock::setJITCode): - Add assertions to ensure we don't try and use NativeCode CodeBlocks as - a normal codeblock. +2010-05-26 Geoffrey Garen <ggaren@apple.com> - * bytecode/CodeBlock.h: - (JSC::): - (JSC::CodeBlock::source): - (JSC::CodeBlock::sourceOffset): - (JSC::CodeBlock::evalCodeCache): - (JSC::CodeBlock::createRareDataIfNecessary): - More assertions. + Reviewed by Sam Weinig. - * jit/JIT.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::linkCall): - Update logic to allow native function caching + Fixed a crash seen on the Leopard bot, caused by merge. * jit/JITStubs.cpp: - * parser/Nodes.cpp: - (JSC::FunctionBodyNode::createNativeThunk): - (JSC::FunctionBodyNode::isHostFunction): - * parser/Nodes.h: - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::~JSFunction): - (JSC::JSFunction::mark): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::~JSGlobalData): - * runtime/JSGlobalData.h: - -2009-06-18 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (Windows build fix). - - * wtf/DateMath.cpp: - (WTF::calculateUTCOffset): - -2009-06-18 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Timezone calculation incorrect in Venezuela. - - https://bugs.webkit.org/show_bug.cgi?id=26531 - <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3 - - The problem is that we're calculating the timezone relative to 01/01/2000, - but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007. - According to the spec, section 15.9.1.9 states "the time since the beginning - of the year", presumably meaning the *current* year. Change the calculation - to be based on whatever the current year is, rather than a canned date. - - No performance impact. + (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe, + since it's no longer passed to us as an argument. - * wtf/DateMath.cpp: - (WTF::calculateUTCOffset): - -2009-06-18 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig). +2010-05-25 Geoffrey Garen <ggaren@apple.com> - (Reintroducing patch added in r44492, and reverted in r44796.) + Fixed build failure caused by merge. - Change the implementation of op_throw so the stub function always modifies its - return address - if it doesn't find a 'catch' it will switch to a trampoline - to force a return from JIT execution. This saves memory, by avoiding the need - for a unique return for every op_throw. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_throw): - JITStubs::cti_op_throw now always changes its return address, - remove return code generated after the stub call (this is now - handled by ctiOpThrowNotCaught). * jit/JITStubs.cpp: - (JSC::): - Add ctiOpThrowNotCaught definitions. - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - Change cti_op_throw to always change its return address. - * jit/JITStubs.h: - Add ctiOpThrowNotCaught declaration. + (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this + function no longer returns a pair. -2009-06-18 Kevin McCullough <kmccullough@apple.com> +2010-05-25 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt. - <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit - - - Exposed functions now needed by WebCore. + <rdar://problem/8020221> + + Fixed a crash seen on Windows when calling a function with too many + arguments. + + SunSpider reports no change. + + No test because the ASSERT I added fires in existing tests. - * JavaScriptCore.exp: + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too + many arguments have been provided, since the caller only allocated enough + registerFile space for the arguments it provided, not enough for the extra + copy of arguments we're going to need. -2009-06-17 Darin Adler <darin@apple.com> +2010-05-25 Kwang Yul Seo <skyul@company100.net> - Reviewed by Oliver Hunt. + Reviewed by Darin Adler. - Bug 26429: Make JSON.stringify non-recursive so it can handle objects - of arbitrary complexity - https://bugs.webkit.org/show_bug.cgi?id=26429 + Build fix for JSFunction + https://bugs.webkit.org/show_bug.cgi?id=39658 - For marking I decided not to use gcProtect, because this is inside the engine - so it's easy enough to just do marking. And that darned gcProtect does locking! - Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor - for that class says "FIXME: Remove all clients of this API, then remove this API." + MSVC can't compile one of JSFunction constructors when JIT is disabled. + "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined. + Add ENABLE(JIT) guard to the constructor. - * runtime/Collector.cpp: - (JSC::Heap::collect): Add a call to JSONObject::markStringifiers. + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + * runtime/JSFunction.h: - * runtime/CommonIdentifiers.cpp: - (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier. - * runtime/CommonIdentifiers.h: Ditto. +2010-05-24 Gavin Barraclough <barraclough@apple.com> - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0. - * runtime/JSGlobalData.h: Added firstStringifierToMark. - - * runtime/JSONObject.cpp: Cut down the includes to the needed ones only. - (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string - objects to get their number and string values. - (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used - to wrap an identifier or integer so we don't have to do any work unless we - actually call a replacer. - (JSC::ReplacerPropertyName::value): Added. - (JSC::gap): Added. Helper function for the Stringifier constructor. - (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added. - The class is used to wrap an identifier or integer so we don't have to - allocate a number or string until we actually call toJSON or a replacer. - (JSC::PropertyNameForFunctionCall::asJSValue): Added. - (JSC::Stringifier::Stringifier): Updated and moved out of the class - definition. Added code to hook this into a singly linked list for marking. - (JSC::Stringifier::~Stringifier): Remove from the singly linked list. - (JSC::Stringifier::mark): Mark all the objects in the holder stacks. - (JSC::Stringifier::stringify): Updated. - (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit. - (JSC::Stringifier::toJSON): Renamed from toJSONValue. - (JSC::Stringifier::appendStringifiedValue): Renamed from stringify. - Added code to use the m_holderStack to do non-recursive stringify of - objects and arrays. This code also uses the timeout checker since in - pathological cases it could be slow even without calling into the - JavaScript virtual machine. - (JSC::Stringifier::willIndent): Added. - (JSC::Stringifier::indent): Added. - (JSC::Stringifier::unindent): Added. - (JSC::Stringifier::startNewLine): Added. - (JSC::Stringifier::Holder::Holder): Added. - (JSC::Stringifier::Holder::appendNextProperty): Added. This is the - function that handles the format of arrays and objects. - (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom - of the file so the JSONObject class is not interleaved with the - Stringifier class. - (JSC::JSONObject::markStringifiers): Added. Calls mark. - (JSC::JSONProtoFuncStringify): Streamlined the code here. The code - to compute the gap string is now a separate function. - - * runtime/JSONObject.h: Made everything private. Added markStringifiers. - -2009-06-17 Oliver Hunt <oliver@apple.com> + Reviewed by Sam Weinig. - Reviewed by Gavin Barraclough. + Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call. - <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com + Presently, as soon as op-call strays off the hot path we set up a set of values on + the stack to be passed as arguments to cti functions, in case any should be called. - Roll out r43849 as it appears that we cannot rely on the address of - an objects property storage being constant even if the structure is - unchanged. + Instead, hoist the setup of the callframe to happen slightly sooner, and make the + cti functions to compile & check arity read these values from the callframe. This + allows up to remove the deprecated methods to manually set up cti arguments, rather + than using JITStubCall.h. + * interpreter/CallFrame.h: * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2009-06-17 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Mark Rowe. - - Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>. - + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_throw): + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITStubs.cpp: - (JSC::): - (JSC::JITStubs::DEFINE_STUB_FUNCTION): + (JSC::DEFINE_STUB_FUNCTION): * jit/JITStubs.h: + (JSC::): -2009-06-17 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Mark Rowe. - - <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit - - On 64-bit, NaN-encoded values must be detagged before they can be used in rshift. - - No performance impact. - - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_rshift): - -2009-06-17 Adam Treat <adam.treat@torchmobile.com> - - Reviewed by George Staikos. - - https://bugs.webkit.org/show_bug.cgi?id=23155 - Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks. - - * jsc.cpp: - (main): - -2009-06-17 George Staikos <george.staikos@torchmobile.com> - - Reviewed by Adam Treat. - - https://bugs.webkit.org/show_bug.cgi?id=23155 - Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks. - - * config.h: - * jsc.cpp: - * wtf/Assertions.cpp: - * wtf/Assertions.h: - * wtf/CurrentTime.cpp: - (WTF::lowResUTCTime): - * wtf/DateMath.cpp: - (WTF::getLocalTime): - * wtf/MathExtras.h: - * wtf/Platform.h: - * wtf/StringExtras.h: - * wtf/Threading.h: - * wtf/win/MainThreadWin.cpp: - -2009-06-17 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com - - Remove PropertySlot::putValue - PropertySlots should only be used for getting, - not putting. Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite, - which is what it really was being used to ask, and remove some other getOwnPropertySlot - & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion. - - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::hasOwnPropertyForWrite): - * runtime/JSObject.h: - * runtime/JSStaticScopeObject.cpp: - * runtime/JSStaticScopeObject.h: - * runtime/PropertySlot.h: - -2009-06-16 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver hunt. - - Temporarily partially disable r44492, since this is causing some problems on internal builds. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_throw): - * jit/JITStubs.cpp: - (JSC::JITStubs::DEFINE_STUB_FUNCTION): - -2009-06-16 Sam Weinig <sam@webkit.org> - - Fix windows build. - - * jit/JIT.cpp: - (JSC::JIT::JIT): - -2009-06-16 Sam Weinig <sam@webkit.org> - - Reviewed by Oliver Hunt. +2010-05-24 Gavin Barraclough <barraclough@apple.com> - Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize - it for each type of stub using the return address to find the correct - offset. + Reviewed by Sam Weinig. + Relanding r60075. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): + * bytecode/CodeBlock.h: + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitGetByIdExceptionInfo): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): * jit/JIT.cpp: - (JSC::JIT::JIT): + (JSC::JIT::privateCompileMainPass): * jit/JIT.h: - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdSelfList): - (JSC::JIT::compileGetByIdProtoList): - (JSC::JIT::compileGetByIdChainList): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdTransition): - (JSC::JIT::compileCTIMachineTrampolines): - (JSC::JIT::compilePatchGetArrayLength): - * jit/JITStubCall.h: - (JSC::JITStubCall::call): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_neq_null): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emit_op_get_callee): + (JSC::JIT::emit_op_create_this): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_callee): + (JSC::JIT::emit_op_create_this): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC::JITThunks::hostFunctionStub): + * jit/JITStubs.h: + (JSC::JITThunks::ctiNativeConstruct): + (JSC::): + * runtime/ExceptionHelpers.cpp: + (JSC::createNotAnObjectError): + * runtime/Executable.h: + (JSC::NativeExecutable::create): + (JSC::NativeExecutable::NativeExecutable): + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSFunction.h: + * wtf/Platform.h: -== Rolled over to ChangeLog-2009-06-16 == +== Rolled over to ChangeLog-2010-05-24 == |
