diff options
Diffstat (limited to 'JavaScriptCore/ChangeLog')
-rw-r--r-- | JavaScriptCore/ChangeLog | 5829 |
1 files changed, 5828 insertions, 1 deletions
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index 4257344..eb2f97d 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,5830 @@ +2010-05-06 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by Alexey Proskuryakov. + + JavaScriptCore/wtf/RandomNumber.h should provide using WTF::* + https://bugs.webkit.org/show_bug.cgi?id=38719 + + * wtf/RandomNumber.h: + Add using directives. + +2010-05-06 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Enable YARR_JIT for X86 Mac for QtWebKit + https://bugs.webkit.org/show_bug.cgi?id=38668 + + * wtf/Platform.h: + +2010-05-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 38714 - Add result caching for Math.sin + + Math.sin is frequently called with the same operand, caching the result should + improve performance. CachedTranscendentalFunction adds a generic mechanism to + cache results for pure functions with the signature "double func(double)", and + where NaN maps to NaN. + + CachedTranscendentalFunction uses a very simple hash function designed to be + fast to execute since we cannot cache the result, and trivial to JIT generate, + should we wish to do so. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/CachedTranscendentalFunction.h: Added. + (JSC::CachedTranscendentalFunction::CachedTranscendentalFunction): + (JSC::CachedTranscendentalFunction::~CachedTranscendentalFunction): + (JSC::CachedTranscendentalFunction::operator()): + (JSC::CachedTranscendentalFunction::initialize): + (JSC::CachedTranscendentalFunction::hash): + * runtime/JSGlobalData.h: + * runtime/MathObject.cpp: + (JSC::mathProtoFuncSin): + * wtf/Platform.h: + +2010-05-06 Geoffrey Garen <ggaren@apple.com> + + Windows build fix. + + * bytecode/SamplingTool.cpp: + (JSC::SamplingFlags::sample): Use a cast, so Windows will be happy when + this code is enabled. + * wtf/Platform.h: Reverted last change to this file, which seems to have + been accidental. + +2010-05-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Add compile switch to make debugger keyword plant breakpoint instructions. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitDebugHook): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_debug): + * wtf/Platform.h: + +2010-05-06 Oliver Hunt <oliver@apple.com> + + Build fix + + Fix ARM builds + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::load16): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::load16): + +2010-05-06 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Improve performance of single character string compares + https://bugs.webkit.org/show_bug.cgi?id=38659 + + Add logic to the jit to identify comparisons to single character string literals + and then just perform the comparison inline, rather than ignoring the evidence + and attempting to perform an integer comparison. + + Multiple changes required -- add jnlesseq opcode, add helper function to identify + single character string constants, add a helper to load single character strings. + Then add the 32_64 and normal codepaths to the JIT. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::load16): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJumpIfTrue): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jless): + (JSC::JIT::emitSlow_op_jless): + (JSC::JIT::emit_op_jlesseq): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jless): + (JSC::JIT::emitSlow_op_jless): + (JSC::JIT::emit_op_jlesseq): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::emitBinaryDoubleOp): + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoadCharacterString): + (JSC::JIT::isOperandConstantImmediateChar): + * jit/JSInterfaceJIT.h: + (JSC::ThunkHelpers::stringImplDataOffset): + (JSC::ThunkHelpers::jsStringLengthOffset): + (JSC::ThunkHelpers::jsStringValueOffset): + Moved from ThunkGenerators to make it possible to share. + * jit/ThunkGenerators.cpp: + +2010-05-06 Martin Robinson <mrobinson@webkit.org> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Enable DOM clipboard and drag-and-drop access + https://bugs.webkit.org/show_bug.cgi?id=30623 + + Convert dragging portion of drag-and-drop to use DataObjectGtk. + + * wtf/gobject/GRefPtr.h: Add forward declarations for GObject functions. + +2010-05-06 Steve Block <steveblock@google.com> + + Reviewed by Eric Seidel. + + MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE + https://bugs.webkit.org/show_bug.cgi?id=38544 + + * wtf/Platform.h: + +2010-05-06 Adam Barth <abarth@webkit.org> + + Reviewed by Maciej Stachowiak. + + [WTFURL] Add a class to represent the segments of a URL + https://bugs.webkit.org/show_bug.cgi?id=38566 + + When paired with a string, this class represents a parsed URL. + + * wtf/url/src/URLSegments.cpp: Added. + (WTF::URLSegments::length): + (WTF::URLSegments::charactersBefore): + * wtf/url/src/URLSegments.h: Added. + (WTF::URLSegments::): + (WTF::URLSegments::URLSegments): + * wtf/url/wtfurl.gyp: + +2010-05-05 Tony Gentilcore <tonyg@chromium.org> + + Reviewed by Adam Barth. + + Adding comment with link to RefPtr documentation. + https://bugs.webkit.org/show_bug.cgi?id=38601 + + * wtf/RefPtr.h: + +2010-05-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + Bug 38604 - workers-gc2 crashing on Qt + + This appears to be due to a couple of issues. + (1) When the atomic string table is deleted it does not clear the 'inTable' bit + on AtomicStrings - it implicitly assumes that all AtomicStrings have already + been deleted at this point (otherwise they will crash in their destructor when + they try to remove themselves from the atomic string table). + (2) We don't fix the ordering in which WTF::WTFThreadData and + WebCore::ThreadGlobalData are destructed. + + We should make sure that ThreadGlobalData is cleaned up before worker threads + terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable + bit of members on atomic string table destruction. + + WTF changes (fix issue 1, above) - ensure inTable property is cleared when the + atomic string table is destroyed (also, rename InTable to IsAtomic, to make it + clear which table we are refering to!) + + * wtf/text/AtomicString.cpp: + (WebCore::AtomicStringTable::destroy): + (WebCore::CStringTranslator::translate): + (WebCore::UCharBufferTranslator::translate): + (WebCore::HashAndCharactersTranslator::translate): + (WebCore::AtomicString::add): + * wtf/text/StringImpl.cpp: + (WebCore::StringImpl::~StringImpl): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::isAtomic): + (WebCore::StringImpl::setIsAtomic): + * wtf/text/StringImplBase.h: + +2010-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Make Array.join specialised for actual arrays + https://bugs.webkit.org/show_bug.cgi?id=38592 + + Bring Array.join in line with the other array methods by specialising for + this === an array. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncJoin): + +2010-05-04 Yongjun Zhang <yongjun_zhang@apple.com> + + Reviewed by Darin Adler. + + WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe. + https://bugs.webkit.org/show_bug.cgi?id=38535 + + Don't call asFunction if callee is not a FunctionType to prevent assertion failure + in JSCell::isObject(). + + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::functionName): + (JSC::DebuggerCallFrame::calculatedFunctionName): + +2010-05-04 Steve Falkenburg <sfalken@apple.com> + + Remove redundant exports to fix Windows build warnings. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-05-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Holger Freyther. + + Fix a memory leak inside the QScriptValue. + + QSciptValuePrivate::toString should release all temporary variables. + + [Qt] QScriptValue::toString have a memory leak. + https://bugs.webkit.org/show_bug.cgi?id=38112 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::toString): + +2010-05-04 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Darin Adler. + + Does not work on SPARC because of alignment issues + https://bugs.webkit.org/show_bug.cgi?id=38455 + + Use AllocAlignmentInteger instead of void* on pageheap_memory to + avoid crashing at runtime in some architectures. Investigated by + Mike Hommey <mh@glandium.org>, change suggested by Darin Adler. + + * wtf/FastMalloc.cpp: + +2010-05-04 Adam Barth <abarth@webkit.org> + + Reviewed by Maciej Stachowiak. + + Add first WTFURL file + https://bugs.webkit.org/show_bug.cgi?id=38470 + + This class represents a component of a URL, such as the scheme or path. + Essentially, the class is an index into a string buffer. + + * wtf/url: Added. + - There was some discussion about where to put the URL library. + There are a number of reasonable options, but putting the library + in the WTF directory seems like a reasonable alternative. This + location will make more sense once WTF is moved out of + JavaScriptCore and into a top-level directory. + * wtf/url/src: Added. + - I've added this extra directory to the usual structure because we + eventually want a "public" folder that defines the public + interface to this library that clients outside of svn.webkit.org + can rely upon, much like the various subfolders of the WebKit + directory often define a public API. + * wtf/url/src/URLComponent.h: Added. + - I've added this somewhat trivial class to get the ball rolling. + (WTF::URLComponent::URLComponent): + (WTF::URLComponent::isValid): + (WTF::URLComponent::isNonempty): + (WTF::URLComponent::reset): + (WTF::URLComponent::operator==): + (WTF::URLComponent::begin): + (WTF::URLComponent::setBegin): + (WTF::URLComponent::length): + (WTF::URLComponent::setLength): + (WTF::URLComponent::end): + * wtf/url/wtfurl.gyp: Added. + - WTFURL will be an independently buildable library, hence the + beginnings of a wtfurl.gyp file. + +2010-05-03 Stephanie Lewis <slewis@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=38368 + <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 + (return memory quicker). + Instead of returning everything but the smallest spans spread out + the spans kept over several size lists. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavenge): + +2010-05-03 James Robinson <jamesr@chromium.org> + + Reviewed by Eric Seidel. + + Clean up a few compiler warnings + https://bugs.webkit.org/show_bug.cgi?id=38073 + + * wtf/text/StringImpl.cpp: + (WebCore::StringImpl::ascii): + +2010-05-03 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (reverting previous commit). + + Rolling out r58114 - this introduced memory leaks of + AtomicStrings then workers terminated. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ThunkGenerators.cpp: + (JSC::ThunkHelpers::stringImplDataOffset): + * runtime/Identifier.cpp: + (JSC::IdentifierTable::~IdentifierTable): + (JSC::IdentifierTable::add): + (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: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + * wtf/WTFThreadData.cpp: + (WTF::WTFThreadData::WTFThreadData): + (WTF::WTFThreadData::~WTFThreadData): + * wtf/WTFThreadData.h: + (JSC::IdentifierTable::remove): + (JSC::IdentifierTable::literalTable): + (WTF::WTFThreadData::atomicStringTable): + * wtf/text/AtomicString.cpp: + (WebCore::AtomicStringTable::create): + (WebCore::AtomicStringTable::table): + (WebCore::AtomicStringTable::destroy): + (WebCore::stringTable): + (WebCore::CStringTranslator::hash): + (WebCore::CStringTranslator::equal): + (WebCore::CStringTranslator::translate): + (WebCore::operator==): + (WebCore::AtomicString::add): + (WebCore::equal): + (WebCore::UCharBufferTranslator::hash): + (WebCore::UCharBufferTranslator::equal): + (WebCore::UCharBufferTranslator::translate): + (WebCore::HashAndCharactersTranslator::hash): + (WebCore::HashAndCharactersTranslator::equal): + (WebCore::HashAndCharactersTranslator::translate): + (WebCore::AtomicString::find): + (WebCore::AtomicString::remove): + * wtf/text/AtomicStringTable.h: Removed. + * wtf/text/StringImpl.cpp: + (WebCore::StringImpl::~StringImpl): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::inTable): + (WebCore::StringImpl::setInTable): + (WebCore::equal): + * wtf/text/StringImplBase.h: + (WTF::StringImplBase::StringImplBase): + +2010-05-03 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + [wx] Implement scheduleDispatchFunctionsOnMainThread for wx port. + https://bugs.webkit.org/show_bug.cgi?id=38480 + + * wtf/wx/MainThreadWx.cpp: + (wxCallAfter::wxCallAfter): + (wxCallAfter::OnCallback): + (WTF::scheduleDispatchFunctionsOnMainThread): + +2010-05-03 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + [wx] Build and use Mac's ComplexTextController to support complex text in wx. + https://bugs.webkit.org/show_bug.cgi?id=38482 + + * wtf/Platform.h: + +2010-05-03 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Interpreter crashes due to incorrect refcounting of cached structures. + https://bugs.webkit.org/show_bug.cgi?id=38491 + rdar://problem/7926160 + + Make sure we ref/deref structures used for cached custom property getters + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::refStructures): + +2010-05-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Eric Seidel. + + [Qt] Enable JIT for QtWebKit on Symbian + https://bugs.webkit.org/show_bug.cgi?id=38339 + + JIT on Symbian has been stable for quite some time, it + is time to turn it on by default. + + * wtf/Platform.h: + +2010-04-29 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Add codegen support for unsigned right shift + https://bugs.webkit.org/show_bug.cgi?id=38375 + + Expose unsigned right shift in the macro assembler, and make use of it + from the jit. Currently if the result is outside the range 0..2^31-1 + we simply fall back to the slow case, even in JSVALUE64 and JSVALUE32_64 + where technically we could still return an immediate value. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::urshift32): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::urshift32): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::urshift32): + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + (JSC::X86Assembler::shrl_i8r): + (JSC::X86Assembler::shrl_CLr): + Add unsigned right shift to the x86 assembler + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + op_rshift no longer simply get thrown to a stub function + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_urshift): + (JSC::JIT::emitSlow_op_urshift): + JSVALUE32 and JSVALUE64 implementation. Only supports + double lhs in JSVALUE64. + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emit_op_urshift): + (JSC::JIT::emitSlow_op_urshift): + Refactor right shift code to have shared implementation between signed + and unsigned versions. + +2010-04-29 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Handle double on righthand side of a right shift + https://bugs.webkit.org/show_bug.cgi?id=38363 + + In 64-bit we support right shift of a double, and there's no + reason not to in 32-bit either. This is a 1.1% sunspider + improvement in 32bit. + + Given high performance javascript code frequently makes + use of bit operators to perform double->int conversion i'll + follow this patch up with similar patches for bitwise 'and' + and 'or'. + + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + +2010-04-29 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Hoist JSVALUE32_64 arithmetic implementations into a separate file. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emitSlow_op_jless): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::emit_op_mod): + (JSC::JIT::compileBinaryArithOpSlowCase): + (JSC::JIT::emit_op_div): + (JSC::JIT::compileBinaryArithOp): + * jit/JITArithmetic32_64.cpp: Added. + (JSC::JIT::emit_op_negate): + (JSC::JIT::emitSlow_op_negate): + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jless): + (JSC::JIT::emitSlow_op_jless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emitSlow_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emitSlow_op_bitand): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emitSlow_op_bitor): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emitSlow_op_bitxor): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emitSlow_op_bitnot): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emitSlow_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emitSlow_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emitSlow_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emitSlow_op_pre_dec): + (JSC::JIT::emit_op_add): + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSub32Constant): + (JSC::JIT::emitSlow_op_sub): + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emit_op_div): + (JSC::JIT::emitSlow_op_div): + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + +2010-04-29 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Oliver Hunt + + Add sqrt() instruction support for ARM assembler (using VFP) + https://bugs.webkit.org/show_bug.cgi?id=38312 + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + (JSC::ARMAssembler::fsqrtd_r): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::supportsFloatingPointSqrt): + (JSC::MacroAssemblerARM::sqrtDouble): + +2010-04-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Refactor qtscriptglobal.h + https://bugs.webkit.org/show_bug.cgi?id=37953 + + Use the same pattern in qtscriptglobal.h as in + qwebkitglobal.h without checking for specific OSs. + + * qt/api/qtscriptglobal.h: + +2010-04-29 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Small cleanup. + + QScriptValuePrivate constructor shouldn't take QScriptEngine pointer + as a parameter, because it breaks a private / public separation rule. + QScriptEnginePrivate::get(QScriptEngine*) should return + a QScriptEnginePrivate pointer instead of a QScriptEnginePtr, it simplifies + implementation. + + [Qt] QScriptValuePrivate class needs some cleanup. + https://bugs.webkit.org/show_bug.cgi?id=37729 + + * qt/api/qscriptengine_p.h: + (QScriptEnginePrivate::get): + * qt/api/qscriptvalue.cpp: + (QScriptValue::QScriptValue): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::QScriptValuePrivate): + +2010-04-29 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Simon Hausmann. + + [WINCE] Export g_stackBase with JS_EXPORTDATA + https://bugs.webkit.org/show_bug.cgi?id=37437 + + Export g_stackBase with JS_EXPORTDATA as it is used by SharedTimerWince.cpp. + + * runtime/Collector.cpp: + +2010-04-28 Oliver Hunt <oliver@apple.com> + + Do an unordered compare so that we don't treat NaN incorrectly. + + RS=Gavin Barraclough + + * jit/ThunkGenerators.cpp: + (JSC::powThunkGenerator): + +2010-04-28 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Add fast paths for Math.pow and Math.sqrt + https://bugs.webkit.org/show_bug.cgi?id=38294 + + Add specialized thunks for Math.pow and Math.sqrt. + This requires adding a sqrtDouble function to the MacroAssembler + and sqrtsd to the x86 assembler. + + Math.pow is slightly more complicated, in that we have + to implement exponentiation ourselves rather than relying + on hardware support. The inline exponentiation is restricted + to positive integer exponents on a numeric base. Exponentiation + is finally performed through the "Exponentiation by Squaring" + algorithm. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::supportsFloatingPointSqrt): + (JSC::MacroAssemblerARM::loadDouble): + (JSC::MacroAssemblerARM::sqrtDouble): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt): + (JSC::MacroAssemblerARMv7::sqrtDouble): + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::loadDouble): + (JSC::MacroAssemblerX86::supportsFloatingPointSqrt): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::sqrtDouble): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::loadDouble): + (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt): + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + (JSC::X86Assembler::movsd_mr): + (JSC::X86Assembler::sqrtsd_rr): + (JSC::X86Assembler::X86InstructionFormatter::twoByteOp): + (JSC::X86Assembler::X86InstructionFormatter::memoryModRM): + * create_hash_table: + * jit/JIT.h: + * jit/JITInlineMethods.h: + * jit/JITOpcodes.cpp: + * jit/JITStubs.h: + (JSC::JITThunks::ctiNativeCallThunk): + * jit/JSInterfaceJIT.h: + (JSC::JSInterfaceJIT::emitLoadDouble): + (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber): + (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber): + (JSC::JSInterfaceJIT::emitLoadInt32): + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::loadDoubleArgument): + (JSC::SpecializedThunkJIT::loadInt32Argument): + (JSC::SpecializedThunkJIT::returnJSValue): + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::finalize): + * jit/ThunkGenerators.cpp: + (JSC::sqrtThunkGenerator): + (JSC::powThunkGenerator): + * jit/ThunkGenerators.h: + * runtime/Executable.h: + (JSC::NativeExecutable::NativeExecutable): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + +2010-04-28 Mike Thole <mthole@apple.com> + + Reviewed by Mark Rowe. + + Reenable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK now that an + exports file for it has been added. + + * wtf/Platform.h: + +2010-04-28 Mike Thole <mthole@apple.com> + + Build fix, not reviewed. + + * wtf/Platform.h: + Disable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK until an exports file is created. + +2010-04-28 Mike Thole <mthole@apple.com> + + Reviewed by David Kilzer. + + Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space + can be inspected before attempting to authenticate against it + https://bugs.webkit.org/show_bug.cgi?id=38271 + + * wtf/Platform.h: Add WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK define. + +2010-04-28 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Don't use CFAbsoluteTimeGetCurrent on Mac OS X, since it's just a cover + for gettimeofday anyway. + + * wtf/CurrentTime.cpp: + (WTF::currentTime): Remove the CF version of this. Change the "other POSIX" + version to pass 0 for the time zone instead of ignoring a return value. + Also get rid of unneeded type casts, since operations involving both + integers and doubles are always evaluated as doubles in C without explicit + type casting. + +2010-04-28 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + [Chromium] callOnMainThread should equate to MessageLoop::PostTask + https://bugs.webkit.org/show_bug.cgi?id=38276 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * wtf/MainThread.cpp: + * wtf/chromium/ChromiumThreading.h: + * wtf/chromium/MainThreadChromium.cpp: + (WTF::initializeMainThread): + (WTF::callOnMainThread): + (WTF::callOnMainThreadAndWait): + (WTF::setMainThreadCallbacksPaused): + (WTF::isMainThread): + +2010-04-28 Simon Hausmann <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Darin Adler. + + JSC's currentThreadStackBase is not reentrant on some platforms + https://bugs.webkit.org/show_bug.cgi?id=37195 + + This function needs to be reentrant to avoid memory corruption on platforms where + the implementation uses global variables. + + This patch adds a mutex lock where necessary and makes the Symbian implementation + reentrant. + + * runtime/Collector.cpp: + (JSC::currentThreadStackBaseMutex): + (JSC::currentThreadStackBase): + +2010-04-28 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by Simon Hausmann. + + Fix compilation with gcc 3.4. + + AtomicStringImpl.h:29: error: base `WebCore::StringImpl' with only + non-default constructor in class without a constructor + + * wtf/text/AtomicStringImpl.h: + (WebCore::AtomicStringImpl::AtomicStringImpl): Provide a default constructor. + * wtf/text/StringImpl.h: Allow AtomicStringImpl to call a StringImpl constructor through a friend declaration. + +2010-04-27 Stephanie Lewis <slewis@apple.com> + + Fix Tiger build. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::Carve): + +2010-04-26 Stephanie Lewis <slewis@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=38154 FastMalloc calls madvise too often. + <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker). + To save on madvise calls when recommitting memory recommit the entire span and then carve it + instead of carving the span up and only committing the part that will be used immediately. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::New): + (WTF::TCMalloc_PageHeap::AllocLarge): + (WTF::TCMalloc_PageHeap::Carve): + +2010-04-26 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Add specialized thunks for a char code related string functions + https://bugs.webkit.org/show_bug.cgi?id=38177 + + This is a simple extension to my prior patch. Basically hoist the + existing character loading logic from the charCodeAt thunk and into + a helper function, then add a helper to load strings from the small + string cache. This allows trivial implementations of fromCharCode + and charAt. + + * create_hash_table: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnJSCell): + (JSC::SpecializedThunkJIT::tagReturnAsJSCell): + * jit/ThunkGenerators.cpp: + (JSC::stringCharLoad): + (JSC::charToString): + (JSC::charCodeAtThunkGenerator): + (JSC::charAtThunkGenerator): + (JSC::fromCharCodeThunkGenerator): + * jit/ThunkGenerators.h: + * runtime/SmallStrings.h: + (JSC::SmallStrings::singleCharacterStrings): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + +2010-04-27 Thomas Zander <t.zander@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix the build on Symbian on Linux using the Makefile based mkspec + + * JavaScriptCore.pri: It is necessary to specify the library search path + when linking against JavaScriptCore. + +2010-04-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + Compile fix for Visual Studio 2010 + https://bugs.webkit.org/show_bug.cgi?id=37867 + + Patch by Prasanth Ullattil <prasanth.ullattil@nokia.com> + + * runtime/Structure.cpp: + (JSC::Structure::transitionTableAdd): + * wtf/MathExtras.h: + * wtf/Platform.h: + +2010-04-27 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + Rename COMPILER(MSVC7) to COMPILER(MSVC7_OR_LOWER) + + * config.h: + (JSC::Structure::transitionTableAdd): + * wtf/Assertions.h: + * wtf/Atomics.h: + * wtf/CurrentTime.h: + (WTF::getLocalTime): + * wtf/Platform.h: + * wtf/StaticConstructors.h: + * wtf/StringExtras.h: + * wtf/Vector.h: + (WTF::::append): + +2010-04-15 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] Fix Mac build break. + + https://bugs.webkit.org/show_bug.cgi?id=37867 + - Make sure JavaScriptCore's debug_and_release config follows that + of WebCore. + - Use different name for JavaScriptCore target in debug and release + since they might be written in the same path at the same time on + parallel builds + - Consolidate the DESTDIR determination logic in JavaScriptCore.pri + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + +2010-04-21 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Make sure WebKit is not compiled using C++0x. + https://bugs.webkit.org/show_bug.cgi?id=37867 + + As the rest of Qt compiles in the C++0x mode, people might start + compiling it in this mode. WebKit don't support this yet. + + Patch by Thiago Macieira <thiago.macieira@nokia.com> + + * JavaScriptCore.pro: + +2010-04-26 Oliver Hunt <oliver@apple.com> + + Fix windows + + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::argumentToVirtualRegister): + +2010-04-26 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Need to support more efficient dispatch of lightweight builtins + https://bugs.webkit.org/show_bug.cgi?id=38155 + + The problem with calling lightweight builtins is that marshalling + the call from the nitro calling convention to the system calling + convention is very expensive relative to the cost of the actually + evaluating the function. To work around this problem this patch + adds the ability to define a custom thunk for a builtin. + + This allows us to use high performance custom implementations of + the common and sensible versions of simple builtins. This patch + includes a simple (use of which is currently hardcoded) thunk for + charCodeAt. + + This adds a JSInterfaceJIT subclass called SpecializedThunkJIT + that has helper functions to remove (or at least reduce) the need + to have separate thunk implementations for each JSValue encoding. + + * GNUmakefile.am: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + Many project file updates + + * create_hash_table: + Add thunk generation callbacks to the hash tables, currently + we hardcode the script to only support charCodeAt + + * jit/JITStubCall.h: + * jit/JITStubs.cpp: + (JSC::JITThunks::~JITThunks): + (JSC::JITThunks::specializedThunk): + * jit/JITStubs.h: + * jit/SpecializedThunkJIT.h: Added. + (JSC::SpecializedThunkJIT::SpecializedThunkJIT): + (JSC::SpecializedThunkJIT::loadCellArgument): + (JSC::SpecializedThunkJIT::loadJSStringArgument): + (JSC::SpecializedThunkJIT::loadInt32Argument): + (JSC::SpecializedThunkJIT::appendFailure): + (JSC::SpecializedThunkJIT::returnInt32): + (JSC::SpecializedThunkJIT::finalize): + (JSC::SpecializedThunkJIT::argumentToVirtualRegister): + (JSC::SpecializedThunkJIT::tagReturnAsInt32): + * jit/ThunkGenerators.cpp: Added. + (JSC::ThunkHelpers::stringImplDataOffset): + (JSC::ThunkHelpers::jsStringLengthOffset): + (JSC::ThunkHelpers::jsStringValueOffset): + (JSC::charCodeAtThunkGenerator): + * jit/ThunkGenerators.h: Added. + * runtime/Executable.h: + (JSC::NativeExecutable::NativeExecutable): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + * runtime/JSFunction.h: + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::getThunk): + * runtime/JSString.h: + (JSC::): + * runtime/JSValue.h: + Protect some of the JSVALUE32 and JSVALUE32_64 only constants + and function behind appropriate USE() guards to make it harder + to use the wrong flags for the target build. + * runtime/Lookup.cpp: + (JSC::HashTable::createTable): + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::HashEntry::initialize): + (JSC::HashEntry::generator): + (JSC::HashEntry::): + Make the lookup tables use a specialized thunkGenerator + if present + * wtf/text/StringImpl.h: + +2010-04-26 Oliver Hunt <oliver@apple.com> + + Build fix + + * runtime/JSImmediate.h: + * runtime/JSValue.h: + +2010-04-26 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Factor some basic JS interface logic out of JIT and into a superclass + https://bugs.webkit.org/show_bug.cgi?id=38163 + + Create JSInterfaceJIT to hold some common low level functions for + interacting with the JS RegisterFile. Doing this separately from + https://bugs.webkit.org/show_bug.cgi?id=38155 to ease reviewing. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::emitJumpSlowCaseIfNotJSCell): + * jit/JSInterfaceJIT.h: Added. + (JSC::JSInterfaceJIT::emitLoadJSCell): + (JSC::JSInterfaceJIT::emitJumpIfNotJSCell): + (JSC::JSInterfaceJIT::emitLoadInt32): + (JSC::JSInterfaceJIT::tagFor): + (JSC::JSInterfaceJIT::payloadFor): + (JSC::JSInterfaceJIT::addressFor): + +2010-04-26 Sam Weinig <sam@webkit.org> + + Fix Tiger build. + + * wtf/mac/MainThreadMac.mm: + (WTF::isMainThread): + +2010-04-26 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/7766413> + + Fixed a crash seen when using the JavaScriptCore API with WebKit. + + No layout test because DumpRenderTree doesn't use the JavaScriptCore API + in this way. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::setGlobalObject): + (JSC::RegisterFile::clearGlobalObject): + (JSC::RegisterFile::globalObject): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): Use WeakGCPtr for managing m_globalObject, + since it's a weak pointer. (We never noticed this error before because, + in WebKit, global objects always have a self-reference in a global variable, + so marking the register file's global variables would keep m_globalObject + alive. In the JavaScriptCore API, you can allocate a global object with + no self-reference.) + + * runtime/JSActivation.h: Removed unneeded #include. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): Don't use ==, since a weak + pointer is 0 when the object it points to runs its destructor. + + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::clear): Changed to return a bool indicating whether the + clear actually happened. + (JSC::WeakGCPtr::assign): Changed to forbid assignment of 0 as a shorthand + for calling clear(). A client should never clear by assigning 0, since + clear() should be conditional on whether the object doing the clearing + is still pointed to by the weak pointer. (Otherwise, a zombie object might + clear a pointer to a new, valid object.) + +2010-04-25 Sam Weinig <sam@webkit.org> + + Reviewed by Maciej Stachowiak. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=38097 + Disentangle initializing the main thread from initializing threading + + This is the first step in getting rid of the WEB_THREAD #define and + paving the way to allowing mac both WebKit and WebKit2 to use the same + WebCore. + + * JavaScriptCore.exp: Export initializeMainThread and initializeMainThreadToProcessMainThread. + * JavaScriptCore.xcodeproj/project.pbxproj: Sort files. + + * wtf/MainThread.cpp: + (WTF::mainThreadInitializationMutex): + (WTF::mainThreadFunctionQueueMutex): + (WTF::initializeMainThread): + (WTF::deprecatedInitializeMainThread): + * wtf/MainThread.h: + Added Mac only initializeMainThreadToProcessMainThread which sets up callOnMainThread + and isMainThead calls to assume that WebCore's main thread is also the + process's main thread. Since it is possible that both initializeMainThread + and initializeMainThreadToProcessMainThread could be called, the first one called + wins (either will work). + + * wtf/Threading.h: Moved to top of file. + + * wtf/ThreadingPthreads.cpp: + (WTF::initializeThreading): Remove call to initializeMainThread. + * wtf/ThreadingWin.cpp: + (WTF::initializeThreading): Ditto. + * wtf/gtk/ThreadingGtk.cpp: + (WTF::initializeThreading): Ditto. + + * wtf/mac/MainThreadMac.mm: + (WTF::initializeMainThreadPlatform): + (WTF::initializeMainThreadToProcessMainThread): + (WTF::scheduleDispatchFunctionsOnMainThread): + (WTF::isMainThread): + Add runtime switch between the old behavior of using the system's main + thread and a stored pointer to the main thread. Tiger always uses the + system's main thread. + + * wtf/qt/ThreadingQt.cpp: + (WTF::initializeThreading): Remove call to initializeMainThread. + * wtf/win/MainThreadWin.cpp: + (WTF::initializeMainThreadPlatform): Add call to initializeCurrentThreadInternal + removed from initializeThreading. + +2010-04-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix a memory leak in the QScriptString. + + QScriptStringPrivate's constructor shouldn't call JSStringRetain as + QScriptConverter implicitly pass a JSStringRef ownership. + + [Qt] QScriptStringPrivate c'tor problem + https://bugs.webkit.org/show_bug.cgi?id=38110 + + * qt/api/qscriptstring_p.h: + (QScriptStringPrivate::QScriptStringPrivate): + +2010-04-24 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + REGRESSION (r56560): Crash in parseFloat if passed invalid UTF-16 data + https://bugs.webkit.org/show_bug.cgi?id=38083 + rdar://problem/7901044 + + Tests: fast/js/ToNumber.html + fast/js/parseFloat.html + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseInt): Added a FIXME comment about a problem I noticed. + (JSC::parseFloat): Added a FIXME comment about a problem I noticed; + covered by test cases in the test I added. + * runtime/UString.cpp: + (JSC::UString::toDouble): Added FIXME comments about two problems I + noticed; covered by test cases in the tests I added. Added a return + statement so we don't crash when illegal UTF-16 sequences are present. + +2010-04-24 Anton Muhin <antonm@chromium.org> + + Reviewed by Darin Adler. + + Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue + + Former implementation attempted to use AtomicString(HashTableDeletedValue) + however those values cannot be used that way: one cannot construct + QualifiedNameImpl out of such AtomicString as we'll try to lookup this string + in the table, for example. + https://bugs.webkit.org/show_bug.cgi?id=37722 + + * wtf/RefPtr.h: expose hash table deleted value + +2010-04-23 Sam Weinig <sam@webkit.org> + + Reviewed by David Levin. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=38060 + Split up Threading.h + + Move bits for of Threading.h into 3 new files. + - Atomics.h for atomic operations. + - ThreadSafeShared.h for the ThreadSafeShared class. + - ThreadingPrimitives.h for the primitives and platform types. + + Basic threading operations (creation, etc.) remain in Threading.h. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Atomics.h: Copied from wtf/Threading.h. + * wtf/ThreadSafeShared.h: Copied from wtf/Threading.h. + * wtf/Threading.h: + * wtf/ThreadingPrimitives.h: Copied from wtf/Threading.h. + +2010-04-23 Sam Weinig <sam@webkit.org> + + Fix Qt build. + + * wtf/qt/MainThreadQt.cpp: #include <QThread> + +2010-04-22 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=38022 + Move isMainThread predicate function to MainThread.h + + * wtf/MainThread.cpp: + (WTF::initializeMainThread): + (WTF::isMainThread): + * wtf/MainThread.h: + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + (WTF::initializeThreading): + * wtf/ThreadingWin.cpp: + (WTF::initializeThreading): + * wtf/gtk/ThreadingGtk.cpp: + (WTF::initializeThreading): + * wtf/mac/MainThreadMac.mm: + (WTF::initializeMainThreadPlatform): + (WTF::isMainThread): + * wtf/qt/MainThreadQt.cpp: + (WTF::isMainThread): + * wtf/qt/ThreadingQt.cpp: + (WTF::initializeThreading): + * wtf/text/AtomicString.cpp: + +2010-04-23 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu> + + Reviewed by Laszlo Gombos. + + Add RVCT support for Linux + + Developed in cooperation with Gabor Loki. + + * API/JSStringRef.h: + * jit/ExecutableAllocator.h: + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutableAllocator::cacheFlush): + * jit/JITStubs.cpp: + * wtf/MathExtras.h: + * wtf/unicode/qt4/UnicodeQt4.h: + +2010-04-23 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Laszlo Gombos. + + [WIN] Move OwnPtrWin.cpp into platform specific folder. + https://bugs.webkit.org/show_bug.cgi?id=38042 + + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrWin.cpp: Removed. + * wtf/win/OwnPtrWin.cpp: Copied from JavaScriptCore/wtf/OwnPtrWin.cpp. + +2010-04-23 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Laszlo Gombos. + + [BREWMP] Move OwnPtrBrew.cpp into platform specific folder. + https://bugs.webkit.org/show_bug.cgi?id=38042 + + * wtf/OwnPtrBrew.cpp: Removed. + * wtf/brew/OwnPtrBrew.cpp: Copied from JavaScriptCore/wtf/OwnPtrBrew.cpp. + +2010-04-22 Steve Block <steveblock@google.com> + + Reviewed by Adam Barth. + + Update Android to use isfinite, isinf, isnan and signbit from namespace std. + https://bugs.webkit.org/show_bug.cgi?id=37948 + + * wtf/MathExtras.h: + +2010-04-22 Fumitoshi Ukai <ukai@chromium.org> + + Unreviewed build fix. + + * wtf/MD5.cpp: fix include path of CString.h + +2010-04-22 Fumitoshi Ukai <ukai@chromium.org> + + Reviewed by Adam Barth. + + MD5 is required for WebSocket new protocol implementation + https://bugs.webkit.org/show_bug.cgi?id=37913 + + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/MD5.cpp: Added. + * wtf/MD5.h: Added. + +2010-04-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (build fix). + Errk, accidentally committed commenting out two ASSERTs! reverting. + + * runtime/Collector.cpp: + (JSC::Heap::protect): + (JSC::Heap::unprotect): + +2010-04-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=38006 + Change lifetime of JSC::IdentifierTables used by WebCores to match AtomicStringTable + + Presently JSC's IdentifierTables are owned by the JSGlobalData. For + JSGlobalData objects created via the API this should continue to be the case, + but for the JSGlobalData objects used by WebCore (the main thread's common + global data, and those for workers) use a IdentifierTable provided (and owned) + by wtfThreadData. This allow the lifetime of these IdentifierTable to match + those of the corresponding AtomicStringTables. + + * API/APIShims.h: + (JSC::APIEntryShim::APIEntryShim): + * API/JSContextRef.cpp: + (JSContextGroupCreate): + * runtime/Collector.cpp: + (JSC::Heap::protect): + (JSC::Heap::unprotect): + (JSC::Heap::markRoots): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + (JSC::JSGlobalData::createContextGroup): + (JSC::JSGlobalData::create): + (JSC::JSGlobalData::sharedInstance): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::): + (JSC::JSGlobalData::isSharedInstance): + * runtime/JSLock.cpp: + (JSC::JSLock::JSLock): + (JSC::JSLock::lock): + (JSC::JSLock::unlock): + (JSC::JSLock::DropAllLocks::DropAllLocks): + * wtf/WTFThreadData.cpp: + (WTF::WTFThreadData::WTFThreadData): + (WTF::WTFThreadData::~WTFThreadData): + +2010-04-22 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r58110. + http://trac.webkit.org/changeset/58110 + https://bugs.webkit.org/show_bug.cgi?id=38007 + + Caused an internal compiler error on Qt (Requested by abarth + on #webkit). + + * wtf/MathExtras.h: + +2010-04-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + * API/JSWeakObjectMapRefPrivate.cpp: + +2010-04-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + * API/JSBase.cpp: + * API/JSCallbackObject.cpp: + +2010-04-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=37978 + Unify JSC::IdentifierTable and WebCore::AtomicStringTable implementations. + + These two classes both implement a HashSet of uniqued StringImpls, with + translator classes to avoid unnecessary object creation. The only difference + between the classes is which flag (isIdentifier or inTable) is set. + Combine the two classes using a template predicated on which flag to use. + + New class AtomicStringTable created, containing all the goodness from + IdentifierTable & AtomicStringTable, expect for Identifier's literalTable, + which has been moved onto JSGlobalData. Removed duplicate string translator + classes. Renamed StringImpl's inTable flag to more explicit 'isAtomic', + and set this on the empty string (which matches Identifier behaviour, and + removes a redundant check for zero-length). + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Identifier.cpp: + (JSC::createLiteralTable): + (JSC::deleteLiteralTable): + (JSC::Identifier::add): + (JSC::Identifier::addSlowCase): + * runtime/Identifier.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + * wtf/WTFThreadData.cpp: + (WTF::WTFThreadData::WTFThreadData): + (WTF::WTFThreadData::~WTFThreadData): + * wtf/WTFThreadData.h: + (WTF::WTFThreadData::atomicStringTable): + * wtf/text/AtomicString.cpp: + (WebCore::table): + (WebCore::operator==): + (WebCore::AtomicString::add): + (WebCore::AtomicString::find): + (WebCore::AtomicString::remove): + * wtf/text/AtomicStringTable.h: Added. + (WTF::CStringTranslator::hash): + (WTF::CStringTranslator::equal): + (WTF::CStringTranslator::translate): + (WTF::UCharBufferTranslator::hash): + (WTF::UCharBufferTranslator::equal): + (WTF::UCharBufferTranslator::translate): + (WTF::HashAndCharactersTranslator::hash): + (WTF::HashAndCharactersTranslator::equal): + (WTF::HashAndCharactersTranslator::translate): + (WTF::IdentifierOrAtomicStringTable::remove): + (WTF::::~IdentifierOrAtomicStringTable): + (WTF::::add): + (WTF::::find): + * wtf/text/StringImpl.cpp: + (WebCore::StringImpl::~StringImpl): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::isAtomic): + (WebCore::StringImpl::setIsAtomic): + (WebCore::equal): + * wtf/text/StringImplBase.h: + (WTF::StringImplBase::StringImplBase): + +2010-04-22 Steve Block <steveblock@google.com> + + Reviewed by Adam Barth. + + Update Android to use isfinite, isinf, isnan and signbit from namespace std. + https://bugs.webkit.org/show_bug.cgi?id=37948 + + * wtf/MathExtras.h: + +2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Remove dependency of JSC to QtGui + https://bugs.webkit.org/show_bug.cgi?id=37867 + + The patch also make sure that hal.h is in the include path on Symbian. + The dependency to QtGui took care of that before. + + Patch by Thiago Macieira <thiago.macieira@nokia.com> + and Rohan McGovern <rohan.mcgovern@nokia.com> + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + +2010-04-22 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] Corrects symbols visibility for JavaScriptCore. + + https://bugs.webkit.org/show_bug.cgi?id=37867 + + * JavaScriptCore.pro: + +2010-04-22 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Use BLX and BX to keep happy the return stack predictor above ARMv4 + https://bugs.webkit.org/show_bug.cgi?id=37862 + + Inspired by Jacob Bramley's patch from JaegerMonkey + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + (JSC::ARMAssembler::bx): + (JSC::ARMAssembler::blx): + (JSC::ARMAssembler::loadBranchTarget): + (JSC::ARMAssembler::jmp): + (JSC::ARMAssembler::getLdrImmAddress): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::jump): + (JSC::MacroAssemblerARM::nearCall): + (JSC::MacroAssemblerARM::call): + (JSC::MacroAssemblerARM::ret): + (JSC::MacroAssemblerARM::prepareCall): + (JSC::MacroAssemblerARM::call32): + +2010-04-21 Andy Estes <aestes@apple.com> + + Rubber stamped by Mark Rowe. + + Export WTF::deleteOwnedPtr(HFONT). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-04-21 Gavin Barraclough <barraclough@apple.com> + + Rubber Stamped by Oliver Hunt. + + Make SmallStrings store an array of RefPtr<StringImpl>, + instead of a direct array of StringImpls. This allows + us to remove a friend (and a layering violation) from + WTF::StringImpl, and makes it so that all StringImpls + are individually heap allocated. + + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::rep): + (JSC::SmallStringsStorage::SmallStringsStorage): + * wtf/text/StringImpl.h: + +2010-04-21 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=37937 + Wean JavaScriptCore off calls to isMainThread() + + - Replace use of isMainThread() for interpreter reentry checks + with a stored value on the JSGlobalData. + - Replace use of isMainThread() for useMainThread only check in the + collector with a stored exclusive thread. + + * API/JSContextRef.cpp: + (JSContextGroupCreate): + Always default to a small stack type for uses of the JSC API. It is + unlikely that the interpreter reentry required on the web will be as + important for other uses of JavaScriptCore. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Update exports. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::prepareForRepeatCall): + Use new stored JSGlobalData::maxReentryDepth instead of isMainThread(). + + * interpreter/Interpreter.h: + Rename MaxMainThreadReentryDepth to MaxLargeThreadReentryDepth and + MaxSecondaryThreadReentryDepth to MaxSmallThreadReentryDepth. + + * jsc.cpp: + (main): Use the a large stack for jsc since it is always using the + main thread. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + Use new stored JSGlobalData::maxReentryDepth instead of isMainThread(). + + * runtime/Collector.cpp: + (JSC::Heap::registerThread): + Use the concept of making JSC run on an exclusiveThread instead of + forcing a mainThreadOnly assertion. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::createNonDefault): + (JSC::JSGlobalData::create): + (JSC::JSGlobalData::createLeaked): + (JSC::JSGlobalData::sharedInstance): + * runtime/JSGlobalData.h: + Add ThreadStackType argument to JSGlobalData constructors and set + maxReentryDepth based on it. + +2010-04-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix pt. 3). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-04-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix pt. 2). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-04-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Qt build fix). + + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * wtf/qt/StringQt.cpp: Copied from WebCore/platform/text/qt/StringQt.cpp. + +2010-04-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + * API/JSValueRef.cpp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * runtime/Identifier.cpp: + (JSC::IdentifierTable::~IdentifierTable): + (JSC::IdentifierTable::add): + * runtime/Identifier.h: + * wtf/WTFThreadData.h: + (JSC::IdentifierTable::remove): + (JSC::IdentifierTable::literalTable): + * wtf/text/StringImpl.cpp: + (WebCore::StringImpl::~StringImpl): + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt, Darin Adler. + + Bug 37906 - Remove JSC::UStringImpl; unify with StringImpl. + + JSC::UStringImpl and WebCore::StringImpl (soon to be renamed to + WTF::StringImpl) are almost identical. Remove duplication of code by unifying + the two, move missing features from UStringImpl into StringImpl & delete the + class UStringImpl. + + * API/JSClassRef.cpp: + * API/JSContextRef.cpp: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/EvalCodeCache.h: + * bytecode/JumpTable.cpp: + * profiler/ProfileNode.cpp: + * runtime/Identifier.cpp: + (JSC::Identifier::add): + * runtime/Identifier.h: + (JSC::Identifier::equal): + * runtime/UString.cpp: + * runtime/UString.h: + (WTF::): + * runtime/UStringImpl.cpp: Removed. + * runtime/UStringImpl.h: + * wtf/text/StringHash.h: + (WebCore::StringHash::equal): + (WebCore::CaseFoldingHash::equal): + * wtf/text/StringImpl.cpp: + (WebCore::StringImpl::~StringImpl): + (WebCore::StringImpl::empty): + (WebCore::StringImpl::sharedBuffer): + (WebCore::equal): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::StringImpl): + (WebCore::StringImpl::create): + (WebCore::StringImpl::tryCreateUninitialized): + (WebCore::StringImpl::cost): + (WebCore::StringImpl::isIdentifier): + (WebCore::StringImpl::setIsIdentifier): + (WebCore::StringImpl::computeHash): + (WebCore::StringImpl::copyChars): + (WebCore::StringImpl::): + +2010-04-21 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + Added missing #include "Lookup.h" in LUT source files. + https://bugs.webkit.org/show_bug.cgi?id=37903 + + * runtime/ArrayPrototype.cpp: + * runtime/DatePrototype.cpp: + * runtime/JSONObject.cpp: + * runtime/MathObject.cpp: + * runtime/NumberConstructor.cpp: + * runtime/RegExpConstructor.cpp: + * runtime/RegExpObject.cpp: + * runtime/StringPrototype.cpp: + +2010-04-21 Gustavo Sverzut Barbieri <barbieri@profusion.mobi> + + Reviewed by Nikolas Zimmermann. + + Add missing EFL JavaScriptCore file. + http://webkit.org/b/37854 + + * wtf/efl: Added. + * wtf/efl/MainThreadEfl.cpp: Added. + (WTF::initializeMainThreadPlatform): + (WTF::timeoutFired): + (WTF::scheduleDispatchFunctionsOnMainThread): + +2010-04-20 Xan Lopez <xlopez@igalia.com> + + Another attempt to fix the build. + + * GNUmakefile.am: + +2010-04-20 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + [ES5] RegExp literals are constants that should be persistent across multiple function calls. + https://bugs.webkit.org/show_bug.cgi?id=37908 + + Dump the separate RegExp constant pool, and just use the standard JS constant pool + in codeblock. This allows us to drop op_new_regexp and all associated code as well. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoad): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::RegExpNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + * jit/JITStubs.cpp: + * jit/JITStubs.h: + (JSC::): + +2010-04-20 Oliver Hunt <oliver@apple.com> + + Fix license on create_regex_tables + + * create_regex_tables: + +2010-04-20 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Fix gtk + + * GNUmakefile.am: + * make-generated-sources.sh: + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 37895 - Share common code from UStringImplBase with StringImpl + + The implementation of StringImpl & UStringImpl is very similar. Restructure + StringImpl to match UStringImpl, moving the flags and length into a base class, + so that this can be shared between both string types to increase code reuse. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RopeImpl.h: + (JSC::RopeImpl::RopeImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::UStringImpl): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::StringImpl): + (WebCore::StringImpl::characters): + * wtf/text/StringImplBase.h: Copied from JavaScriptCore/runtime/UStringImpl.h. + (WTF::StringImplBase::length): + (WTF::StringImplBase::operator new): + (WTF::StringImplBase::StringImplBase): + +2010-04-20 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Autogenerate yarr character tables + https://bugs.webkit.org/show_bug.cgi?id=37877 + + Use a python script to automatically generate character tables + for the builtin YARR character classes. This allows us to generate + actual tables as well, by using these tables we can both increase + performance of the check (for complex builtins) and reduce the actual + code size. + + 4-8% win on string-unpack-code, but lots of noise on other tests so + i'm only confident saying its a 1% win overall. + + * DerivedSources.make: + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::ExtendedAddress::ExtendedAddress): + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::branchTest8): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::branchTest8): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::branchTest8): + * assembler/X86Assembler.h: + (JSC::X86Assembler::cmpb_im): + (JSC::X86Assembler::testb_im): + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::dump): + * create_regex_tables: Added. + * yarr/RegexCompiler.cpp: + (JSC::Yarr::CharacterClassConstructor::charClass): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::matchCharacterClass): + (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): + (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): + (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): + * yarr/RegexPattern.h: + (JSC::Yarr::CharacterClassTable::create): + (JSC::Yarr::CharacterClassTable::CharacterClassTable): + (JSC::Yarr::CharacterClass::CharacterClass): + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (speculative windows fix - missed a bit!). + + * wtf/text/AtomicString.h: + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (speculative windows fix). + + * wtf/text/AtomicString.h: + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + Add missing .def file entries. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 37869 - Move URopeImpl to its own .h/.cpp + + Currently Ropes are implemented by the class URopeImpl, which is defined in + UStringImpl.h, and then typedefed to the name JSString::Rope. Remove the + typedef, and rename all uses of URopeImpl and JSString::Rope to just RopeImpl. + + Move RopeImpl to its own header, and remove all remaining references to ropes + from UStringImpl (rename UStringOrRopeImpl to UStringImplBase, rename or move + the isRope & deref methods from UStringOrRopeImpl). + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/JSString.h: + (JSC::): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::~JSString): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::JSStringFinalizerStruct::): + * runtime/RopeImpl.cpp: Copied from JavaScriptCore/runtime/UStringImpl.cpp. + (JSC::RopeImpl::derefFibersNonRecursive): + (JSC::RopeImpl::destructNonRecursive): + * runtime/RopeImpl.h: Copied from JavaScriptCore/runtime/UStringImpl.h. + (JSC::RopeImpl::tryCreateUninitialized): + (JSC::RopeImpl::isRope): + (JSC::RopeImpl::deref): + (JSC::RopeImpl::RopeImpl): + * runtime/UStringImpl.cpp: + * runtime/UStringImpl.h: + (JSC::UStringImplBase::isInvalid): + (JSC::UStringImplBase::ref): + (JSC::UStringImplBase::UStringImplBase): + (JSC::UStringImplBase::): + (JSC::UStringImpl::UStringImpl): + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 37828 - Move WebCore's String classes to WTF + + Move these classes up to WTF so they are available to all clients of WTF (in + particular JSC). + + As a first patch, making the most minimal change possible, since this patch + could easily grow rather large since we'll have to change every class forward + declaration ( e.g. every "namespace WebCore { class String; }" much change to + "namespace WTF { class String; }"). + + Moving the files, but leaving the classes logically in the WebCore namespace - + which is technically a layering violation - I'll come back and fix this up in a + subsequent patch. + + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * config.h: + * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h. + * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp. + * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h. + * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h. + * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h. + * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h. + * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp. + * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h. + * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp. + (WebCore::charactersToFloat): + * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h. + +2010-04-20 Csaba Osztrogonác <ossy@webkit.org> + + [Qt] Unreviewed speculative buildfix for WinCE after r57882 + https://bugs.webkit.org/show_bug.cgi?id=37701 + + * JavaScriptCore.pri: missing wince* case added. + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (build fix). + Speculative Chromium/Win build fix, attempt #2. + + * config.h: + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (build fix). + Speculative Chromium/Win build fix. + + * config.h: JS_EXPORTDATA should do nothing on !JSC builds. + +2010-04-20 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Target(WebCore,jsc,...) must depends on static library of JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=37701 + + * JavaScriptCore.pri: dependency added. + +2010-04-20 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Maciej Stachowiak (relanding r57829). + Added missing JS_EXPORTDATA + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): + * API/JSContextRef.cpp: + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Identifier.cpp: + (JSC::Identifier::remove): + (JSC::Identifier::checkCurrentIdentifierTable): + * runtime/Identifier.h: + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::create): + * wtf/WTFThreadData.cpp: Copied from JavaScriptCore/wtf/WTFThreadData.cpp. + * wtf/WTFThreadData.h: Copied from JavaScriptCore/wtf/WTFThreadData.h. + +2010-04-19 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (rolling out r57829). + This broke windows. + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): + * API/JSContextRef.cpp: + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Identifier.cpp: + (JSC::Identifier::remove): + (JSC::Identifier::checkCurrentIdentifierTable): + (JSC::createIdentifierTableSpecificCallback): + (JSC::createIdentifierTableSpecific): + * runtime/Identifier.h: + (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData): + (JSC::defaultIdentifierTable): + (JSC::setDefaultIdentifierTable): + (JSC::currentIdentifierTable): + (JSC::setCurrentIdentifierTable): + (JSC::resetCurrentIdentifierTable): + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::create): + * wtf/WTFThreadData.cpp: Removed. + * wtf/WTFThreadData.h: Removed. + +2010-04-19 Douglas Gregor <dgregor@apple.com> + + Reviewed and landed by Anders Carlsson. + + * runtime/UStringImpl.h: + Fix class/struct declaration mismatches. + +2010-04-19 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Beth Dakin. + + Checked in these tests I wrote becuase Balazs Kelemen wanted to use them. + + * tests/perf: Added. + * tests/perf/bench-allocate-nonretained.js: Added. + * tests/perf/bench-allocate-retained.js: Added. + +2010-04-19 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-04-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=37745 + Move string uniquing tables to (new) WTFThreadData class. + + Remove AtomicString's dependency on ThreadGlobalData so that we can move + WebCore's string classes up to WTF. + + WTFThreadData.cpp/.h are based on ThreadGlobalData from WebCore. + Moved JSC & WebCore's string uniquing tables to this class. + + This patch introduces a temporary layering violation in providing forward + declarations of classes from JSC and WTF; this will be resolved as we move + more string code up to WTF. + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): + * API/JSContextRef.cpp: + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Identifier.cpp: + (JSC::Identifier::remove): + (JSC::Identifier::checkCurrentIdentifierTable): + * runtime/Identifier.h: + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::create): + * wtf/WTFThreadData.cpp: Copied from WebCore/platform/ThreadGlobalData.cpp. + (WTF::WTFThreadData::WTFThreadData): + (WTF::WTFThreadData::~WTFThreadData): + * wtf/WTFThreadData.h: Copied from WebCore/platform/ThreadGlobalData.h. + (WTF::WTFThreadData::atomicStringTable): + (WTF::WTFThreadData::initializeIdentifierTable): + (WTF::WTFThreadData::currentIdentifierTable): + (WTF::WTFThreadData::setCurrentIdentifierTable): + (WTF::WTFThreadData::resetCurrentIdentifierTable): + (WTF::wtfThreadData): + +2010-04-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Build fix for WinCE. + + Moved the include of the non-existing errno.h header file inside + platform guard macros. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + +2010-04-18 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Laszlo Gombos. + + [WINCE] Don't define WTF_CPU_MIDDLE_ENDIAN=1 + https://bugs.webkit.org/show_bug.cgi?id=37434 + + Windows CE supports little-endian format only, so don't define + WTF_CPU_MIDDLE_ENDIAN=1. + + * wtf/Platform.h: + +2010-04-18 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Fix JavaScriptCore's include path for WinCE builds + + https://bugs.webkit.org/show_bug.cgi?id=36751 + + * JavaScriptCore.pri: + +2010-04-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by nobody, build fix. + +2010-04-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by nobody, build fix. + +2010-04-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 37730 - Remove JSC::UString dependencies from WebCore::StringImpl + (Following on from bug #37675). + + Make the argument ordering for UStringImpl's constructor & create + methods match, when passed a shared buffer. + + * JavaScriptCore.exp: + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::create): + * runtime/UStringImpl.h: + +2010-04-15 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix memory leak in QScriptEngine::evaluate(). + + QScriptEnginePrivate::evaluate should release temporary variables. + + [Qt] QScriptEngine::evaluate has memory leak. + https://bugs.webkit.org/show_bug.cgi?id=37596 + + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::evaluate): + * qt/api/qscriptengine_p.h: + +2010-04-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix a memory leak in QScriptValue::inherits. + + [Qt] QScriptValue::inherits has a memory leak. + https://bugs.webkit.org/show_bug.cgi?id=37617 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::inherits): + +2010-04-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix a few memory leaks in QScriptEngine. + + Syntax checking caused memory leak, not all temporary variables were released. + + [Qt] Syntax checking in the QtScript cause a memory leak. + https://bugs.webkit.org/show_bug.cgi?id=37610 + + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::checkSyntax): + * qt/api/qscriptsyntaxcheckresult.cpp: + (QScriptSyntaxCheckResultPrivate::errorMessage): + (QScriptSyntaxCheckResultPrivate::errorLineNumber): + +2010-04-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix memory leak inside QScriptEnginePrivate::makeJSValue. + + QScriptEnginePrivate::makeJSValue should release temporary JSStringRef variable. + + [Qt] tst_QScriptValue::toString has a memory leak. + https://bugs.webkit.org/show_bug.cgi?id=37598 + + * qt/api/qscriptengine_p.h: + (QScriptEnginePrivate::makeJSValue): + +2010-04-14 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Geoffrey Garen. + + Move the YARR JIT fallback detection from RegexJIT.cpp to + RegexCompiler.cpp. + + https://bugs.webkit.org/show_bug.cgi?id=37571 + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::operator!): + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): + +2010-04-14 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Maciej Stachowiak. + + Mac OS X: Use deployment target to determine whether memory tagging should be enabled + https://bugs.webkit.org/show_bug.cgi?id=34888 + + When building on (Snow) Leopard but targeting Tiger + (TARGETING_TIGER defined, BUILDING_ON_TIGER not defined), + WebKit would crash on Tiger because the tags passed to mmap + caused those function calls to fail. + + Conversely, when building on Tiger but targeting Leopard + (BUILDING_ON_TIGER defined, TARGETING_LEOPARD defined), WebKit + would crash on Leopard because the tags passed to vm_map and + vm_allocate caused those function calls to fail. + + Solution: Use TARGETING_TIGER rather than BUILDING_ON_TIGER to + govern the tag definitions. Use the same tags for vm_map and + vm_allocate regardless of target, since they work on + both. Fall back to the mmap tags that work on Tiger (that is, + "no tags") if targeting Tiger, since those tags also work on + Leopard. + + * wtf/VMTags.h: + +2010-04-12 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by nobody, build fix. + + [Qt] Build fix for Mac when building with build-webkit --qt + + Specifying no configuration on Mac builds WebCore both in debug + and release. JavaScriptCore has to follow this rule as well. + + * JavaScriptCore.pro: + +2010-04-11 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/7851332> Fix the build. + + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::): Initialize extra members of malloc_introspection_t to zero. + +2010-04-09 Mikhail Naganov <mnaganov@chromium.org> + + Reviewed by Pavel Feldman. + + Make CallIdentifier constructor to handle null urls. + + https://bugs.webkit.org/show_bug.cgi?id=37341 + + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::CallIdentifier): + +2010-04-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix crashes with package builds in release + + Add NDEBUG to the defines for package build in JavaScriptCore.pri, + so that it's consistently used for JavaScriptCore, WebCore, jsc and all + other tools using wtf, etc. data structures directly. Mixing NDEBUG with + non-NDEBUG builds causes crashes due to differences in data structures when + assertions/checks are enabled. + + * JavaScriptCore.pri: + +2010-04-09 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + Implement NO_RETURN for COMPILER(MSVC). + https://bugs.webkit.org/show_bug.cgi?id=33056 + + Added NO_RETURN_WITH_VALUE for functions with non-void return type. + + * jsc.cpp: + * wtf/AlwaysInline.h: + * wtf/FastMalloc.cpp: + +2010-04-08 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Simon Hausmann. + + [WINCE] Check if ARM or _ARM_ is defined + https://bugs.webkit.org/show_bug.cgi?id=37200 + + MSVC defines ARM and _ARM_ for Windows CE ARM. Define WTF_CPU_ARM=1 + when either ARM or _ARM_ is defined. + + * wtf/Platform.h: + +2010-04-08 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed Oliver Hunt. + + [Qt]r57240 broke Qt build (might be a gcc bug) + https://bugs.webkit.org/show_bug.cgi?id=37253 + + Workaround until fix. On PLATFORM(QT) use inline instead of ALWAYS_INLINE. + + * wtf/PassRefPtr.h: Qt guards added. + +2010-04-07 Oliver Hunt <oliver@apple.com> + + Reviewed by Anders Carlsson. + + Vector<UString> makes many needless calls to UString::UString and UString::~UString + + Add a VectorTrait<UString> specialisation to allow vector to simply memset/memcpy + data around. Only difference from the VectorTrait<RefPtr<T> > traits is the inability + to use memset to initialize data. + + * runtime/UString.h: + (WTF::): + +2010-04-07 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Beat gcc with a clue bat -- force inlining of refIfNotNull and derefIfNotNull + + * wtf/PassRefPtr.h: + +2010-04-07 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + Replace isprint with isASCIIPrintable + https://bugs.webkit.org/show_bug.cgi?id=37223 + + WebKit does not use functions in <ctype.h> as they are dependent on the current + locale. Use the equivalent functions in <wtf/ASCIICType.h>. isASCIIPrintable + replaces isprint. + + * pcre/pcre_exec.cpp: + (pchars): + +2010-04-07 Enrica Casucci <enrica@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=37219 + + This change disables text caret for the iPhone platflorm. + + * wtf/Platform.h: Disabled text caret for iPhone. + +2010-04-06 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + REGRESSION: Worker termination via JS timeout may cause worker tests like fast/workers/worker-terminate.html fail. + https://bugs.webkit.org/show_bug.cgi?id=36646 + + Add a new exception type for forcibly terminating a JavaScript stack. + The new exception functions similarly to the + InterruptedExecutionException but is conceptually different because + execution is terminated instead of just interrupted. + + * GNUmakefile.am: + - Added new Terminator.h file. + * JavaScriptCore.gypi: + - Added new Terminator.h file. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + - Added new Terminator.h file. + * JavaScriptCore.xcodeproj/project.pbxproj: + - Added new Terminator.h file. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + - Fully unwind the stack for TerminatedExecutionException. + (JSC::Interpreter::privateExecute): + - Check if we've been terminated at the same time we check if we've + timed out. + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + - Check if we've been terminated at the same time we check if we've + timed out. + * runtime/Completion.cpp: + - Some exceptions define special completion types so that calls can + see why we terminated evaluation. + (JSC::evaluate): + * runtime/Completion.h: + - Define a new completion type for termination. + (JSC::): + * runtime/ExceptionHelpers.cpp: + - Define TerminatedExecutionException and refactor pseudo-RTTI + virtual function to be more semantic. + (JSC::InterruptedExecutionError::exceptionType): + (JSC::TerminatedExecutionError::TerminatedExecutionError): + (JSC::TerminatedExecutionError::exceptionType): + (JSC::TerminatedExecutionError::toString): + (JSC::createTerminatedExecutionException): + * runtime/ExceptionHelpers.h: + - Entry point for generating a TerminatedExecutionException. + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + - Add a Terminator object that can be used to asynchronously + terminate a JavaScript execution stack. + * runtime/JSGlobalData.h: + * runtime/JSObject.h: + (JSC::JSObject::exceptionType): + - Define that, by default, thrown objects have a normal exception + type. + * runtime/Terminator.h: Added. + - Added a new controller object that can be used to terminate + execution asynchronously. This object is more or less a + glorified bool. + (JSC::Terminator::Terminator): + (JSC::Terminator::termianteSoon): + (JSC::Terminator::shouldTerminate): + +2010-04-05 Oliver Hunt <oliver@apple.com> + + And another one. + + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + +2010-04-05 Oliver Hunt <oliver@apple.com> + + And another build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2010-04-05 Oliver Hunt <oliver@apple.com> + + Build fix + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2010-04-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Support weak maps in JSC + https://bugs.webkit.org/show_bug.cgi?id=37132 + + Expose an API to allow creation of a map for storing + weak JS references. + + * API/JSWeakObjectMapRefInternal.h: Added. + (OpaqueJSWeakObjectMap::create): + (OpaqueJSWeakObjectMap::map): + (OpaqueJSWeakObjectMap::~OpaqueJSWeakObjectMap): + (OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap): + * API/JSWeakObjectMapRefPrivate.cpp: Added. + * API/JSWeakObjectMapRefPrivate.h: Added. + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::registerWeakMap): + (JSC::JSGlobalObject::deregisterWeakMap): + +2010-04-05 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Symbian] Consolidate Symbian WINSCW environment configuration + https://bugs.webkit.org/show_bug.cgi?id=37100 + + Move the "undefinition" of WIN32 and _WIN32 from WebCore/config.h + to JavaScriptCore/wtf/Platform.h as it is not specific to WebCore. + + PLATFORM(WIN) and OS(WIN) no longer needs to be undefined as + undefining WIN32 takes care of it. + + * wtf/Platform.h: + +2010-04-03 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=37068 + Change UString to use a 0 rep for null strings instead of a null object. + + No performance impact. + + * JavaScriptCore.exp: + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + * runtime/UString.cpp: + (JSC::initializeUString): + * runtime/UString.h: + (JSC::UString::UString): + (JSC::UString::data): + (JSC::UString::size): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::cost): + +2010-04-03 Balazs Kelemen <kb@inf.u-szeged.hu> + + Reviewed by Oliver Hunt. + + Fix uninitalised members in CallLinkInfo and BytecodeGenerator. + + https://bugs.webkit.org/show_bug.cgi?id=36816 + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::CallLinkInfo): + +2010-04-03 yael aharon <yael.aharon@nokia.com> + + Reviewed by Darin Adler. + + Enable HTMLProgressElement for Safari on OSX + https://bugs.webkit.org/show_bug.cgi?id=36961 + + * Configurations/FeatureDefines.xcconfig: + +2010-04-02 Ruben Van Boxem <vanboxem.ruben@gmail.com> + + Reviewed by Eric Seidel. + + Mingw-w64 fixes for JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=35607 + + * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32) + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlockPtr): + (JSC::currentThreadStackBase): + (JSC::currentThreadStackBase): + * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions + +2010-04-02 Geoffrey Garen <ggaren@apple.com> + + Build fix: updated the .def file. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-04-02 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Inlined toThisString and toThisJSString to avoid virtual function call overhead + https://bugs.webkit.org/show_bug.cgi?id=37039 + + Maybe a 1% speedup on iBench JS. + + * JavaScriptCore.exp: New exports. + + * runtime/JSCell.cpp: + * runtime/JSCell.h: + * runtime/JSNumberCell.cpp: + * runtime/JSNumberCell.h: + * runtime/JSString.cpp: + * runtime/JSString.h: + * runtime/JSValue.h: + * runtime/JSZombie.h: + (JSC::JSZombie::toThisObject): Nixed the old virtual-type implementation. + + * runtime/JSObject.h: + (JSC::JSValue::toThisString): + (JSC::JSValue::toThisJSString): Added the inlined implementation. + +2010-04-02 Jeremy Moskovich <jeremy@chromium.org> + + Reviewed by Geoffrey Garen. + + Beef up documentation for ASSERT* and CRASH macros a bit. + + https://bugs.webkit.org/show_bug.cgi?id=36527 + + * wtf/Assertions.h: + +2010-04-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed, minor build fix. + + Change the order of the member initialisation list + in constructor to match declaration order + + * runtime/Collector.cpp: + (JSC::Heap::Heap): + +2010-04-01 Kinuko Yasuda <kinuko@chromium.org> + + Reviewed by Dmitry Titov. + + Add FileThread for async file operation support in FileReader and FileWriter + https://bugs.webkit.org/show_bug.cgi?id=36896 + + Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags. + + * Configurations/FeatureDefines.xcconfig: + +2010-03-31 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix pt II). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-31 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-31 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 36871 - Remove JSC::CString + Use WTF::CString instead (which until recently was WebCore::CString). + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/UString.cpp: + * runtime/UString.h: + +2010-03-31 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed, fix after r56842. + + Add UNUSED_PARAM a to silence warning. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2010-03-31 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed, Symbian build fix. + + Refactor JITStubs.cpp so that the list of STUB_FUNCTIONs + are not dependent on the JSVALUE32_64 guard. + + * jit/JITStubs.cpp: Place the JSVALUE32_64 guard inside + the body of cti_op_eq_strings. + * jit/JITStubs.h: Remove JSVALUE32_64 guard from + cti_op_eq_strings stub. + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + Fixing b0rked version of JavaScriptCore.vcproj - added lines were truncated. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2010-03-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=36866 + Move CString to WTF + + * Android.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text: Added. + * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp. + * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h. + (WTF::CStringBuffer::data): + (WTF::CStringBuffer::length): + (WTF::CStringBuffer::create): + (WTF::CStringBuffer::CStringBuffer): + (WTF::CStringBuffer::mutableData): + (WTF::CString::CString): + (WTF::CString::isNull): + (WTF::CString::buffer): + (WTF::operator!=): + +2010-03-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by nobody, build break. + + [Qt] Fix build break on Qt Mac. + + DESTDIR path on Mac do not include the configuration path by default + like on Windows. Have to force it. + + * JavaScriptCore.pro: + +2010-03-29 Alice Liu <alice.liu@apple.com> + + Reviewed by NOBODY (build fix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + add JSObjectRefPrivate.h + +2010-03-29 Chao-ying Fu <fu@mips.com> + + Reviewed by Oliver Hunt. + + MIPS JIT Supports + https://bugs.webkit.org/show_bug.cgi?id=30144 + + The following changes enable MIPS JIT. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::lbu): + (JSC::MIPSAssembler::linkWithOffset): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::load8): + (JSC::MacroAssemblerMIPS::branch8): + (JSC::MacroAssemblerMIPS::branchTest8): + (JSC::MacroAssemblerMIPS::setTest8): + (JSC::MacroAssemblerMIPS::setTest32): + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::preserveReturnAddressAfterCall): + (JSC::JIT::restoreReturnAddressBeforeReturn): + * jit/JITOpcodes.cpp: + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITStubs.h: + (JSC::JITStackFrame::returnAddressSlot): + * wtf/Platform.h: + +2010-02-26 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Fraser. + + Add support for Widgets 1.0: View Mode Media Feature + https://bugs.webkit.org/show_bug.cgi?id=35446 + + Add an enable flag for the Widgets (http://www.w3.org/TR/widgets-reqs/) + and turn it on for Qt only. + + * wtf/Platform.h: + +2010-03-29 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + Corrected name of (u)int64_t compile time assert. + https://bugs.webkit.org/show_bug.cgi?id=36739 + + int64_t_is_four_bytes -> int64_t_is_eight_bytes + + * os-win32/stdint.h: + +2010-03-29 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Use the -l syntax for linking against JavaScriptCore on Windows. + This allow qmake to extract dependencies correctly when generating VS + solutions. + + * JavaScriptCore.pri: + +2010-03-29 Thomas Zander <t.zander@nokia.com> + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=36742 + + gcc for Symbian doesn't support gcc extensions like atomicity.h - disable + + * wtf/Threading.h: also detect os symbian + +2010-03-28 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Remove the definition of WTF_CHANGES guards from the build system + https://bugs.webkit.org/show_bug.cgi?id=31670 + + * JavaScriptCore.pro: Remove the definition of WTF_CHANGES + as it is already defined in config.h + +2010-03-28 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Add API for reporting additional memory cost of JavaScript objects + https://bugs.webkit.org/show_bug.cgi?id=36650 + + * qt/api/qscriptengine.cpp: + (QScriptEngine::reportAdditionalMemoryCost): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.h: + (QScriptEnginePrivate::reportAdditionalMemoryCost): + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::reportAdditionalMemoryCost): + +2010-03-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + QScriptEngine API was enriched by globalObject() method + which give an access to the global object. + + [Qt] QScriptEngine doesn't give an access to global object + https://bugs.webkit.org/show_bug.cgi?id=36603 + + * qt/api/qscriptengine.cpp: + (QScriptEngine::globalObject): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::globalObject): + * qt/api/qscriptengine_p.h: + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::globalObject): + +2010-03-26 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Build JavaScriptCore as a static library. + https://bugs.webkit.org/show_bug.cgi?id=36590 + + This patch takes what was left of the unused JavaScriptCore.pro + and moved the compilation logic from JavaScriptCore.pri to + JavaScriptCore.pro. + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + * jsc.pro: + * qt/api/QtScript.pro: + +2010-03-25 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (build fix). + + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + +2010-03-25 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 36611 - Cleanup JSC::CString + Rename CString::c_str() -> CString::data(), CString::size() -> CString::length(), + remove UString::getCString() (all uses are wrong, should use UString::UTF8String()). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printUnaryOp): + (JSC::CodeBlock::printBinaryOp): + (JSC::CodeBlock::printConditionalJump): + (JSC::CodeBlock::printGetByIdOp): + (JSC::CodeBlock::printPutByIdOp): + (JSC::printGlobalResolveInfo): + (JSC::printStructureStubInfo): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::dump): + * jsc.cpp: + (functionPrint): + (functionDebug): + (runInteractive): + (fillBufferWithContentsOfFile): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::c_str): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/DateConversion.cpp: + (JSC::parseDate): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::globalFuncJSCPrint): + * runtime/UString.cpp: + (JSC::operator==): + (JSC::UString::toDouble): + * runtime/UString.h: + (JSC::CString::length): + (JSC::CString::data): + +2010-03-25 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by nobody, build fix. + + [Qt] Build fix on MSVC. Reverts r55633 for stdint.h + + This file gets included in generated moc files which don't + include the prefix header. + + * os-win32/stdint.h: + +2010-03-24 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + +2010-03-24 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Switch String::latin1, String::utf8, String::fromUTF8 to + use WTF's Unicode conversion methods rather than TextEncoder. + These methods only perform simple conversion, and don't need + really require TextEncoder's full capability (to look up arbitrary + encodings by name), switching to only be dependent on WTF will + make it easier if we chose to move WebCore::String to WTF. + + * JavaScriptCore.exp: + +2010-03-24 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoff Garen. + + * wtf/FastMalloc.h: Added a using directive for fastMallocSize, like we do for all public + WTF symbols. Also sorted the list alphabetically. + +2010-03-23 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (speculative windows build fix part II). + +2010-03-23 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (speculative windows build fix). + +2010-03-23 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 36519 - JSGlobalContextRelease is unnecessarily slow + + Since [ http://trac.webkit.org/changeset/35917 ], calling + JSGlobalContextRelease always triggers a GC heap collection + (if not a full destroy). As per 35917's changelog "This is + only really necessary when the (JSGlobalObject's) last + reference is released, but there is no way to determine that, + and no harm in collecting slightly more often." + + Well, we now know of cases of API clients who are harmed by + the performance penalty of collecting too often, so it's time + to add a way to determine whether a call to JSGlobalContextRelease + is removing the last protect from it's global object. If further + protects are retaining the global object (likely from other + JSGlobalContextRefs), then don't trigger a GC collection. + + * API/JSContextRef.cpp: + * runtime/Collector.cpp: + (JSC::Heap::unprotect): return a boolean indicating that the value is now unprotected. + * runtime/Collector.h: + * wtf/HashCountedSet.h: + (WTF::::remove): return a boolean indicating whether the value was removed from the set. + +2010-03-23 Mark Rowe <mrowe@apple.com> + + Build fix. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): Some versions of GCC emit a warning about the implicit 64- to 32-bit truncation + that takes place here. An explicit cast is sufficient to silence it. + +2010-03-23 Alexey Proskuryakov <ap@apple.com> + + Build fix. + + * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): Fixed a typo - length doesn't + need to be converted with toInteger(). + +2010-03-23 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=36511 + <rdar://problem/7753498> Safari freezes when using SPUTNIK JavaScript conformance check + + Test: fast/js/sputnik-S15.4.4.12_A3_T3.html + + * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): We were incorrectly computing + the start offset, and iterated over (almost) all integers. Note that this can be fixed + without using doubles, but the code would be much more complicated, and there is no important + reason to stick to integers here. + +2010-03-23 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Darin Adler. + + Fix compilation on Itanium in 32-bit mode + https://bugs.webkit.org/show_bug.cgi?id=36494 + + * wtf/Platform.h: Introduce CPU(IA64_32). Don't define + WTF_USE_JSVALUE64 if the CPU is in 32-bit mode. + +2010-03-23 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Mark Rowe. + + Interpreter fix for <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648) + evaluates to -2147483648 on 32 bit (35842) + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Only take the fast negate path if + a bit other than bit 31 is set. If none of bits 0-30 are set, then the + value we're negating can only be 0 or -2147483648, and neither can be + negated in int space. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): + (JSC::JIT::emitSlow_op_negate): Updated the JIT implementation to match + the interpreter, since it's slightly simpler. + +2010-03-22 Siddharth Mathur <siddharth.mathur@nokia.com> + + Reviewed by Laszlo Gombos. + + [Symbian] More efficient aligned memory allocation for JSC Collector + https://bugs.webkit.org/show_bug.cgi?id=34350 + + * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage + + * runtime/Collector.cpp: Reduced port-specific code and added private data member + (JSC::Heap::Heap): + (JSC::Heap::~Heap): + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlockPtr): + + * runtime/Collector.h: Added private data member + + * wtf/symbian: Added. + * wtf/symbian/BlockAllocatorSymbian.cpp: Added. + (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate + aligned blocks more efficiently as required by Collector + (WTF::AlignedBlockAllocator::alloc): + (WTF::AlignedBlockAllocator::free): + (WTF::AlignedBlockAllocator::destroy): + (WTF::AlignedBlockAllocator::~AlignedBlockAllocator): + * wtf/symbian/BlockAllocatorSymbian.h: Added. + +2010-03-22 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Fixed <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648) + evaluates to -2147483648 on 32 bit (35842) + + Two ways to fix the same bug: + + 1. Check for overflow when negating, since negating the largest negative + int causes overflow. + + 2. Constant-fold even when negating a negative, since, like they say in + high school, "math works." + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::branchNeg32): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::branchNeg32): Added a branching version + of the negate operator. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): Use the branching version of the negate + operator to check for overflow. + + (JSC::JIT::emitSlow_op_negate): Link the check for overflow to a slow case. + (We could emit inline code for this, since we know what the result would + be, but that's probably just a waste of generated code.) + + * parser/Grammar.y: Constant fold even when negating a negative. + +2010-03-22 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/36431> Clean up 'int' use in UString.cpp after r54789 + + Reviewed by Darin Adler. + + * runtime/UString.cpp: + (JSC::UString::from): Changed argument type from 'unsigned int' + to 'unsigned' to match WebKit coding style. + (JSC::UString::find): Changed static_cast<int>() to + static_cast<unsigned>() now that this method returns unsigned. + (JSC::UString::rfind): Ditto. + * runtime/UString.h: + (JSC::UString::from): Changed argument type from 'unsigned int' + to 'unsigned' to match WebKit coding style. + +2010-03-22 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Add support for syntax checking in the QtScript API. + + New class was created; the QScriptSyntaxCheckResult which main + responsibility is to provide results of the ECMA Script code + syntax check. The class is not fully functional as the JSC C API + doesn't expose an error column number, but it is a good start point + for a future development. + + [Qt] QtScript functionality should be extended by syntax checking. + https://bugs.webkit.org/show_bug.cgi?id=36123 + + * qt/api/QtScript.pro: + * qt/api/qscriptengine.cpp: + (QScriptEngine::checkSyntax): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::checkSyntax): + * qt/api/qscriptengine_p.h: + * qt/api/qscriptsyntaxcheckresult.cpp: Added. + (QScriptSyntaxCheckResult::QScriptSyntaxCheckResult): + (QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult): + (QScriptSyntaxCheckResult::operator=): + (QScriptSyntaxCheckResult::state): + (QScriptSyntaxCheckResult::errorLineNumber): + (QScriptSyntaxCheckResult::errorColumnNumber): + (QScriptSyntaxCheckResult::errorMessage): + * qt/api/qscriptsyntaxcheckresult.h: Added. + * qt/api/qscriptsyntaxcheckresult_p.cpp: Added. + (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate): + (QScriptSyntaxCheckResultPrivate::errorMessage): + (QScriptSyntaxCheckResultPrivate::errorLineNumber): + * qt/api/qscriptsyntaxcheckresult_p.h: Added. + (QScriptSyntaxCheckResultPrivate::get): + (QScriptSyntaxCheckResultPrivate::QScriptSyntaxCheckResultPrivate): + (QScriptSyntaxCheckResultPrivate::state): + (QScriptSyntaxCheckResultPrivate::errorColumnNumber): + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::checkSyntax_data): + (tst_QScriptEngine::checkSyntax): + +2010-03-21 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + New class; QScriptProgram. + + The class should be used to evaluate the same script multiple times + more efficiently. + + [Qt] QtScript should have QScriptProgram class + https://bugs.webkit.org/show_bug.cgi?id=36008 + + * qt/api/QtScript.pro: + * qt/api/qscriptengine.cpp: + (QScriptEngine::evaluate): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::evaluate): + * qt/api/qscriptengine_p.h: + (QScriptEnginePrivate::evaluate): + * qt/api/qscriptprogram.cpp: Added. + (QScriptProgram::QScriptProgram): + (QScriptProgram::~QScriptProgram): + (QScriptProgram::operator=): + (QScriptProgram::isNull): + (QScriptProgram::sourceCode): + (QScriptProgram::fileName): + (QScriptProgram::firstLineNumber): + (QScriptProgram::operator==): + (QScriptProgram::operator!=): + * qt/api/qscriptprogram.h: Added. + * qt/api/qscriptprogram_p.h: Added. + (QScriptProgramPrivate::get): + (QScriptProgramPrivate::QScriptProgramPrivate): + (QScriptProgramPrivate::~QScriptProgramPrivate): + (QScriptProgramPrivate::isNull): + (QScriptProgramPrivate::sourceCode): + (QScriptProgramPrivate::fileName): + (QScriptProgramPrivate::firstLineNumber): + (QScriptProgramPrivate::operator==): + (QScriptProgramPrivate::operator!=): + (QScriptProgramPrivate::program): + (QScriptProgramPrivate::file): + (QScriptProgramPrivate::line): + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::evaluateProgram): + +2010-03-21 David Kilzer <ddkilzer@apple.com> + + Blind attempt #2 to fix the Windows build after r56314 + + * API/tests/testapi.c: Include JSObjectRefPrivate.h for the new + methods instead of declaring them locally (and non-extern). + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Backed out previous change. + +2010-03-21 David Kilzer <ddkilzer@apple.com> + + Blind attempt to fix the Windows build after r56314 + + Try to fix the following errors on the Windows buildbot: + + Linking... + testapi.obj : error LNK2001: unresolved external symbol "bool __cdecl JSObjectSetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *,struct OpaqueJSValue const *)" (?JSObjectSetPrivateProperty@@YA_NPBUOpaqueJSContext@@PAUOpaqueJSValue@@PAUOpaqueJSString@@PBU2@@Z) + testapi.obj : error LNK2001: unresolved external symbol "struct OpaqueJSValue const * __cdecl JSObjectGetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *)" (?JSObjectGetPrivateProperty@@YAPBUOpaqueJSValue@@PBUOpaqueJSContext@@PAU1@PAUOpaqueJSString@@@Z) + C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\bin\testapi.exe : fatal error LNK1120: 2 unresolved externals + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added + missing symbols to be exported. + +2010-03-21 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Documentation fix for previous patch. + + * API/JSObjectRefPrivate.h: + +2010-03-20 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + JSC needs an API to allow custom objects to have aprivate GC-accessible properties + https://bugs.webkit.org/show_bug.cgi?id=36420 + + Add new API methods to support "private" properties on custom + objects. + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::JSCallbackObjectData): + (JSC::JSCallbackObjectData::~JSCallbackObjectData): + (JSC::JSCallbackObjectData::getPrivateProperty): + (JSC::JSCallbackObjectData::setPrivateProperty): + (JSC::JSCallbackObjectData::deletePrivateProperty): + (JSC::JSCallbackObjectData::markChildren): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): + (JSC::JSCallbackObject::getPrivateProperty): + (JSC::JSCallbackObject::setPrivateProperty): + (JSC::JSCallbackObject::deletePrivateProperty): + (JSC::JSCallbackObject::markChildren): + * API/JSObjectRef.cpp: + (JSObjectGetPrivateProperty): + (JSObjectSetPrivateProperty): + (JSObjectDeletePrivateProperty): + * API/JSObjectRefPrivate.h: Added. + * API/tests/testapi.c: + (main): + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-03-20 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fixes after introduction of Brew files. + + * wscript: + +2010-03-18 Tom Callaway <tcallawa@redhat.com> + + Reviewed by Darin Adler. + + Bug 35429: Fix compile on SPARC64 + https://bugs.webkit.org/show_bug.cgi?id=35429 + + * wtf/Platform.h: Set WTF_USE_JSVALUE64 for SPARC64 + +2010-03-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Add API to directly expose JSON parsing + https://bugs.webkit.org/show_bug.cgi?id=34887 + + Add API to expose JSON parsing directly, and add tests to testapi + + * API/JSValueRef.cpp: + (JSValueMakeFromJSONString): + (JSValueCreateJSONString): + * API/tests/testapi.c: + (main): + * JavaScriptCore.exp: + * runtime/JSONObject.cpp: + (JSC::JSONStringify): + * runtime/JSONObject.h: + +2010-03-16 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler and Mark Rowe. + + Update WebKit availability macros for release after 4.0. + + * API/WebKitAvailability.h: + +2010-03-17 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + undefined, NaN, and Infinity should be ReadOnly + https://bugs.webkit.org/show_bug.cgi?id=36263 + + Simply add the ReadOnly flag to these properties. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + +2010-03-17 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + Speed up Math.round a little by removing unneeded special case + https://bugs.webkit.org/show_bug.cgi?id=36107 + + Test: fast/js/math.html + + * runtime/MathObject.cpp: + (JSC::mathProtoFuncRound): This function had a special case for numbers + between -0.5 and -0.0 to return -0.0. But the algorithm in the function + already yields -0.0 for those cases, so the extra checking and branching + is unneeded. + +2010-03-17 Mike Homey <glandium@debian.org> + + Reviewed by Gustavo Noronha. + + Build fix for SPARC. Fix missing macro value. + + * wtf/Platform.h: + +2010-03-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt, Darin Adler. + + Bug 36083 - REGRESSION (r55772-r55834): Crash in JavaScriptCore RegExp code on PowerPC + + The problem is a bug in our port of PCRE - that a read may take place from the first character in an + empty string. For the time being, revert to using a valid pointer in the data segment rather than + an invalid non-null pointer into the zero-page for the empty string's data pointer. A better fix for + this will be to remove PCRE. + + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::empty): + +2010-03-16 Darin Adler <darin@apple.com> + + Rolled out r56081 since it broke the Windows build. + +2010-03-16 Zoltan Horvath <zoltan@webkit.org> + + Reviewed by Darin Adler. + + Remove extra <new> include and add guards to operator new/delete definitions + https://bugs.webkit.org/show_bug.cgi?id=35967 + + Remove extra <new> header include from FastAlloc.cpp since it is included in + FastAlloc.h. Add ENABLE(GLOBAL_FASTMALLOC_NEW) macro guard to operator + new/delete/new []/delete [] definitions. + + * wtf/FastMalloc.cpp: + +2010-03-15 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Add a function to create a BREW instance without local variable declarations. + https://bugs.webkit.org/show_bug.cgi?id=34705 + + Add a template function to create a BREW instance in one line. + + * wtf/brew/ShellBrew.h: Added. + (WTF::createInstance): + +2010-03-15 Geoffrey Garen <ggaren@apple.com> + + Not reviewed. + + Removed a now-incorrect comment I forgot to remove in my last check-in. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavenge): + +2010-03-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Fixed a portion of: + <rdar://problem/7165917> | https://bugs.webkit.org/show_bug.cgi?id=28676 + Safari 4 does not release memory back to the operating system fast enough (28676) + + Every few seconds, release a percentage of the minimum unused page count + during that time period. + + SunSpider reports no change, command-line or in-browser, Mac or Windows. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::init): + (WTF::TCMalloc_PageHeap::signalScavenger): + (WTF::TCMalloc_PageHeap::initializeScavenger): Renamed shouldContinueScavenging + to shouldScavenge, since scavenging is no longer something that we interrupt. + + (WTF::TCMalloc_PageHeap::scavenge): The new scavenging algorithm. Fixes + a bug where the old code would release only one item from each size class + per scavenge, potentially leaving large numbers of large-sized objects + unreleased for a long time. + + (WTF::TCMalloc_PageHeap::shouldScavenge): + (WTF::TCMalloc_PageHeap::New): + (WTF::TCMalloc_PageHeap::AllocLarge): + (WTF::TCMalloc_PageHeap::Delete): + (WTF::TCMalloc_PageHeap::GrowHeap): + (WTF::TCMalloc_PageHeap::scavengerThread): + (WTF::TCMalloc_PageHeap::periodicScavenge): Updated to track the minimum + value of free_committed_pages_ during a given scavenge period. + +2010-03-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=35843 + Re-land reverted fix to JSString::getIndex() + + Calling getIndex() on a JSString in rope form may result in a JSException being thrown + if there is insuficient memory so value(exec) returns UString() with length zero, + which will be passed to jsSingleCharacterSubstring. + Add a slow case function to trap the error & return a safe null value, until the + exception is handled. + + * runtime/JSString.cpp: + (JSC::JSString::getIndexSlowCase): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::jsSingleCharacterSubstring): + (JSC::JSString::getIndex): + (JSC::jsSingleCharacterString): + (JSC::JSString::getStringPropertySlot): + +2010-03-04 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Adam Roben. + + Add a long long version of abs() for MSVC. + + * wtf/MathExtras.h: + (abs): + +2010-03-15 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Combine ctiTrampolines on ARM and Thumb-2 + https://bugs.webkit.org/show_bug.cgi?id=36014 + + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + +2010-03-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (build fix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (build fix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 36075 - Clean up screwyness re static string impls & Identifiers. + + * API/JSClassRef.cpp: + (OpaqueJSClass::~OpaqueJSClass): Classname may be null/empty, and these are an identifer. This is okay, since the null/empty strings are shared across all threads. + * JavaScriptCore.exp: + * runtime/Identifier.cpp: + (JSC::Identifier::add): No need to explicitly hash null reps, this is done in the ststic UStringImpl constructor. + (JSC::Identifier::addSlowCase): UStringImpl::empty() handled & checkCurrentIdentifierTable now called in the header. + (JSC::Identifier::checkCurrentIdentifierTable): Replaces checkSameIdentifierTable (this no longer checked the rep since the identifierTable pointer was removed from UString::Rep long ago). + * runtime/Identifier.h: + (JSC::Identifier::add): Replace call to checkSameIdentifierTable with call to checkCurrentIdentifierTable at head of function. + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::~UStringImpl): Remove call to checkConsistency - this function no longer checks anything interesting. + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::UStringOrRopeImpl): Set s_refCountFlagIsIdentifier in static constructor. + (JSC::UStringImpl::UStringImpl): remove calls to checkConsistency (see above), add new ASSERT to substring constructor. + (JSC::UStringImpl::setHash): ASSERT not static (static strings set the hash in their constructor, should not reach this code path). + (JSC::UStringImpl::create): Add missing ASSERT. + (JSC::UStringImpl::setIsIdentifier): ASSERT !isStatic() (static strings hash set in constructor). + +2010-03-12 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by David Levin. + + Two functions tryConsumeCharacter() and tryConsumeCharacterClass() are + removed from yarr/RegexInterpreter.cpp because they are never called. + + * yarr/RegexInterpreter.cpp: + +2010-03-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + The JSNative state was renamed to JSPrimitive. The new name better + coresponds to the ECMAScript standard. + + Enum QScriptValuePrivate::States was renamed to State to obey Qt + coding style rules ("States" name suggests that a state could + mixed together with an other state using bitwise logic operators. + + [Qt] QScriptValuePrivate::States has naming issues + https://bugs.webkit.org/show_bug.cgi?id=35968 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::isBool): + (QScriptValuePrivate::isNumber): + (QScriptValuePrivate::isNull): + (QScriptValuePrivate::isString): + (QScriptValuePrivate::isUndefined): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::assignEngine): + (QScriptValuePrivate::refinedJSValue): + +2010-03-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Windows build fix). + + Add export. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Windows build fix). + + Add export. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-11 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Oliver Hunt. + + Remove nonsense comments used in development & commited in error. + + * runtime/UStringImpl.h: + +2010-03-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Windows build fix). + + Remove export. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=36041 + Remove unnecessary differences in common code between WebCore::StringImpl & JSC::UStringImpl + + Much of the code in WebCore::StringImpl and JSC::UStringImpl is now very similar, + but has trivial and unnecessary formatting differences, such as the exact wording + of comments, missing ASSERTs, functions implemented in the .h vs .cpp etc. + + * runtime/Identifier.cpp: + (JSC::Identifier::add): UStringImpl::empty() now automatically hashes, uas per WebCore strings. + (JSC::Identifier::addSlowCase): UStringImpl::empty() now automatically hashes, uas per WebCore strings. + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::~UStringImpl): Only call bufferOwnership() once, add missing ASSERTs. + (JSC::UStringImpl::createUninitialized): Move from .h, not commonly called, no need to inline. + (JSC::UStringImpl::create): Move from .h, not commonly called, no need to inline. + (JSC::UStringImpl::sharedBuffer): Rewritten to more closely match WebCore implementation, remove need for separate baseSharedBuffer() method. + * runtime/UStringImpl.h: + (JSC::UStringImpl::UStringImpl): Automatically hash static strings, ASSERT m_data & m_length are non-null/non-zero in non-static strings. + (JSC::UStringImpl::setHash): Add missing ASSERT. + (JSC::UStringImpl::create): Moved to .cpp / added missing check for empty string creation. + (JSC::UStringImpl::adopt): Vector.size() returns size_t, not unsigned. + (JSC::UStringImpl::cost): Renamed m_bufferSubstring -> m_substringBuffer + (JSC::UStringImpl::hash): Reordered in file. + (JSC::UStringImpl::existingHash): Reordered in file. + (JSC::UStringImpl::computeHash): Reordered in file, renamed parameter. + (JSC::UStringImpl::checkConsistency): rewrote ASSERT. + (JSC::UStringImpl::bufferOwnership): Return type should be BufferOwnership. + (JSC::UStringImpl::): Moved friends to head of class. + +2010-03-11 Mark Rowe <mrowe@apple.com> + + Reviewed by David Kilzer. + + <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version + + Default to using the appropriate SDK if the target Mac OS X version is not the current Mac OS X version. + + * Configurations/Base.xcconfig: + +2010-03-11 Mark Rowe <mrowe@apple.com> + + Reviewed by Tim Hatcher. + + <rdar://problem/7745082> Make it possible to build WebKit for older Mac OS X versions from the current Mac OS X version + + Introduce TARGET_MAC_OS_X_VERSION_MAJOR to represent the Mac OS X version that is being targeted. It defaults to the + current Mac OS X version unless otherwise specified. + + Key off TARGET_MAC_OS_X_VERSION_MAJOR where we'd previously been keying off MAC_OS_X_VERSION_MAJOR. + + Explicitly map from the target Mac OS X version to the preferred compiler since Xcode's default compiler choice + may not be usable when targetting a different Mac OS X version. + + Key off TARGET_GCC_VERSION rather than MAC_OS_X_VERSION_MAJOR in locations where we'd previously been keying off + MAC_OS_X_VERSION_MAJOR but the decision is really related to the compiler version being used. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/FeatureDefines.xcconfig: + * Configurations/JavaScriptCore.xcconfig: + * Configurations/Version.xcconfig: + +2010-03-11 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Mark Rowe. + + Sort the project file. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-03-11 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Mark Rowe. + + Sort the project file . + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-03-11 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Buildfix for Thumb-2 after r55684. Add branch8 and branchTest8 functions. + https://bugs.webkit.org/show_bug.cgi?id=35892 + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::ldrb): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::load8): + (JSC::MacroAssemblerARMv7::branch8): + (JSC::MacroAssemblerARMv7::branchTest8): + (JSC::MacroAssemblerARMv7::setTest8): + +2010-03-10 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Oliver Hunt. + + Rename JSC::UStringImpl::data() to characters(), to match WebCore::StringImpl. + + * API/JSClassRef.cpp: + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::keyForCharacterSwitch): + * bytecompiler/NodesCodegen.cpp: + (JSC::processClauseList): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + (JSC::Identifier::addSlowCase): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/UString.cpp: + (JSC::UString::toStrictUInt32): + (JSC::equal): + * runtime/UString.h: + (JSC::UString::data): + * runtime/UStringImpl.h: + (JSC::UStringImpl::characters): + (JSC::UStringImpl::hash): + (JSC::UStringImpl::setHash): + +2010-03-10 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler, Geoffrey Garen, Maciej Stachowiak. + + https://bugs.webkit.org/show_bug.cgi?id=35991 + Would be faster to not use a thread specific to implement StringImpl::empty() + + Change JSC::UStringImpl's implementation of empty() match to match StringImpl's new implementation + (use a static defined within the empty() method), and change the interface to match too (return + a pointer not a reference). + + ~0% performance impact (possible minor progression from moving empty() from .h to .cpp). + + * JavaScriptCore.exp: + * runtime/Identifier.cpp: + (JSC::Identifier::add): + (JSC::Identifier::addSlowCase): + * runtime/PropertyNameArray.cpp: + (JSC::PropertyNameArray::add): + * runtime/UString.cpp: + (JSC::initializeUString): + (JSC::UString::UString): + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::empty): + (JSC::UStringImpl::create): + * runtime/UStringImpl.h: + (JSC::UStringImpl::adopt): + (JSC::UStringImpl::createUninitialized): + (JSC::UStringImpl::tryCreateUninitialized): + +2010-03-10 Dmitry Titov <dimich@chromium.org> + + Not reviewed, fixing Snow Leopard build. + + * wtf/mac/MainThreadMac.mm: Forgot 'static' for a new local function. + (WTF::postTimer): + +2010-03-10 Dmitry Titov <dimich@chromium.org> + + Reviewed by Darin Adler. + + Make Document::postTask to use a single queue of tasks, to fire them in order + https://bugs.webkit.org/show_bug.cgi?id=35943 + + The patch uses CFRunLoopTimer to schedule execution of tasks instead of performSelectorOnMainThread which apparently can starve other event sources. + The timer is used when the schedule request is coming on the main thread itself. This happens when the task is posted on the main thread or + when too many tasks are posted and the queue does 'stop and re-schedule' to make sure run loop has a chance to execute other events. + + * wtf/mac/MainThreadMac.mm: + (WTF::timerFired): + (WTF::postTimer): + (WTF::scheduleDispatchFunctionsOnMainThread): Use timer posted to the current RunLoop if scheduling the task execution while on the main thread. + +2010-03-10 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: added new symbol. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-10 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: removed old symbol. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-09 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Alexey Proskuryakov, Darin Adler, and Sam Weinig. + + Refactored fastCheckConsistency to match some review comments: + - renamed fastCheckConsistency to fastMallocSize, and changed ValueCheck + to ASSERT that a pointer's fastMallocSize is not 0. + - implemented a version of fastMallocSize for tcmalloc. + + Also moved some pre-existing code around to avoid a problem related to + mismatched #define/#undef of malloc/free in this source file. + + * JavaScriptCore.exp: + * wtf/FastMalloc.cpp: + (WTF::fastMallocSize): Renamed. Fixed indentation. + + (WTF::TCMalloc_PageHeap::scavenge): Removed an incorrect ASSERT that + got in the way of testing the tcmalloc implementation. (More information + on why this ASSERT is incorrect is in <rdar://problem/7165917>.) + + (WTF::TCMallocStats::fastMallocSize): Implemented for tcmalloc. + + * wtf/FastMalloc.h: Updated for rename. + + * wtf/ValueCheck.h: + (WTF::): Moved the ASSERT that used to be in fastCheckConsistency here. + +2010-03-10 Kevin Ollivier <kevino@theolliviers.com> + + Reviewed by Eric Seidel. + + Make global new/delete operators configurable for all ports and disable it + for the wx port for now. + + * wtf/FastMalloc.h: + * wtf/Platform.h: + +2010-03-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (reverting r54510). + + This caused a performance regression, by breaking the code + generator's logic to calculate the skip level for resolving + variables (traced by rdar:7683350) Reverting for now. + + * parser/Grammar.y: + * parser/NodeConstructors.h: + (JSC::ContinueNode::ContinueNode): + (JSC::BreakNode::BreakNode): + (JSC::ForInNode::ForInNode): + * runtime/CommonIdentifiers.cpp: + (JSC::CommonIdentifiers::CommonIdentifiers): + * runtime/CommonIdentifiers.h: + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/Identifier.cpp: + (JSC::Identifier::add): + * runtime/PropertyNameArray.cpp: + (JSC::PropertyNameArray::add): + +2010-03-09 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Changed FastMalloc statistics reporting to be a bit clearer. We now + report: + - Reserved VM Bytes: the VM that has been mapped into the process. + - Committed VM Bytes: the subset of Reserved VM Bytes actually in use. + - Free List Bytes: the subset of Committed VM Bytes in a free list. + + * wtf/FastMalloc.cpp: + (WTF::fastMallocStatistics): + (WTF::TCMallocStats::fastMallocStatistics): Updated to report the statistics + above. Standardized use of "ifdef WTF_CHANGES". Added a SpinLockHolder + around all statistics gathering, since it reads from the page heap. + + * wtf/FastMalloc.h: Updated to report the statistics above. + +2010-03-09 Gabor Loki <loki@webkit.org> + + Rubber-stamped by Maciej Stachowiak. + + Buildfix for ARM after r55684. Add branch8 and branchTest8 functions. + https://bugs.webkit.org/show_bug.cgi?id=35892 + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::dataTransfer32): + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::load8): + (JSC::MacroAssemblerARM::branch8): + (JSC::MacroAssemblerARM::branchTest8): + +2010-03-08 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: 'P' is not a type. Luckily, 'void' is. + + * wtf/FastMalloc.cpp: + (WTF::fastCheckConsistency): + +2010-03-08 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: export a new symbol. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-08 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + Switching malloc implementations requires a world rebuild + https://bugs.webkit.org/show_bug.cgi?id=35899 + + * wtf/FastMalloc.cpp: + (WTF::fastCheckConsistency): + (WTF::TCMallocStats::fastCheckConsistency): + * wtf/FastMalloc.h: + * wtf/ValueCheck.h: + (WTF::): Moved pointer checking into a helper function in FastMalloc.cpp, + so you can switch malloc implementations without rebuilding the world. + +2010-03-07 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + TypeInfo is unnecessarily large + https://bugs.webkit.org/show_bug.cgi?id=35850 + + Reduce the size of the type and flags members to a single + byte each, reducing the size of Structure by 8 bytes. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::branch8): + (JSC::MacroAssemblerX86Common::branchTest8): + (JSC::MacroAssemblerX86Common::setTest8): + Add single byte branches, and correct setTest8 to do a + single byte read from memory, and actually store the result + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + (JSC::X86Assembler::cmpb_im): + (JSC::X86Assembler::testb_im): + * jit/JITCall.cpp: + (JSC::JIT::emit_op_construct_verify): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emit_op_construct_verify): + (JSC::JIT::emit_op_to_jsnumber): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + * runtime/JSTypeInfo.h: + (JSC::TypeInfo::TypeInfo): + (JSC::TypeInfo::type): + +2010-03-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (reverting regression). + + Reverting 55035, this caused a regression. + (https://bugs.webkit.org/show_bug.cgi?id=35843) + + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::jsSingleCharacterSubstring): + (JSC::JSString::getIndex): + (JSC::JSString::getStringPropertySlot): + * runtime/UStringImpl.cpp: + * runtime/UStringImpl.h: + +2010-03-08 Stuart Morgan <stuartmorgan@chromium.org> + + Reviewed by Darin Adler. + + Added a new USE definition for secure text mode on the Mac. + https://bugs.webkit.org/show_bug.cgi?id=31265 + + * wtf/Platform.h: + +2010-03-08 Jian Li <jianli@chromium.org> + + Reviewed by Dmitry Titov. + + Blob.slice support. + https://bugs.webkit.org/show_bug.cgi?id=32993 + + Add ENABLE_BLOB_SLICE feature define. + Also fix a problem that JSValue.toInteger is not exposed on Windows. + + * Configurations/FeatureDefines.xcconfig: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-07 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Small performance fix in the QScriptConverter::toString(). + + The QByteArray was replaced by the QVarLengthArray which doesn't + have to allocate any memory on heap. + + [Qt] QScriptConverter::toString() should use QVarLengthArray instead of QByteArray + https://bugs.webkit.org/show_bug.cgi?id=35577 + + * qt/api/qscriptconverter_p.h: + (QScriptConverter::toString): + +2010-03-06 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Sam Weinig. + + Remove unnecessary includes of wtf/Platform.h. This is already pulled in by config.h. + + * API/APICast.h: + * API/JSCallbackFunction.cpp: + * API/JSContextRef.cpp: + * API/JSObjectRef.cpp: + * API/JSValueRef.cpp: + * assembler/ARMAssembler.h: + * assembler/ARMv7Assembler.h: + * assembler/AbstractMacroAssembler.h: + * assembler/AssemblerBuffer.h: + * assembler/AssemblerBufferWithConstantPool.h: + * assembler/CodeLocation.h: + * assembler/LinkBuffer.h: + * assembler/MIPSAssembler.h: + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerARMv7.h: + * assembler/MacroAssemblerCodeRef.h: + * assembler/MacroAssemblerMIPS.h: + * assembler/MacroAssemblerX86.h: + * assembler/MacroAssemblerX86Common.h: + * assembler/MacroAssemblerX86_64.h: + * assembler/RepatchBuffer.h: + * assembler/X86Assembler.h: + * jit/JIT.h: + * jit/JITCode.h: + * jit/JITInlineMethods.h: + * jit/JITStubs.h: + * os-win32/stdint.h: + * runtime/JSAPIValueWrapper.h: + * runtime/JSImmediate.h: + * wtf/ASCIICType.h: + * wtf/StdLibExtras.h: + * wtf/VMTags.h: + * yarr/RegexCompiler.h: + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.h: + * yarr/RegexParser.h: + * yarr/RegexPattern.h: + +2010-03-06 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Share OwnPtr. + https://bugs.webkit.org/show_bug.cgi?id=35776 + + Share OwnPtr implementation with BREW MP and remove OwnPtrBrew. + + * wtf/OwnPtrBrew.cpp: Added. + (WTF::deleteOwnedPtr): + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.cpp: Removed. + * wtf/brew/OwnPtrBrew.h: Removed. + +2010-03-06 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Eric Seidel. + + Implemented JIT_OPTIMIZE_NATIVE_CALL for WinCE + https://bugs.webkit.org/show_bug.cgi?id=33426 + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + +2010-03-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (build fix). + + Add enw exports to windows + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + JSC should cache int to Identifier conversion as it does for ordinary strings + https://bugs.webkit.org/show_bug.cgi?id=35814 + + Make the NumericStrings cache cache unsigned ints in addition to signed. + We keep them separate from the int cache as it both simplifies code, and + also because the unsigned path is exclusive to property access and therefore + seems to have different usage patterns. + + The primary trigger for the unsigned to Identifier propertyName conversion + is the construction of array-like objects out of normal objects. Given these + tend to be relative small numbers, and the array-like behaviour lends itself + to sequential values this patch also adds a non-colliding cache for all small + numbers. + + * JavaScriptCore.exp: + * runtime/Identifier.cpp: + (JSC::Identifier::from): + * runtime/Identifier.h: + * runtime/NumericStrings.h: + (JSC::NumericStrings::add): + (JSC::NumericStrings::lookup): + (JSC::NumericStrings::lookupSmallString): + +2010-03-03 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Allow static property getters to interact with JSCs caching + https://bugs.webkit.org/show_bug.cgi?id=35716 + + Add new opcodes for handling cached lookup of static value getters. + More or less the same as with JS getters, all that changes is that + instead of calling through a JSFunction we always know that we have + a C function to call. + + For the patching routines in the JIT we now need to pass a few + new parameters to allow us to pass enough information to the stub + function to allow us to call the C function correctly. Logically + this shouldn't actually be necessary as all of these functions ignore + the identifier, but removing the ident parameter would require + somewhat involved changes to the way we implement getOwnPropertySlot, + etc. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::refStructures): + * bytecode/Instruction.h: + (JSC::Instruction::Instruction): + (JSC::Instruction::): + * bytecode/Opcode.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + (JSC::JIT::compileGetByIdProto): + (JSC::JIT::compileGetByIdSelfList): + (JSC::JIT::compileGetByIdProtoList): + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertySlot): + * runtime/Lookup.h: + (JSC::getStaticPropertySlot): + (JSC::getStaticValueSlot): + * runtime/PropertySlot.h: + (JSC::PropertySlot::): + (JSC::PropertySlot::PropertySlot): + (JSC::PropertySlot::cachedPropertyType): + (JSC::PropertySlot::isCacheable): + (JSC::PropertySlot::isCacheableValue): + (JSC::PropertySlot::setValueSlot): + (JSC::PropertySlot::setCacheableCustom): + (JSC::PropertySlot::setGetterSlot): + (JSC::PropertySlot::setCacheableGetterSlot): + (JSC::PropertySlot::clearOffset): + (JSC::PropertySlot::customGetter): + +2010-03-04 Shinichiro Hamaji <hamaji@chromium.org> + + Unreviewed. Remove a non-ASCII character introduced in the following bug. + + put_by_id does will incorrectly cache writes where a specific value exists, where at the point of caching the same value is being written. + https://bugs.webkit.org/show_bug.cgi?id=35537 + + * runtime/JSObject.h: + (JSC::JSObject::putDirectInternal): + +2010-03-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic. + + This also allows shadow builds relying only on qmake to work properly. + * jsc.pro: + * qt/api/QtScript.pro: + * qt/tests/qscriptengine/qscriptengine.pro: + * qt/tests/qscriptvalue/qscriptvalue.pro: + * qt/tests/tests.pri: + +2010-03-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + QScriptValue::isObject fix. + + Fix broken internal state evaluation from JSValue to JSNative / JSObject. + New function was introduced which should take care about promoting + JSValue state inside QScriptValuePrivate. It should be used instead of a + direct JSC C API call. + + The bug exposed a weakness in autotest suite, as the QScriptValuePrivate + is based on state machine with lazy state evaluation, there is a possibility + that serial sequencial calls to the same public const function could return + different results. The patch fix the issue. + + [Qt] Sometimes QScriptValue::isObject returns an incorrect value + https://bugs.webkit.org/show_bug.cgi?id=35387 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::isBool): + (QScriptValuePrivate::isNumber): + (QScriptValuePrivate::isNull): + (QScriptValuePrivate::isString): + (QScriptValuePrivate::isUndefined): + (QScriptValuePrivate::isError): + (QScriptValuePrivate::isObject): + (QScriptValuePrivate::isFunction): + (QScriptValuePrivate::call): + (QScriptValuePrivate::refineJSValue): + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::initScriptValues): + (tst_QScriptValue::isValid_makeData): + (tst_QScriptValue::isValid_test): + (tst_QScriptValue::isBool_makeData): + (tst_QScriptValue::isBool_test): + (tst_QScriptValue::isBoolean_makeData): + (tst_QScriptValue::isBoolean_test): + (tst_QScriptValue::isNumber_makeData): + (tst_QScriptValue::isNumber_test): + (tst_QScriptValue::isFunction_test): + (tst_QScriptValue::isNull_makeData): + (tst_QScriptValue::isNull_test): + (tst_QScriptValue::isString_makeData): + (tst_QScriptValue::isString_test): + (tst_QScriptValue::isUndefined_makeData): + (tst_QScriptValue::isUndefined_test): + (tst_QScriptValue::isObject_makeData): + (tst_QScriptValue::isObject_test): + (tst_QScriptValue::toString_makeData): + (tst_QScriptValue::toString_test): + (tst_QScriptValue::toNumber_makeData): + (tst_QScriptValue::toNumber_test): + (tst_QScriptValue::toBool_makeData): + (tst_QScriptValue::toBool_test): + (tst_QScriptValue::toBoolean_makeData): + (tst_QScriptValue::toBoolean_test): + (tst_QScriptValue::toInteger_makeData): + (tst_QScriptValue::toInteger_test): + (tst_QScriptValue::toInt32_makeData): + (tst_QScriptValue::toInt32_test): + (tst_QScriptValue::toUInt32_makeData): + (tst_QScriptValue::toUInt32_test): + (tst_QScriptValue::toUInt16_makeData): + (tst_QScriptValue::toUInt16_test): + +2010-03-03 Chao-ying Fu <fu@mips.com> + + Reviewed by Gavin Barraclough. + + MIPS JIT Supports + https://bugs.webkit.org/show_bug.cgi?id=30144 + + The following changes enable MIPS YARR and YARR_JIT. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Imm32::Imm32): + * assembler/MIPSAssembler.h: Added. + (JSC::MIPSRegisters::): + (JSC::MIPSAssembler::MIPSAssembler): + (JSC::MIPSAssembler::): + (JSC::MIPSAssembler::JmpSrc::JmpSrc): + (JSC::MIPSAssembler::JmpDst::JmpDst): + (JSC::MIPSAssembler::JmpDst::isUsed): + (JSC::MIPSAssembler::JmpDst::used): + (JSC::MIPSAssembler::emitInst): + (JSC::MIPSAssembler::nop): + (JSC::MIPSAssembler::loadDelayNop): + (JSC::MIPSAssembler::copDelayNop): + (JSC::MIPSAssembler::move): + (JSC::MIPSAssembler::li): + (JSC::MIPSAssembler::lui): + (JSC::MIPSAssembler::addiu): + (JSC::MIPSAssembler::addu): + (JSC::MIPSAssembler::subu): + (JSC::MIPSAssembler::mult): + (JSC::MIPSAssembler::mfhi): + (JSC::MIPSAssembler::mflo): + (JSC::MIPSAssembler::mul): + (JSC::MIPSAssembler::andInsn): + (JSC::MIPSAssembler::andi): + (JSC::MIPSAssembler::nor): + (JSC::MIPSAssembler::orInsn): + (JSC::MIPSAssembler::ori): + (JSC::MIPSAssembler::xorInsn): + (JSC::MIPSAssembler::xori): + (JSC::MIPSAssembler::slt): + (JSC::MIPSAssembler::sltu): + (JSC::MIPSAssembler::sltiu): + (JSC::MIPSAssembler::sll): + (JSC::MIPSAssembler::sllv): + (JSC::MIPSAssembler::sra): + (JSC::MIPSAssembler::srav): + (JSC::MIPSAssembler::lw): + (JSC::MIPSAssembler::lwl): + (JSC::MIPSAssembler::lwr): + (JSC::MIPSAssembler::lhu): + (JSC::MIPSAssembler::sw): + (JSC::MIPSAssembler::jr): + (JSC::MIPSAssembler::jalr): + (JSC::MIPSAssembler::jal): + (JSC::MIPSAssembler::bkpt): + (JSC::MIPSAssembler::bgez): + (JSC::MIPSAssembler::bltz): + (JSC::MIPSAssembler::beq): + (JSC::MIPSAssembler::bne): + (JSC::MIPSAssembler::bc1t): + (JSC::MIPSAssembler::bc1f): + (JSC::MIPSAssembler::newJmpSrc): + (JSC::MIPSAssembler::appendJump): + (JSC::MIPSAssembler::addd): + (JSC::MIPSAssembler::subd): + (JSC::MIPSAssembler::muld): + (JSC::MIPSAssembler::lwc1): + (JSC::MIPSAssembler::ldc1): + (JSC::MIPSAssembler::swc1): + (JSC::MIPSAssembler::sdc1): + (JSC::MIPSAssembler::mtc1): + (JSC::MIPSAssembler::mfc1): + (JSC::MIPSAssembler::truncwd): + (JSC::MIPSAssembler::cvtdw): + (JSC::MIPSAssembler::ceqd): + (JSC::MIPSAssembler::cngtd): + (JSC::MIPSAssembler::cnged): + (JSC::MIPSAssembler::cltd): + (JSC::MIPSAssembler::cled): + (JSC::MIPSAssembler::cueqd): + (JSC::MIPSAssembler::coled): + (JSC::MIPSAssembler::coltd): + (JSC::MIPSAssembler::culed): + (JSC::MIPSAssembler::cultd): + (JSC::MIPSAssembler::label): + (JSC::MIPSAssembler::align): + (JSC::MIPSAssembler::getRelocatedAddress): + (JSC::MIPSAssembler::getDifferenceBetweenLabels): + (JSC::MIPSAssembler::size): + (JSC::MIPSAssembler::executableCopy): + (JSC::MIPSAssembler::getCallReturnOffset): + (JSC::MIPSAssembler::linkJump): + (JSC::MIPSAssembler::linkCall): + (JSC::MIPSAssembler::linkPointer): + (JSC::MIPSAssembler::relinkJump): + (JSC::MIPSAssembler::relinkCall): + (JSC::MIPSAssembler::repatchInt32): + (JSC::MIPSAssembler::repatchPointer): + (JSC::MIPSAssembler::repatchLoadPtrToLEA): + (JSC::MIPSAssembler::relocateJumps): + (JSC::MIPSAssembler::linkWithOffset): + (JSC::MIPSAssembler::linkCallInternal): + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerMIPS.h: Added. + (JSC::MacroAssemblerMIPS::MacroAssemblerMIPS): + (JSC::MacroAssemblerMIPS::): + (JSC::MacroAssemblerMIPS::add32): + (JSC::MacroAssemblerMIPS::and32): + (JSC::MacroAssemblerMIPS::lshift32): + (JSC::MacroAssemblerMIPS::mul32): + (JSC::MacroAssemblerMIPS::not32): + (JSC::MacroAssemblerMIPS::or32): + (JSC::MacroAssemblerMIPS::rshift32): + (JSC::MacroAssemblerMIPS::sub32): + (JSC::MacroAssemblerMIPS::xor32): + (JSC::MacroAssemblerMIPS::load32): + (JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords): + (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch): + (JSC::MacroAssemblerMIPS::loadPtrWithPatchToLEA): + (JSC::MacroAssemblerMIPS::loadPtrWithAddressOffsetPatch): + (JSC::MacroAssemblerMIPS::load16): + (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch): + (JSC::MacroAssemblerMIPS::store32): + (JSC::MacroAssemblerMIPS::supportsFloatingPoint): + (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate): + (JSC::MacroAssemblerMIPS::pop): + (JSC::MacroAssemblerMIPS::push): + (JSC::MacroAssemblerMIPS::move): + (JSC::MacroAssemblerMIPS::swap): + (JSC::MacroAssemblerMIPS::signExtend32ToPtr): + (JSC::MacroAssemblerMIPS::zeroExtend32ToPtr): + (JSC::MacroAssemblerMIPS::branch32): + (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords): + (JSC::MacroAssemblerMIPS::branch16): + (JSC::MacroAssemblerMIPS::branchTest32): + (JSC::MacroAssemblerMIPS::jump): + (JSC::MacroAssemblerMIPS::branchAdd32): + (JSC::MacroAssemblerMIPS::branchMul32): + (JSC::MacroAssemblerMIPS::branchSub32): + (JSC::MacroAssemblerMIPS::breakpoint): + (JSC::MacroAssemblerMIPS::nearCall): + (JSC::MacroAssemblerMIPS::call): + (JSC::MacroAssemblerMIPS::ret): + (JSC::MacroAssemblerMIPS::set32): + (JSC::MacroAssemblerMIPS::setTest32): + (JSC::MacroAssemblerMIPS::moveWithPatch): + (JSC::MacroAssemblerMIPS::branchPtrWithPatch): + (JSC::MacroAssemblerMIPS::storePtrWithPatch): + (JSC::MacroAssemblerMIPS::tailRecursiveCall): + (JSC::MacroAssemblerMIPS::makeTailRecursiveCall): + (JSC::MacroAssemblerMIPS::loadDouble): + (JSC::MacroAssemblerMIPS::storeDouble): + (JSC::MacroAssemblerMIPS::addDouble): + (JSC::MacroAssemblerMIPS::subDouble): + (JSC::MacroAssemblerMIPS::mulDouble): + (JSC::MacroAssemblerMIPS::convertInt32ToDouble): + (JSC::MacroAssemblerMIPS::insertRelaxationWords): + (JSC::MacroAssemblerMIPS::branchTrue): + (JSC::MacroAssemblerMIPS::branchFalse): + (JSC::MacroAssemblerMIPS::branchEqual): + (JSC::MacroAssemblerMIPS::branchNotEqual): + (JSC::MacroAssemblerMIPS::branchDouble): + (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerMIPS::linkCall): + (JSC::MacroAssemblerMIPS::repatchCall): + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + * wtf/Platform.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): + (JSC::Yarr::RegexGenerator::generateReturn): + +2010-03-03 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + +2010-03-03 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + +2010-03-03 Mark Rowe <mrowe@apple.com> + + Reviewed by Geoff Garen. + + Add virtual memory tags for TCMalloc and WebCore's purgeable buffers. + + * wtf/TCSystemAlloc.cpp: + (TryMmap): Use the VM tag. + * wtf/VMTags.h: Make use of VM_MEMORY_TCMALLOC and VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS. + +2010-03-03 Steve Falkenburg <sfalken@apple.com> + + Rubber stamped by Adam Roben. + + Fix bogus xcopy that was polluting source tree at build time. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + +2010-03-02 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Oliver Hunt. + + Allow building smoothly on win32 and win64 using GCC + https://bugs.webkit.org/show_bug.cgi?id=35607 + + * jit/JITStubs.h: + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlockPtr): + (JSC::currentThreadStackBase): + +2010-03-02 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by David Levin. + + Revert database thread changes that are no longer required + https://bugs.webkit.org/show_bug.cgi?id=35519 + + Jochen Eisinger created 55214 and 55247 to track which database + owns which thread. Dmitry suggested that this could also + be done via TLS, though. After exploring the options, Jochen + chose to go the TLS route, so these patches are no longer needed. + + * wtf/Threading.h: + * wtf/ThreadingNone.cpp: + (WTF::isMainThread): + * wtf/ThreadingPthreads.cpp: + (WTF::identifierByPthreadHandle): + (WTF::establishIdentifierForPthreadHandle): + (WTF::pthreadHandleForIdentifier): + (WTF::createThreadInternal): + (WTF::currentThread): + * wtf/ThreadingWin.cpp: + (WTF::threadMap): + (WTF::storeThreadHandleByIdentifier): + (WTF::threadHandleForIdentifier): + (WTF::createThreadInternal): + +2010-03-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Fix QScriptValue::toString(). + + More ECMA Script compliance, especially for values as NaN, Inifinite + and really big/small numbers. + + [Qt] QScriptValue::toString() returns incorrect values + https://bugs.webkit.org/show_bug.cgi?id=34850 + + * qt/api/qscriptconverter_p.h: + (QScriptConverter::toString): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::toString): + * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::toString_initData): + (tst_QScriptValue::toString_makeData): + (tst_QScriptValue::toString_test): + +2010-03-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Introduce a new class; QScriptString. + + The QScriptString class should act as a handle to "interned" + strings in a QScriptEngine. + + [Qt] QtScript should provide QScriptString + https://bugs.webkit.org/show_bug.cgi?id=34843 + + * qt/api/QtScript.pro: + * qt/api/qscriptengine.cpp: + (QScriptEngine::toStringHandle): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.h: + (QScriptEnginePrivate::toStringHandle): + * qt/api/qscriptstring.cpp: Added. + (QScriptString::QScriptString): + (QScriptString::~QScriptString): + (QScriptString::operator=): + (QScriptString::isValid): + (QScriptString::operator==): + (QScriptString::operator!=): + (QScriptString::toArrayIndex): + (QScriptString::toString): + (QScriptString::operator QString): + (qHash): + * qt/api/qscriptstring.h: Added. + * qt/api/qscriptstring_p.h: Added. + (QScriptStringPrivate::QScriptStringPrivate): + (QScriptStringPrivate::~QScriptStringPrivate): + (QScriptStringPrivate::get): + (QScriptStringPrivate::isValid): + (QScriptStringPrivate::operator==): + (QScriptStringPrivate::operator!=): + (QScriptStringPrivate::toArrayIndex): + (QScriptStringPrivate::toString): + (QScriptStringPrivate::id): + * qt/tests/qscriptstring/qscriptstring.pro: Added. + * qt/tests/qscriptstring/tst_qscriptstring.cpp: Added. + (tst_QScriptString::tst_QScriptString): + (tst_QScriptString::~tst_QScriptString): + (tst_QScriptString::test): + (tst_QScriptString::hash): + (tst_QScriptString::toArrayIndex_data): + (tst_QScriptString::toArrayIndex): + * qt/tests/tests.pro: + +2010-03-02 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Export function on windows. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-03-01 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Refactor named getter function signature to be in line with indexing getter signature + https://bugs.webkit.org/show_bug.cgi?id=35563 + + This removes the PropertySlot argument from getter functions, and makes them directly + pass the slot base. This makes the semantics for the functions match that of the + indexing getters. + + On the down side, this means that we can no longer simply use a proxy function for + JS getters, so we now add another marker value to indicate that a getter is present + and branch accordingly. + + Against all rationality sunspider reports this as a perf win, but i suspect it's just noise. + + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::staticValueGetter): + (JSC::::staticFunctionGetter): + (JSC::::callbackGetter): + * JavaScriptCore.exp: + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): + * runtime/JSActivation.h: + * runtime/JSFunction.cpp: + (JSC::JSFunction::argumentsGetter): + (JSC::JSFunction::callerGetter): + (JSC::JSFunction::lengthGetter): + * runtime/JSFunction.h: + * runtime/NumberConstructor.cpp: + (JSC::numberConstructorNaNValue): + (JSC::numberConstructorNegInfinity): + (JSC::numberConstructorPosInfinity): + (JSC::numberConstructorMaxValue): + (JSC::numberConstructorMinValue): + * runtime/PropertySlot.cpp: + (JSC::PropertySlot::functionGetter): + * runtime/PropertySlot.h: + (JSC::PropertySlot::getValue): + (JSC::PropertySlot::setGetterSlot): + (JSC::PropertySlot::setCacheableGetterSlot): + * runtime/RegExpConstructor.cpp: + (JSC::regExpConstructorDollar1): + (JSC::regExpConstructorDollar2): + (JSC::regExpConstructorDollar3): + (JSC::regExpConstructorDollar4): + (JSC::regExpConstructorDollar5): + (JSC::regExpConstructorDollar6): + (JSC::regExpConstructorDollar7): + (JSC::regExpConstructorDollar8): + (JSC::regExpConstructorDollar9): + (JSC::regExpConstructorInput): + (JSC::regExpConstructorMultiline): + (JSC::regExpConstructorLastMatch): + (JSC::regExpConstructorLastParen): + (JSC::regExpConstructorLeftContext): + (JSC::regExpConstructorRightContext): + * runtime/RegExpObject.cpp: + (JSC::regExpObjectGlobal): + (JSC::regExpObjectIgnoreCase): + (JSC::regExpObjectMultiline): + (JSC::regExpObjectSource): + (JSC::regExpObjectLastIndex): + +2010-03-01 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + PropertySlot::getValue(ExecState, unsigned) unnecessarily converts index to an Identifier + https://bugs.webkit.org/show_bug.cgi?id=35561 + + Fix this by defining a separate property getter function for index getters. This allows + us to pass an unsigned number without the conversion to an Identifier. We then update + setCustomIndex to take this new getter type. + + * runtime/PropertySlot.h: + (JSC::PropertySlot::getValue): + (JSC::PropertySlot::setCustom): + (JSC::PropertySlot::setCustomIndex): + +2010-03-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 35537 - put_by_id does will incorrectly cache writes where a specific value exists, + where at the point of caching the same value is being written. + + When performing a put_by_id that is replacing a property already present on the object, + there are three interesting cases regarding the state of the specific value: + + (1) No specific value set - nothing to do, leave the structure in it's current state, + can cache. + (2) A specific value was set, the new put is not of a specified value (i.e. function), + or is of a different specific value - in these cases we need to perform a despecifying + transition to clear the specific value in the structure, but having done so this is a + normal property so as such we can again cache normally. + (3) A specific value was set, and we are overwriting with the same value - in these cases + leave the structure unchanged, but since a specific value is set we cannot cache this + put (we would need the JIT to dynamically check the value being written matched). + + Unfortunately, the current behaviour does not match this. the checks for a specific value + being present & the value matching are combined in such a way that in case (2), above we + will unnecessarily prevent the transition being cached, but in case (3) we will incorrectly + fail to prevent caching. + + The bug exposes itself if multiple puts of the same specific value are performed to a + property, and erroneously the put is allowed to be cached by the JIT. Method checks may be + generated caching calls of this structure. Subsequent puts performed from JIT code may + write different values without triggering a despecify transition, and as such cached method + checks will continue to pass, despite the value having changed. + + * runtime/JSObject.h: + (JSC::JSObject::putDirectInternal): + +2010-03-01 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Fix the Qt build on Mac OS X/Cocoa 64-bit + + * JavaScriptCore.pri: Add missing implementation file to resolve JSC symbols + +2010-02-26 Gavin Barraclough <barraclough@apple.com> + + Rubber Stamped by Geoff Garen. + + Remove wrec. All builds should have switched to yarr by now. + + * Android.mk: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/RegExp.h: + * wrec: Removed. + * wrec/CharacterClass.cpp: Removed. + * wrec/CharacterClass.h: Removed. + * wrec/CharacterClassConstructor.cpp: Removed. + * wrec/CharacterClassConstructor.h: Removed. + * wrec/Escapes.h: Removed. + * wrec/Quantifier.h: Removed. + * wrec/WREC.cpp: Removed. + * wrec/WREC.h: Removed. + * wrec/WRECFunctors.cpp: Removed. + * wrec/WRECFunctors.h: Removed. + * wrec/WRECGenerator.cpp: Removed. + * wrec/WRECGenerator.h: Removed. + * wrec/WRECParser.cpp: Removed. + * wrec/WRECParser.h: Removed. + * wscript: + +2010-02-26 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Make the lookup table generator include an explicit cast to expected + type of the function. We do this because otherwise the blind intptr_t + cast that is subsequently applied allows incorrectly typed functions + to be inserted into the table, where they will only fail at runtime. + This change makes such errors produce a compile time failure. + + * create_hash_table: + +2010-02-26 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Simon Hausmann. + + [Qt] Symbian specific getCPUTime implemetation + https://bugs.webkit.org/show_bug.cgi?id=34742 + + Default implementation doesn't work on Symbian devices. + This change adds a proper implementation by + asking thread execution time from the current thread. + + * runtime/TimeoutChecker.cpp: + (JSC::getCPUTime): + +2010-02-25 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=35406 + <rdar://problem/6945502> Make generic array methods work with JavaArray + + Renamed lazyCreationData to subclassData. This is extra data that can be used by JSArray + subclasses (you can't add new data members, because it wouldn't fit in JSCell otherwise). + + * JavaScriptCore.exp: + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + * runtime/JSArray.h: + * runtime/RegExpConstructor.cpp: + (JSC::RegExpMatchesArray::RegExpMatchesArray): + (JSC::RegExpMatchesArray::~RegExpMatchesArray): + (JSC::RegExpMatchesArray::fillArrayInstance): + * runtime/RegExpMatchesArray.h: + (JSC::RegExpMatchesArray::getOwnPropertySlot): + (JSC::RegExpMatchesArray::getOwnPropertyDescriptor): + (JSC::RegExpMatchesArray::put): + (JSC::RegExpMatchesArray::deleteProperty): + (JSC::RegExpMatchesArray::getOwnPropertyNames): + +2010-02-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + JSC crashes like crazy in the JSPropertyNameIterator destructor + + Add back null check of m_cachedStructure. Curse last minute changes. + + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): + +2010-02-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Race condition in JSPropertyNameIterator and Structure destruction + https://bugs.webkit.org/show_bug.cgi?id=35398 + + JSPropertyNameIterator and Structure have a cyclic dependency that they + manage by clearing the appropriate reference in each other during their + destruction. However if the Structure is destroyed while the + JSPropertyNameIterator is dead but not yet finalized the Structures + WeakGCPtr will return null, and so prevent Structure from clearing + the m_cachedStructure pointer of the iterator. When the iterator is + then finalised the m_cachedStructure is invalid, and the attempt to + clear the structures back reference fails. + + To fix this we simply make JSPropertyNameIterator keep the Structure + alive, using the weak pointer to break the ref cycle. + + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): + The iterator now keeps m_cachedStructure alive itself, so no longer needs + to check for it being cleared + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::setCachedStructure): + Add an assertion to ensure correct usage + (JSC::JSPropertyNameIterator::cachedStructure): + Add .get() + * runtime/Structure.cpp: + (JSC::Structure::~Structure): + Add an assertion that our iterator isn't already dead, and remove + the now unnecessary attempt to clear the ref in the iterator + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::hasDeadObject): + An assert-only function to allow us to assert correct behaviour + in the Structure destructor + +2010-02-25 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Jeremy Orlow. + + Make the context that was passed to the ThreadFunction accessible. + https://bugs.webkit.org/show_bug.cgi?id=35379 + + When a database is opened, right now you + don't have any context from where it is opened. The problem is that + the actual calls that open a database go through the sqlite3 vfs + layer, so there's no easy way to pass this function down to to + platform/sql/chromium/SQLFileSystemChromium*.cpp + + This patch will allow you to get from anywhere within webkit a pointer + to the Thread object that actually created the thread you're currently + on (in case of the database, this can be either a thread forked of + from the main thread or from a worker thread), and query the object + for context information. + + * wtf/Threading.h: + * wtf/ThreadingNone.cpp: + (WTF::threadContext): + * wtf/ThreadingPthreads.cpp: + (WTF::): + (WTF::identifierByPthreadHandle): + (WTF::establishIdentifierForPthreadHandle): + (WTF::pthreadHandleForIdentifier): + (WTF::contextForIdentifier): + (WTF::createThreadInternal): + (WTF::currentThread): + (WTF::threadContext): + * wtf/ThreadingWin.cpp: + (WTF::): + (WTF::threadMap): + (WTF::storeThreadHandleByIdentifier): + (WTF::threadHandleForIdentifier): + (WTF::contextForIdentifier): + (WTF::createThreadInternal): + (WTF::threadContext): + +2010-02-25 Jeremy Orlow <jorlow@chromium.org> + + Reverting to re-submit with better change log. + + * wtf/Threading.h: + * wtf/ThreadingNone.cpp: + (WTF::isMainThread): + * wtf/ThreadingPthreads.cpp: + (WTF::identifierByPthreadHandle): + (WTF::establishIdentifierForPthreadHandle): + (WTF::pthreadHandleForIdentifier): + (WTF::createThreadInternal): + (WTF::currentThread): + * wtf/ThreadingWin.cpp: + (WTF::threadMap): + (WTF::storeThreadHandleByIdentifier): + (WTF::threadHandleForIdentifier): + (WTF::createThreadInternal): + +2010-02-25 Jochen Eisinger <jochen@chromium.org> + + Reviewed by Jeremy Orlow. + + Make the context that was passed to the ThreadFunction accessible. + https://bugs.webkit.org/show_bug.cgi?id=35379 + + * wtf/Threading.h: + * wtf/ThreadingNone.cpp: + (WTF::threadContext): + * wtf/ThreadingPthreads.cpp: + (WTF::): + (WTF::identifierByPthreadHandle): + (WTF::establishIdentifierForPthreadHandle): + (WTF::pthreadHandleForIdentifier): + (WTF::contextForIdentifier): + (WTF::createThreadInternal): + (WTF::currentThread): + (WTF::threadContext): + * wtf/ThreadingWin.cpp: + (WTF::): + (WTF::threadMap): + (WTF::storeThreadHandleByIdentifier): + (WTF::threadHandleForIdentifier): + (WTF::contextForIdentifier): + (WTF::createThreadInternal): + (WTF::threadContext): + +2010-02-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + [REGRESSION in r55185] EXC_BAD_ACCESS on opening inspector. + https://bugs.webkit.org/show_bug.cgi?id=35335 + + compileGetDirectOffset modifies the contents of the object register + when the object is not using the inline storage array. As the object + register contains our 'this' pointer we can't allow it to be clobbered. + The fix is simply to copy the register into a separate scratch register + when we're loading off an object that doesn't use inline storage. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdSelfList): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompileGetByIdSelfList): + +2010-02-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Speed up getter performance in the jit + https://bugs.webkit.org/show_bug.cgi?id=35332 + + Implement getter lookup caching in the interpreter. + The getter stubs are generated through basically the + same code paths as the normal get_by_id caching. + Instead of simply loading a property and returning, + we load the getter slot, and pass the getter, base value + and return address to a shared stub used for getter + dispatch. + + * jit/JIT.h: + (JSC::JIT::compileGetByIdProto): + (JSC::JIT::compileGetByIdSelfList): + (JSC::JIT::compileGetByIdProtoList): + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): + * runtime/GetterSetter.h: + +2010-02-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Web Inspector: Regression: r55027+: Inspector broken + https://bugs.webkit.org/show_bug.cgi?id=35253 + + op_get_by_id_getter_chain was not passing the correct this parameter. + The bug was caused by incorrect use of baseCell instead of baseValue, + baseValue contains the original object for the lookup (and hence the + correct this object), baseCell is clobbered as part of walking the + prototype chain. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-02-23 Gustavo Noronha Silva <gns@gnome.org> + + Rubber-stamped by Dimitri Glazkov. + + Chromium build fix. + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2010-02-23 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Gustavo Noronha Silva. + + Changes references of GOwnPtr to reflect their new place. + http://webkit.org/b/35084 + + * JavaScriptCore/JavaScriptCore.gypi: + * JavaScriptCore/wtf/Threading.h: + * JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h: + +2010-02-23 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + Adding the EFL implementation of JavaScriptCore. + See https://bugs.webkit.org/show_bug.cgi?id=35084 for details. + + * GNUmakefile.am: Updated to reflect the new location of GOwnPtr and + GRefPtr. + * wtf/efl/MainThreadEfl.cpp: Added. + * wtf/gobject/GOwnPtr.cpp: Moved from wtf/gtk. + * wtf/gobject/GOwnPtr.h: Moved from wtf/gtk. + * wtf/gobject/GRefPtr.cpp: Moved from wtf/gtk. + * wtf/gobject/GRefPtr.h: Moved from wtf/gtk. + +2010-02-22 Julien Chaffraix <jchaffraix@webkit.org> + + Reviewed by Darin Adler. + + Remove auto_ptr usage in JavaScriptCore. + https://bugs.webkit.org/show_bug.cgi?id=35221 + + * parser/Nodes.h: Removed now unneeded adopt method. + * parser/Parser.cpp: Removed <memory> include as it is not required anymore. + * wtf/OwnPtr.h: Removed the constructor from auto_ptr. + * wtf/VectorTraits.h: Removed a template specialization for auto_ptr. + * wtf/unicode/Collator.h: Made userDefault return a PassOwnPtr. + * wtf/unicode/CollatorDefault.cpp: + (WTF::Collator::userDefault): Changed the method to match the next signature. + * wtf/unicode/icu/CollatorICU.cpp: + (WTF::Collator::userDefault): Ditto. + +2010-02-22 Huahui Wu <hwu@google.com> + + Reviewed by Eric Seidel. + + Add code that enables SquirrelFish Extreme (a.k.a JSCX, JSC JIT) + in Android. It's disabled by default, but is enabled when the + enveronment variable ENABLE_JSC_JIT is set to true. + https://bugs.webkit.org/show_bug.cgi?id=34855 + + * Android.mk: + * wtf/Platform.h: + +2010-02-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + JSStringBuilder should not CRASH if allocation fails, it should throw a JSException. + + * runtime/JSGlobalObjectFunctions.cpp: + * runtime/JSStringBuilder.h: + (JSC::JSStringBuilder::JSStringBuilder): + (JSC::JSStringBuilder::append): + (JSC::JSStringBuilder::build): + * runtime/StringBuilder.h: + (JSC::StringBuilder::build): + * wtf/Vector.h: + (WTF::VectorBufferBase::tryAllocateBuffer): + (WTF::): + (WTF::VectorBuffer::tryAllocateBuffer): + (WTF::::tryExpandCapacity): + (WTF::::tryReserveCapacity): + (WTF::::tryAppend): + +2010-02-22 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Map FastMalloc to BREW memory allocator + https://bugs.webkit.org/show_bug.cgi?id=33570 + + Use MALLOC macro instead of the standard malloc function. + Although RVCT provides malloc, we can't use it in BREW + because the loader does not initialize the base address properly. + + * wtf/FastMalloc.cpp: + * wtf/brew/SystemMallocBrew.h: Added. + (mallocBrew): + (callocBrew): + (freeBrew): + (reallocBrew): + +2010-02-22 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Build fix for make distcheck. + + * GNUmakefile.am: + +2010-02-22 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed build fix. + + [Qt] Build fix for RVCT. + + Fix after r55024. The "-i" option is for perl not for the + script. + + * DerivedSources.pro: + +2010-02-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Make UString::m_data be const, and make the UChar owned/ref-counted by CrossThreadRefCounted be const too. + + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::baseSharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::create): + (JSC::UStringImpl::data): + (JSC::UStringImpl::UStringImpl): + * wtf/OwnFastMallocPtr.h: + (WTF::OwnFastMallocPtr::~OwnFastMallocPtr): + +2010-02-21 Yuta Kitamura <yutak@chromium.org> + + Reviewed by Darin Adler. + + HashMapTranslatorAdapter::translate() needs to set the mapped value. + + HTTPHeaderMap::add(const char*, const String&) does not work + https://bugs.webkit.org/show_bug.cgi?id=35227 + + * wtf/HashMap.h: + (WTF::HashMapTranslatorAdapter::translate): + +2010-02-19 Maciej Stachowiak <mjs@apple.com> + + Reviewed by David Levin. + + Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases + https://bugs.webkit.org/show_bug.cgi?id=35147 + + * Configurations/FeatureDefines.xcconfig: + +2010-02-19 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + JSString::getIndex() calls value() to resolve the string value (is a rope) + to a UString, then passes the result to jsSingleCharacterSubstring without + checking for an exception. In case of out-of-memory the returned UString + is null(), which may result in an out-of-buounds substring being created. + This is bad. + + Simple fix is to be able to get an index from a rope without resolving to + UString. This may be a useful optimization in some test cases. + + The same bug exists in some other methods is JSString, these can be fixed + by changing them to call getIndex(). + + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::jsSingleCharacterSubstring): + (JSC::JSString::getIndex): + (JSC::jsSingleCharacterString): + (JSC::JSString::getStringPropertySlot): + * runtime/UStringImpl.cpp: + (JSC::singleCharacterSubstring): + * runtime/UStringImpl.h: + (JSC::UStringImpl::singleCharacterSubstring): + +2010-02-19 Oliver Hunt <oliver@apple.com> + + RS = Gavin Barraclough. + + Split the 32/64 version of JITPropertyAccess into a separate file. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JITPropertyAccess.cpp: + * jit/JITPropertyAccess32_64.cpp: Added. + (JSC::JIT::emit_op_put_by_index): + (JSC::JIT::emit_op_put_getter): + (JSC::JIT::emit_op_put_setter): + (JSC::JIT::emit_op_del_by_id): + (JSC::JIT::emit_op_method_check): + (JSC::JIT::emitSlow_op_method_check): + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitSlow_op_put_by_val): + (JSC::JIT::emit_op_get_by_id): + (JSC::JIT::emitSlow_op_get_by_id): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::compilePutDirectOffset): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchMethodCallProto): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::emit_op_get_by_pname): + (JSC::JIT::emitSlow_op_get_by_pname): + +2010-02-19 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Laszlo Gombos. + + Added additional parameter to create_rvct_stubs + for setting the regularexpression prefix. + Renamed it because it now works for other platforms too. + https://bugs.webkit.org/show_bug.cgi?id=34951 + + * DerivedSources.pro: + * create_jit_stubs: Copied from JavaScriptCore/create_rvct_stubs. + * create_rvct_stubs: Removed. + +2010-02-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve interpreter getter performance + https://bugs.webkit.org/show_bug.cgi?id=35138 + + Improve the performance of getter dispatch by making it possible + for the interpreter to cache the GetterSetter object lookup. + + To do this we simply need to make PropertySlot aware of getters + as a potentially cacheable property, and record the base and this + objects for a getter access. This allows us to use more-or-less + identical code to that used by the normal get_by_id caching, with + the dispatch being the only actual difference. + + I'm holding off of implementing this in the JIT until I do some + cleanup to try and making coding in the JIT not be as horrible + as it is currently. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::refStructures): + * bytecode/Opcode.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSObject.cpp: + (JSC::JSObject::fillGetterPropertySlot): + * runtime/PropertySlot.cpp: + (JSC::PropertySlot::functionGetter): + * runtime/PropertySlot.h: + (JSC::PropertySlot::isGetter): + (JSC::PropertySlot::isCacheable): + (JSC::PropertySlot::isCacheableValue): + (JSC::PropertySlot::setValueSlot): + (JSC::PropertySlot::setGetterSlot): + (JSC::PropertySlot::setCacheableGetterSlot): + (JSC::PropertySlot::clearOffset): + (JSC::PropertySlot::thisValue): + +2010-02-17 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Fixed a portion of: + <rdar://problem/7165917> | https://bugs.webkit.org/show_bug.cgi?id=28676 + Safari 4 does not release memory back to the operating system fast enough (28676) + + This patch fixes a surprisingly common edge case in which the page heap + would have only one free span, but that span would be larger than the + minimum free size, so we would decide not to free it, even though it + could be as large as 100MB or more! + + SunSpider reports no change on Mac or Windows. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavenge): Call shouldContinueScavenging() instead + of doing the math ourselves. Don't keep a local value for pagesDecommitted + because that lets free_committed_pages_ be wrong temporarily. Instead, + update free_committed_pages_ as we go. ASSERT that we aren't releasing + a span that has already been released, because we think this is impossible. + Finally, don't be afraid to release all free memory in the page heap when + scavenging. We only scavenge after 5 seconds of the application's working + set not growing, and we keep both thread caches and a central cache on + top of the page heap, so the extra free pages in the page heap were just + overkill. + +2010-02-17 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=35070 + Addition of 2 strings of length 2^31 may result in a string of length 0. + + Check for overflow when creating a new JSString as a result of an addition + or concatenation, throw an out of memory exception. + + * runtime/JSString.h: + (JSC::): + * runtime/Operations.h: + (JSC::jsString): + +2010-02-17 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + [Linux] Webkit incompatible with Java plugins + https://bugs.webkit.org/show_bug.cgi?id=24912 + + Add support for GFile to GOwnPtr. + + Based on original work by Gustavo Noronha. + + * wtf/gtk/GOwnPtr.cpp: + (WTF::GFile): + * wtf/gtk/GOwnPtr.h: + +2010-02-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Mark Rowe. + + Fix a handful of other leaks seen on the buildbot. + + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::deref): Delegate through to the subclass version of deref to ensure that + the correct cleanup takes place. This function previously featured some code that attempted to + skip deletion of static UStringImpl's. Closer inspection revealed that it was in fact equivalent + to "if (false)", meaning that UStringImpl's which had their final deref performed via this function + were leaked. + +2010-02-16 Mark Rowe <mrowe@apple.com> + + Reviewed by Gavin Barraclough. + + Fix a handful of leaks seen on the buildbot. + + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::deref): Call URopeImpl::destructNonRecursive rather than delete + to ensure that the rope's fibers are also destroyed. + +2010-02-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=34964 + Leaks tool reports false memory leaks due to Rope implementation. + + A rope is a recursive data structure where each node in the rope holds a set of + pointers, each of which may reference either a string (in UStringImpl form) or + another rope node. A low bit in each pointer is used to distinguish between + rope & string elements, in a fashion similar to the recently-removed + PtrAndFlags class (see https://bugs.webkit.org/show_bug.cgi?id=33731 ). Again, + this causes a problem for Leaks - refactor to remove the magic pointer + mangling. + + Move Rope out from JSString.h and rename to URopeImpl, to match UStringImpl. + Give UStringImpl and URopeImpl a common parent class, UStringOrRopeImpl. + Repurpose an otherwise invalid permutation to flags (static & should report + memory cost) to identify ropes. + + This allows us to change the rope's fibers to interrogate the object rather + than storing a bool within the low bits of the pointer (or in some cases the + use of a common parent class removes the need to determine the type at all - + there is a common interface to ref or get the length of either ropes or strings). + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::keyForCharacterSwitch): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + (JSC::Identifier::addSlowCase): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/JSString.h: + (JSC::): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::~JSString): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::JSStringFinalizerStruct::JSStringFinalizerStruct): + (JSC::RopeBuilder::JSStringFinalizerStruct::): + * runtime/UString.cpp: + (JSC::UString::toStrictUInt32): + (JSC::equal): + * runtime/UString.h: + (JSC::UString::isEmpty): + (JSC::UString::size): + * runtime/UStringImpl.cpp: + (JSC::URopeImpl::derefFibersNonRecursive): + (JSC::URopeImpl::destructNonRecursive): + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::isRope): + (JSC::UStringOrRopeImpl::length): + (JSC::UStringOrRopeImpl::ref): + (JSC::UStringOrRopeImpl::): + (JSC::UStringOrRopeImpl::operator new): + (JSC::UStringOrRopeImpl::UStringOrRopeImpl): + (JSC::UStringImpl::adopt): + (JSC::UStringImpl::createUninitialized): + (JSC::UStringImpl::tryCreateUninitialized): + (JSC::UStringImpl::data): + (JSC::UStringImpl::cost): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::): + (JSC::URopeImpl::tryCreateUninitialized): + (JSC::URopeImpl::initializeFiber): + (JSC::URopeImpl::fiberCount): + (JSC::URopeImpl::fibers): + (JSC::URopeImpl::deref): + (JSC::URopeImpl::URopeImpl): + (JSC::URopeImpl::hasOneRef): + (JSC::UStringOrRopeImpl::deref): + +2010-02-15 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32) + https://bugs.webkit.org/show_bug.cgi?id=34939 + + * jit/JITStubs.cpp: + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build Fix!). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Some general Rope related refactoring. + + Rename Rope::m_ropeLength to m_fiberCount, to be more descriptive. + Rename Rope::m_stringLength to simply m_length (since this is the + more conventional name for the length of a string). Move append + behaviour out into a new RopeBuilder class, so that Rope no longer + needs any knowledge of the JSString or UString implementation. + + Make Rope no longer be nested within JSString. + (Rope now no-longer need reside within JSString.h, but leaving + the change of moving this out to a different header as a separate + change from these renames). + + * JavaScriptCore.exp: + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * runtime/JSString.cpp: + (JSC::Rope::destructNonRecursive): + (JSC::Rope::~Rope): + (JSC::JSString::resolveRope): + (JSC::JSString::toBoolean): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::Rope::Fiber::Fiber): + (JSC::Rope::Fiber::deref): + (JSC::Rope::Fiber::ref): + (JSC::Rope::Fiber::refAndGetLength): + (JSC::Rope::Fiber::isRope): + (JSC::Rope::Fiber::rope): + (JSC::Rope::Fiber::isString): + (JSC::Rope::Fiber::string): + (JSC::Rope::Fiber::nonFiber): + (JSC::Rope::tryCreateUninitialized): + (JSC::Rope::append): + (JSC::Rope::fiberCount): + (JSC::Rope::length): + (JSC::Rope::fibers): + (JSC::Rope::Rope): + (JSC::Rope::operator new): + (JSC::): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::~JSString): + (JSC::RopeBuilder::length): + (JSC::RopeBuilder::canGetIndex): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::isRope): + (JSC::RopeBuilder::fiberCount): + (JSC::JSString::getStringPropertySlot): + * runtime/Operations.h: + (JSC::jsString): + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build fix). + + Add missing cast for !YARR (PPC) builds. + + * runtime/RegExp.cpp: + (JSC::RegExp::match): + +2010-02-14 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Many false leaks in release builds due to PtrAndFlags + + StructureTransitionTable was effectively a smart pointer type, + one machine word in size and wholly contained as a member of + of Structure. It either pointed to an actual table, or could + be used to describe a single transtion entry without use of a + table. + + This, however, worked by using a PtrAndFlags, which is not + compatible with the leaks tool. Since there is no clear way to + obtain another bit for 'free' here, and since there are bits + available up in Structure, merge this functionality back up into + Structure. Having this in a separate class was quite clean + from an enacapsulation perspective, but this solution doesn't + seem to bad - all table access is now intermediated through the + Structure::structureTransitionTableFoo methods, keeping the + optimization fairly well contained. + + This was the last use of PtrAndFlags, so removing the file too. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.h: + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::~Structure): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::hasTransition): + * runtime/Structure.h: + (JSC::Structure::): + (JSC::Structure::structureTransitionTableContains): + (JSC::Structure::structureTransitionTableGet): + (JSC::Structure::structureTransitionTableHasTransition): + (JSC::Structure::structureTransitionTableRemove): + (JSC::Structure::structureTransitionTableAdd): + (JSC::Structure::structureTransitionTable): + (JSC::Structure::setStructureTransitionTable): + (JSC::Structure::singleTransition): + (JSC::Structure::setSingleTransition): + * runtime/StructureTransitionTable.h: + * wtf/PtrAndFlags.h: Removed. + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Rubber Stamped by Geoff Garen. + + Bug 34948 - tryMakeString should fail on error in length calculation + + Ooops! - "bool overflow" argument should have been "bool& overflow". + + * runtime/UString.h: + (JSC::sumWithOverflow): + (JSC::tryMakeString): + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build Fix (pt 2!)). + + Some symbol names have changed, remove, will readd if required. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Build Fix (pt 1?)). + + Some symbol names have changed, remove, will readd if required. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Removed some mistaken code added in http://trac.webkit.org/changeset/53860. + + * API/APIShims.h: + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): No need to start/stop the + timeout checker when calling out from the API to the client; we want to + monitor the VM for timeouts, not the client. This mistake was harmless / + undetectable, since it's totally redundant with the APIEntryShim, which + also starts / stops the timeout checker. + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 34952 - String lengths in UString should be unsigned. + This matches WebCore::StringImpl, and better unifies behaviour throughout JSC. + + * JavaScriptCore.exp: + * bytecode/EvalCodeCache.h: + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + * runtime/Identifier.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEscape): + * runtime/JSONObject.cpp: + (JSC::gap): + (JSC::Stringifier::indent): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncSplit): + (JSC::trimString): + * runtime/UString.cpp: + (JSC::UString::UString): + (JSC::UString::from): + (JSC::UString::getCString): + (JSC::UString::ascii): + (JSC::UString::operator[]): + (JSC::UString::toStrictUInt32): + (JSC::UString::find): + (JSC::UString::rfind): + (JSC::UString::substr): + (JSC::operator<): + (JSC::operator>): + (JSC::compare): + (JSC::equal): + (JSC::UString::UTF8String): + * runtime/UString.h: + (JSC::UString::size): + (JSC::operator==): + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::create): + * runtime/UStringImpl.h: + (JSC::UStringImpl::create): + (JSC::UStringImpl::size): + (JSC::UStringImpl::computeHash): + (JSC::UStringImpl::UStringImpl): + +2010-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 34948 - tryMakeString should fail on error in length calculation + + The sum of the length of substrings could overflow. + + * runtime/UString.h: + (JSC::sumWithOverflow): + (JSC::tryMakeString): + +2010-02-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Fixed <rdar://problem/7628524> Crash beneath JSGlobalContextRelease when + typing in Google search field with GuardMalloc/full page heap enabled + + * API/JSContextRef.cpp: Don't use APIEntryShim, since that requires + a JSGlobalData, which this function destroys. Do use setCurrentIdentifierTable + and JSLock instead, since those are the two features of APIEntryShim we + require. + +2010-02-15 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Laszlo Gombos. + + Added additional parameter to create_rvct_stubs + for setting the offset of thunkReturnAddress. + https://bugs.webkit.org/show_bug.cgi?id=34657 + + * create_rvct_stubs: + * jit/JITStubs.cpp: + +2010-02-15 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Fix QScriptValue::toIntXX methods. + + More ECMA Script compliance. + + [Qt] QScriptValue::toIntXX returns incorrect values + https://bugs.webkit.org/show_bug.cgi?id=34847 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::toInteger): + (QScriptValuePrivate::toInt32): + (QScriptValuePrivate::toUInt32): + (QScriptValuePrivate::toUInt16): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::toInteger_initData): + (tst_QScriptValue::toInteger_makeData): + (tst_QScriptValue::toInteger_test): + (tst_QScriptValue::toInt32_initData): + (tst_QScriptValue::toInt32_makeData): + (tst_QScriptValue::toInt32_test): + (tst_QScriptValue::toUInt32_initData): + (tst_QScriptValue::toUInt32_makeData): + (tst_QScriptValue::toUInt32_test): + (tst_QScriptValue::toUInt16_initData): + (tst_QScriptValue::toUInt16_makeData): + (tst_QScriptValue::toUInt16_test): + +2010-02-14 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Adam Barth. + + Implement NEVER_INLINE and NO_RETURN for RVCT + https://bugs.webkit.org/show_bug.cgi?id=34740 + + * wtf/AlwaysInline.h: + +2010-02-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Remove uses of PtrAndFlags from JIT data stuctures. + + These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid + permutation of pointer states in MethodCallLinkInfo to represent the removed bits. + + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::seenOnce): + (JSC::CallLinkInfo::setSeen): + (JSC::MethodCallLinkInfo::MethodCallLinkInfo): + (JSC::MethodCallLinkInfo::seenOnce): + (JSC::MethodCallLinkInfo::setSeen): + * jit/JIT.cpp: + (JSC::JIT::unlinkCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchMethodCallProto): + * runtime/UString.h: + +2010-02-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Many false leaks in release builds due to PtrAndFlags + + Remove UntypedPtrAndBitfield (similar to PtrAndFlags) in UStringImpl, + and steal bits from the refCount instead. + + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::baseSharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::cost): + (JSC::UStringImpl::isIdentifier): + (JSC::UStringImpl::setIsIdentifier): + (JSC::UStringImpl::ref): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::bufferOwnership): + (JSC::UStringImpl::isStatic): + (JSC::UStringImpl::): + +2010-02-12 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Removed an unnecessary data dependency from my last patch. + + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::markChildren): Since isAnyStringMarked being false + is a condition of entering the loop, we can just use '=' instead of '|='. + +2010-02-12 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Tor Arne Vestbø. + + Additional refptr/passrefptr workarounds for WINSCW compiler + https://bugs.webkit.org/show_bug.cgi?id=28054 + + * wtf/PassRefPtr.h: + (WTF::refIfNotNull): + (WTF::PassRefPtr::PassRefPtr): + (WTF::PassRefPtr::~PassRefPtr): + (WTF::PassRefPtr::clear): + (WTF::::operator): + * wtf/RefPtr.h: + (WTF::RefPtr::RefPtr): + (WTF::::operator): + +2010-02-12 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Tor Arne Vestbø. + + Additional refptr/passrefptr workarounds for WINSCW compiler + https://bugs.webkit.org/show_bug.cgi?id=28054 + + * wtf/PassRefPtr.h: + (WTF::refIfNotNull): + (WTF::PassRefPtr::PassRefPtr): + (WTF::PassRefPtr::~PassRefPtr): + (WTF::PassRefPtr::clear): + (WTF::::operator): + * wtf/RefPtr.h: + (WTF::RefPtr::RefPtr): + (WTF::::operator): + 2010-02-12 Janne Koskinen <janne.p.koskinen@digia.com> Reviewed by Tor Arne Vestbø. @@ -7050,7 +12877,7 @@ The very last cell in the block is not allocated -- should not be marked. Fix branchDouble behaviour on ARM THUMB2 JIT. The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch - for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't + for DoubleEqualOrUnordered, however this is incorrect - ConditionEQ won't branch on unordered operands. Similarly, DoubleLessThanOrUnordered & DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO & ARMv7Assembler::ConditionLS, whereas they should be using |