2010-08-16 Kevin Ollivier [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. * wscript: 2010-08-16 Leandro Pereira [EFL] Build fix after r65366. * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if they're empty. * jsc/CMakeLists.txt: Ditto. * wtf/CMakeLists.txt: Ditto. 2010-08-15 Kevin Ollivier [wx] Build fix, don't build intermediate source in DerivedSources dir. * wscript: 2010-08-14 Patrick Gansterer Reviewed by Kenneth Rohde Christiansen. [CMake] Add preprocessor detection for generator scripts https://bugs.webkit.org/show_bug.cgi?id=43984 * CMakeLists.txt: 2010-08-14 Patrick Gansterer Reviewed by Kenneth Rohde Christiansen. [CMake] Set target properties only if available https://bugs.webkit.org/show_bug.cgi?id=43978 * CMakeLists.txt: * jsc/CMakeLists.txt: * wtf/CMakeLists.txt: 2010-08-13 Kevin Ollivier [wx] Build fix, add CString to the list of forwards. * wtf/Forward.h: 2010-08-13 Gavin Barraclough Windows build fix * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-08-13 Gavin Barraclough Windows build fix * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-08-13 Gavin Barraclough Windows build fix * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-08-13 Gavin Barraclough Rubber stamped by Sam Weinig. Switch String::/UString::ascii() to return a CString. * 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: 2010-08-13 Gabor Loki Reviewed by Gavin Barraclough. Avoid increasing required alignment of target type warning on ARM https://bugs.webkit.org/show_bug.cgi?id=38045 The reinterpret_cast([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. * 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): 2010-08-13 Gavin Barraclough Reviewed by Sam Weinig 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: (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 Reviewed by Gavin Barraclough. Refactoring the fpu code generator for the ARM port https://bugs.webkit.org/show_bug.cgi?id=43842 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. * 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): 2010-08-12 Sheriff Bot Unreviewed, rolling out r65295. http://trac.webkit.org/changeset/65295 https://bugs.webkit.org/show_bug.cgi?id=43950 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::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 Windows build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-08-12 Gavin Barraclough Reviewed by Sam Weinig 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: (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 Eeerk! - revert accidentally committed changes in UString! * JavaScriptCore.exp: * runtime/UString.cpp: (JSC::UString::UString): * runtime/UString.h: 2010-08-12 Gavin Barraclough Reviewed by Sam Weinig 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. * 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[]): 2010-08-12 David Levin Reviewed by NOBODY (build fix). * runtime/UString.h: Removed unneccessary #include. 2010-08-12 Gavin Barraclough Reviewed by Sam Weinig Revert changes to ALWAYS_INLINEness of a couple of functions in UString. This appears to have degraded performance. * runtime/UString.cpp: (JSC::UString::ascii): * runtime/UString.h: (JSC::UString::length): (JSC::UString::isEmpty): (JSC::UString::~UString): 2010-08-12 Csaba Osztrogonác Reviewed by Antonio Gomes. [Qt] Fix warnings: unknown conversion type character 'l' in format https://bugs.webkit.org/show_bug.cgi?id=43359 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. Qt port calls QString::vsprintf(...) , which is platform independent, and handles %lli, %llu and %llx on all platforms. (http://trac.webkit.org/changeset/35712) * wtf/text/WTFString.h: 2010-08-12 Gabor Loki Reviewed by Geoffrey Garen. Fix the array subscript is above array bounds warning in ByteArray on ARM. https://bugs.webkit.org/show_bug.cgi?id=43358 The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861 * wtf/ByteArray.cpp: (WTF::ByteArray::create): 2010-08-12 Gustavo Noronha Silva Reviewed by Martin Robinson. [GTK] Use GSettings to save/restore Web Inspector settings https://bugs.webkit.org/show_bug.cgi?id=43512 * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our GSettings support. (WTF::refGPtr): (WTF::derefGPtr): * wtf/gobject/GRefPtr.h: 2010-08-12 Gabor Loki Reviewed by Simon Hausmann. The scratch register should be saved in YARR with ARM JIT https://bugs.webkit.org/show_bug.cgi?id=43910 Reported by Jocelyn Turcotte. * yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateEnter): (JSC::Yarr::RegexGenerator::generateReturn): 2010-08-11 Gavin Barraclough Windows build fix. * JavaScriptCore.xcodeproj/project.pbxproj: * wtf/Forward.h: 2010-08-11 Leo Yang Reviewed by Geoffrey Garen. 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 * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::resetDateCache): 2010-08-11 Gavin Barraclough Windows & !JIT build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * JavaScriptCore.xcodeproj/project.pbxproj: * runtime/RegExp.cpp: (JSC::RegExp::match): 2010-08-11 Gavin Barraclough Rubber stamp by sam weinig Touch a file to stop the bot rolling a bit change out! * runtime/UString.cpp: (JSC::UString::ascii): 2010-08-11 Kevin Ollivier [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards. * wtf/Forward.h: 2010-08-11 Gavin Barraclough Rubber stamps by Darin Adler & Sam Weinig. Bug 43867 - Some UString cleanup 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::getOwnPropertySlot): (JSC::Arguments::getOwnPropertyNames): (JSC::Arguments::put): (JSC::Arguments::deleteProperty): * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncToString): * runtime/DatePrototype.cpp: (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::gap): (JSC::Stringifier::appendQuotedString): (JSC::Stringifier::appendStringifiedValue): (JSC::Stringifier::indent): (JSC::Stringifier::unindent): (JSC::Walker::walk): * runtime/JSString.cpp: (JSC::JSString::replaceCharacter): (JSC::JSString::getIndexSlowCase): * runtime/JSString.h: (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::getRightContext): * runtime/RegExpObject.cpp: (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::getOwnPropertyNames): * runtime/StringPrototype.cpp: (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): 2010-08-11 Gabor Loki Qt build fix (ARMv7). Fix invalid conversion from int to Condition. Add ARMv7Assembler.cpp to JavaScriptCore.pro. * JavaScriptCore.pro: * assembler/ARMv7Assembler.h: (JSC::ARMv7Assembler::): (JSC::ARMv7Assembler::JmpSrc::JmpSrc): 2010-08-11 Nathan Lawrence Reviewed by Geoffrey Garen. 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. * runtime/Collector.h: (JSC::CollectorBitmap::getset): (JSC::Heap::checkMarkCell): * runtime/JSArray.h: (JSC::MarkStack::drain): * runtime/JSCell.h: (JSC::MarkStack::append): 2010-08-11 Steve Falkenburg Reviewed by Adam Roben. Improve vsprops copying for Windows build https://bugs.webkit.org/show_bug.cgi?id=41982 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. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: 2010-08-10 Darin Adler Reviewed by Sam Weinig. Add leakRef and clear to all RefPtr variants https://bugs.webkit.org/show_bug.cgi?id=42389 * 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/PassRefPtr.h: Changed all uses of releaseRef to leakRef. * 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. * 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. 2010-08-10 Dumitru Daniliuc Unreviewed, reverting an unintentional change to a file submitted in r65108. * bytecode/CodeBlock.h: (JSC::binaryChop): 2010-08-10 Gavin Barraclough Rubber stamped by Sam Weinig 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::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: * bytecompiler/NodesCodegen.cpp: (JSC::processClauseList): * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * 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::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::): 2010-08-10 Gavin Barraclough 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. * 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. 2010-08-10 Patrick Gansterer Reviewed by Eric Seidel. Make FastMalloc more portable. https://bugs.webkit.org/show_bug.cgi?id=41790 * wtf/FastMalloc.cpp: (WTF::TCMalloc_Central_FreeList::Populate): (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): 2010-08-10 Patrick Gansterer Reviewed by David Levin. [WINCE] Buildfix for CE 6.0 https://bugs.webkit.org/show_bug.cgi?id=43027 CE 6.0 doesn't define localtime in the system include files. * wtf/Platform.h: Include ce_time.h on all OS(WINCE). 2010-08-10 Gavin Barraclough Rubber stamped by Sam Weinig. Bug 43786 - Move AtomicStringHash from WebCore to WTF Also remove deprecated string headers from WebCore/platform/text. * 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. 2010-08-09 Oliver Hunt Fix Qt/ARM again, this time including the other changed file. * jit/JIT.h: 2010-08-09 Oliver Hunt Fix Qt/ARM C++ overload resolution I stab at thee * jit/JITInlineMethods.h: (JSC::JIT::beginUninterruptedSequence): (JSC::JIT::endUninterruptedSequence): 2010-08-09 Oliver Hunt Reviewed by Gavin Barraclough. Allow an assembler/macroassembler to compact branches to more concise forms when linking https://bugs.webkit.org/show_bug.cgi?id=43745 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. * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/ARMv7Assembler.cpp: Added. (JSC::): Record jump sizes * 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 (JSC::ARMv7Assembler::linkJump): (JSC::ARMv7Assembler::canBeShortJump): (JSC::ARMv7Assembler::linkLongJump): (JSC::ARMv7Assembler::linkShortJump): (JSC::ARMv7Assembler::linkJumpAbsolute): Moving code around for the various jump linking functions * 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. * 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 (JSC::LinkBuffer::applyOffset): A helper function to deal with the now potentially moved labels (JSC::LinkBuffer::linkCode): The new and mighty linker function * 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 * 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 * 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 * wtf/FastMalloc.cpp: (WTF::TCMallocStats::): * wtf/Platform.h: 2010-08-09 Gavin Barraclough Qt build fix III. * wtf/text/WTFString.h: 2010-08-09 Gavin Barraclough Qt build fix. * wtf/qt/StringQt.cpp: 2010-08-06 Gavin Barraclough Rubber stamped by Sam Weinig 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::). * JavaScriptCore.xcodeproj/project.pbxproj: * wtf/Forward.h: 2010-08-07 Sheriff Bot Unreviewed, rolling out r64938. http://trac.webkit.org/changeset/64938 https://bugs.webkit.org/show_bug.cgi?id=43685 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::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::setupPolymorphicProtoList): * wtf/Platform.h: 2010-08-07 Nathan Lawrence Reviewed by Geoffrey Garen. 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: * 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/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 2010-08-07 Michael Saboff Reviewed by Geoffrey Garen. 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. * 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): 2010-08-07 Kwang Yul Seo Reviewed by Eric Seidel. Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator https://bugs.webkit.org/show_bug.cgi?id=43399 m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR). * runtime/JSGlobalData.h: 2010-08-07 Patrick Roland Gansterer Reviewed by Eric Seidel. [Qt] Enable JIT on WinCE https://bugs.webkit.org/show_bug.cgi?id=43303 Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm. * DerivedSources.pro: 2010-08-07 Dan Bernstein Reviewed by Anders Carlsson. 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 * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h. 2010-08-07 Zoltan Herczeg Reviewed by Eric Seidel. Bitmap.h has no default constructor https://bugs.webkit.org/show_bug.cgi?id=43619 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. Csaba Osztrogonác helped to find this bug. * wtf/Bitmap.h: (WTF::::Bitmap): 2010-08-06 Rafael Antognolli [EFL] Build fix. * CMakeLists.txt: add runtime/CGHandle.cpp. 2010-08-06 Jessie Berlin Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build. Unreviewed. * JavaScriptCore.xcodeproj/project.pbxproj: * wtf/Forward.h: 2010-08-06 Jessie Berlin Windows Build Fix (continued). Unreviewed. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-08-06 Jessie Berlin Windows Build Fix. Unreviewed. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add GCHandle.h and GCHandle.cpp. 2010-08-06 Nathan Lawrence Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=43207 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. * 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): 2010-08-06 Tor Arne Vestbø Reviewed by Antonio Gomes. [Qt] Fix warnings about difference in symbol visiblity on Mac OS X * jsc.pro: 2010-08-06 Zoltan Herczeg Reviewed by Darin Adler. Refactor identifier parsing in lexer https://bugs.webkit.org/show_bug.cgi?id=41845 The code is refactored to avoid gotos. The new code has the same performance as the old one. SunSpider --parse-only: no change (from 34.0ms to 33.6ms) SunSpider: no change (from 523.2ms to 523.5ms) * parser/Lexer.cpp: (JSC::Lexer::parseIdent): (JSC::Lexer::lex): * parser/Lexer.h: 2010-08-06 Gabor Loki Reviewed by Gavin Barraclough. The ARM JIT does not support JSValue32_64 with RVCT https://bugs.webkit.org/show_bug.cgi?id=43411 JSValue32_64 is enabled for RVCT by default. * create_jit_stubs: * jit/JITStubs.cpp: (JSC::ctiTrampoline): (JSC::ctiVMThrowTrampoline): (JSC::ctiOpThrowNotCaught): * wtf/Platform.h: 2010-08-05 Chao-ying Fu Reviewed by Darin Adler. Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS https://bugs.webkit.org/show_bug.cgi?id=43514 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. * wtf/Platform.h: 2010-08-05 Gavin Barraclough Rubber stamped by Sam Weinig 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::). * JavaScriptCore.xcodeproj/project.pbxproj: * wtf/Forward.h: 2010-08-05 Geoffrey Garen Reviewed by Mark Rowe. Fixed leak seen on buildbot. * runtime/GCActivityCallbackCF.cpp: (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr, since anything less would be uncivilized. 2010-08-05 Andy Estes Reviewed by David Kilzer. Rename iOS-related OS and PLATFORM macros. https://bugs.webkit.org/show_bug.cgi?id=43493 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. * 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): 2010-08-05 Nathan Lawrence Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=43464 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. Additionally, I added an assert inside of emitOpcode that verifies that the last generated opcode was of the correct length. * bytecode/CodeBlock.cpp: (JSC::CodeBlock::CodeBlock): (JSC::CodeBlock::derefStructures): (JSC::CodeBlock::markAggregate): * bytecode/CodeBlock.h: (JSC::CodeBlock::globalObject): (JSC::GlobalCodeBlock::GlobalCodeBlock): (JSC::ProgramCodeBlock::ProgramCodeBlock): (JSC::EvalCodeBlock::EvalCodeBlock): (JSC::FunctionCodeBlock::FunctionCodeBlock): * bytecode/Opcode.h: (JSC::opcodeLength): * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::BytecodeGenerator): (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: * interpreter/Interpreter.cpp: (JSC::Interpreter::resolveGlobal): (JSC::Interpreter::resolveGlobalDynamic): (JSC::Interpreter::privateExecute): * jit/JITOpcodes.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): (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::cti_op_resolve_global): * runtime/Executable.cpp: (JSC::FunctionExecutable::compileForCallInternal): (JSC::FunctionExecutable::compileForConstructInternal): (JSC::FunctionExecutable::reparseExceptionInfo): 2010-08-05 Gavin Barraclough Reviewed by Sam Weinig. Bug 43185 - Switch RegisterFile over to use PageAllocation Remove platform-specific memory allocation code. * 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 Reviewed by Darin Adler. Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array content aren't properly initialized as part of unshift. * runtime/JSArray.cpp: (JSC::JSArray::unshiftCount): 2010-08-05 Jian Li Reviewed by David Levin. Unify blob related feature defines to ENABLE(BLOB). https://bugs.webkit.org/show_bug.cgi?id=43081 * Configurations/FeatureDefines.xcconfig: 2010-08-05 Gustavo Noronha Silva Rubber-stamped by Xan Lopez. Remove GHashTable left-overs. GHashTable is ref-counted, and is correctly supported by GRefPtr. * wtf/gobject/GOwnPtr.h: 2010-08-05 Gustavo Noronha Silva Unreviewed. Typo fix that makes distcheck happy. * GNUmakefile.am: 2010-08-03 Geoffrey Garen Reviewed by Oliver Hunt and Beth Dakin. 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. * API/JSValueRef.cpp: (JSValueMakeNumber): Don't allow an API client to accidentally specify a non-standard NaN either. 2010-08-04 Gavin Barraclough Windows build fix part II. * wtf/PageReservation.h: (WTF::PageReservation::systemReserve): 2010-08-04 Gavin Barraclough Windows build fix. * wtf/PageReservation.h: (WTF::PageReservation::systemReserve): 2010-08-04 Gavin Barraclough Build fix - add new header to !Mac projects. * GNUmakefile.am: * JavaScriptCore.gypi: * JavaScriptCore.vcproj/WTF/WTF.vcproj: 2010-08-04 Gavin Barraclough Reviewed by Sam Weinig. 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: 2010-08-04 Sheriff Bot Unreviewed, rolling out r64655. http://trac.webkit.org/changeset/64655 https://bugs.webkit.org/show_bug.cgi?id=43496 JavaScriptCore references patch seems to have caused regressions in QT and GTK builds (Requested by nlawrence on #webkit). * 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::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): 2010-08-04 Gavin Barraclough Rubber stamped by Sam Weinig. Enable JSVALUE64 for CPU(PPC64). Basic browsing seems to work. * wtf/Platform.h: 2010-08-04 Nathan Lawrence Reviewed by Darin Adler. 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 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: (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): (JSC::MarkStack::appendInternal): * runtime/JSGlobalObject.cpp: (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::JSValue): (JSC::JSValue::asCell): * runtime/MarkStack.h: * 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): 2010-08-03 Nathan Lawrence Reviewed by Oliver Hunt. Tightened up some get_by_id_chain* code generation https://bugs.webkit.org/show_bug.cgi?id=40935 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. * 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): 2010-08-03 Adam Roben Turn on PLATFORM_STRATEGIES on Windows Fixes . Reviewed by Anders Carlsson. * wtf/Platform.h: 2010-08-04 Gabor Loki Reviewed by Geoffrey Garen. Enable JSValue32_64 for GCC on ARM by default https://bugs.webkit.org/show_bug.cgi?id=43410 * wtf/Platform.h: 2010-08-03 Gavin Barraclough Speculative windows build fix. * wtf/Bitmap.h: 2010-08-03 Gavin Barraclough Build fix following r64624. * JavaScriptCore.xcodeproj/project.pbxproj: * wtf/PageAllocation.h: 2010-08-03 Nathan Lawrence Reviewed by Gavin Barraclough. https://bugs.webkit.org/show_bug.cgi?id=43269 Added new allocateAligned methods to PageAllocation. In order to prevent a regress in performance, the function needs to be inlined. Additionally, I ported the symbian block allocator to use PageAllocation and added a new WTF::Bitmap class to support this. * 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. 2010-08-03 Michael Saboff Reviewed by Gavin Barraclough. 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. * JavaScriptCore.xcodeproj/project.pbxproj: * runtime/JSArray.cpp: (JSC::JSArray::increaseVectorPrefixLength): 2010-08-03 Chao-ying Fu Reviewed by Gavin Barraclough. Fix following https://bugs.webkit.org/show_bug.cgi?id=43089 (accidentally inverted a compiler version check). * jit/ExecutableAllocator.h: (JSC::ExecutableAllocator::cacheFlush): 2010-08-03 Patrick Gansterer Reviewed by Gavin Barraclough. Implement DEFINE_STUB_FUNCTION for WinCE. https://bugs.webkit.org/show_bug.cgi?id=34953 * jit/JITStubs.cpp: (JSC::): (JSC::DEFINE_STUB_FUNCTION): 2010-08-02 Gavin Barraclough Reviewed by Oliver Hunt. Bug 43390 - Do not CRASH if we run out of room for jit code. 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. 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::executableCopy): * assembler/ARMv7Assembler.h: (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: (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::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): 2010-08-03 Geoffrey Garen Reviewed by Oliver Hunt. 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. * JavaScriptCore.xcodeproj/project.pbxproj: * runtime/JSArray.cpp: (JSC::JSArray::JSArray): * runtime/JSArray.h: (JSC::JSArray::): * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::storeVPtrs): 2010-08-03 Alex Milowski Reviewed by Beth Dakin. Changed the ENABLE_MATHML value to enable MathML by default. * Configurations/FeatureDefines.xcconfig: 2010-08-03 Michael Saboff Reviewed by Gavin Barraclough. 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. As part of this change, we use m_allocBase when reallocating and freeing the memory associated with ArrayStorage. * runtime/JSArray.cpp: (JSC::JSArray::JSArray): (JSC::JSArray::~JSArray): (JSC::JSArray::putSlowCase): (JSC::JSArray::increaseVectorLength): (JSC::JSArray::increaseVectorPrefixLength): * runtime/JSArray.h: 2010-08-03 Geoffrey Garen Reviewed by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=43444 PLATFORM(CF) is false on Windows in JavaScriptCore Moved some PLATFORM(WIN) #defines down into JavaScriptCore. * 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. 2010-08-03 Geoffrey Garen 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. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error in the future with an explicit error message. 2010-08-03 Geoffrey Garen Try to fix Windows build: update .def file. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-08-03 Nathan Lawrence Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=41318 GC should reclaim garbage even when new objects are not being allocated rapidly 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. 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: * 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: 2010-08-02 Kevin Ollivier [wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp * wscript: 2010-08-02 Mahesh Kulkarni Reviewed by Simon Hausmann. [QT] build fix for symbian https://bugs.webkit.org/show_bug.cgi?id=43234 1) wrong order of passing param's 2) static_cast complains on symbian so using reinterpret_cast No new tests added. Just a build fix for qt symbian * wtf/PageAllocation.cpp: (WTF::PageAllocation::commit): (WTF::PageAllocation::decommit): (WTF::PageAllocation::reserve): 2010-07-30 Luiz Agostini Reviewed by Simon Fraser. Enabling view modes to all platforms https://bugs.webkit.org/show_bug.cgi?id=37505 Removing ENABLE_WIDGETS_10_SUPPORT flag. 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. * wtf/Platform.h: 2010-07-30 Andy Estes Reviewed by David Kilzer. 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: 2010-07-30 Dumitru Daniliuc Reviewed by Davin Levin. Added a yield() function. https://bugs.webkit.org/show_bug.cgi?id=42843 * 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): 2010-07-30 Rafael Antognolli Reviewed by Antonio Gomes. [EFL] Add library version and soname to EFL generated libraries and binary. https://bugs.webkit.org/show_bug.cgi?id=43212 Add version and soname to libjavascriptcore.so and libwtf.so in case of linking as shared libraries, and version to jsc executable. * CMakeLists.txt: * jsc/CMakeLists.txt: * wtf/CMakeLists.txt: 2010-07-30 Mahesh Kulkarni Reviewed by Simon Hausmann. [QT] build fix for symbian https://bugs.webkit.org/show_bug.cgi?id=43234 * wtf/PageAllocation.h: (WTF::PageAllocation::PageAllocation): 2010-07-29 Sheriff Bot Unreviewed, rolling out r64313. http://trac.webkit.org/changeset/64313 https://bugs.webkit.org/show_bug.cgi?id=43233 Some Chromium bots are not happy with it for some unknown reason. (Requested by dumi on #webkit). * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * wtf/Threading.h: * wtf/ThreadingPthreads.cpp: * wtf/ThreadingWin.cpp: * wtf/gtk/ThreadingGtk.cpp: * wtf/qt/ThreadingQt.cpp: 2010-07-29 Sheriff Bot Unreviewed, rolling out r64302. http://trac.webkit.org/changeset/64302 https://bugs.webkit.org/show_bug.cgi?id=43223 Assertion is bogus (Requested by olliej on #webkit). * 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): 2010-07-29 Michael Saboff Reviewed by Gavin Barraclough. 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): 2010-07-29 Michael Saboff Reviewed by Darin Adler. Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes. * runtime/Collector.h: 2010-07-28 Dumitru Daniliuc Reviewed by David Levin. Added a yield() function. https://bugs.webkit.org/show_bug.cgi?id=42843 * 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): 2010-07-29 Michael Saboff Reviewed by Oliver Hunt. 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 * yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): 2010-07-29 Gabor Loki Reviewed by Gavin Barraclough. Avoid increasing required alignment of target type warning on ARM https://bugs.webkit.org/show_bug.cgi?id=38045 The reinterpret_cast([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. * 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): 2010-07-29 Martin Robinson Unreviewed build fix. Include a missing header in the source list to fix 'make dist.' * GNUmakefile.am: Include missing header. 2010-07-28 Gavin Barraclough Reviewed by Darin Adler. Bug 43162 - Add support for MADV_FREE to PageAllocation. * wtf/PageAllocation.cpp: (WTF::PageAllocation::commit): (WTF::PageAllocation::decommit): 2010-07-27 Kinuko Yasuda Reviewed by Ojan Vafai. Add FILE_SYSTEM build flag for FileSystem API https://bugs.webkit.org/show_bug.cgi?id=42915 * Configurations/FeatureDefines.xcconfig: 2010-07-27 Gavin Barraclough 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"). * 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): 2010-07-27 Gavin Barraclough Speculative build fix for Chromium/Win * wtf/Platform.h: 2010-07-27 Gavin Barraclough Oh! that makes more sense! Maybe C++-style comments are bringing teh bad mojo. * wtf/Platform.h: 2010-07-27 Gavin Barraclough Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O * wtf/Platform.h: 2010-07-27 Michael Saboff Reviewed by Gavin Barraclough. 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): 2010-07-27 Gavin Barraclough Reviewed by Oliver Hunt. Bug 43089 - Cleanup JIT related switched in Platform.h 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. 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: * 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: 2010-07-27 James Robinson Reviewed by Darin Fisher. [chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on https://bugs.webkit.org/show_bug.cgi?id=43084 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. * wtf/Platform.h: 2010-07-23 Helder Correia Reviewed by Darin Adler. 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 * runtime/JSByteArray.h: (JSC::JSByteArray::setIndex): (JSC::JSByteArray::JSByteArray): 2010-07-27 Gavin Barraclough Reviewed by Oliver Hunt. Bug 42621 - Add a bump allocator for the YARR interpreter 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. 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): 2010-07-26 Gavin Barraclough Windows build fix from Chromium/GTK build fix! * wtf/PageAllocation.cpp: 2010-07-26 Gavin Barraclough Chromium/GTK build fix * wtf/PageAllocation.cpp: 2010-07-26 Gavin Barraclough Build fix for !Mac platforms. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * JavaScriptCore.gypi: * JavaScriptCore.pro: * JavaScriptCore.vcproj/WTF/WTF.vcproj: 2010-07-26 Gavin Barraclough Reviewed by Oliver Hunt. Bug 43009 - Abstract out page allocation from executable allocators It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. 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). * 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 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. 2010-07-26 Gavin Barraclough Speculative !debug build fix II. * wtf/PageAllocation.h: (WTF::PageAllocation::PageAllocation): 2010-07-26 Gavin Barraclough Speculative !debug build fix. * wtf/PageAllocation.h: (WTF::PageAllocation::PageAllocation): 2010-07-26 Gavin Barraclough Reviewed by Oliver Hunt. Bug 43009 - Abstract out page allocation from executable allocators It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. 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). * 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ø Reviewed by Kenneth Rohde Christiansen. [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() 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. https://bugs.webkit.org/show_bug.cgi?id=29381 * runtime/TimeoutChecker.h: Add getter for the timeout interval 2010-07-25 Patrick Gansterer Reviewed by Kent Tamura. [WINCE] Buildfix for JSC in release mode https://bugs.webkit.org/show_bug.cgi?id=42934 * jsc.cpp: Don't use __try on WinCE. 2010-07-24 Patrick Gansterer Reviewed by Darin Adler. [MSVC] Ensure 4 byte alignment on ARM https://bugs.webkit.org/show_bug.cgi?id=42935 * jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame. 2010-07-24 Patrick Gansterer Reviewed by Darin Adler. [WINCE] Cleanup defines in Platform.h https://bugs.webkit.org/show_bug.cgi?id=42933 * wtf/Platform.h: 2010-07-23 Rafael Antognolli Reviewed by Antonio Gomes. [EFL] Cleanup glib support (make it optional) https://bugs.webkit.org/show_bug.cgi?id=42480 Remove gobject/GRefPtr.cpp if not using soup/glib. * wtf/CMakeListsEfl.txt: 2010-07-23 Patrick Gansterer Reviewed by Adam Roben. [WINCE] Implement TCSpinLock. https://bugs.webkit.org/show_bug.cgi?id=41792 Implement the SpinLock with InterlockedExchange from the Windows API. * wtf/TCSpinLock.h: (TCMalloc_SpinLock::Lock): (TCMalloc_SpinLock::Unlock): (TCMalloc_SpinLock::IsHeld): (TCMalloc_SpinLock::Init): (TCMalloc_SlowLock): 2010-07-22 Csaba Osztrogonác Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build. * jit/JITStubs.cpp: * jit/JITStubs.h: 2010-07-22 Gavin Barraclough Eeeep! r63947 hosed all non-x86 builds! * jit/JITStubs.h: 2010-07-22 Gavin Barraclough Reviewed by Oliver Hunt. Bug 42818 - [Qt] REGRESSION(63348): jsc is broken Speculative fix, need fastcall conventions on Qt/Win. * jit/JITStubs.cpp: * jit/JITStubs.h: 2010-07-22 Oliver Hunt Reviewed by Gavin Barraclough. Do more constant folding https://bugs.webkit.org/show_bug.cgi?id=42867 Constant fold a few more operations. SunSpider says this is a win but I suspect that's just code motion at play. * parser/ASTBuilder.h: (JSC::ASTBuilder::makeModNode): (JSC::ASTBuilder::makeURightShiftNode): (JSC::ASTBuilder::makeBitOrNode): (JSC::ASTBuilder::makeBitAndNode): (JSC::ASTBuilder::makeBitXOrNode): (JSC::ASTBuilder::makeBinaryNode): 2010-07-22 Kent Hansen Reviewed by Kent Tamura. Error properties of the Global Object are missing the DontEnum attribute https://bugs.webkit.org/show_bug.cgi?id=28771 Add the attributes to become spec compliant. * runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::reset): 2010-07-20 Steve Falkenburg Reviewed by Adam Roben. WebKit on Windows should build optionally with an unversioned ICU DLL https://bugs.webkit.org/show_bug.cgi?id=42722 JavaScriptCore needs to link against unversioned ICU 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. 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/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. 2010-07-20 Steve Falkenburg Re-save vsprops files after no-op edits in Visual Studio to fix manual edit issues. 2010-07-20 Mahesh Kulkarni Reviewed by Steve Block. Need to be able to configure Geolocation policy regarding user permissions https://bugs.webkit.org/show_bug.cgi?id=42068 If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy by default * wtf/Platform.h: 2010-07-20 Sheriff Bot Unreviewed, rolling out r63742. http://trac.webkit.org/changeset/63742 https://bugs.webkit.org/show_bug.cgi?id=42641 Broke Leopard Intel build. (Requested by bbandix on #webkit). * wtf/Platform.h: 2010-07-20 Mahesh Kulkarni Reviewed by Steve Block. Need to be able to configure Geolocation policy regarding user permissions https://bugs.webkit.org/show_bug.cgi?id=42068 If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy by default * wtf/Platform.h: 2010-07-19 Dirk Schulze Reviewed by Nikolas Zimmermann. SVG CleanUp of SVGPathData parsing https://bugs.webkit.org/show_bug.cgi?id=41410 Added piOverTwo to MathExtras. * wtf/MathExtras.h: 2010-07-19 Mike Moretti Reviewed by Laszlo Gombos. [Symbian] Build fix after r63404. Implement isValid() function for the Symbian executable allocator. * jit/ExecutableAllocatorSymbian.cpp: (JSC::ExecutableAllocator::isValid): 2010-07-19 Chris Marrin Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=42118 Disable WebGL on Leopard for now. 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. * Configurations/FeatureDefines.xcconfig: 2010-07-16 Darin Adler Reviewed by Sam Weinig. Use OwnPtr for CodeBlock objects https://bugs.webkit.org/show_bug.cgi?id=42490 * 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 Reviewed by Kenneth Rohde Christiansen. [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 * CMakeListsEfl.txt: add missing file for x86_64. 2010-07-16 Leandro Pereira [EFL] Unreviewed build system cleanup. Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from root CMakeLists.txt to the platform CMakeLists.txt. * CMakeLists.txt: * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp. 2010-07-16 Oliver Hunt Reviewed by Geoffrey Garen. ES5 allows use of reserved words as IdentifierName https://bugs.webkit.org/show_bug.cgi?id=42471 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. * 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::): 2010-07-16 Anders Carlsson Reviewed by Sam Weinig. clang++ build fixes for JavaScriptCore and WebCore https://bugs.webkit.org/show_bug.cgi?id=42478 * runtime/RegExpKey.h: (JSC::operator==): Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL. 2010-07-16 Anders Carlsson Reviewed by David Levin. Really add WARN_UNUSED_RESULT to leakRef https://bugs.webkit.org/show_bug.cgi?id=42464 * wtf/PassRefPtr.h: (WTF::PassRefPtr::): (WTF::NonNullPassRefPtr::): Put the WARN_UNUSED_RESULT attribute at the right place. * wtf/RetainPtr.h: (WTF::RetainPtr::releaseRef): Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need to be fixed first. 2010-07-15 Victor Wang Reviewed by David Levin. [Chromium] Disable c4291 for chromium windows multi dll build. https://bugs.webkit.org/show_bug.cgi?id=42177 * JavaScriptCore.gyp/JavaScriptCore.gyp: 2010-07-15 Geoffrey Garen Reviewed by Maciej Stachowiak. 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. * 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. 2010-07-15 Martin Robinson Reviewed by Oliver Hunt. [GTK] Simplify the distribution step https://bugs.webkit.org/show_bug.cgi?id=42414 * 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. 2010-07-15 Oliver Hunt Reviewed by Geoff Garen. Fix dumping of op_put_by_id. * bytecode/CodeBlock.cpp: (JSC::CodeBlock::printPutByIdOp): 2010-07-15 Zoltan Herczeg Reviewed by Darin Adler. Refactoring some parts of the lexer https://bugs.webkit.org/show_bug.cgi?id=41845 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). SunSpider: no change (529.4ms to 528.7ms) --parse-only: no change (31.0ms to 31.2ms) * 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 2010-07-15 Mark Rowe Update the sorting in the Xcode project files. * JavaScriptCore.xcodeproj/project.pbxproj: 2010-07-14 Oliver Hunt Reviewed by Gavin Barraclough. 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 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::linkCall): (JSC::JIT::linkConstruct): * jit/JIT.h: (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::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): 2010-07-14 Gavin Barraclough Speculative Qt/Windows build fix. * jit/JITStubs.h: 2010-07-14 Gavin Barraclough Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=42280 JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it! * jit/JIT.h: * jit/JITInlineMethods.h: (JSC::JIT::restoreArgumentReferenceForTrampoline): * jit/JITStubs.cpp: * jit/JITStubs.h: * wtf/Platform.h: 2010-07-14 Oliver Hunt RS=Geoff Garen. Guard the CF path of interpreter vs. jit selection with PLATFORM(CF) This allows the code to work on windows as well. Also unifies the environment variable with the preference name. * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): 2010-07-14 Oliver Hunt Reviewed by Don Melton. Crash when trying to enable JIT and Interpreter in a single build. CFPreferences code added at the last minute failed to account for the preference not being present and then attempted to CFRelease a null value. * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): 2010-07-14 Zoltan Herczeg Reviewed by Darin Adler. Change indentations in the lexer https://bugs.webkit.org/show_bug.cgi?id=41845 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. No behavioural changes. * parser/Lexer.cpp: (JSC::singleEscape): (JSC::Lexer::lex): 2010-07-13 Sheriff Bot Unreviewed, rolling out r63262. http://trac.webkit.org/changeset/63262 https://bugs.webkit.org/show_bug.cgi?id=42229 broke Windows compile (Requested by bweinstein on #webkit). * API/tests/testapi.c: (assertEqualsAsCharactersPtr): (main): * testapi.pro: Removed. 2010-07-13 Oliver Hunt Reviewed by Gavin Barraclough. ES5 requires BOMs to be treated as whitespace https://bugs.webkit.org/show_bug.cgi?id=42218 Add BOM character to the Lexer's definition of whitespace, and remove the logic that dealt with stripping BOMs and caching the cleaned string. * parser/Lexer.h: (JSC::Lexer::isWhiteSpace): * parser/SourceProvider.h: (JSC::UStringSourceProvider::create): (JSC::UStringSourceProvider::UStringSourceProvider): * wtf/text/StringImpl.h: 2010-07-13 Andreas Kling Reviewed by Darin Adler. Avoid slow-path for put() in Array.splice() https://bugs.webkit.org/show_bug.cgi?id=41920 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. 2010-07-13 Gavin Barraclough Reviewed by Oliver Hunt. 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/Interpreter.cpp: (JSC::Interpreter::unwindCallFrame): (JSC::Interpreter::execute): (JSC::Interpreter::executeCall): (JSC::Interpreter::executeConstruct): (JSC::Interpreter::prepareForRepeatCall): (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: (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/JSGlobalData.h: (JSC::JSGlobalData::canUseJIT): 2010-07-13 Caio Marcelo de Oliveira Filho Reviewed by Oliver Hunt. testapi.c depends on the Core Foundation. https://bugs.webkit.org/show_bug.cgi?id=40058 Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it to compile in Qt environments. All tests should work except for the JSStringCreateWithCharacters() function, because its tests depend on Core Foundation specific functions. * API/tests/testapi.c: (testJSStringRefCF): moved CoreFoundation specific tests to this function. (main): The moves plus some minor tweaks. * testapi.pro: Added. 2010-07-13 Gavin Barraclough Reviewed by Oliver Hunt. 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. * 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: 2010-07-12 Oliver Hunt Reviewed by Gavin Barraclough. REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*) https://bugs.webkit.org/show_bug.cgi?id=41763 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. The second part of this fix is simply to harden the path that led to a crash when parsing failed. * jit/JITOpcodes.cpp: (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. 2010-07-13 Gabor Loki Reviewed by Gavin Barraclough. Fix the constant encoding in data transfer instructions on ARM https://bugs.webkit.org/show_bug.cgi?id=42166 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. Reported by Jacob Bramley. * assembler/ARMAssembler.cpp: (JSC::ARMAssembler::dataTransfer32): * assembler/MacroAssemblerARM.h: (JSC::MacroAssemblerARM::call32): 2010-07-09 Darin Adler Reviewed by Geoffrey Garen. String to number coercion is not spec compliant https://bugs.webkit.org/show_bug.cgi?id=31349 ToNumber should ignore NBSP (\u00a0) https://bugs.webkit.org/show_bug.cgi?id=25490 * runtime/JSGlobalObjectFunctions.cpp: (JSC::parseIntOverflow): Added a version that works on UChar. * runtime/JSGlobalObjectFunctions.h: Ditto. * 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. 2010-07-12 Martin Robinson Reviewed by Xan Lopez. [GTK] make dist is broken because of missing headers and other miscellaneous reasons https://bugs.webkit.org/show_bug.cgi?id=42107 * GNUmakefile.am: Add missing header to the sources list. 2010-07-12 Adam Roben Stop generating stripped symbols for Release builds It turns out we can strip the symbols after-the-fact using PDBCopy. Fixes . Reviewed by Steve Falkenburg. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Removed the pre-link event, which just created the public\sym directory. 2010-07-12 Anders Carlsson Reviewed by Dan Bernstein. Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions https://bugs.webkit.org/show_bug.cgi?id=42086 * wtf/OwnPtr.h: * wtf/PassOwnPtr.h: * wtf/PassRefPtr.h: (WTF::PassRefPtr::releaseRef): (WTF::NonNullPassRefPtr::leakRef): (WTF::NonNullPassRefPtr::releaseRef): * wtf/RetainPtr.h: (WTF::RetainPtr::releaseRef): 2010-07-10 Oliver Hunt Reviewed by Maciej Stachowiak. HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled https://bugs.webkit.org/show_bug.cgi?id=42039 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) * 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: 2010-07-10 Oliver Hunt Reviewed by Gavin Barraclough. Remove switches from inner expression loops in the parser https://bugs.webkit.org/show_bug.cgi?id=42035 Use bitmasks and flags on the token types to identify unary and binary operators, rather than switching on the token type to identify them. * parser/JSParser.cpp: (JSC::isUnaryOp): (JSC::JSParser::isBinaryOperator): * parser/JSParser.h: (JSC::): 2010-07-09 Leon Clarke Reviewed by Adam Barth. add support for link prefetching https://bugs.webkit.org/show_bug.cgi?id=3652 * Configurations/FeatureDefines.xcconfig: 2010-07-09 Oliver Hunt Reviewed by Darin Adler. 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: 2010-07-09 Gavin Barraclough Reviewed by Oliver Hunt. Bug 42015 - Enable JSValue32_64 on ARMv7 * Configurations/JavaScriptCore.xcconfig: * jit/JIT.h: * jit/JITStubs.cpp: * wtf/Platform.h: 2010-07-09 Kenneth Russell Reviewed by Dimitri Glazkov. Assertion failure in String::utf8() for certain invalid UTF16 inputs https://bugs.webkit.org/show_bug.cgi?id=41983 * wtf/text/WTFString.cpp: (WebCore::String::utf8): - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8. 2010-07-09 Oliver Hunt Reviewed by Geoffrey Garen. Remove a couple of excess writes from the lexer https://bugs.webkit.org/show_bug.cgi?id=41981 Remove a couple of fields from JSTokenInfo, and rename the remaining ones to something more accurate * 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): 2010-07-08 Oliver Hunt Reviewed by Sam Weinig. 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 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. 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. We still emit normal put_by_id code when emitting __proto__ as we want to get the correct handling for changing the prototype. 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. * bytecode/Opcode.h: * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitPutById): (JSC::BytecodeGenerator::emitDirectPutById): * bytecompiler/BytecodeGenerator.h: * bytecompiler/NodesCodegen.cpp: (JSC::PropertyListNode::emitBytecode): * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): * jit/JIT.h: (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: 2010-07-08 Gavin Barraclough Reviewed by Sam Weinig. String.prototype methods should CheckObjectCoercible (test this is not null or undefined). * 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): 2010-07-08 Gavin Barraclough Reviewed by Sam Weinig. Date.prototype.toJSON takes one argument, report this correctly. * runtime/DatePrototype.cpp: 2010-07-08 Gavin Barraclough Reviewed by Sam Weinig. RegExp's prototype should be an object of type RegExp. * runtime/RegExpPrototype.cpp: (JSC::RegExpPrototype::RegExpPrototype): * runtime/RegExpPrototype.h: 2010-07-08 Oliver Hunt Reviewed by Gavin Barraclough. JavaScript parser violates ECMA automatic semicolon insertion rule https://bugs.webkit.org/show_bug.cgi?id=41844 Remove (very) old and bogus logic that automatically inserted a semicolon at the end of a script's source. * parser/Lexer.cpp: (JSC::Lexer::lex): 2010-07-08 Oliver Hunt Reviewed by Anders Carlson. Tidy up the lexer Remove some of the old yacc/lex-isms still present in the lexer * parser/JSParser.h: (JSC::): * parser/Lexer.cpp: (JSC::Lexer::parseString): (JSC::Lexer::lex): * parser/Lexer.h: 2010-07-08 Oliver Hunt Reviewed by Gavin Barraclough. 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 * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::sharedInstance): Fix typo. 2010-07-08 Darin Adler Reviewed by Oliver Hunt. Fix assertion seen on the Leopard buildbot. The single shared instance of JSGlobalData was not being adopted after creation. * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef. 2010-07-08 Gavin Barraclough Reviewed by Sam Weinig. BOMs are whitespace. * runtime/JSGlobalObjectFunctions.cpp: (JSC::isStrWhiteSpace): 2010-07-08 Martin Robinson Unreviewed. Try fix the GTK+ build by touching this file. * jit/ExecutableAllocatorFixedVMPool.cpp: 2010-07-08 Gavin Barraclough GTK build fix take two. * GNUmakefile.am: 2010-07-08 Gavin Barraclough GTK build fix. * GNUmakefile.am: 2010-07-08 Gavin Barraclough Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=41641 Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms other than x86-64 (this may be useful on 32-bit platforms, too). Simplify ifdefs by dividing into thwo broad allocation strategies (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). Rename constant used in the code to have names descriptive of their purpose, rather than their specific value on a given platform. * 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: 2010-07-08 Xan Lopez Reviewed by Gustavo Noronha. Silence a few noisy build rules. * GNUmakefile.am: 2010-07-08 Sheriff Bot Unreviewed, rolling out r62765. http://trac.webkit.org/changeset/62765 https://bugs.webkit.org/show_bug.cgi?id=41840 All jscore and layout tests crash on Qt bot (Requested by Ossy on #webkit). * wtf/FastMalloc.cpp: (WTF::TCMalloc_PageHeap::initializeScavenger): (WTF::TCMalloc_PageHeap::signalScavenger): (WTF::TCMalloc_PageHeap::scavengerThread): 2010-07-08 Andreas Kling Reviewed by Oliver Hunt. Interpreter: Crash in op_load_varargs on 64-bit https://bugs.webkit.org/show_bug.cgi?id=41795 Added missing cast of argCount to int32_t in op_load_varargs. * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): 2010-07-08 Patrick Gansterer Reviewed by Geoffrey Garen. Make FastMalloc more portable. https://bugs.webkit.org/show_bug.cgi?id=41790 Use WTF::Mutex instead of pthread_mutex_t and replace pthread_cond_t with WTF::ThreadCondition. * wtf/FastMalloc.cpp: (WTF::TCMalloc_PageHeap::initializeScavenger): (WTF::TCMalloc_PageHeap::signalScavenger): (WTF::TCMalloc_PageHeap::scavengerThread): 2010-07-08 Patrick Gansterer Reviewed by Darin Adler. Remove needless #include from TCSystemAlloc.cpp. https://bugs.webkit.org/show_bug.cgi?id=41777 * wtf/TCSystemAlloc.cpp: 2010-07-07 Darin Adler Fixed build in configurations like PowerPC. * 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! 2010-07-07 Oliver Hunt Reviewed by Geoffrey Garen. Lazy mode of parser allows invalid syntax in object literals. https://bugs.webkit.org/show_bug.cgi?id=41809 Make the parser itself validate getter and setter syntax rather than offloading it to the AST builder. * parser/ASTBuilder.h: (JSC::ASTBuilder::createGetterOrSetterProperty): * parser/JSParser.cpp: (JSC::JSParser::parseProperty): 2010-07-07 Dumitru Daniliuc Reviewed by Adam Roben. Revert r62689. https://bugs.webkit.org/show_bug.cgi?id=41804 * runtime/Collector.cpp: (JSC::Heap::freeBlocks): 2010-07-07 Adam Barth Reviewed by Sam Weinig. Add reverseFind to Vector and deploy in HTML5 parser https://bugs.webkit.org/show_bug.cgi?id=41778 This method seems generally useful. I'm slightly surprised we don't have it already. * wtf/Vector.h: (WTF::::reverseFind): 2010-07-07 Darin Adler Reviewed by Adam Barth. Turn on adoptRef assertion for RefCounted https://bugs.webkit.org/show_bug.cgi?id=41547 * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other WTF headers should use "" includes; consistent in most WTF headers. Added a call to relaxAdoptionRequirement. * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED. Added relaxAdoptionRequirement. 2010-07-07 Anders Carlsson Try to fix the Windows build. * runtime/Collector.cpp: (JSC::Heap::freeBlocks): 2010-07-07 Darin Adler Reviewed by Adam Barth. More OwnPtr work https://bugs.webkit.org/show_bug.cgi?id=41727 * 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. * 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. 2010-07-07 Darin Adler Reviewed by Adam Barth. Make clear set the pointer to 0 before deletion https://bugs.webkit.org/show_bug.cgi?id=41727 * 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. * 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. * wtf/gobject/GOwnPtr.h: More of the same. * wtf/gobject/GRefPtr.h: Ditto. 2010-07-07 Zoltan Herczeg Reviewed by Oliver Hunt. Refactored string parsing inside the lexer https://bugs.webkit.org/show_bug.cgi?id=41606 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. * parser/Lexer.cpp: (JSC::singleEscape): (JSC::Lexer::parseString): (JSC::Lexer::lex): * parser/Lexer.h: 2010-07-06 Oliver Hunt Reviewed by Maciej Stachowiak. Make it possible to have both the JIT and Interpreter available in a single build https://bugs.webkit.org/show_bug.cgi?id=41722 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. If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter. 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. * 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: 2010-07-06 Darin Adler Reviewed by Adam Barth. Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr https://bugs.webkit.org/show_bug.cgi?id=41320 * bytecode/CodeBlock.cpp: (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment instead of set since the result of reparseExceptionInfo is now a PassOwnPtr. * bytecode/CodeBlock.h: Change extractExceptionInfo to return a PassOwnPtr instead of a raw pointer. * 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. * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr, and put it in the private sections of classes other than the base class. * wtf/MessageQueue.h: (WTF::MessageQueue::append): Use leakPtr instead of release. (WTF::MessageQueue::appendAndCheckEmpty): Ditto. (WTF::MessageQueue::prepend): Ditto. * 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. * 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. 2010-07-06 Sam Weinig Reviewed by Darin Adler Update comment in StringExtras.h to be more accurate. * wtf/StringExtras.h: 2010-07-06 Sheriff Bot Unreviewed, rolling out r62511. http://trac.webkit.org/changeset/62511 https://bugs.webkit.org/show_bug.cgi?id=41686 Breaks Linux/64bit compilation (Requested by xan_ on #webkit). * 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: 2010-07-05 Gavin Barraclough Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=41641 Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms other than x86-64 (this may be useful on 32-bit platforms, too). Simplify ifdefs by dividing into thwo broad allocation strategies (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). Rename constant used in the code to have names descriptive of their purpose, rather than their specific value on a given platform. * 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: 2010-07-05 Steve Block Reviewed by Darin Adler. ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h https://bugs.webkit.org/show_bug.cgi?id=41594 * wtf/ThreadingPthreads.cpp: 2010-07-04 Mark Rowe Build fix after r62456. * 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. 2010-07-02 Sam Weinig Reviewed by Darin Adler. Patch for https://bugs.webkit.org/show_bug.cgi?id=41553 Make StringExtras.h versions of snprintf and vsnprintf match the unix versions. - MSVC does not ensure the buffers are null terminated as the unix versions do. * 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. 2010-07-03 Yong Li Reviewed by Darin Adler. Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in the interpreter as well as the JIT. https://bugs.webkit.org/show_bug.cgi?id=41351 rdar://problem/8142141 * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): Fix signed integer overflow problem in op_load_varargs handling. 0xFFFFFFFF was read as -1. 2010-06-26 Jeremy Orlow Reviewed by Dumitru Daniliuc. Support for keys and in-memory storage for IndexedDB https://bugs.webkit.org/show_bug.cgi?id=41252 Set the role to Private. * JavaScriptCore.xcodeproj/project.pbxproj: 2010-07-02 Oliver Hunt Reviewed by Geoffrey Garen. Move BOM handling out of the lexer and parser https://bugs.webkit.org/show_bug.cgi?id=41539 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. * 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-03 Patrick Gansterer Reviewed by Kent Tamura. [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar. https://bugs.webkit.org/show_bug.cgi?id=41411 * wtf/unicode/wince/UnicodeWince.cpp: (WTF::Unicode::isAlphanumeric): * wtf/unicode/wince/UnicodeWince.h: (WTF::Unicode::isArabicChar): 2010-07-03 Kwang Yul Seo Reviewed by Kent Tamura. [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log. https://bugs.webkit.org/show_bug.cgi?id=41524 Print "WebKit CRASH" before crashing. * wtf/Assertions.h: 2010-07-02 Gavin Barraclough Reviewed by Oliver Hunt. Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken 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. * assembler/ARMv7Assembler.h: (JSC::ARMv7Assembler::repatchLoadPtrToLEA): 2010-07-02 Oliver Hunt Reviewed by Gavin Barraclough. Clamp the number of arguments supported by function.apply https://bugs.webkit.org/show_bug.cgi?id=41351 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. * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * runtime/Arguments.h: (JSC::Arguments::): 2010-07-02 Chao-ying Fu Reviewed by Oliver Hunt. Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS https://bugs.webkit.org/show_bug.cgi?id=40179 Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL. * jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTINativeCall): * wtf/Platform.h: 2010-07-02 Gavin Barraclough Reviewed by Oliver Hunt. Bug 41552 - Clean up ARMv7 vfp code generation Emit separate opcode individually, remove magic numbers. Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned). * 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): 2010-07-02 Sheriff Bot Unreviewed, rolling out r62410. http://trac.webkit.org/changeset/62410 https://bugs.webkit.org/show_bug.cgi?id=41549 accursed last minute changes (Requested by olliej on #webkit). * 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: 2010-07-02 Sam Weinig Reviewed by Geoffrey Garen. Patch for https://bugs.webkit.org/show_bug.cgi?id=41548 Use snprintf instead of sprintf everywhere in JavaScriptCore * runtime/JSGlobalObjectFunctions.cpp: (JSC::encode): (JSC::globalFuncEscape): * runtime/UString.cpp: (JSC::UString::from): 2010-07-02 Oliver Hunt Reviewed by Geoffrey Garen. Move BOM handling out of the lexer and parser https://bugs.webkit.org/show_bug.cgi?id=41539 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. * 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 Reviewed by Oliver Hunt. [ Updated after rollout. ] 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 * runtime/RegExp.cpp: (JSC::RegExp::RegExp): * runtime/RegExp.h: * runtime/RegExpCache.cpp: (JSC::RegExpCache::lookupOrCreate): (JSC::RegExpCache::create): * runtime/RegExpCache.h: 2010-07-02 Martin Robinson Unreviewed. Build fix for GTK+. Build Lexer.lut.h with the rest of the .lut.h files. Later these should all probably be moved to DerivedSources. * GNUmakefile.am: 2010-06-23 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] Separate DerivedSources per-project https://bugs.webkit.org/show_bug.cgi?id=41109 Generate JavaScriptCore derived sources in /DerivedSources/JavaScriptCore. * GNUmakefile.am: 2010-07-02 Peter Varga Reviewed by Oliver Hunt. 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 * yarr/RegexInterpreter.cpp: (JSC::Yarr::ByteCompiler::emitDisjunction): 2010-07-01 Oliver Hunt Reviewed by Maciej Stachowiak. Add a FixedArray template to encapsulate fixed length arrays https://bugs.webkit.org/show_bug.cgi?id=41506 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. * 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): 2010-07-01 Zoltan Herczeg Reviewed by Oliver Hunt. Improve the main lexer switch by mapping input characters to their type https://bugs.webkit.org/show_bug.cgi?id=41459 Sunsipder: no change (from 532.9ms to 531.5ms) SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms) * parser/Lexer.cpp: (JSC::): (JSC::Lexer::lex): 2010-07-01 Sam Weinig Rubber-stamped by Ander Carlsson. Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard. * wtf/Platform.h: 2010-07-01 Gavin Barraclough Reviewed by Oliver Hunt. Bug 41490 - Add missing operations to MacroAssemblerARMv7 Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed. * 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: 2010-07-01 Oliver Hunt Reviewed by Geoff Garen. Improve reentrancy logic in polymorphic cache stubs Make the polymorphic cache stubs handle reentrancy better. * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): (JSC::getPolymorphicAccessStructureListSlot): 2010-07-01 Antti Koivisto Revert accidental commit. * runtime/Collector.cpp: (JSC::Heap::allocateBlock): 2010-06-30 Darin Adler Reviewed by Adam Barth. Add assertion, off by default, for when you forget to do adoptRef https://bugs.webkit.org/show_bug.cgi?id=41422 * 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. * 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. 2010-06-29 Michael Saboff Reviewed by Darin Adler. Bug 41238 - RegExp performance slow on Dromaeo benchmark Other javascript engines appear to cache prior results of regular expression operations. Suggest adding some sort of caching mechanism to regular expression processing. Added a single entry cache of match() results to RegExp class. 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. * runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::match): * runtime/RegExp.h: * runtime/UString.h: (JSC::operator==): 2010-06-29 Nathan Lawrence Reviewed by Geoffrey Garen. 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. * wtf/HashSet.h: (WTF::::begin): (WTF::::end): (WTF::::find): (WTF::::remove): * wtf/HashTable.h: 2010-06-29 Martin Robinson Reviewed by Xan Lopez. [GTK] Clean up the source lists in the GNUMakefile.am files https://bugs.webkit.org/show_bug.cgi?id=41229 Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate the source lists. * GNUmakefile.am: 2010-06-29 Caio Marcelo de Oliveira Filho Reviewed by Kenneth Rohde Christiansen. [Qt] Fix QtScript build after QScriptValuePrivate ctor changes https://bugs.webkit.org/show_bug.cgi?id=41307 * qt/api/qscriptvalue_p.h: (QScriptValuePrivate::prototype): * qt/benchmarks/qscriptengine/qscriptengine.pro: 2010-06-28 Caio Marcelo de Oliveira Filho Reviewed by Kenneth Rohde Christiansen. [Qt] QScriptEngine API should contain a newArray function https://bugs.webkit.org/show_bug.cgi?id=39115 * 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): 2010-06-28 Xan Lopez Reviewed by Gustavo Noronha. 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. * GNUmakefile.am: 2010-06-28 John Gregg Reviewed by Kent Tamura. add ENABLE_DIRECTORY_UPLOAD build support https://bugs.webkit.org/show_bug.cgi?id=41100 * Configurations/FeatureDefines.xcconfig: 2010-06-28 Xan Lopez Revert to build jsc, since the tests expect this. * GNUmakefile.am: 2010-06-28 Zoltan Herczeg Reviewed by Oliver Hunt. Only one character lookahead should be enough for the lexer https://bugs.webkit.org/show_bug.cgi?id=41213 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. * 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: 2010-06-28 Lucas De Marchi Unreviewed build fix. [EFL] Build fix for latest version of Ecore library. Ecore recently changed return type of callbacks from int to Eina_Bool. * wtf/efl/MainThreadEfl.cpp: (WTF::timeoutFired): Return Eina_Bool instead of int. 2010-06-28 Caio Marcelo de Oliveira Filho Reviewed by Kenneth Rohde Christiansen. [Qt] QScriptValue should have API for accessing object properties https://bugs.webkit.org/show_bug.cgi?id=40903 Make possible to access properties inside QScriptValues. While this still doesn't support the ResolveLocal parameter, it is already useful for testing the API. The tests from upstream QtScript weren't imported since most of them depend on the setProperty() function as well. A simple test was created. * 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: 2010-06-28 Xan Lopez Reviewed by Gustavo Noronha. [GTK] Add support for GTK+3 https://bugs.webkit.org/show_bug.cgi?id=41253 Suffix jsc with the API version of the library, so that libwebkitgtk 1.x and 3.x can install jsc. * GNUmakefile.am: 2010-06-27 Kwang Yul Seo Reviewed by Kent Tamura. [BREWMP] Turn ENABLE(SINGLE_THREADED) on. https://bugs.webkit.org/show_bug.cgi?id=41135 Brew MP does not support preemptive multi-threading. Disable threading for Brew MP. * wtf/Platform.h: 2010-06-26 Tony Gentilcore Reviewed by Dimitri Glazkov. Add an ENABLE_WEB_TIMING option for enabling Web Timing support. https://bugs.webkit.org/show_bug.cgi?id=38924 * Configurations/FeatureDefines.xcconfig: 2010-06-25 Nathan Lawrence Reviewed by Geoffrey Garen. 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. * API/tests/testapi.c: (main): 2010-06-25 Sheriff Bot Unreviewed, rolling out r61924. http://trac.webkit.org/changeset/61924 https://bugs.webkit.org/show_bug.cgi?id=41240 It was rolled out, but cq+ wasn't removed (Requested by Ossy_ on #webkit). * runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::create): * runtime/RegExp.h: * runtime/RegExpCache.cpp: (JSC::RegExpCache::lookupOrCreate): (JSC::RegExpCache::create): * runtime/RegExpCache.h: 2010-06-25 Renata Hodovan Reviewed by Geoffrey Garen. 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 * runtime/RegExp.cpp: (JSC::RegExp::RegExp): * runtime/RegExp.h: * runtime/RegExpCache.cpp: (JSC::RegExpCache::lookupOrCreate): (JSC::RegExpCache::create): * runtime/RegExpCache.h: 2010-06-25 Jedrzej Nowacki Reviewed by Simon Hausmann. 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 Reviewed by Geoffrey Garen. Remove old js parser https://bugs.webkit.org/show_bug.cgi?id=41222 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 * 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: 2010-06-25 Jedrzej Nowacki Reviewed by Simon Hausmann. New QtScript API; setPrototype() and prototype(). This patch implements QScriptValue's prototype accessors. [Qt] QScriptValue should have accessors to a prototype. https://bugs.webkit.org/show_bug.cgi?id=39356 * 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: 2010-06-25 Lucas De Marchi Reviewed by Kenneth Rohde Christiansen. [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 * CMakeLists.txt: Add missing files and re-sort. 2010-06-25 Lucas De Marchi Reviewed by Gustavo Noronha Silva. [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 * jsc/CMakeLists.txt: 2010-06-25 Nathan Lawrence Reviewed by Geoffrey Garen. Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on sunspider. * assembler/AssemblerBuffer.h: (JSC::AssemblerBuffer::AssemblerBuffer): 2010-06-25 Sheriff Bot Unreviewed, rolling out r61842. http://trac.webkit.org/changeset/61842 https://bugs.webkit.org/show_bug.cgi?id=41208 It broke Windows build (Requested by Ossy_ on #webkit). * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: * JavaScriptCore.vcproj/WTF/WTF.vcproj: * wtf/OwnPtrCommon.h: * wtf/brew/OwnPtrBrew.h: Removed. * wtf/win/OwnPtrWin.h: Removed. 2010-06-25 Sheriff Bot Unreviewed, rolling out r61833. http://trac.webkit.org/changeset/61833 https://bugs.webkit.org/show_bug.cgi?id=41205 It broke Leopard and GTK (Requested by Ossy_ on #webkit). * runtime/RegExp.cpp: (JSC::RegExp::RegExp): (JSC::RegExp::create): * runtime/RegExp.h: * runtime/RegExpCache.cpp: (JSC::RegExpCache::lookupOrCreate): (JSC::RegExpCache::create): * runtime/RegExpCache.h: 2010-06-25 Kwang Yul Seo Reviewed by Adam Barth. Change OwnPtrCommon to include platform-specific headers https://bugs.webkit.org/show_bug.cgi?id=40279 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. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: * JavaScriptCore.vcproj/WTF/WTF.vcproj: * wtf/OwnPtrCommon.h: * wtf/brew/OwnPtrBrew.h: Added. * wtf/win/OwnPtrWin.h: Added. 2010-06-25 Patrick Gansterer Reviewed by Darin Adler. Add the possibility for a head and footer section to create_jit_stubs. https://bugs.webkit.org/show_bug.cgi?id=36050 * create_jit_stubs: 2010-06-24 Renata Hodovan Reviewed by Geoffrey Garen. 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 * runtime/RegExp.cpp: (JSC::RegExp::RegExp): * runtime/RegExp.h: * runtime/RegExpCache.cpp: (JSC::RegExpCache::lookupOrCreate): (JSC::RegExpCache::create): * runtime/RegExpCache.h: 2010-06-24 Oliver Hunt Reviewed by Maciej Stachowiak. Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64 https://bugs.webkit.org/show_bug.cgi?id=41193 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. * 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): 2010-06-24 Oliver Hunt Build fix 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: 2010-06-21 Nathan Lawrence Reviewed by Geoff Garen. https://bugs.webkit.org/show_bug.cgi?id=40128 Fixed broken debug functionality. * 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. 2010-06-24 Leandro Pereira Unreviewed build fix. * CMakeLists.txt: Add JSParser.cpp. 2010-06-24 Oliver Hunt Reviewed by Maciej Stachowiak. Single character string replacement may replace too many characters https://bugs.webkit.org/show_bug.cgi?id=41138 Simple fix to stop the rope path of single character replacement once the first replacement occurs. * runtime/JSString.cpp: (JSC::JSString::replaceCharacter): 2010-06-24 Gabor Loki Reviewed by Gavin Barraclough. Fix the length of instruction stream controlled by constant pool https://bugs.webkit.org/show_bug.cgi?id=40293 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/AssemblerBufferWithConstantPool.h: (JSC::): 2010-06-24 Oliver Hunt Reviewed by Gavin Barraclough. We assume bytecodeOffset will always return a value > 1, so we adjust the failure case to return 1 instead of 0. * bytecode/CodeBlock.h: (JSC::CodeBlock::bytecodeOffset): 2010-06-23 Oliver Hunt Reviewed by Gavin Barraclough. Custom-written JavaScript parser https://bugs.webkit.org/show_bug.cgi?id=34019 Implement a recursive descent parser similar to that used by V8 and SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests. 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. 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. * 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): 2010-06-23 Jedrzej Nowacki Reviewed by Simon Hausmann. Optimization of the QScriptValuePrivate. Patch change only internals of the QScriptValuePrivate. Most of the QScriptValuePrivate's attributes were moved into an union. [Qt] Optimization of the QScriptVAluePrivate. https://bugs.webkit.org/show_bug.cgi?id=40415 * 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): 2010-06-23 Kwang Yul Seo Reviewed by Oliver Hunt. [GTK] Implement ThreadSpecific with glib https://bugs.webkit.org/show_bug.cgi?id=39829 Implement ThreadSpecific with glib's GStaticPrivate. This patch makes it possible to build GTK port without pthread. * wtf/ThreadSpecific.h: (WTF::::ThreadSpecific): (WTF::::~ThreadSpecific): (WTF::::get): (WTF::::set): (WTF::::destroy): 2010-06-23 Leandro Pereira Unreviewed build fix. * CMakeLists.txt: Add runtime/RegExpCache.cpp. 2010-06-22 Renata Hodovan Reviewed by Geoffrey Garen. Adding regular expression caching to JavaScriptCore https://bugs.webkit.org/show_bug.cgi?id=38142 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. * 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): 2010-06-22 Gabor Loki Reviewed by Geoffrey Garen. Add native call support for ARM and Thumb-2 JIT. https://bugs.webkit.org/show_bug.cgi?id=40231 * jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTINativeCall): * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTINativeCall): * wtf/Platform.h: 2010-06-21 Oliver Hunt Reviewed by Geoffrey Garen. Make JSC more resilient in the face of parse failures https://bugs.webkit.org/show_bug.cgi?id=40951 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). * 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): 2010-06-21 John Sullivan Reviewed by Adam Roben. RetainPtr can't be used in HashMaps or HashSets Added hashing knowledge similar to that in COMPtr.h. * 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. 2010-06-19 Oliver Hunt Reviewed by Geoffrey Garen. Need to ensure that we grow the RegisterFile when creating a callframe for host code https://bugs.webkit.org/show_bug.cgi?id=40858 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. 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. Thankfully the new assertion I added should help to catch these failures in future, and triggers on a couple of tests currently. * 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): 2010-06-21 Satish Sampath Reviewed by Steve Block. Speech Input Patch 0: Added compilation argument to conditionally compile pending patches. https://bugs.webkit.org/show_bug.cgi?id=40878 * Configurations/FeatureDefines.xcconfig: 2010-06-21 Kwang Yul Seo Reviewed by Kent Tamura. [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1 https://bugs.webkit.org/show_bug.cgi?id=40653 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. * wtf/FastMalloc.h: 2010-06-18 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Work around a build problem with libjscore on Symbian. https://bugs.webkit.org/show_bug.cgi?id=40840 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. The real fix would be to fix qmake or the toolchain, this patch might help meanwhile. * JavaScriptCore.pri: 2010-06-21 Patrick Gansterer Reviewed by Kent Tamura. Buildfix after r61338. https://bugs.webkit.org/show_bug.cgi?id=40888 roundUpAllocationSize is needed in RegisterFile.h. * jit/ExecutableAllocator.h: 2010-06-19 Kwang Yul Seo Reviewed by Darin Adler. Include in StringExtras.h https://bugs.webkit.org/show_bug.cgi?id=40808 Without string.h, RVCT 2.2 can't compile StringExtras.h. It can't find strlen and strncmp. * wtf/StringExtras.h: 2010-06-19 Thiago Macieira Reviewed by Kenneth Rohde Christiansen. Don't use __attribute__((may_alias)) with the Intel compiler, as it doesn't understand it. * wtf/Vector.h: 2010-06-19 Thiago Macieira Reviewed by Kenneth Rohde Christiansen. Fix compilation with the Intel C++ compiler (11.1.072). Like RVCT, label pointers must be void*, not const void*. * bytecode/Opcode.h: 2010-06-19 Thiago Macieira Reviewed by Kenneth Rohde Christiansen. 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). * wtf/Platform.h: 2010-06-18 Oliver Hunt Reviewed by Geoffrey Garen. Incorrect handling of multiple BOMs scattered through a file. https://bugs.webkit.org/show_bug.cgi?id=40865 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. * parser/Lexer.cpp: (JSC::Lexer::sourceCode): 2010-06-17 Oliver Hunt Reviewed by Sam Weinig. Don't throw away exception information for functions that use exceptions https://bugs.webkit.org/show_bug.cgi?id=40786 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. * bytecode/CodeBlock.cpp: (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::generate): (JSC::BytecodeGenerator::emitCatch): * bytecompiler/BytecodeGenerator.h: (JSC::BytecodeGenerator::emitThrow): 2010-06-18 Anders Carlsson Reviewed by Sam Weinig. Add PlatformStrategies and PluginStrategy classes. https://bugs.webkit.org/show_bug.cgi?id=40850 * wtf/Platform.h: 2010-06-18 Leandro Pereira [EFL] Unreviewed build fix. * wtf/CMakeLists.txt: Add MD5.cpp. 2010-06-17 Shu Chang Reviewed by Kenneth Rohde Christiansen. [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. https://bugs.webkit.org/show_bug.cgi?id=40780 * JavaScriptCore.pri: * jit/ExecutableAllocator.h: 2010-06-17 Darin Adler Reviewed by Sam Weinig. Use adoptRef and create functions in more code paths https://bugs.webkit.org/show_bug.cgi?id=40760 * API/JSClassRef.h: Removed unneeded include of RefCounted.h. * API/JSWeakObjectMapRefPrivate.cpp: Ditto. * bytecode/CodeBlock.h: (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the SharedSymbolTable::create function instead of calling new directly. * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable class and made the constructor private. 2010-06-17 Mark Brand Reviewed by Simon Hausmann. [Qt] use "win32-g++*" scope to match all MinGW makespecs 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. * JavaScriptCore.pro: 2010-06-16 Darin Adler Reviewed by David Levin. Deploy adoptRef in more places, including all HTML and MathML elements https://bugs.webkit.org/show_bug.cgi?id=39941 * wtf/ThreadSafeShared.h: Made the constructor protected and removed the unneeded support for initial reference counts other than 1. 2010-06-16 Peter Varga Reviewed by Geoffrey Garen. Store matchBegin directly in the array of output instead of the stack. https://bugs.webkit.org/show_bug.cgi?id=38988 * yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateDisjunction): (JSC::Yarr::RegexGenerator::generate): 2010-06-15 Anders Carlsson Reviewed by Sam Weinig. Make JavaScriptCore build with clang++. * jit/JITInlineMethods.h: (JSC::JIT::emitPutVirtualRegister): Explicitly cast to an int. * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex): Return 0 instead of false. 2010-06-15 Adam Roben Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds Fixes . Reviewed by Sam Weinig. * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of JavaScriptCore's DerivedSources directory to AppleInternal/Sources/JavaScriptCore. 2010-06-15 Gabor Loki Rubber-stamped by Eric Seidel. Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM https://bugs.webkit.org/show_bug.cgi?id=40423 Using OBJECT_OFFSETOF macro instead of objectof to bypass access to non-static data member warning. * jit/JITPropertyAccess32_64.cpp: (JSC::JIT::privateCompilePutByIdTransition): 2010-06-11 Eric Seidel Reviewed by Adam Barth. Rename the rest of the *Tokenizer classes to *DocumentParser https://bugs.webkit.org/show_bug.cgi?id=40507 * wtf/Platform.h: - fixed a comment to match new names. 2010-06-11 Jedrzej Nowacki Reviewed by Simon Hausmann. [Qt] Explicit conversions from QtScript types to JSC opaque types were removed. https://bugs.webkit.org/show_bug.cgi?id=40412 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. 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. * 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): 2010-05-31 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Implement the simple text code path. https://bugs.webkit.org/show_bug.cgi?id=40077 Remove the FONT_FAST_PATH macro and use the Qt's fast text implementation instead of the one of WebKit. The Qt::TextBypassShaping flag is used to tell Qt to only use the glyph advances. Qt 4.7 is needed to get this flag thus the complex path is always used if QtWebKit is compiled against an earlier version. 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. * wtf/Platform.h: 2010-06-11 Luiz Agostini Reviewed by Kenneth Rohde Christiansen. add codePointCompare to JavaScriptCore.exp https://bugs.webkit.org/show_bug.cgi?id=40426 * JavaScriptCore.exp: 2010-06-10 Oliver Hunt Reviewed by Maciej Stachowiak. Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode https://bugs.webkit.org/show_bug.cgi?id=40367 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. * jit/JITArithmetic32_64.cpp: (JSC::JIT::emitRightShiftSlowCase): 2010-06-10 Kwang Yul Seo Reviewed by Eric Seidel. Remove weakRandomNumber https://bugs.webkit.org/show_bug.cgi?id=40291 weakRandomNumber is used nowhere. Currently, WeakRandom is used instead. * wtf/RandomNumber.cpp: * wtf/RandomNumber.h: 2010-06-09 Alexey Proskuryakov Reviewed by Brady Eidson. Export StringImpl::ascii(). It might be not very useful, but it's a public function. * JavaScriptCore.exp: 2010-06-09 Leandro Pereira Reviewed by Adam Treat. [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 * 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. 2010-06-09 Gabor Loki Reviewed by David Levin. Remove some unused variable warnings from JITOpcodes https://bugs.webkit.org/show_bug.cgi?id=40298 * jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTINativeCall): * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTINativeCall): 2010-05-18 Yuzo Fujishima Reviewed by Shinichiro Hamaji. 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 * wtf/unicode/qt4/UnicodeQt4.h: * wtf/unicode/wince/UnicodeWince.h: 2010-06-08 Sheriff Bot Unreviewed, rolling out r60830. http://trac.webkit.org/changeset/60830 https://bugs.webkit.org/show_bug.cgi?id=40305 Broke the Windows build (Requested by abarth on #webkit). * JavaScriptCore.vcproj/WTF/WTF.vcproj: * wtf/OwnPtrCommon.h: * wtf/brew/OwnPtrBrew.h: Removed. * wtf/win/OwnPtrWin.h: Removed. 2010-06-08 MORITA Hajime Unreviewed. An attempt to fix test break. * Configurations/FeatureDefines.xcconfig: 2010-06-08 Kwang Yul Seo Reviewed by Adam Barth. Change OwnPtrCommon to include platform-specific headers https://bugs.webkit.org/show_bug.cgi?id=40279 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. * JavaScriptCore.vcproj/WTF/WTF.vcproj: * wtf/OwnPtrCommon.h: * wtf/brew/OwnPtrBrew.h: Added. * wtf/win/OwnPtrWin.h: Added. 2010-06-07 MORITA Hajime Reviewed by Kent Tamura. https://bugs.webkit.org/show_bug.cgi?id=40219 [Mac] ENABLE_METER_TAG should be enabled Added ENABLE_METER_TAG. * Configurations/FeatureDefines.xcconfig: 2010-06-07 Kwang Yul Seo Reviewed by Eric Seidel. [BREWMP] Add more types to OwnPtr https://bugs.webkit.org/show_bug.cgi?id=39667 Add ISSL and ISocket to the list of OwnPtr-ed type. * wtf/OwnPtrCommon.h: * wtf/brew/OwnPtrBrew.cpp: (WTF::deleteOwnedPtr): 2010-06-07 Benjamin Poulain Reviewed by Simon Hausmann. [Qt] Crash when compiling on Snow Leopard and running on Leopard https://bugs.webkit.org/show_bug.cgi?id=31403 Disable the use of pthread_setname_np and other symbols when targetting Leopard. Use the defines TARGETING_XX instead of BUILDING_ON_XX for features that cannot be used before Snow Leopard. * wtf/Platform.h: 2010-06-07 Gabor Loki Reviewed by NOBODY (JSVALUE32_64 build fix). * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTINativeCall): 2010-06-06 Gavin Barraclough Reviewed by NOBODY (windows build fix pt 2). * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-06-06 Gavin Barraclough Reviewed by NOBODY (windows build fix pt 1). * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-06-06 Gavin Barraclough Reviewed by Sam Weinig. 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. 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. Convenience methods added to create & throw type & syntax error with a default error message, since this is a common case. 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(...)". * 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::emitNewError): (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): * bytecompiler/BytecodeGenerator.h: * 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: * interpreter/Interpreter.cpp: (JSC::Interpreter::throwException): (JSC::Interpreter::privateExecute): * 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): 2010-06-05 Kwang Yul Seo Reviewed by Eric Seidel. [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx https://bugs.webkit.org/show_bug.cgi?id=39710 Build fix for BREW MP. * wtf/MathExtras.h: 2010-06-04 Adam Barth Reviewed by Darin Adler. HTML5 parser should be within 1% of old parser performance https://bugs.webkit.org/show_bug.cgi?id=40172 Fix cast in this operator= to allow for assignment between vectors with different inline capacities (as clearly intended by its author). * wtf/Vector.h: (WTF::::operator): 2010-06-04 Jedrzej Nowacki Reviewed by Kenneth Rohde Christiansen. New QtScript API; QScriptValue::instanceOf. New function create an easy way to check value's prototype hierarchy. [Qt] QScriptValue should have an instanceOf method https://bugs.webkit.org/show_bug.cgi?id=40120 * 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): 2010-06-04 Gavin Barraclough Reviewed by NOBODY (interpreter build fix). * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): 2010-06-04 Mark Rowe Silence some warnings seen on the build bot. * 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. 2010-06-04 Gavin Barraclough Reviewed by Oliver Hunt. Bug 40187 - Change function signature of NativeConstructor to match NativeFunction 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. * 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): 2010-06-04 Tony Gentilcore Reviewed by Adam Barth. Add a takeFirst() method to Deque and use it where appropriate. https://bugs.webkit.org/show_bug.cgi?id=40089 * wtf/Deque.h: (WTF::::takeFirst): * wtf/MainThread.cpp: (WTF::dispatchFunctionsFromMainThread): * wtf/MessageQueue.h: (WTF::::tryGetMessage): 2010-06-04 Jedrzej Nowacki Reviewed by Kenneth Rohde Christiansen. Remove a QEXPECT_FAIL flag from an autotest. Test tst_QScriptEngine::globalObject pass after 36600 bug fix have been applied. [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed. https://bugs.webkit.org/show_bug.cgi?id=40114 * qt/tests/qscriptengine/tst_qscriptengine.cpp: (tst_QScriptEngine::globalObject): 2010-06-04 Jedrzej Nowacki Reviewed by Kenneth Rohde Christiansen. Fix QScriptValue::equals. Handling for a few edge cases were added. Now comparison between NaN, an invalid objects should works as supposed. [Qt] QScriptValue::equals problems https://bugs.webkit.org/show_bug.cgi?id=40110 * 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): 2010-06-03 Jedrzej Nowacki Reviewed by Kenneth Rohde Christiansen. New states in QScriptValuePrivate. 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. [Qt] The QScriptValuePrivate::CSpecial is too generic. https://bugs.webkit.org/show_bug.cgi?id=40067 * qt/api/qscriptvalue_p.h: (QScriptValuePrivate::): (QScriptValuePrivate::QScriptValuePrivate): (QScriptValuePrivate::isNull): (QScriptValuePrivate::isUndefined): (QScriptValuePrivate::toString): (QScriptValuePrivate::toNumber): (QScriptValuePrivate::toBool): (QScriptValuePrivate::toObject): (QScriptValuePrivate::assignEngine): (QScriptValuePrivate::isNumberBased): 2010-06-03 Gavin Barraclough Reviewed by NOBODY (Qt build fix). * wtf/Platform.h: 2010-06-03 Gavin Barraclough Reviewed by Mark Rowe. Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms This was fixed in bug #40094. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * wtf/Platform.h: 2010-06-03 Gavin Barraclough Reviewed by NOBODY (Interpreter build fix). * JavaScriptCore.JSVALUE32_64only.exp: * JavaScriptCore.JSVALUE32only.exp: * JavaScriptCore.JSVALUE64only.exp: * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): 2010-06-03 Gavin Barraclough Reviewed by NOBODY (windows build fix II). * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-06-03 Gavin Barraclough Reviewed by NOBODY (windows build fix). * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-06-02 Gavin Barraclough Reviewed by Oliver Hunt. 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. * 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): 2010-06-02 Mark Rowe Reviewed by Gavin Barraclough. Add value-representation specific sections to the mac export file. * Configurations/JavaScriptCore.xcconfig: * DerivedSources.make: * JavaScriptCore.JSVALUE32_64only.exp: Added. * JavaScriptCore.JSVALUE32only.exp: Added. * JavaScriptCore.JSVALUE64only.exp: Added. * JavaScriptCore.xcodeproj/project.pbxproj: 2010-06-02 Mark Rowe Reviewed by Gavin Barraclough. Work around an LLVM GCC code generation bug that results in crashes inside PCRE. * 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. 2010-06-02 Jedrzej Nowacki Reviewed by Kenneth Rohde Christiansen. Fix the QScriptValue::strictlyEquals function. Handling for a few edge cases was added. New autotest that covers the QScriptValue::strictlyEquals function. [Qt] QScriptValue::strictlyEquals is broken https://bugs.webkit.org/show_bug.cgi?id=36600 * 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): 2010-06-02 Jedrzej Nowacki Reviewed by Kenneth Rohde Christiansen. New function QScriptEngine::newObject. The function creates a object of class Object and returns it as a QScriptValue. [Qt] QScriptEngine API should contain a newObject function https://bugs.webkit.org/show_bug.cgi?id=39114 * 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): 2010-06-02 Gabor Loki Reviewed by Gavin Barraclough. https://bugs.webkit.org/show_bug.cgi?id=40011 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. * assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::load16): 2010-06-02 Sterling Swigart Reviewed by David Levin. Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches. https://bugs.webkit.org/show_bug.cgi?id=39906 * Configurations/FeatureDefines.xcconfig: 2010-06-01 Gavin Barraclough Reviewed by Sam Weinig. Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together This is a useful stepping stone towards reversing argument order. * 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): 2010-06-01 Yong Li Reviewed by Darin Adler. Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex. https://bugs.webkit.org/show_bug.cgi?id=39893 * wtf/ThreadingPthreads.cpp: (WTF::Mutex::Mutex): 2010-06-01 Kwang Yul Seo Reviewed by Xan Lopez. [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap https://bugs.webkit.org/show_bug.cgi?id=39831 Use DEFINE_STATIC_LOCAL for static local variables. * wtf/gtk/ThreadingGtk.cpp: (WTF::threadMapMutex): (WTF::threadMap): (WTF::identifierByGthreadHandle): 2010-06-01 Kent Tamura Reviewed by Shinichiro Hamaji. Fix style errors of dtoa https://bugs.webkit.org/show_bug.cgi?id=39972 Fix all errors reported by check-webkit-style. * wtf/dtoa.cpp: * wtf/dtoa.h: 2010-05-30 Darin Adler Reviewed by Sam Weinig. * 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. 2010-05-29 Geoffrey Garen Windows build fix: Updated exported symbols. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-05-29 Geoffrey Garen Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I can figure out why it's crashing. * wtf/Platform.h: 2010-05-29 Geoffrey Garen Fixed Windows crash seen on buildbot. * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first argument in ecx. 2010-05-28 Geoffrey Garen Windows build fix: Updated exported symbols. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-05-28 Geoffrey Garen Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL is disabled. * runtime/Lookup.cpp: (JSC::setUpStaticFunctionSlot): * runtime/Lookup.h: * wtf/Platform.h: 2010-05-28 Geoffrey Garen Windows build fix: Updated exported symbols. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 2010-05-28 Geoffrey Garen Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt. 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 JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&) is now this 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. * debugger/DebuggerCallFrame.cpp: (JSC::DebuggerCallFrame::functionName): (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to ExecState::callee(). (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue(). * 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. * interpreter/Interpreter.cpp: (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue(). (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.) (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope. Updated for CallFrame::init API change. (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope. Updated for CallFrame::init API change. Added support for calling a host function. (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope. Updated for CallFrame::init API change. (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. (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. * 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. * 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. * 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. * runtime/Arguments.h: (JSC::Arguments::getArgumentsData): (JSC::Arguments::Arguments): Updated for ExecState and Register API changes noted above. * 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. * runtime/CallData.h: Changed host function signature as described above. * 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. * 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. 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): (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): (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): 2010-05-28 Jedrzej Nowacki Reviewed by Geoffrey Garen. Fix the JSObjectSetPrototype function. 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. JSObjectSetPrototype doesn't check for cycle in prototype chain. https://bugs.webkit.org/show_bug.cgi?id=39360 * API/JSObjectRef.cpp: (JSObjectSetPrototype): * API/tests/testapi.c: (assertTrue): (checkForCycleInPrototypeChain): (main): * runtime/JSObject.cpp: (JSC::JSObject::put): * runtime/JSObject.h: (JSC::JSObject::setPrototypeWithCycleCheck): 2010-05-28 Chao-ying Fu Reviewed by Eric Seidel. Fix MIPS JIT DoubleGreaterThanOrEqual Operands https://bugs.webkit.org/show_bug.cgi?id=39504 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 * assembler/MacroAssemblerMIPS.h: (JSC::MacroAssemblerMIPS::branchDouble): 2010-05-28 Gavin Barraclough Reviewed by Geoff Garen. Move jit compilation from linking thunks into cti_vm_lazyLink methods. * jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): 2010-05-28 Gavin Barraclough 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::linkCall): (JSC::JIT::linkConstruct): * jit/JIT.h: (JSC::JIT::compile): * jit/JITOpcodes.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITStubs.cpp: (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): 2010-05-27 Luiz Agostini Reviewed by Darin Adler. UTF-16 code points compare() for String objects https://bugs.webkit.org/show_bug.cgi?id=39701 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. * 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: 2010-05-26 Darin Adler Reviewed by Kent Tamura. Null characters handled incorrectly in ToNumber conversion https://bugs.webkit.org/show_bug.cgi?id=38088 * 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. * 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. 2010-05-27 Nathan Lawrence Reviewed by Geoffrey Garen. 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 * runtime/Collector.cpp: (JSC::Heap::allocate): * runtime/Collector.h: (JSC::CollectorBitmap::advanceToNextPossibleFreeCell): 2010-05-27 Kevin Ollivier [wx] Build fixes for Windows after recent changes. * wscript: 2010-05-27 Gustavo Noronha Silva More build fixage for make dist. * GNUmakefile.am: 2010-05-27 Kwang Yul Seo Reviewed by Darin Adler. RVCT does not have strnstr. https://bugs.webkit.org/show_bug.cgi?id=39719 Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr. * wtf/StringExtras.h: 2010-05-26 Gavin Barraclough Reviewed by Oliver Hunt. 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): 2010-05-26 Gavin Barraclough Reviewed by NOBODY (revert). Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing. * 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): 2010-05-26 Gustavo Noronha Silva Build fixes for make distcheck. * GNUmakefile.am: 2010-05-26 Gavin Barraclough Reviewed by Oliver Hunt. Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction. 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): 2010-05-26 Geoffrey Garen Reviewed by Sam Weinig. Fixed a crash seen on the Leopard bot, caused by merge. * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe, since it's no longer passed to us as an argument. 2010-05-25 Geoffrey Garen Fixed build failure caused by merge. * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this function no longer returns a pair. 2010-05-25 Geoffrey Garen Reviewed by Oliver Hunt. 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. * 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. 2010-05-25 Kwang Yul Seo Reviewed by Darin Adler. Build fix for JSFunction https://bugs.webkit.org/show_bug.cgi?id=39658 MSVC can't compile one of JSFunction constructors when JIT is disabled. "PassRefPtr" causes the compile error as NativeExecutable is not defined. Add ENABLE(JIT) guard to the constructor. * runtime/JSFunction.cpp: (JSC::JSFunction::JSFunction): * runtime/JSFunction.h: 2010-05-24 Gavin Barraclough Reviewed by Sam Weinig. Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call. 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. 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/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::privateCompileCTIMachineTrampolines): * jit/JITOpcodes32_64.cpp: (JSC::JIT::privateCompileCTIMachineTrampolines): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * jit/JITStubs.h: (JSC::): 2010-05-24 Gavin Barraclough 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::privateCompileMainPass): * jit/JIT.h: * 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-2010-05-24 ==