diff options
author | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
commit | 5f1ab04193ad0130ca8204aadaceae083aca9881 (patch) | |
tree | 5a92cd389e2cfe7fb67197ce14b38469462379f8 /JavaScriptCore/ChangeLog | |
parent | 194315e5a908cc8ed67d597010544803eef1ac59 (diff) | |
download | external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2 |
Get WebKit r44544.
Diffstat (limited to 'JavaScriptCore/ChangeLog')
-rw-r--r-- | JavaScriptCore/ChangeLog | 8906 |
1 files changed, 8906 insertions, 0 deletions
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index 2cecfd2..d06dfa0 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,8909 @@ +2009-06-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Enable JIT_OPTIMIZE_CALL & JIT_OPTIMIZE_METHOD_CALLS on ARMv7 platforms. + + These optimizations function correctly with no further changes. + + * wtf/Platform.h: + Change to enable JIT_OPTIMIZE_CALL & JIT_OPTIMIZE_METHOD_CALLS. + +2009-06-09 Gavin Barraclough <barraclough@apple.com> + + Not Reviewed, build fix. + + * assembler/MacroAssemblerARMv7.h: + +2009-06-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Enable JIT_OPTIMIZE_ARITHMETIC on ARMv7 platforms. + + Temporarily split support for 'branchTruncateDoubleToInt32' onto its own switch + ('supportsFloatingPointTruncate'). See comment in MacroAssemblerARMv7, we need + to work out wherther we are going to be able to support the current interface on + all platforms, or whether this should be refactored. + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::supportsFloatingPoint): + Add implementation of supportsFloatingPointTruncate (returns true). + (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate): + Add implementation of supportsFloatingPointTruncate (returns false). + (JSC::MacroAssemblerARMv7::loadDouble): + (JSC::MacroAssemblerARMv7::storeDouble): + (JSC::MacroAssemblerARMv7::addDouble): + (JSC::MacroAssemblerARMv7::subDouble): + (JSC::MacroAssemblerARMv7::mulDouble): + (JSC::MacroAssemblerARMv7::convertInt32ToDouble): + (JSC::MacroAssemblerARMv7::branchDouble): + Implement FP code genertion operations. + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::supportsFloatingPointTruncate): + Add implementation of supportsFloatingPointTruncate (returns true). + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate): + Add implementation of supportsFloatingPointTruncate (returns true). + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_rshift): + Changed to call supportsFloatingPointTruncate(). + (JSC::JIT::emitSlow_op_rshift): + Changed to call supportsFloatingPointTruncate(). + * wtf/Platform.h: + Change to enable JIT_OPTIMIZE_ARITHMETIC. + +2009-06-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Mark Rowe & Geoff Garen. + + Enable JIT_OPTIMIZE_PROPERTY_ACCESS on ARMv7 platforms. + + Firm up interface for planting load intructions that will be repatched by + repatchLoadPtrToLEA(). This method should now no longer be applied to just + any loadPtr instruction. + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::loadPtrWithPatchToLEA): + Implement loadPtrWithPatchToLEA interface (plants a load with a fixed width address). + (JSC::MacroAssemblerARMv7::move): + (JSC::MacroAssemblerARMv7::nearCall): + (JSC::MacroAssemblerARMv7::call): + (JSC::MacroAssemblerARMv7::moveWithPatch): + (JSC::MacroAssemblerARMv7::tailRecursiveCall): + Switch to use common method 'moveFixedWidthEncoding()' to perform fixed width (often patchable) loads. + (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding): + Move an immediate to a register, always plants movT3/movt instruction pair. + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::loadPtrWithPatchToLEA): + Implement loadPtrWithPatchToLEA interface (just a regular 32-bit load on x86). + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::loadPtrWithPatchToLEA): + Implement loadPtrWithPatchToLEA interface (just a regular 64-bit load on x86_64). + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::emit_op_put_by_id): + * wtf/Platform.h: + Change to enable JIT_OPTIMIZE_PROPERTY_ACCESS. + +2009-06-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Enable JS language JIT for ARM thumb2 platforms. Add ARMv7 specific + asm & constants, add appropriate configuration switches to Platform.h. + + Landing this disabled until jump linking is completed (see YARR jit patch). + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::load32): + Fix: should load pointer with ImmPtr not Imm32. + (JSC::MacroAssemblerARMv7::store32): + Fix: should load pointer with ImmPtr not Imm32. + (JSC::MacroAssemblerARMv7::move): + Fix: When moving an Imm32 that is actually a pointer, should call movT3() + not mov(), to ensure code generation is repeatable (for exception handling). + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + Disable JIT_OPTIMIZE_NATIVE_CALL specific code generation if the optimization is not enabled. + * jit/JIT.h: + Add ARMv7 specific values of constants & register names. + * jit/JITInlineMethods.h: + (JSC::JIT::preverveReturnAddressAfterCall): + (JSC::JIT::restoreReturnAddressBeforeReturn): + (JSC::JIT::restoreArgumentReferenceForTrampoline): + Implement for ARMv7 (move value to/from lr). + * jit/JITStubs.cpp: + Add JIT entry/thow trampolines, add macro to add thunk wrapper around stub routines. + * jit/JITStubs.h: + (JSC::JITStackFrame::returnAddressSlot): + Add ARMv7 stack frame object. + * wtf/Platform.h: + Add changes necessary to allow JIT to build on this platform, disabled. + +2009-06-08 Mark Rowe <mrowe@apple.com> + + Speculative GTK build fix. + + * wtf/DateMath.cpp: + +2009-06-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Mark Rowe. + + Previous patch caused a regression. + + Restructure so no new (empty, inline) function calls are added on x86. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::makeWritable): + (JSC::ExecutableAllocator::makeExecutable): + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + +2009-06-08 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, GTK build fix (thanks, bdash). + + * GNUmakefile.am: Moved DateMath with all other wtf kin. + +2009-06-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Add (incomplete) support to YARR for running with the jit enabled + on Arm thumb2 platforms. Adds new Assembler/MacroAssembler classes, + along with cache flushing support, tweaks to MacroAssemblerCodePtr + to support decorated thumb code pointers, and new enter/exit code + to YARR jit for the platform. + + Support for this platform is still under development - the assembler + currrently only supports planting and linking jumps with a 16Mb range. + As such, initially commiting in a disabled state. + + * JavaScriptCore.xcodeproj/project.pbxproj: + Add new assembler files. + * assembler/ARMv7Assembler.h: Added. + Add new Assembler. + * assembler/AbstractMacroAssembler.h: + Tweaks to ensure sizes of pointer values planted in JIT code do not change. + * assembler/MacroAssembler.h: + On ARMv7 platforms use MacroAssemblerARMv7. + * assembler/MacroAssemblerARMv7.h: Added. + Add new MacroAssembler. + * assembler/MacroAssemblerCodeRef.h: + (JSC::FunctionPtr::FunctionPtr): + Add better ASSERT. + (JSC::ReturnAddressPtr::ReturnAddressPtr): + Add better ASSERT. + (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): + On ARMv7, MacroAssemblerCodePtr's mush be 'decorated' with a low bit set, + to indicate to the processor that the code is thumb code, not traditional + 32-bit ARM. + (JSC::MacroAssemblerCodePtr::dataLocation): + On ARMv7, decoration must be removed. + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::makeWritable): + Reformatted, no change. + (JSC::ExecutableAllocator::makeExecutable): + When marking code executable also cache flush it, where necessary. + (JSC::ExecutableAllocator::MakeWritable::MakeWritable): + Only use the null implementation of this class if both !ASSEMBLER_WX_EXCLUSIVE + and running on x86(_64) - on other platforms we may also need ensure that + makeExecutable is called at the end to flush caches. + (JSC::ExecutableAllocator::reprotectRegion): + Reformatted, no change. + (JSC::ExecutableAllocator::cacheFlush): + Cache flush a region of memory, or platforms where this is necessary. + * wtf/Platform.h: + Add changes necessary to allow YARR jit to build on this platform, disabled. + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): + (JSC::Yarr::RegexGenerator::generateReturn): + Add support to these methods for ARMv7. + +2009-06-08 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, fix my previous fix. + + * runtime/DateInstance.cpp: + (JSC::DateInstance::msToGregorianDateTime): Use WTF namespace qualifier to + disambiguate func signatures. + +2009-06-08 Mark Rowe <mrowe@apple.com> + + Attempt to fix the Tiger build. + + * wtf/Platform.h: Only test the value of the macro once we know it is defined. + +2009-06-08 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, another Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-06-08 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, projectile-fixing Windows build. + + * runtime/DateConversion.cpp: Added StringExtras include. + * wtf/DateMath.cpp: Replaced math with algorithm include (looking for std::min def for Windows). + +2009-06-08 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, Windows build fix. + + * runtime/DateConstructor.cpp: Changed to use WTF namespace. + * runtime/DateConversion.cpp: Added UString include. + * runtime/DateInstance.cpp: Changed to use WTF namespace. + * wtf/DateMath.cpp: Added math include. + +2009-06-08 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=26238 + Move most of runtime/DateMath functions to wtf/DateMath, and split off conversion-related + helpers to DateConversion. + + * AllInOneFile.cpp: Changed DateMath->DateConversion. + * GNUmakefile.am: Ditto and added DateMath. + * JavaScriptCore.exp: Ditto. + * JavaScriptCore.pri: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added DateMath. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * JavaScriptCoreSources.bkl: Ditto. + * pcre/pcre_exec.cpp: Changed to use DateMath. + * profiler/ProfileNode.cpp: + (JSC::getCount): Changed to use DateConversion. + * runtime/DateConstructor.cpp: Ditto. + * runtime/DateConversion.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp. + (JSC::parseDate): Refactored to use null-terminated characters as input. + * runtime/DateConversion.h: Copied from JavaScriptCore/runtime/DateMath.h. + * runtime/DateInstance.cpp: Changed to use wtf/DateMath. + * runtime/DateInstance.h: Ditto. + * runtime/DateMath.cpp: Removed. + * runtime/DateMath.h: Removed. + * runtime/DatePrototype.cpp: Ditto. + * runtime/InitializeThreading.cpp: Ditto. + * wtf/DateMath.cpp: Copied from JavaScriptCore/runtime/DateMath.cpp. + * wtf/DateMath.h: Copied from JavaScriptCore/runtime/DateMath.h. + +2009-06-08 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + +2009-06-07 David Kilzer <ddkilzer@apple.com> + + Make JavaScriptCore compile for iPhone and iPhone Simulator + + Reviewed by Gavin Barraclough. + + * Configurations/Base.xcconfig: Split GCC_ENABLE_OBJC_GC on + $(REAL_PLATFORM_NAME). Added $(ARCHS_UNIVERSAL_IPHONE_OS) to + VALID_ARCHS. Added REAL_PLATFORM_NAME_iphoneos, + REAL_PLATFORM_NAME_iphonesimulator, HAVE_DTRACE_iphoneos and + HAVE_DTRACE_iphonesimulator variables. + * Configurations/DebugRelase.xcconfig: Split ARCHS definition on + $(REAL_PLATFORM_NAME). + * Configurations/JavaScriptCore.xcconfig: Added + EXPORTED_SYMBOLS_FILE_armv6 and EXPORTED_SYMBOLS_FILE_armv7 + variables. Split OTHER_LDFLAGS into OTHER_LDFLAGS_BASE and + OTHER_LDFLAGS_$(REAL_PLATFORM_NAME) since CoreServices.framework + is only linked to on Mac OS X. + * JavaScriptCore.xcodeproj/project.pbxproj: Removed references + to CoreServices.framework since it's linked using OTHER_LDFLAGS + in JavaScriptCore.xcconfig. + * profiler/ProfilerServer.mm: Added #import for iPhone + Simulator. + (-[ProfilerServer init]): Conditionalize use of + NSDistributedNotificationCenter to non-iPhone or iPhone + Simulator. + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::): Build fix for iPhone and iPhone + Simulator. + * wtf/Platform.h: Defined PLATFORM(IPHONE) and + PLATFORM(IPHONE_SIMULATOR). + * wtf/ThreadingPthreads.cpp: + (WTF::setThreadNameInternal): Build fix for iPhone and iPhone + Simulator. + +2009-06-08 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Use $QMAKE_PATH_SEP instead of hardcoded / to fix Windows build + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + * jsc.pro: + +2009-06-07 Gavin Barraclough <barraclough@apple.com> + + RS by Sam Weinig. + + Remove bonus bogus \n from last commit. + + * jit/JITStubs.cpp: + (JSC::): + +2009-06-07 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Change the implementation of op_throw so the stub function always modifies its + return address - if it doesn't find a 'catch' it will switch to a trampoline + to force a return from JIT execution. This saves memory, by avoiding the need + for a unique return for every op_throw. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_throw): + JITStubs::cti_op_throw now always changes its return address, + remove return code generated after the stub call (this is now + handled by ctiOpThrowNotCaught). + * jit/JITStubs.cpp: + (JSC::): + Add ctiOpThrowNotCaught definitions. + (JSC::JITStubs::DEFINE_STUB_FUNCTION): + Change cti_op_throw to always change its return address. + * jit/JITStubs.h: + Add ctiOpThrowNotCaught declaration. + +2009-06-05 Gavin Barraclough <barraclough@apple.com> + + Rudder stamped by Sam Weinig. + + Add missing ASSERT. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::getRelocatedAddress): + +2009-06-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Switch storePtrWithPatch to take the initial immediate value as an argument. + + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::storePtrWithPatch): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::storePtrWithPatch): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jsr): + +2009-06-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Remove patchLength..tByIdExternalLoadPrefix magic numbers from JIT.h. + + These aren't really suitable values to be tracking within common code + of the JIT, since they are not (and realistically cannot) be checked + by ASSERTs, as the other repatch offsets are. Move this functionality + (skipping the REX prefix when patching load instructions to LEAs on + x86-64) into the X86Assembler. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::CodeLocationInstruction::repatchLoadPtrToLEA): + * assembler/X86Assembler.h: + (JSC::X86Assembler::repatchLoadPtrToLEA): + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + +2009-06-05 Shinichiro Hamaji <hamaji@chromium.org> + + Bug 26160: Compile fails in MacOSX when GNU fileutils are installed + + <https://bugs.webkit.org/show_bug.cgi?id=26160> + + Reviewed by Alexey Proskuryakov. + + Use /bin/ln instead of ln for cases where this command is used with -h option. + As this option is not supported by GNU fileutils, this change helps users + who have GNU fileutils in their PATH. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-06-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Remove DoubleNotEqual floating point comparison condition for now - + it is not used, and it is unclear the semantics are correct (I think + this comparison would actually give you not-equal-or-unordered, which + might be what is wanted... we can revisit this interface & get it + right when required). + + Also, fix asserts in branchArith32 ops. All adds & subs can check + for Signed, multiply only sets OF so can only check for overflow. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::): + (JSC::MacroAssemblerX86Common::branchAdd32): + (JSC::MacroAssemblerX86Common::branchMul32): + (JSC::MacroAssemblerX86Common::branchSub32): + +2009-06-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Minor tidy up in JITStubs. + + * jit/JITStubs.cpp: + (JSC::StackHack::StackHack): + * jit/JITStubs.h: + +2009-06-05 Koen Kooi <koen@dominion.thruhere.net> + + Reviewed by Xan Lopez. + + Build fix for glib unicode backend. + + * wtf/unicode/glib/UnicodeMacrosFromICU.h: + +2009-06-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + 3 tiny cleanups: + + * assembler/MacroAssemblerX86.h: + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::storePtrWithPatch): + store*() methods should take an ImplicitAddress, rather than an Address. + * assembler/X86Assembler.h: + Make patchPointer private. + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_ret): + Remove empty line at end of function. + +2009-06-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Encapsulate many uses of void* in the assembler & jit with types that provide + more semantic information. The new types are: + + * MacroAssemblerCodePtr - this wraps a pointer into JIT generated code. + * FunctionPtr - this wraps a pointer to a C/C++ function in JSC. + * ReturnAddressPtr - this wraps a return address resulting from a 'call' instruction. + + Wrapping these types allows for stronger type-checking than is possible with everything + represented a void*. For example, it is now enforced by the type system that near + calls can only be linked to JIT code and not to C functions in JSC (this was previously + required, but could not be enforced on the interface). + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::CodeLocationCommon::CodeLocationCommon): + (JSC::AbstractMacroAssembler::CodeLocationCommon::dataLocation): + (JSC::AbstractMacroAssembler::CodeLocationCommon::executableAddress): + (JSC::AbstractMacroAssembler::CodeLocationCommon::reset): + (JSC::AbstractMacroAssembler::CodeLocationInstruction::repatchLoadToLEA): + (JSC::AbstractMacroAssembler::CodeLocationInstruction::CodeLocationInstruction): + (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForSwitch): + (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForExceptionHandler): + (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForJSR): + (JSC::AbstractMacroAssembler::CodeLocationLabel::operator!): + (JSC::AbstractMacroAssembler::CodeLocationLabel::reset): + (JSC::AbstractMacroAssembler::CodeLocationLabel::CodeLocationLabel): + (JSC::AbstractMacroAssembler::CodeLocationLabel::getJumpDestination): + (JSC::AbstractMacroAssembler::CodeLocationJump::relink): + (JSC::AbstractMacroAssembler::CodeLocationJump::CodeLocationJump): + (JSC::AbstractMacroAssembler::CodeLocationCall::relink): + (JSC::AbstractMacroAssembler::CodeLocationCall::calleeReturnAddressValue): + (JSC::AbstractMacroAssembler::CodeLocationCall::CodeLocationCall): + (JSC::AbstractMacroAssembler::CodeLocationNearCall::relink): + (JSC::AbstractMacroAssembler::CodeLocationNearCall::calleeReturnAddressValue): + (JSC::AbstractMacroAssembler::CodeLocationNearCall::CodeLocationNearCall): + (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch): + (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::CodeLocationDataLabel32): + (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch): + (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::CodeLocationDataLabelPtr): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToTrampoline): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToTrampoline): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::addressForLookup): + (JSC::AbstractMacroAssembler::trampolineAt): + (JSC::AbstractMacroAssembler::PatchBuffer::link): + (JSC::AbstractMacroAssembler::PatchBuffer::performFinalization): + (JSC::::CodeLocationCommon::instructionAtOffset): + (JSC::::CodeLocationCommon::labelAtOffset): + (JSC::::CodeLocationCommon::jumpAtOffset): + (JSC::::CodeLocationCommon::callAtOffset): + (JSC::::CodeLocationCommon::nearCallAtOffset): + (JSC::::CodeLocationCommon::dataLabelPtrAtOffset): + (JSC::::CodeLocationCommon::dataLabel32AtOffset): + * assembler/MacroAssemblerCodeRef.h: + (JSC::FunctionPtr::FunctionPtr): + (JSC::FunctionPtr::value): + (JSC::FunctionPtr::executableAddress): + (JSC::ReturnAddressPtr::ReturnAddressPtr): + (JSC::ReturnAddressPtr::value): + (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): + (JSC::MacroAssemblerCodePtr::executableAddress): + (JSC::MacroAssemblerCodePtr::dataLocation): + (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef): + * assembler/X86Assembler.h: + (JSC::X86Assembler::patchPointerForCall): + * jit/JIT.cpp: + (JSC::ctiPatchNearCallByReturnAddress): + (JSC::ctiPatchCallByReturnAddress): + (JSC::JIT::privateCompile): + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JIT.h: + (JSC::JIT::compileCTIMachineTrampolines): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + * jit/JITCode.h: + (JSC::JITCode::operator !): + (JSC::JITCode::addressForCall): + (JSC::JITCode::offsetOf): + (JSC::JITCode::execute): + (JSC::JITCode::size): + (JSC::JITCode::HostFunction): + * jit/JITInlineMethods.h: + (JSC::JIT::emitNakedCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::JITStubs::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::JITThunks::ctiArrayLengthTrampoline): + (JSC::JITThunks::ctiStringLengthTrampoline): + (JSC::JITThunks::ctiVirtualCallPreLink): + (JSC::JITThunks::ctiVirtualCallLink): + (JSC::JITThunks::ctiVirtualCall): + (JSC::JITThunks::ctiNativeCallThunk): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::operator!): + (JSC::Yarr::RegexCodeBlock::execute): + +2009-06-05 Antti Koivisto <antti@apple.com> + + Try to unbreak Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-06-03 Antti Koivisto <antti@apple.com> + + Reviewed by Dave Kilzer. + + https://bugs.webkit.org/show_bug.cgi?id=13128 + Safari not obeying cache header + + Export JSC::parseDate() + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-06-04 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Bug in property caching of getters and setters. + + Make sure that the transition logic accounts for getters and setters. + If we don't we end up screwing up the transition tables so that some + transitions will start incorrectly believing that they need to check + for getters and setters. + + * runtime/JSObject.cpp: + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + * runtime/JSObject.h: + (JSC::): + * runtime/Structure.h: + +2009-06-04 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Minor tweak to PatchBuffer, change it so it no longer holds a CodeRef, and instead + holds a separate code pointer and executable pool. Since it now always holds its + own copy of the code size, and to simplify the construction sequence, it's neater + this way. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::PatchBuffer::PatchBuffer): + (JSC::AbstractMacroAssembler::PatchBuffer::finalizeCode): + (JSC::AbstractMacroAssembler::PatchBuffer::code): + (JSC::AbstractMacroAssembler::PatchBuffer::performFinalization): + +2009-06-04 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Remove 'JIT_STUB_ARGUMENT_STACK' this is unused and untested. + + This just leaves JIT_STUB_ARGUMENT_REGISTER and JIT_STUB_ARGUMENT_VA_LIST. + Since JIT_STUB_ARGUMENT_REGISTER is the sensible configuration on most platforms, + remove this define and make this the default behaviour. + Platforms must now define JIT_STUB_ARGUMENT_VA_LIST to get crazy va_list voodoo, + if they so desire. + + (Refactoring of #ifdefs only, no functional change, no performance impact.) + + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::restoreArgumentReference): + (JSC::JIT::restoreArgumentReferenceForTrampoline): + * jit/JITStubs.cpp: + (JSC::): + * jit/JITStubs.h: + * wtf/Platform.h: + +2009-06-04 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + * jit/JITArithmetic.cpp: + Remove some redundant typedefs, unused since arithmetic was added to the MacroAssembler interface. + +2009-06-04 Brent Fulgham <bfulgham@webkit.org> + + Build fix due to header include problem. + + * interpreter/Interpreter.h: Remove wtf from includes so that + compile can find the headers in expected places. + +2009-06-04 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + HashTable class (JavaScriptCore/wtf/HashTable.h) doesn't instantiated by 'new', so + inheritance was removed. HashTable struct has been instantiated by operator new in + JSGlobalData.cpp:106. + HashTable couldn't inherited from FastAllocBase since struct with inheritance is + no longer POD, so HashTable struct has been instantiated by fastNew, destroyed by + fastDelete. + + * interpreter/Interpreter.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * wtf/HashTable.h: + +2009-06-04 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Wrap the code that plants pushes/pops planted by JIT in explanatorily named + methods; move property storage reallocation into a standard stub function. + + ~No performance impact (possible <1% progression on x86-64, likely just noise). + + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + (JSC::JIT::privateCompileCTIMachineTrampolines): + Wrap calls to push/pop. + * jit/JIT.h: + Declare the new wrapper methods. + * jit/JITInlineMethods.h: + (JSC::JIT::preverveReturnAddressAfterCall): + (JSC::JIT::restoreReturnAddressBeforeReturn): + Define the new wrapper methods. + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_ret): + Wrap calls to push/pop. + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + Move property storage reallocation into a standard stub function. + * jit/JITStubs.cpp: + (JSC::JITStubs::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::JITStubs::): + +2009-06-04 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Ariya Hidayat. + + [Qt] Single-threaded QtWebKit configuration + <https://bugs.webkit.org/show_bug.cgi?id=26015> + + * JavaScriptCore.pri: Use ThreadingNone.cpp instead of + ThreadingQt.cpp and make sure ENABLE_JSC_MULTIPLE_THREADS is turned off + when ENABLE_SINGLE_THREADED is tuned on + * wtf/ThreadingNone.cpp: + (WTF::ThreadCondition::wait): Fix compilation warning. + (WTF::ThreadCondition::timedWait): Ditto. + +2009-06-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Anders Carlsson. + + Remove workaround that was added to address <rdar://problem/5488678> as it no longer affects our Tiger builds. + + * Configurations/Base.xcconfig: + +2009-06-02 Xan Lopez <xlopez@igalia.com> + + Reviewed by Sam Weinig. + + Use C-style comments in Platform.h so it can be included from C + files. + + * wtf/Platform.h: + +2009-06-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Rubber-stamped by Simon Hausmann. + + Use File::Spec->tmpdir instead of hardcoded paths for tempfile() dir + + This fixes the Windows-build if the user does not have a /tmp directory. + + * pcre/dftables: + +2009-06-02 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver ">>" Hunt. + + emitSlow_op_rshift is linking the wrong number of slow cases, if !supportsFloatingPoint(). + Fixerate, and refactor/comment the code a little to make it clearer what is going on. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + +2009-06-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY - speculative windows build fix (errm, for the other patch!). + + * jit/JITStubs.cpp: + (JSC::): + +2009-06-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY - speculative windows build fix. + + * assembler/AbstractMacroAssembler.h: + (JSC::::CodeLocationCall::CodeLocationCall): + (JSC::::CodeLocationNearCall::CodeLocationNearCall): + +2009-06-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Olliej Hunt. + + Change JITStub functions from being static members on the JITStub class to be + global extern "C" functions, and switch their the function signature declaration + in the definition of the functions to be C-macro generated. This makes it easier + to work with the stub functions from assembler code (since the names no longer + require mangling), and by delaring the functions with a macro we can look at + also auto-generating asm thunks to wrap the JITStub functions to perform the + work currently in 'restoreArgumentReference' (as a memory saving). + + Making this change also forces us to be a bit more realistic about what is private + on the Register and CallFrame objects. Presently most everything on these classes + is private, and the classes have plenty of friends. We could befriend all the + global functions to perpetuate the delusion of encapsulation, but using friends is + a bit of a sledgehammer solution here - since friends can poke around with all of + the class's privates, and since all the major classes taht operate on Regsiters are + currently friends, right there is currently in practice very little protection at + all. Better to start removing friend delclarations, and exposing just the parts + that need to be exposed. + + * interpreter/CallFrame.h: + (JSC::ExecState::returnPC): + (JSC::ExecState::setCallerFrame): + (JSC::ExecState::returnValueRegister): + (JSC::ExecState::setArgumentCount): + (JSC::ExecState::setCallee): + (JSC::ExecState::setCodeBlock): + * interpreter/Interpreter.h: + * interpreter/Register.h: + (JSC::Register::Register): + (JSC::Register::i): + * jit/JITStubs.cpp: + (JSC::): + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::JITStubs::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::JITStubs::): + * runtime/JSFunction.h: + (JSC::JSFunction::nativeFunction): + (JSC::JSFunction::classInfo): + * runtime/JSGlobalData.h: + +2009-06-01 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Tidy up the literal parser. + + Make the number lexing in the LiteralParser exactly match the JSON spec, which + makes us cover more cases, but also more strict. Also made string lexing only + allow double-quoted strings. + + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::Lexer::lex): + (JSC::LiteralParser::Lexer::lexString): + (JSC::LiteralParser::Lexer::lexNumber): + +2009-06-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam "WX" Weinig. + + Allow the JIT to operate without relying on use of RWX memory, on platforms where this is supported. + + This patch adds a switch to Platform.h (ENABLE_ASSEMBLER_WX_EXCLUSIVE) which enables this mode of operation. + When this flag is set, all executable memory will be allocated RX, and switched to RW only whilst being + modified. Upon completion of code generation the protection is switched back to RX to allow execution. + + Further optimization will be required before it is desirable to enable this mode of operation by default; + enabling this presently incurs a 5%-10% regression. + + (Submitting disabled - no performance impact). + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::CodeLocationInstruction::repatchLoadToLEA): + (JSC::AbstractMacroAssembler::CodeLocationLabel::fromFunctionPointer): + (JSC::AbstractMacroAssembler::CodeLocationJump::relink): + (JSC::AbstractMacroAssembler::CodeLocationCall::relink): + (JSC::AbstractMacroAssembler::CodeLocationNearCall::relink): + (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch): + (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToTrampoline): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToTrampoline): + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkNearCallerToFunction): + (JSC::AbstractMacroAssembler::PatchBuffer::PatchBuffer): + (JSC::AbstractMacroAssembler::PatchBuffer::~PatchBuffer): + (JSC::AbstractMacroAssembler::PatchBuffer::link): + (JSC::AbstractMacroAssembler::PatchBuffer::patch): + (JSC::AbstractMacroAssembler::PatchBuffer::performFinalization): + (JSC::::CodeLocationCommon::nearCallAtOffset): + (JSC::::CodeLocationCall::CodeLocationCall): + (JSC::::CodeLocationNearCall::CodeLocationNearCall): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::executableCopy): + * assembler/X86Assembler.h: + (JSC::CAN_SIGN_EXTEND_U32_64): + (JSC::X86Assembler::linkJump): + (JSC::X86Assembler::linkCall): + (JSC::X86Assembler::patchPointer): + (JSC::X86Assembler::relinkJump): + (JSC::X86Assembler::relinkCall): + (JSC::X86Assembler::repatchInt32): + (JSC::X86Assembler::repatchPointer): + (JSC::X86Assembler::repatchLoadToLEA): + (JSC::X86Assembler::patchInt32): + (JSC::X86Assembler::patchRel32): + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::): + (JSC::ExecutableAllocator::makeWritable): + (JSC::ExecutableAllocator::makeExecutable): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::reprotectRegion): + * jit/ExecutableAllocatorWin.cpp: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + * wtf/Platform.h: + +2009-05-29 Zoltan Horvath <hzoltan@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + Inherits Interpreter class from FastAllocBase because it has been + instantiated by 'new' in JavaScriptCore/runtime/JSGlobalData.cpp. + + * interpreter/Interpreter.h: + +2009-06-01 David Levin <levin@chromium.org> + + Reviewed by NOBODY (windows build fix). + + Add exports for windows (corresponding to the JavaScriptCore.exp modification + in the previous change). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-06-01 David Levin <levin@chromium.org> + + Reviewed by Darin Alder and Maciej Stachowiak. + + Bug 26057: StringImpl should share buffers with UString. + https://bugs.webkit.org/show_bug.cgi?id=26057 + + * JavaScriptCore.exp: + * runtime/UString.cpp: + (JSC::UString::Rep::create): + (JSC::UString::BaseString::sharedBuffer): Only do the sharing when + the buffer exceeds a certain size. The size was tuned by running + various dom benchmarks with numbers ranging from 20 to 800 and finding + a place that seemed to do the best overall. + * runtime/UString.h: + +2009-05-31 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Olliej "you just need to change NativeFunctionWrapper.h" Hunt. + + Add ENABLE_JIT_OPTIMIZE_NATIVE_CALL switch to allow JIT to operate without native call optimizations. + + * runtime/NativeFunctionWrapper.h: + * wtf/Platform.h: + +2009-05-30 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/6935193> REGRESSION (r42734): Celtic Kane JavaScript benchmark does not run: + "Maximum call stack size exceeded" + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): Use the same recursion limit as the other recursion checks. + We need a limit of at least 100 to run the benchmark above. + (JSC::arrayProtoFuncToLocaleString): Ditto. + (JSC::arrayProtoFuncJoin): Ditto. + +2009-05-28 Dirk Schulze <krit@webkit.org> + + Reviewed by Nikolas Zimmermann. + + Added new build flag --filters for Mac. More details in WebCore/ChangeLog. + + * Configurations/FeatureDefines.xcconfig: + +2009-05-27 Oliver Hunt <oliver@apple.com> + + Reviewed by Mark Rowe. + + <rdar://problem/6928025> Stack overflow in JSC::stringProtoFuncReplace() running jsFunFuzz + + We should always check for exceptions after creating a CachedCall, this wasn't being done in + the string replace logic. + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + +2009-05-27 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Unreviewed (make distcheck) build fix; adding missing headers. + + * GNUmakefile.am: + +2009-05-27 Jessie Berlin <jberlin@apple.com> + + Reviewed by Adam Roben + + Fix the Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-27 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Gustavo Noronha. + + When building on Windows, consider Windows specific files. + + * GNUmakefile.am: + +2009-05-27 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Maciej Stachowiak. + + When building with MinGW, don't use the __declspec(dl{import,export}) + decorations and rely on the linker to use its nifty auto-import feature. + It is extremely hard to get the decorations right with MinGW in general + and impossible in WebKit, where the resulting shared library is linking + together some static libraries. + + * config.h: + +2009-05-26 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=25613 + + Be able to use GOwnPtr for GHashTable as well. The assumption + is that the hash table has been created with g_hash_table_new_full + and has proper destruction functions. + + * wtf/GOwnPtr.cpp: + (WTF::GHashTable): + * wtf/GOwnPtr.h: + +2009-05-26 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + <rdar://problem/6924033> REGRESSION: Assertion failure due to forward references + + Add a pattern type for forward references to ensure that we don't confuse the + quantifier alternatives assertion. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateTerm): + * yarr/RegexPattern.h: + (JSC::Yarr::PatternTerm::): + (JSC::Yarr::PatternTerm::PatternTerm): + (JSC::Yarr::PatternTerm::ForwardReference): + +2009-05-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Fix for: <rdar://problem/6918095> REGRESSION: jQuery load() issue (25981), + and also an ASSERT failure on http://ihasahotdog.com/. + + When overwriting a property on a dictionary with a cached specific value, + clear the cache if new value being written is different. + + * JavaScriptCore.exp: + Export the new symbols. + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_get_by_id_method_check_second): + Close dictionary prototypes upon caching a method access, as would happen when caching + a regular get_by_id. + * runtime/JSObject.h: + (JSC::JSObject::propertyStorage): + (JSC::JSObject::locationForOffset): + Make these methods private. + (JSC::JSObject::putDirectInternal): + When overwriting a property on a dictionary with a cached specific value, + clear the cache if new value being written is different. + * runtime/Structure.cpp: + (JSC::Structure::despecifyDictionaryFunction): + Reset the specific value field for a given property in a dictionary. + (JSC::Structure::despecifyFunctionTransition): + Rename of 'changeFunctionTransition' (this was already internally refered to as a despecification). + * runtime/Structure.h: + Declare new method. + +2009-05-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver "pieces of eight" Hunt. + + When reseting RegexPattern class, should fully reset the class, not just bits of it. + In particular, we delete the cached character classes (for wordchars, etc), but do + not reset the set of pointers to the cached classes. In the case of a repeated parse + due to an illegal back-reference we will continue to use the deleted character class. + + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::reset): + +2009-05-26 Brent Fulgham <bfulgham@webkit.org> + + Build fix to correct r44161. + + * wtf/FastAllocBase.h: + +2009-05-26 Zoltan Horvath <horvath.zoltan.6@stud.u-szeged.hu> + + Reviewed by Maciej Stachowiak. + + Inherite HashTable from FastAllocBase, because it has been instantiated by + 'new' in JavaScriptCore/runtime/JSGlobalData.cpp. + + * wtf/HashTable.h: + * wtf/FastAllocBase.h: Remove 'wtf' path from TypeTraits.h to allow use outside of wtf. + +2009-05-25 David Levin <levin@chromium.org> + + Reviewed by Maciej Stachowiak and Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=25126 + Allow the buffer underlying UString to be shared. + + In order to not grow the underlying size of any structure, + there is a union in the Rep string which holds + + m_sharedBuffer -- a pointer to the shared ref counted buffer + if the class is BaseString and the buffer is being shared OR + + m_baseString -- the BaseString if the class is only UString::Rep + but not a UString::BaseString + + Ideally, m_sharedBuffer would be a RefPtr, but it cannot be because + it is in a union. + + No change in sunspider perf. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/UString.cpp: + (JSC::UString::Rep::share): + (JSC::UString::Rep::destroy): + (JSC::UString::BaseString::sharedBuffer): + (JSC::UString::BaseString::setSharedBuffer): + (JSC::UString::BaseString::slowIsBufferReadOnly): + (JSC::expandCapacity): + (JSC::UString::Rep::reserveCapacity): + (JSC::UString::expandPreCapacity): + (JSC::concatenate): + (JSC::UString::append): + * runtime/UString.h: + (JSC::UString::Rep::Rep): + (JSC::UString::Rep::): + (JSC::UString::BaseString::isShared): + (JSC::UString::BaseString::isBufferReadOnly): + (JSC::UString::Rep::baseString): + * wtf/CrossThreadRefCounted.h: + (WTF::CrossThreadRefCounted::isShared): + * wtf/OwnFastMallocPtr.h: Added. + (WTF::OwnFastMallocPtr::OwnFastMallocPtr): + (WTF::OwnFastMallocPtr::~OwnFastMallocPtr): + (WTF::OwnFastMallocPtr::get): + (WTF::OwnFastMallocPtr::release): + +2009-05-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Re-add interpreter logic to jit-enabled builds as GCC mysteriously regresses without it + + * wtf/Platform.h: + +2009-05-25 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Maciej Stachowiak. + + The functions written in assembly need to have a leading + underscore on Windows too. + + * jit/JITStubs.cpp: + +2009-05-24 Steve Falkenburg <sfalken@apple.com> + + Build fix for experimental PGO Windows target. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2009-05-23 David Kilzer <ddkilzer@apple.com> + + Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr + + <https://bugs.webkit.org/show_bug.cgi?id=25495> + + Reviewed by Oliver Hunt. + + * GNUmakefile.am: Added OwnPtrCommon.h and PassOwnPtr.h. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + + * wtf/OwnPtr.h: + (WTF::OwnPtr::OwnPtr): Added constructors that take a + PassOwnPtr. Also added a copy constructor declaration that's + required when assigning a PassOwnPtr to a stack-based OwnPtr. + (WTF::operator=): Added assignment operator methods that take a + PassOwnPtr. + (WTF::swap): Reformatted. + (WTF::operator==): Whitespace changes. + (WTF::operator!=): Ditto. + + * wtf/OwnPtrCommon.h: Added. + (WTF::deleteOwnedPtr): + + * wtf/PassOwnPtr.h: Added. + (WTF::PassOwnPtr::PassOwnPtr): + (WTF::PassOwnPtr::~PassOwnPtr): + (WTF::PassOwnPtr::get): + (WTF::PassOwnPtr::clear): + (WTF::PassOwnPtr::release): + (WTF::PassOwnPtr::operator*): + (WTF::PassOwnPtr::operator->): + (WTF::PassOwnPtr::operator!): + (WTF::PassOwnPtr::operator UnspecifiedBoolType): + (WTF::::operator): + (WTF::operator==): + (WTF::operator!=): + (WTF::static_pointer_cast): + (WTF::const_pointer_cast): + (WTF::getPtr): + +2009-05-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Remove interpreter specific logic from the JIT builds. + + This saves ~100k in JSC release builds. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * interpreter/Interpreter.h: + * wtf/Platform.h: + +2009-05-22 Mark Rowe <mrowe@apple.com> + + Part two of an attempted Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-22 Mark Rowe <mrowe@apple.com> + + Part one of an attempted Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + op_method_check + + Optimize method calls, by caching specific function values within the Structure. + The new opcode is used almost like an x86 opcode prefix byte to optimize op_get_by_id, + where the property access is being used to read a function to be passed to op-call (i.e. + 'foo.bar();'). This patch modifies the Structure class such that when a property is + put to an object for the first time we will check if the value is a function. If it is, + we will cache the function value on the Structure. A Structure in such a state guarantees + that not only does a property with the given identifier exist on the object, but also that + its value is unchanged. Upon any further attempt to put a property with the same identifier + (but a different value) to the object, it will transition back to a normal Structure (where + it will guarantee the presence but not the value of the property). + + op_method_check makes use of the new information made available by the Structure, by + augmenting the functionality of op_get_by_id. Upon generating a FunctionCallDotNode a + check will be emitted prior to the property access reading the function value, and the JIT + will generate an extra (initially unlinked but patchable) set of checks prior to the regular + JIT code for get_by_id. The new code will do inline structure and prototype structure check + (unlike a regular get_by_id, which can only handle 'self' accesses inline), and then performs + an immediate load of the function value, rather than using memory accesses to load the value + from the obejct's property storage array. If the method check fails it will revert, or if + the access is polymorphic, the op_get_by_id will continue to operate - and optimize itself - + just as any other regular op_get_by_id would. + + ~2.5% on v8-tests, due to a ~9% progression on richards. + + * API/JSCallbackObjectFunctions.h: + (JSC::::put): + (JSC::::staticFunctionGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): + * JavaScriptCore.exp: + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::differenceBetween): + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::moveWithPatch): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/CodeBlock.h: + (JSC::getMethodCallLinkInfoReturnLocation): + (JSC::CodeBlock::getMethodCallLinkInfo): + (JSC::CodeBlock::addMethodCallLinkInfos): + (JSC::CodeBlock::methodCallLinkInfo): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitMethodCheck): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::MethodCallCompilationInfo::MethodCallCompilationInfo): + * jit/JITOpcodes.cpp: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_method_check): + (JSC::JIT::emitSlow_op_method_check): + (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::patchMethodCallProto): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_get_by_id_method_check): + (JSC::JITStubs::cti_op_get_by_id_method_check_second): + * jit/JITStubs.h: + * jsc.cpp: + (GlobalObject::GlobalObject): + * parser/Nodes.cpp: + (JSC::FunctionCallDotNode::emitBytecode): + * runtime/Arguments.cpp: + (JSC::Arguments::put): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + (JSC::constructError): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/JSActivation.cpp: + (JSC::JSActivation::put): + (JSC::JSActivation::putWithAttributes): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::putWithAttributes): + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::mark): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::methodCallDummy): + * runtime/JSObject.cpp: + (JSC::JSObject::put): + (JSC::JSObject::putWithAttributes): + (JSC::JSObject::deleteProperty): + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::JSObject::getPropertyAttributes): + (JSC::JSObject::getPropertySpecificFunction): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectFunctionWithoutTransition): + * runtime/JSObject.h: + (JSC::getJSFunction): + (JSC::JSObject::getDirectLocation): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectWithoutTransition): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parseObject): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::lookupPut): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + (JSC::NativeErrorConstructor::construct): + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::NativeErrorPrototype): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + * runtime/PropertyMapHashTable.h: + (JSC::PropertyMapEntry::PropertyMapEntry): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::): + (JSC::PutPropertySlot::PutPropertySlot): + (JSC::PutPropertySlot::setNewProperty): + (JSC::PutPropertySlot::setDespecifyFunctionProperty): + (JSC::PutPropertySlot::isCacheable): + (JSC::PutPropertySlot::cachedOffset): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::~Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changeFunctionTransition): + (JSC::Structure::addPropertyWithoutTransition): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::put): + (JSC::Structure::remove): + * runtime/Structure.h: + (JSC::Structure::get): + (JSC::Structure::specificFunction): + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTableHashTraits::emptyValue): + * wtf/Platform.h: + +2009-05-22 Brent Fulgham <bfulgham@webkit.org> + + Reviewed by Steve Falkenburg. + + https://bugs.webkit.org/show_bug.cgi?id=25950 + JavaScriptCore Fails to build on Windows (Cairo) due to CoreFoundation + link requirement. + + Modify project to add new Debug_CFLite and Release_CFLite targets. These + use the new JavaScriptCoreCFLite.vsprops to link against CFLite.dll. + Existing projects are changed to use the new JavaScriptCoreCF.vsprops + to link against CoreFoundation.dll. + + The JavaScriptCoreCommon.vsprops is modified to remove the link + against CoreFoundation.dll. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + +2009-05-22 Dominik Röttsches <dominik.roettsches@access-company.com> + + Reviewed by Gustavo Noronha. + + https://bugs.webkit.org/show_bug.cgi?id=15914 + [GTK] Implement Unicode functionality using GLib + + Original patch by Jürg Billeter and Naiem Shaik. + Implementing WTF Unicode functionality based on GLib. + + * GNUmakefile.am: + * wtf/unicode/Unicode.h: + * wtf/unicode/glib: Added. + * wtf/unicode/glib/UnicodeGLib.cpp: Added. + (WTF::Unicode::foldCase): + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::direction): + (WTF::Unicode::umemcasecmp): + * wtf/unicode/glib/UnicodeGLib.h: Added. + (WTF::Unicode::): + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::isArabicChar): + (WTF::Unicode::isFormatChar): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::category): + (WTF::Unicode::isLower): + (WTF::Unicode::digitValue): + (WTF::Unicode::combiningClass): + (WTF::Unicode::decompositionType): + * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added. + +2009-05-21 Xan Lopez <xlopez@igalia.com> + + Unreviewed build fix. + + Add MacroAssemblerCodeRef.h to file list. + + * GNUmakefile.am: + +2009-05-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + Addition of MacroAssemblerCodeRef.h rubber stamped by Geoff Garen. + + Refactor JIT code-handle objects. The representation of generated code is currently + a bit of a mess. We have a class JITCode which wraps the pointer to a block of + generated code, but this object does not reference the executable pool meaning that + external events (the pool being derefed) could make the pointer become invalid. + To overcome this both the JIT and Yarr implement further (and similar) objects to + wrap the code pointer with a RefPtr to the pool. To add to the mire, as well as the + CodeBlock containing a handle onto the code the FunctionBodyNode also contains a + copy of the code pointer which is used almost (but not entirely) uniquely to access + the JIT code for a function. + + Rationalization of all this: + + * Add a new type 'MacroAssembler::CodeRef' as a handle for a block of JIT generated code. + * Change the JIT & Yarr to internally handle code using CodeRefs. + * Move the CodeRef (formerly anow defunct JITCodeRef) from CodeBlock to its owner node. + * Remove the (now) redundant code pointer from FunctionBodyNode. + + While tidying this up I've made the PatchBuffer return code in new allocations using a CodeRef, + and have enforced an interface that the PatchBuffer will always be used, and 'finalizeCode()' or + 'finalizeCodeAddendum()' will always be called exactly once on the PatchBuffer to complete code generation. + + This gives us a potentially useful hook ('PatchBuffer::performFinalization()') at the end of generation, + which may have a number of uses. It may be helpful should we wish to switch our generation + model to allow RW/RX exclusive memory, and it may be useful on non-cache-coherent platforms to + give us an oportunity to cache flush as necessary. + + No performance impact. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToTrampoline): + (JSC::AbstractMacroAssembler::CodeRef::CodeRef): + (JSC::AbstractMacroAssembler::CodeRef::trampolineAt): + (JSC::AbstractMacroAssembler::PatchBuffer::PatchBuffer): + (JSC::AbstractMacroAssembler::PatchBuffer::~PatchBuffer): + (JSC::AbstractMacroAssembler::PatchBuffer::link): + (JSC::AbstractMacroAssembler::PatchBuffer::linkTailRecursive): + (JSC::AbstractMacroAssembler::PatchBuffer::patch): + (JSC::AbstractMacroAssembler::PatchBuffer::complete): + (JSC::AbstractMacroAssembler::PatchBuffer::finalize): + (JSC::AbstractMacroAssembler::PatchBuffer::entry): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::setJITCode): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getBytecodeIndex): + (JSC::CodeBlock::executablePool): + * interpreter/CallFrameClosure.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::prepareForRepeatCall): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::linkCall): + * jit/JIT.h: + * jit/JITCode.h: + (JSC::JITCode::JITCode): + (JSC::JITCode::operator bool): + (JSC::JITCode::addressForCall): + (JSC::JITCode::offsetOf): + (JSC::JITCode::execute): + (JSC::JITCode::size): + (JSC::JITCode::executablePool): + (JSC::JITCode::HostFunction): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_vm_dontLazyLinkCall): + (JSC::JITStubs::cti_vm_lazyLinkCall): + * parser/Nodes.cpp: + (JSC::ProgramNode::generateJITCode): + (JSC::EvalNode::generateJITCode): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::createNativeThunk): + (JSC::FunctionBodyNode::generateJITCode): + * parser/Nodes.h: + (JSC::ScopeNode::generatedJITCode): + (JSC::ScopeNode::getExecutablePool): + (JSC::ScopeNode::setJITCode): + (JSC::ProgramNode::jitCode): + (JSC::EvalNode::jitCode): + (JSC::FunctionBodyNode::jitCode): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::compile): + (JSC::Yarr::jitCompileRegex): + (JSC::Yarr::executeRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::pcreFallback): + (JSC::Yarr::RegexCodeBlock::setFallback): + (JSC::Yarr::RegexCodeBlock::operator bool): + (JSC::Yarr::RegexCodeBlock::set): + (JSC::Yarr::RegexCodeBlock::execute): + +2009-05-21 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + <rdar://problem/6910264> REGRESSION: Cached DOM global object property access fails in browser (25921) + <https://bugs.webkit.org/show_bug.cgi?id=25921> + + When caching properties on the global object we need to ensure that we're + not attempting to cache through a shell object. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveGlobal): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_resolve_global): + +2009-05-21 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + +2009-05-21 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Mark Rowe. + + Bug 25945: Add support for MADV_FREE to TCMalloc + <https://bugs.webkit.org/show_bug.cgi?id=25945> + <rdar://problem/6910754> + + Add support for MADV_FREE to TCMalloc_SystemRelease for platforms that + don't also support MADV_FREE_REUSE. The code is identical to the MADV_DONTNEED + case except for the advice passed to madvise(), so combining the two cases + makes the most sense. + + * wtf/Platform.h: Only define HAVE_MADV_FREE when not building on Tiger or + Leopard, because while it is defined on these platforms it actually does + nothing. + * wtf/TCSystemAlloc.cpp: + (TCMalloc_SystemRelease): use MADV_FREE if it is available; otherwise use + MADV_DONTNEED. + +2009-05-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Fix <https://bugs.webkit.org/show_bug.cgi?id=25917> / <rdar://problem/6910066>. + Bug 25917: REGRESSION (r43559?): Javascript debugger crashes when pausing page + + The debugger currently retrieves the arguments object from an activation rather than pulling + it from a call frame. This is unreliable to due to the recent optimization to lazily create + the arguments object. In the long-term it should stop doing that (<rdar://problem/6911886>), + but for now we force eager creation of the arguments object when debugging. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + +2009-05-21 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Maciej Stachowiak. + + Bug 25912: Harden NumberPrototype.cpp by removing use of strcpy() + <https://bugs.webkit.org/show_bug.cgi?id=25912> + + This causes no change on SunSpider. + + * runtime/NumberPrototype.cpp: + (JSC::integerPartNoExp): replace strcpy() with memcpy(), ASSERT that the + temporary buffer has sufficient space to store the result, and move the + explicit null-termination closer to the memcpy() for easier visual inspection + of the code. + (JSC::fractionalPartToString): replace strcpy() with memcpy(), and ASSERT + that the temporary buffer has sufficient space to store the result. There + is no explicit null-termination because this is done by the caller. The + same is already true for exponentialPartToString(). + (JSC::numberProtoFuncToExponential): replace strcpy() with memcpy(), explicitly + null-terminate the result, and ASSERT that the temporary buffer has sufficient + space to store the result. + +2009-05-20 Sam Weinig <sam@webkit.org> + + Reviewed by Cameron Zwarich. + + Cleanup the JSGlobalData when exiting early with the usage statement in jsc. + + * jsc.cpp: + (printUsageStatement): + (parseArguments): + (jscmain): + +2009-05-20 Stephanie Lewis <slewis@apple.com> + + Update the order files. <rdar://problem/6881750> Generate new order files. + + * JavaScriptCore.order: + +2009-05-19 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> + + Reviewed by Simon Hausmann. + + Replace WREC with YARR + YARR_JIT for the Qt port. This is only + used when compiled with JIT support for now, so it is a drop-in + replacement for the WREC usage. Still including the wrec headers + as they are being referred from RegExp.h, though the contents of + that header it protected by "#if ENABLE(WREC)". + + * JavaScriptCore.pri: + +2009-05-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Eric Seidel. + + Fix GTK debug build. + + The function dumpDisjunction, compiled with debug enabled, uses + printf, which needs stdio.h to be included. + + * yarr/RegexInterpreter.cpp: + +2009-05-20 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by George Staikos. + + BUG 25843: [Qt] Remove qt-port build flag + <https://bugs.webkit.org/show_bug.cgi?id=25843> + + * JavaScriptCore.pro: + + +2009-05-19 Geoffrey Garen <ggaren@apple.com> + + Windows build fix. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::releaseExcessCapacity): Copy-paste typo. + +2009-05-19 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Fixed <rdar://problem/6885680> CrashTracer: [USER] 1 crash in Install + Mac OS X at <unknown binary> • 0x9274241c + + (Original patch by Joe Sokol and Ronnie Misra.) + + SunSpider says 1.004x faster. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::releaseExcessCapacity): Instead of doing complicated + math that sometimes used to overflow, just release the full range of the + register file. + + * interpreter/RegisterFile.h: + (JSC::isPageAligned): + (JSC::RegisterFile::RegisterFile): Added ASSERTs to verify that it's + safe to release the full range of the register file. + + (JSC::RegisterFile::shrink): No need to releaseExcessCapacity() if the + new end is not smaller than the old end. (Also, doing so used to cause + numeric overflow, unmapping basically the whole process from memory.) + +2009-05-19 Oliver Hunt <oliver@apple.com> + + RS=Mark Rowe. + + <rdar://problem/6888393> REGRESSION: Start Debugging JavaScript crashes browser (nightly builds only?) + <https://bugs.webkit.org/show_bug.cgi?id=25717> + + Remove JSC_FAST_CALL as it wasn't gaining us anything, and was + resulting in weird bugs in the nightly builds. + + * parser/Nodes.cpp: + * parser/Nodes.h: + (JSC::ExpressionNode::isNumber): + (JSC::ExpressionNode::isString): + (JSC::ExpressionNode::isNull): + (JSC::ExpressionNode::isPure): + (JSC::ExpressionNode::isLocation): + (JSC::ExpressionNode::isResolveNode): + (JSC::ExpressionNode::isBracketAccessorNode): + (JSC::ExpressionNode::isDotAccessorNode): + (JSC::ExpressionNode::isFuncExprNode): + (JSC::ExpressionNode::isSimpleArray): + (JSC::ExpressionNode::isAdd): + (JSC::ExpressionNode::resultDescriptor): + (JSC::StatementNode::firstLine): + (JSC::StatementNode::lastLine): + (JSC::StatementNode::isEmptyStatement): + (JSC::StatementNode::isReturnNode): + (JSC::StatementNode::isExprStatement): + (JSC::StatementNode::isBlock): + (JSC::NullNode::isNull): + (JSC::BooleanNode::isPure): + (JSC::NumberNode::value): + (JSC::NumberNode::setValue): + (JSC::NumberNode::isNumber): + (JSC::NumberNode::isPure): + (JSC::StringNode::isPure): + (JSC::StringNode::isString): + (JSC::ResolveNode::identifier): + (JSC::ResolveNode::isLocation): + (JSC::ResolveNode::isResolveNode): + (JSC::BracketAccessorNode::isLocation): + (JSC::BracketAccessorNode::isBracketAccessorNode): + (JSC::DotAccessorNode::base): + (JSC::DotAccessorNode::identifier): + (JSC::DotAccessorNode::isLocation): + (JSC::DotAccessorNode::isDotAccessorNode): + (JSC::TypeOfResolveNode::identifier): + (JSC::AddNode::isAdd): + (JSC::BlockNode::isBlock): + (JSC::EmptyStatementNode::isEmptyStatement): + (JSC::ExprStatementNode::isExprStatement): + (JSC::ReturnNode::isReturnNode): + (JSC::ScopeNode::sourceURL): + (JSC::ProgramNode::bytecode): + (JSC::EvalNode::bytecode): + (JSC::FunctionBodyNode::parameters): + (JSC::FunctionBodyNode::toSourceString): + (JSC::FunctionBodyNode::bytecode): + (JSC::FuncExprNode::isFuncExprNode): + +2009-05-19 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Gavin Barraclough. + + - speed up string comparison, especially for short strings + + ~1% on SunSpider + + * JavaScriptCore.exp: + * runtime/UString.cpp: + * runtime/UString.h: + (JSC::operator==): Inline UString's operator==, since it is called from + hot places in the runtime. Also, specialize 2-char strings in a similar way to + 1-char, since we're taking the hit of a switch anyway. + +2009-05-18 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Gavin Barraclough. + + - for polymorphic prototype lookups, increase the number of slots from 4 to 8 + + ~4% faster on v8 raytrace benchmark + + * bytecode/Instruction.h: + +2009-05-18 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Oliver Hunt. + + - tighten up the code for the load_varargs stub + + ~1-2% on v8-raytrace + + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_load_varargs): Hoist some loop invariants that + the compiler didn't feel like hoisting for us. Remove unneeded exception check. + +2009-05-18 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Geoff Garen. + + - Improve code generation for access to prototype properties + + ~0.4% speedup on SunSpider. + + Based on a suggestion from Geoff Garen. + + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + +2009-05-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Gavin Barraclough. + + Enable YARR, and disable WREC for GTK+. + + * GNUmakefile.am: + * yarr/RegexParser.h: + +2009-05-18 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Xan Lopez. + + [Gtk] Various autotools build refactoring and fixes + https://bugs.webkit.org/show_bug.cgi?id=25286 + + Add -no-install and -no-fast-install to programs and tests that we + don't install. Also remove -O2 since this is already handled at + configure time. + + * GNUmakefile.am: + +2009-05-17 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Xan Lopez. + + [Gtk] Various autotools build refactoring and fixes + https://bugs.webkit.org/show_bug.cgi?id=25286 + + Add JavaScriptCore/ to JSC include path only since it's not + required when building WebCore. + + * GNUmakefile.am: + +2009-05-17 Steve Falkenburg <sfalken@apple.com> + + Windows build fix + + * JavaScriptCore.vcproj/JavaScriptCore.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2009-05-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Looking like MSVC doesn't like static variables in inline methods? + Make the state of the SSE2 check a static variable on the class + MacroAssemblerX86Common as a speculative build fix for Windows. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::convertInt32ToDouble): + (JSC::MacroAssemblerX86Common::branchDouble): + (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerX86Common::isSSE2Present): + (JSC::MacroAssemblerX86Common::): + * jit/JIT.cpp: + +2009-05-15 Adam Roben <aroben@apple.com> + + Add some assembler headers to JavaScriptCore.vcproj + + This is just a convenience for Windows developers. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2009-05-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Add FP support to the MacroAssembler, port JITArithmetic over to make use of this. Also add + API to determine whether FP support is available 'MacroAssembler::supportsFloatingPoint()', + FP is presently only supported on SSE2 platforms, not x87. On platforms where a suitable + hardware FPU is not available 'supportsFloatingPoint()' may simply return false, and all + other methods ASSERT_NOT_REACHED(). + + * assembler/AbstractMacroAssembler.h: + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::MacroAssemblerX86): + (JSC::MacroAssemblerX86::branch32): + (JSC::MacroAssemblerX86::branchPtrWithPatch): + (JSC::MacroAssemblerX86::supportsFloatingPoint): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::): + (JSC::MacroAssemblerX86Common::loadDouble): + (JSC::MacroAssemblerX86Common::storeDouble): + (JSC::MacroAssemblerX86Common::addDouble): + (JSC::MacroAssemblerX86Common::subDouble): + (JSC::MacroAssemblerX86Common::mulDouble): + (JSC::MacroAssemblerX86Common::convertInt32ToDouble): + (JSC::MacroAssemblerX86Common::branchDouble): + (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerX86Common::branch32): + (JSC::MacroAssemblerX86Common::branch16): + (JSC::MacroAssemblerX86Common::branchTest32): + (JSC::MacroAssemblerX86Common::branchAdd32): + (JSC::MacroAssemblerX86Common::branchMul32): + (JSC::MacroAssemblerX86Common::branchSub32): + (JSC::MacroAssemblerX86Common::set32): + (JSC::MacroAssemblerX86Common::setTest32): + (JSC::MacroAssemblerX86Common::x86Condition): + (JSC::MacroAssemblerX86Common::isSSE2Present): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::movePtrToDouble): + (JSC::MacroAssemblerX86_64::moveDoubleToPtr): + (JSC::MacroAssemblerX86_64::setPtr): + (JSC::MacroAssemblerX86_64::branchPtr): + (JSC::MacroAssemblerX86_64::branchTestPtr): + (JSC::MacroAssemblerX86_64::branchAddPtr): + (JSC::MacroAssemblerX86_64::branchSubPtr): + (JSC::MacroAssemblerX86_64::supportsFloatingPoint): + * assembler/X86Assembler.h: + * jit/JIT.cpp: + (JSC::JIT::JIT): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::compileBinaryArithOp): + (JSC::JIT::compileBinaryArithOpSlowCase): + (JSC::JIT::emit_op_add): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + +2009-05-15 Francisco Tolmasky <francisco@280north.com> + + BUG 25467: JavaScript debugger should use function.displayName as the function's name in the call stack + <https://bugs.webkit.org/show_bug.cgi?id=25467> + + Reviewed by Adam Roben. + + * JavaScriptCore.exp: Added calculatedFunctionName + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Added calculatedFunctionName + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added calculatedFunctionName + * debugger/DebuggerCallFrame.cpp: Added calculatedFunctionName to match existing one in ProfileNode. + (JSC::DebuggerCallFrame::calculatedFunctionName): + * debugger/DebuggerCallFrame.h: Added calculatedFunctionName to match existing one in ProfileNode. + +2009-05-14 Gavin Barraclough <barraclough@apple.com> + + Build fix, not reviewed. + + Quick fixes for JIT builds with OPTIMIZE flags disabled. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compilePutByIdHotPath): + +2009-05-14 Steve Falkenburg <sfalken@apple.com> + + Back out incorrect Windows build fix + + * JavaScriptCore.vcproj/JavaScriptCore.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2009-05-14 Steve Falkenburg <sfalken@apple.com> + + Windows build fix + + * JavaScriptCore.vcproj/JavaScriptCore.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2009-05-14 Adam Roben <aroben@apple.com> + + Windows jsc build fix + + r43648 modified jsc.vcproj's post-build event not to try to copy files + that aren't present. Then r43661 mistakenly un-did that modification. + This patch restores the modification from r43648, but puts the code in + jscCommon.vsprops (where it should have been added in r43648). + + * JavaScriptCore.vcproj/jsc/jsc.vcproj: Restored empty + VCPostBuildEventTool tags. + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Modified the post-build + event command line to match the one in jsc.vcproj from r43648. + +2009-05-14 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=25325 + + Make sure pthread_self() is declared before it gets called in Collector.cpp + + * runtime/Collector.cpp: Include pthread.h in most Unix-like platforms + (not just for OPENBSD) + +2009-05-14 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + Fix <https://bugs.webkit.org/show_bug.cgi?id=25785>. + Bug 25785: Segfault in mark when using JSObjectMakeConstructor + + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): OpaqueJSClass::prototype can return 0. We need to use the default object prototype when it does. + * API/tests/testapi.c: + (main): Add a test case. + * runtime/JSObject.h: + (JSC::JSObject::putDirect): Add a clearer assertion for a null value. The assertion on the next line does catch this, + but the cause of the failure is not clear from the assertion itself. + +2009-05-14 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Darin Adler. + + <rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2 + + The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode. + Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR + if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not. + + * Configurations/Base.xcconfig: + +2009-05-14 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Checking register file bounds should be a ptr comparison (m_end is a Register*). + Also, the compare should be unsigned, pointers don'ts go negative. + + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + +2009-05-13 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Fix <rdar://problem/6882919> REGRESSION: page at Metroauto site crashes in cti_op_loop_if_less (25730) + + op_loop_if_less (imm < op) was loading op into regT1, but in the slow path spills regT0. + This leads to bad happen. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emitSlow_op_loop_if_less): + +2009-05-13 Dmitry Titov <dimich@chromium.org> + + Rubber-stamped by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=25746 + Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * bytecode/SamplingTool.cpp: + (JSC::SamplingThread::start): + (JSC::SamplingThread::stop): + * bytecode/SamplingTool.h: + * wtf/CrossThreadRefCounted.h: + (WTF::CrossThreadRefCounted::CrossThreadRefCounted): + (WTF::::ref): + (WTF::::deref): + * wtf/Threading.h: + * wtf/ThreadingNone.cpp: + * wtf/ThreadingPthreads.cpp: + (WTF::threadMapMutex): + (WTF::initializeThreading): + (WTF::threadMap): + (WTF::identifierByPthreadHandle): + (WTF::establishIdentifierForPthreadHandle): + (WTF::pthreadHandleForIdentifier): + (WTF::clearPthreadHandleForIdentifier): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::detachThread): + (WTF::currentThread): + * wtf/ThreadingWin.cpp: + (WTF::threadMapMutex): + (WTF::initializeThreading): + (WTF::threadMap): + (WTF::storeThreadHandleByIdentifier): + (WTF::threadHandleForIdentifier): + (WTF::clearThreadHandleForIdentifier): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::detachThread): + (WTF::currentThread): + * wtf/gtk/ThreadingGtk.cpp: + (WTF::threadMapMutex): + (WTF::initializeThreading): + (WTF::threadMap): + (WTF::identifierByGthreadHandle): + (WTF::establishIdentifierForThread): + (WTF::threadForIdentifier): + (WTF::clearThreadForIdentifier): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + * wtf/qt/ThreadingQt.cpp: + (WTF::threadMapMutex): + (WTF::threadMap): + (WTF::identifierByQthreadHandle): + (WTF::establishIdentifierForThread): + (WTF::clearThreadForIdentifier): + (WTF::threadForIdentifier): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + +2009-05-13 Darin Adler <darin@apple.com> + + Revert the parser arena change. It was a slowdown, not a speedup. + Better luck next time (I'll break it up into pieces). + +2009-05-13 Darin Adler <darin@apple.com> + + Tiger build fix. + + * parser/Grammar.y: Add back empty code blocks, needed by older + versions of bison on certain rules. + +2009-05-13 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + +2009-05-13 Adam Roben <aroben@apple.com> + + Windows build fixes after r43642 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Updated. + + * debugger/Debugger.cpp: + * runtime/ArrayConstructor.cpp: + * runtime/JSArray.cpp: + * runtime/RegExp.cpp: + * runtime/RegExpConstructor.cpp: + * runtime/RegExpPrototype.cpp: + * runtime/StringPrototype.cpp: + Added missing #includes. + +2009-05-13 Darin Adler <darin@apple.com> + + Reviewed by Cameron Zwarich. + + Bug 25674: syntax tree nodes should use arena allocation + https://bugs.webkit.org/show_bug.cgi?id=25674 + + Step 3: Add some actual arena allocation. About 1% SunSpider speedup. + + * JavaScriptCore.exp: Updated. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack + contains const Identifier* now. + (JSC::BytecodeGenerator::emitPushNewScope): Updated to take a const + Identifier&. + * bytecompiler/BytecodeGenerator.h: Ditto + + * bytecompiler/SegmentedVector.h: Added isEmpty. + + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): Moved this function here from + WebCore so WebCore doesn't need the details of FunctionBodyNode. + * debugger/Debugger.h: Ditto. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): Updated since VarStack contains const + Identifier* now. + + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_vm_lazyLinkCall): Call isHostFunction on the body + rather than on the function object, since we can't easily have inlined + access to the FunctionBodyNode in JSFunction.h since WebCore needs + access to that header. + (JSC::JITStubs::cti_op_construct_JSConstruct): Ditto. + * profiler/Profiler.cpp: + (JSC::Profiler::createCallIdentifier): Ditto. + + * parser/Grammar.y: Use JSGlobalData* to pass the global data pointer + around whenever possible instead of using void*. Changed + SET_EXCEPTION_LOCATION from a macro to an inline function. Marked + the structure-creating functions inline. Changed the VarStack to use + identifier pointers instead of actual identifiers. This takes + advantage of the fact that all identifier pointers come from the + arena and avoids reference count churn. Changed Identifier* to + const Identifier* to make sure we don't modify any by accident. + Used identifiers for regular expression strings too, using the new + scanRegExp that has out parameters instead of the old one that relied + on side effects in the Lexer. Move the creation of numeric identifiers + out of this file and into the PropertyNode constructor. + + * parser/Lexer.cpp: + (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers. + (JSC::Lexer::makeIdentifier): Changed return type to const Identifier* + and changed to call ParserArena. + (JSC::Lexer::scanRegExp): Added out arguments that are const Identifier* + as well as a prefix character argument so we can handle the /= case + without a string append. + (JSC::Lexer::skipRegExp): Added. Skips a regular expression without + allocating Identifier objects. + (JSC::Lexer::clear): Removed the code to manage m_identifiers, m_pattern, + and m_flags, and added code to set m_arena to 0. + * parser/Lexer.h: Updated for changes above. + + * parser/NodeConstructors.h: + (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable + on the arena. + (JSC::ParserArenaDeletable::operator new): Changed to call the + allocateDeletable function on the arena instead of deleteWithArena. + (JSC::RegExpNode::RegExpNode): Changed arguments to Identifier instead + of UString since these come from the parser which makes identifiers. + (JSC::PropertyNode::PropertyNode): Added new constructor that makes + numeric identifiers. Some day we might want to optimize this for + integers so it doesn't create a string for each one. + (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier + since it's now a const Identifier& so it can't be left uninitialized. + (JSC::BreakNode::BreakNode): Ditto. + (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements* + to keep track of the statements rather than a separate statement vector. + (JSC::BlockNode::BlockNode): Ditto. + (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier. + + * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here. + It seemed strangely out of place in the header. + (JSC::ThrowableExpressionData::emitThrowError): Added an overload for + UString as well as Identifier. + (JSC::SourceElements::singleStatement): Added. + (JSC::SourceElements::lastStatement): Added. + (JSC::RegExpNode::emitBytecode): Updated since the pattern and flags + are now Identifier instead of UString. Also changed the throwError code + to use the substitution mechanism instead of doing a string append. + (JSC::SourceElements::emitBytecode): Added. Replaces the old + statementListEmitCode function, since we now keep the SourceElements + objects around. + (JSC::BlockNode::lastStatement): Added. + (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of + statementListEmitCode. + (JSC::CaseClauseNode::emitBytecode): Added. + (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode + instead of statementListEmitCode. + (JSC::ScopeNodeData::ScopeNodeData): Changed to store the + SourceElements* instead of using releaseContentsIntoVector. + (JSC::ScopeNode::emitStatementsBytecode): Added. + (JSC::ScopeNode::singleStatement): Added. + (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead + of statementListEmitCode. + (JSC::EvalNode::emitBytecode): Ditto. + (JSC::EvalNode::generateBytecode): Removed code to clear the children + vector. This optimization is no longer possible since everything is in + a single arena. + (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode + insetad of statementListEmitCode and check for the return node using + the new functions. + + * parser/Nodes.h: Changed VarStack to store const Identifier* instead + of Identifier and rely on the arena to control lifetime. Added a new + ParserArenaFreeable class. Made ParserArenaDeletable inherit from + FastAllocBase instead of having its own operator new. Base the Node + class on ParserArenaFreeable. Changed the various Node classes + to use const Identifier& instead of Identifier to avoid the need to + call their destructors and allow them to function as "freeable" in the + arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions. + Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode, + CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable + as a base class since they do not descend from Node. Eliminated the + StatementVector type and instead have various classes use SourceElements* + instead of StatementVector. This prevents those classes from having th + use ParserArenaDeletable to make sure the vector destructor is called. + + * parser/Parser.cpp: + (JSC::Parser::parse): Pass the arena to the lexer. + + * parser/Parser.h: Added an include of ParserArena.h, which is no longer + included by Nodes.h. + + * parser/ParserArena.cpp: + (JSC::ParserArena::ParserArena): Added. Initializes the new members, + m_freeableMemory, m_freeablePoolEnd, and m_identifiers. + (JSC::ParserArena::freeablePool): Added. Computes the pool pointer, + since we store only the current pointer and the end of pool pointer. + (JSC::ParserArena::deallocateObjects): Added. Contains the common + memory-deallocation logic used by both the destructor and the + reset function. + (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects. + (JSC::ParserArena::reset): Ditto. Also added code to zero out the + new structures, and switched to use clear() instead of shrink(0) since + we don't really reuse arenas. + (JSC::ParserArena::makeNumericIdentifier): Added. + (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool + is empty. + (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine + since this is used only for assertions at the moment. + + * parser/ParserArena.h: Added an actual arena of "freeable" objects, + ones that don't need destructors to be called. Also added the segmented + vector of identifiers that used to be in the Lexer. + + * runtime/FunctionConstructor.cpp: + (JSC::extractFunctionBody): Use singleStatement function rather than + getting at a StatementVector. + + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): Call isHostFunction on the body + rather than the function object. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): Moved the structure version of this in + here from the header. It's not hot enough that it needs to be inlined. + (JSC::JSFunction::isHostFunction): Moved this in here from the header. + It's now a helper to be used only within the class. + (JSC::JSFunction::setBody): Moved this in here. It's not hot enough that + it needs to be inlined, and we want to be able to compile the header + without the definition of FunctionBodyNode. + + * runtime/JSFunction.h: Eliminated the include of "Nodes.h". This was + exposing too much JavaScriptCore dependency to WebCore. Because of this + change and some changes made to WebCore, we could now export a lot fewer + headers from JavaScriptCore, but I have not done that yet in this check-in. + Made a couple functions non-inline. Removes some isHostFunction() assertions. + + * wtf/FastAllocBase.h: Added the conventional using statements we use in + WTF so we can use identifiers from the WTF namespace without explicit + namespace qualification or namespace directive. This is the usual WTF style, + although it's unconventional in the C++ world. We use the namespace primarily + for link-time disambiguation, not compile-time. + + * wtf/FastMalloc.cpp: Fixed an incorrect comment. + +2009-05-13 Xan Lopez <xlopez@igalia.com> + + Unreviewed build fix: add JITStubCall.h to files list. + + * GNUmakefile.am: + +2009-05-13 Ariya Hidayat <ariya.hidayat@nokia.com> + + Unreviewed build fix, as suggested by Yael Aharon <yael.aharon@nokia.com>. + + * wtf/qt/ThreadingQt.cpp: + (WTF::waitForThreadCompletion): renamed IsValid to isValid. + +2009-05-13 Jan Michael Alonzo <jmalonzo@webkit.org> + + Revert r43562 - [Gtk] WTF_USE_JSC is already defined in + WebCore/config.h. + + * wtf/Platform.h: + +2009-05-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Add SamplingCounter tool to provide a simple mechanism for counting events in JSC + (enabled using ENABLE(SAMPLING_COUNTERS)). To count events within a single function + use the class 'SamplingCounter', where the counter may be incremented from multiple + functions 'GlobalSamplingCounter' may be convenient; all other counters (stack or + heap allocated, rather than statically declared) should use the DeletableSamplingCounter. + Further description of these classes is provided alongside their definition in + SamplingTool.h. + + Counters may be incremented from c++ by calling the 'count()' method on the counter, + or may be incremented by JIT code by using the 'emitCount()' method within the JIT. + + This patch also fixes CODEBLOCK_SAMPLING, which was missing a null pointer check. + + * JavaScriptCore.exp: + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::addWithCarry32): + (JSC::MacroAssemblerX86::and32): + (JSC::MacroAssemblerX86::or32): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::and32): + (JSC::MacroAssemblerX86Common::or32): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::and32): + (JSC::MacroAssemblerX86_64::or32): + (JSC::MacroAssemblerX86_64::addPtr): + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + (JSC::X86Assembler::adcl_im): + (JSC::X86Assembler::addq_im): + (JSC::X86Assembler::andl_im): + (JSC::X86Assembler::orl_im): + * bytecode/SamplingTool.cpp: + (JSC::AbstractSamplingCounter::dump): + * bytecode/SamplingTool.h: + (JSC::AbstractSamplingCounter::count): + (JSC::GlobalSamplingCounter::name): + (JSC::SamplingCounter::SamplingCounter): + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::): + * jit/JITInlineMethods.h: + (JSC::JIT::setSamplingFlag): + (JSC::JIT::clearSamplingFlag): + (JSC::JIT::emitCount): + * jsc.cpp: + (runWithScripts): + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): + * wtf/Platform.h: + +2009-05-13 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore.make: + +2009-05-12 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore.make: + +2009-05-12 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + <rdar://problem/6881457> Crash occurs at JSC::Interpreter::execute() when loading http://www.sears.com + + We created the arguments objects before an op_push_scope but not + before op_push_new_scope, this meant a null arguments object could + be resolved inside catch blocks. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitPushNewScope): + +2009-05-12 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + <rdar://problem/6879881> Crash occurs at JSC::JSActivation::mark() when loading http://www.monster.com; http://www.cnet.com + <https://bugs.webkit.org/show_bug.cgi?id=25736> Crash loading www.google.dk/ig (and other igoogle's as well) + + Following on from the lazy arguments creation patch, it's now + possible for an activation to to have a null register in the callframe + so we can't just blindly mark the local registers in an activation, + and must null check first instead. + + * API/tests/testapi.c: + (functionGC): + * API/tests/testapi.js: + (bludgeonArguments.return.g): + (bludgeonArguments): + * runtime/JSActivation.cpp: + (JSC::JSActivation::mark): + +2009-05-12 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Geoff Garen. + + WTF_USE_CTI_REPATCH_PIC is no longer used, remove. + + * jit/JIT.h: + * jit/JITStubCall.h: + +2009-05-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Maciej Stachowiak. + + We've run into some problems where changing the size of the class JIT leads to + performance fluctuations. Try forcing alignment in an attempt to stabalize this. + + * jit/JIT.h: + +2009-05-12 Kevin Ollivier <kevino@theolliviers.com> + + wx build fix. Add ParserArena.cpp to the build. + + * JavaScriptCoreSources.bkl: + +2009-05-12 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Unsigned underflow on 64bit cannot be treated as a negative number + + This code included some placeswhere we deliberately create negative offsets + from unsigned values, on 32bit this is "safe", but in 64bit builds much + badness occurs. Solution is to use signed types as nature intended. + + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_load_varargs): + +2009-05-12 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Holger Freyther. + + [Gtk] Various autotools build refactoring and fixes + https://bugs.webkit.org/show_bug.cgi?id=25286 + + Define WTF_USE_JSC for the Gtk port. + + * wtf/Platform.h: + +2009-05-12 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Oliver Hunt. + + - allow all of strictEqual to be inlined into cti_op_stricteq once again + + We had this optimization once but accidentally lost it at some point. + + * runtime/Operations.h: + (JSC::JSValue::strictEqualSlowCaseInline): + (JSC::JSValue::strictEqual): + +2009-05-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + instanceof should throw if the constructor being tested does not implement + 'HasInstance" (i.e. is a function). Instead we were returning false. + + * interpreter/Interpreter.cpp: + (JSC::isInvalidParamForIn): + (JSC::isInvalidParamForInstanceOf): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_instanceof): + * tests/mozilla/ecma_2/instanceof/instanceof-003.js: + Fix broken test case. + * tests/mozilla/ecma_2/instanceof/regress-7635.js: + Remove broken test case (was an exact duplicate of a test in instanceof-003.js). + +2009-05-12 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve function call forwarding performance + + Make creation of the Arguments object occur lazily, so it + is not necessarily created for every function that references + it. Then add logic to Function.apply to allow it to avoid + allocating the Arguments object at all. Helps a lot with + the function forwarding/binding logic in jQuery, Prototype, + and numerous other JS libraries. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::willResolveToArguments): + (JSC::BytecodeGenerator::uncheckedRegisterForArguments): + (JSC::BytecodeGenerator::createArgumentsIfNecessary): + (JSC::BytecodeGenerator::emitCallEval): + (JSC::BytecodeGenerator::emitPushScope): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveArguments): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_create_arguments): + (JSC::JIT::emit_op_init_arguments): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_tear_off_arguments): + (JSC::JITStubs::cti_op_load_varargs): + * parser/Nodes.cpp: + (JSC::ApplyFunctionCallDotNode::emitBytecode): + +2009-05-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Enable use of SamplingFlags directly from JIT code. + + * bytecode/SamplingTool.h: + * jit/JIT.h: + (JSC::JIT::sampleCodeBlock): + (JSC::JIT::sampleInstruction): + * jit/JITInlineMethods.h: + (JSC::JIT::setSamplingFlag): + (JSC::JIT::clearSamplingFlag): + +2009-05-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Cameron Zwarich. + + Implement JIT generation for instanceof for non-objects (always returns false). + Also fixes the sequencing of the prototype and value isObject checks, to no match the spec. + + 0.5% progression on v8 tests overall, due to 3.5% on early-boyer. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * runtime/JSObject.cpp: + (JSC::JSObject::hasInstance): + * runtime/TypeInfo.h: + (JSC::TypeInfo::TypeInfo): + +2009-05-11 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + A little more JIT refactoring. + + Rearranged code to more clearly indicate what's conditionally compiled + and why. Now, all shared code is at the top of our JIT files, and all + #if'd code is at the bottom. #if'd code is delineated by large comments. + + Moved functions that relate to the JIT but don't explicitly do codegen + into JIT.cpp. Refactored SSE2 check to store its result as a data member + in the JIT. + + * jit/JIT.cpp: + (JSC::isSSE2Present): + (JSC::JIT::JIT): + (JSC::JIT::unlinkCall): + (JSC::JIT::linkCall): + * jit/JIT.h: + (JSC::JIT::isSSE2Present): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + +2009-05-11 Holger Hans Peter Freyther <zecke@selfish.org> + + Build fix. + + * JavaScriptCore.pri: Build the new JITOpcodes.cpp + +2009-05-11 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen. + + More re-factoring of JIT code generation. Use a macro to + forward the main switch-statement cases to the helper functions. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + +2009-05-11 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen. + + More re-factoring of JIT code generation to move opcode generation + to helper functions outside the main switch-statement and gave those + helper functions standardized names. This patch covers the remaining + slow cases. + + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITOpcodes.cpp: + +2009-05-11 Geoffrey Garen <ggaren@apple.com> + + Build fix. + + * GNUmakefile.am: Added JITOpcodes.cpp and JITStubCall.h to the project. + +2009-05-11 Geoffrey Garen <ggaren@apple.com> + + Build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added + JITOpcodes.cpp and JITStubCall.h to the project. + +2009-05-11 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Some JIT refactoring. + + Moved JITStubCall* into its own header. + + Modified JITStubCall to ASSERT that its return value is handled correctly. + Also, replaced function template with explicit instantiations to resolve + some confusion. + + Replaced all uses of emit{Get,Put}CTIArgument with explicit peeks, pokes, + and calls to killLastResultRegister(). + + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompile): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + * jit/JITCall.cpp: + * jit/JITInlineMethods.h: + (JSC::JIT::restoreArgumentReference): + * jit/JITPropertyAccess.cpp: + * jit/JITStubCall.h: Copied from jit/JIT.h. + (JSC::JITStubCall::JITStubCall): + (JSC::JITStubCall::addArgument): + (JSC::JITStubCall::call): + (JSC::JITStubCall::): + +2009-05-11 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen. + + Start re-factoring JIT code generation to move opcode generation + to helper functions outside the main switch-statement and gave those + helper functions standardized names. This patch only covers the main + pass and all the arithmetic opcodes in the slow path. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + * jit/JITOpcodes.cpp: Copied from jit/JIT.cpp. + * jit/JITPropertyAccess.cpp: + +2009-05-11 Steve Falkenburg <sfalken@apple.com> + + Re-add experimental PGO configs. + + Reviewed by Adam Roben. + + * JavaScriptCore.vcproj/JavaScriptCore.make: + * JavaScriptCore.vcproj/JavaScriptCore.sln: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + +2009-05-11 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey "1" Garen. + + Rip out the !USE(CTI_REPATCH_PIC) code. It was untested and unused. + + * jit/JIT.h: + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + (JSC::JIT::compileCTIMachineTrampolines): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITStubs::tryCachePutByID): + (JSC::JITStubs::tryCacheGetByID): + +2009-05-11 Dmitry Titov <dimich@chromium.org> + + GTK build fix - the deprecated waitForThreadCompletion is not needed on GTK. + + * wtf/ThreadingPthreads.cpp: used #ifdef PLATFORM(DARWIN) around waitForThreadCompletion(). + +2009-05-11 Adam Roben <aroben@apple.com> + + Build fix for newer versions of GCC + + * wtf/ThreadingPthreads.cpp: Added a declaration of + waitForThreadCompletion before its definition to silence a warning. + +2009-05-11 Dmitry Titov <dimich@chromium.org> + + Reviewed by Alexey Proskuryakov and Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=25348 + Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. + + * wtf/Threading.h: + (WTF::ThreadIdentifier::ThreadIdentifier): + (WTF::ThreadIdentifier::isValid): + (WTF::ThreadIdentifier::invalidate): + (WTF::ThreadIdentifier::platformId): + ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and + methods that are used across the code on thread ids: construction, comparisons, + check for 'valid' state etc. '0' is used as invalid id, which happens to just work + with all platform-specific thread id implementations. + + All the following files repeatedly reflect the new ThreadIdentifier for each platform. + We remove ThreadMap and threadMapMutex from all of them, remove the functions that + populated/searched/cleared the map and add platform-specific comparison operators + for ThreadIdentifier. + + There are specific temporary workarounds for Safari 4 beta on OSX and Win32 since the + public build uses WTF threading functions with old type of ThreadingIdentifier. + The next time Safari 4 is rebuilt, it will 'automatically' pick up the new type and new + functions so the deprecated ones can be removed. + + * wtf/gtk/ThreadingGtk.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + + * wtf/ThreadingNone.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + + * wtf/ThreadingPthreads.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::detachThread): + (WTF::currentThread): + (WTF::waitForThreadCompletion): This is a workaround for Safari 4 beta on Mac. + Safari 4 is linked against old definition of ThreadIdentifier so it treats it as uint32_t. + This 'old' variant of waitForThreadCompletion takes uint32_t and has the old decorated name, so Safari can + load it from JavaScriptCore library. The other functions (CurrentThread() etc) happen to match their previous + decorated names and, while they return pthread_t now, it is a pointer which round-trips through a uint32_t. + This function will be removed as soon as Safari 4 will release next public build. + + * wtf/qt/ThreadingQt.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + + * wtf/ThreadingWin.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): All the platforms (except Windows) used a sequential + counter as a thread ID and mapped it into platform ID. Windows was using native thread + id and mapped it into thread handle. Since we can always obtain a thread handle + by thread id, createThread now closes the handle. + (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle, + it means the thread already exited. + (WTF::detachThread): + (WTF::currentThread): + (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now). + (WTF::waitForThreadCompletionDeprecated): same. + (WTF::currentThreadDeprecated): same. + (WTF::createThreadDeprecated): same. + + * bytecode/SamplingTool.h: + * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor. + + * JavaScriptCore.exp: export lists - updated decorated names of the WTF threading functions + since they now take a different type as a parameter. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions + that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto. + +2009-05-11 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + Bug 25560: REGRESSION (r34821): "string value".__proto__ gets the wrong object. + https://bugs.webkit.org/show_bug.cgi?id=25560 + rdar://problem/6861069 + + I missed this case back a year ago when I sped up handling + of JavaScript wrappers. Easy to fix. + + * runtime/JSObject.h: + (JSC::JSValue::get): Return the prototype itself if the property name + is __proto__. + * runtime/JSString.cpp: + (JSC::JSString::getOwnPropertySlot): Ditto. + +2009-05-09 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Rename emitGetFromCallFrameHeader to emitGetFromCallFrameHeaderPtr + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::emitGetFromCallFrameHeaderPtr): + (JSC::JIT::emitGetFromCallFrameHeader32): + +2009-05-11 Holger Hans Peter Freyther <zecke@selfish.org> + + Unreviewed build fix. Build ParserAreana.cpp for Qt + + * JavaScriptCore.pri: + +2009-05-11 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=24536 + + Symbian compilers cannot resolve WTF::PassRefPtr<JSC::Profile> + unless Profile.h is included. + + * profiler/ProfileGenerator.h: + +2009-05-11 Csaba Osztrogonac <oszi@inf.u-szeged.hu> + + Reviewed by Holger Freyther. + + https://bugs.webkit.org/show_bug.cgi?id=24284 + + * JavaScriptCore.pri: coding style modified + * jsc.pro: duplicated values removed from INCLUDEPATH, DEFINES + +2009-05-11 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by NOBODY (build fix). + + Also add ParserArena, in addition to AllInOne, for release builds, + since adding it to AllInOne breaks Mac. + + * GNUmakefile.am: + +2009-05-11 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Unreviewed build fix. Adding ParserArena to the autotools build. + + * GNUmakefile.am: + +2009-05-11 Adam Roben <aroben@apple.com> + + More Windows build fixes after r43479 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Export ParserArena::reset. + +2009-05-11 Adam Roben <aroben@apple.com> + + Windows build fixes after r43479 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added + ParserArena to the project. + + * parser/NodeConstructors.h: Added a missing include. + (JSC::ParserArenaDeletable::operator new): Marked these as inline. + +2009-05-10 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Geoff Garen. + + - fixed REGRESSION(r43432): Many JavaScriptCore tests crash in 64-bit + https://bugs.webkit.org/show_bug.cgi?id=25680 + + Accound for the 64-bit instruction prefix when rewriting mov to lea on 64-bit. + + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + +2009-05-10 Darin Adler <darin@apple.com> + + Reviewed by Cameron Zwarich. + + Bug 25674: syntax tree nodes should use arena allocation + https://bugs.webkit.org/show_bug.cgi?id=25674 + + Part two: Remove reference counting from most nodes. + + * JavaScriptCore.exp: Updated. + + * JavaScriptCore.xcodeproj/project.pbxproj: Added ParserArena.h and .cpp. + + * parser/Grammar.y: Replaced uses of ParserRefCountedData with uses of + ParserArenaData. Took out now-nonfunctional code that tries to manually + release declaration list. Changed the new calls that create FuncDeclNode + and FuncExprNode so that they use the proper version of operator new for + the reference-counted idiom, not the deletion idiom. + + * parser/NodeConstructors.h: + (JSC::ParserArenaDeletable::operator new): Added. + (JSC::ParserArenaRefCounted::ParserArenaRefCounted): Added. + (JSC::Node::Node): Removed ParserRefCounted initializer. + (JSC::ElementNode::ElementNode): Ditto. + (JSC::PropertyNode::PropertyNode): Ditto. + (JSC::ArgumentsNode::ArgumentsNode): Ditto. + (JSC::SourceElements::SourceElements): Ditto. + (JSC::ParameterNode::ParameterNode): Ditto. + (JSC::FuncExprNode::FuncExprNode): Added ParserArenaRefCounted initializer. + (JSC::FuncDeclNode::FuncDeclNode): Ditto. + (JSC::CaseClauseNode::CaseClauseNode): Removed ParserRefCounted initializer. + (JSC::ClauseListNode::ClauseListNode): Ditto. + (JSC::CaseBlockNode::CaseBlockNode): Ditto. + + * parser/NodeInfo.h: Replaced uses of ParserRefCountedData with uses of + ParserArenaData. + + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): Added ParserArenaRefCounted initializer. + (JSC::ProgramNode::create): Use the proper version of operator new for + the reference-counted idiom, not the deletion idiom. Use the arena + contains function instead of the vecctor find function. + (JSC::EvalNode::create): Use the proper version of operator new for + the reference-counted idiom, not the deletion idiom. Use the arena + reset function instead of the vector shrink function. + (JSC::FunctionBodyNode::createNativeThunk): Use the proper version + of operator new for the reference-counted idiom, not the deletion idiom. + (JSC::FunctionBodyNode::create): More of the same. + + * parser/Nodes.h: Added ParserArenaDeletable and ParserArenaRefCounted + to replace ParserRefCounted. Fixed inheritance so only the classes that + need reference counting inherit from ParserArenaRefCounted. + + * parser/Parser.cpp: + (JSC::Parser::parse): Set m_sourceElements to 0 since it now starts + uninitialized. Just set it to 0 again in the failure case, since it's + now just a raw pointer, not an owning one. + (JSC::Parser::reparseInPlace): Removed now-unneeded get() function. + (JSC::Parser::didFinishParsing): Replaced uses of ParserRefCountedData + with uses of ParserArenaData. + + * parser/Parser.h: Less RefPtr, more arena. + + * parser/ParserArena.cpp: Added. + * parser/ParserArena.h: Added. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::~JSGlobalData): Removed arena-related code, since it's + now in the Parser. + (JSC::JSGlobalData::createLeaked): Removed unneeded #ifndef. + (JSC::JSGlobalData::createNativeThunk): Tweaked #if a bit. + + * runtime/JSGlobalData.h: Removed parserArena, which is now in Parser. + + * wtf/RefCounted.h: Added deletionHasBegun function, for use in + assertions to catch deletion not done by the deref function. + +2009-05-10 David Kilzer <ddkilzer@apple.com> + + Part 2: Try to fix the Windows build by adding a symbol which is really just a re-mangling of a changed method signature + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-10 David Kilzer <ddkilzer@apple.com> + + Try to fix the Windows build by removing an unknown symbol + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-10 David Kilzer <ddkilzer@apple.com> + + Touch Nodes.cpp to try to fix Windows build + + * parser/Nodes.cpp: Removed whitespace. + +2009-05-10 Darin Adler <darin@apple.com> + + Reviewed by Maciej Stachowiak. + + Quick fix for failures seen on buildbot. Maciej plans a better fix later. + + * wtf/dtoa.cpp: Change the hardcoded number of 32-bit words in a BigInt + from 32 to 64. Parsing "1e500", for example, requires more than 32 words. + +2009-05-10 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Bug 25674: syntax tree nodes should use arena allocation + Part one: Change lifetimes so we won't have to use reference + counting so much, but don't eliminate the reference counts + entirely yet. + + * JavaScriptCore.exp: Updated. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): Update for use of raw pointers + instead of RefPtr. + (JSC::BytecodeGenerator::emitCall): Ditto. + (JSC::BytecodeGenerator::emitConstruct): Ditto. + + * parser/Grammar.y: Update node creating code to use new (JSGlobalData*) + instead of the plain new. At the moment this is just a hook for future + arena allocation; it's inline and JSGlobalData* is not used. + + * parser/NodeConstructors.h: Updated for name change of parserObjects to + parserArena. Also added explicit initialization for raw pointers that used + to be RefPtr. Also removed some uses of get() that aren't needed now that + the pointers are raw pointers. Also eliminated m_parameter from FuncExprNode + and FuncDeclNode. Also changed node-creating code to use new (JSGlobalData*) + as above. + + * parser/Nodes.cpp: Eliminated NodeReleaser and all use of it. + (JSC::ParserRefCounted::ParserRefCounted): Updated for name change of + parserObjects to parserArena. + (JSC::SourceElements::append): Use raw pointers. + (JSC::ArrayNode::emitBytecode): Ditto. + (JSC::ArrayNode::isSimpleArray): Ditto. + (JSC::ArrayNode::toArgumentList): Ditto. + (JSC::ObjectLiteralNode::emitBytecode): Ditto. + (JSC::PropertyListNode::emitBytecode): Ditto. + (JSC::BracketAccessorNode::emitBytecode): Ditto. + (JSC::DotAccessorNode::emitBytecode): Ditto. + (JSC::ArgumentListNode::emitBytecode): Ditto. + (JSC::NewExprNode::emitBytecode): Ditto. + (JSC::EvalFunctionCallNode::emitBytecode): Ditto. + (JSC::FunctionCallValueNode::emitBytecode): Ditto. + (JSC::FunctionCallResolveNode::emitBytecode): Ditto. + (JSC::FunctionCallBracketNode::emitBytecode): Ditto. + (JSC::FunctionCallDotNode::emitBytecode): Ditto. + (JSC::CallFunctionCallDotNode::emitBytecode): Ditto. + (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto. + (JSC::PostfixBracketNode::emitBytecode): Ditto. + (JSC::PostfixDotNode::emitBytecode): Ditto. + (JSC::DeleteBracketNode::emitBytecode): Ditto. + (JSC::DeleteDotNode::emitBytecode): Ditto. + (JSC::DeleteValueNode::emitBytecode): Ditto. + (JSC::VoidNode::emitBytecode): Ditto. + (JSC::TypeOfValueNode::emitBytecode): Ditto. + (JSC::PrefixBracketNode::emitBytecode): Ditto. + (JSC::PrefixDotNode::emitBytecode): Ditto. + (JSC::UnaryOpNode::emitBytecode): Ditto. + (JSC::BinaryOpNode::emitStrcat): Ditto. + (JSC::BinaryOpNode::emitBytecode): Ditto. + (JSC::EqualNode::emitBytecode): Ditto. + (JSC::StrictEqualNode::emitBytecode): Ditto. + (JSC::ReverseBinaryOpNode::emitBytecode): Ditto. + (JSC::ThrowableBinaryOpNode::emitBytecode): Ditto. + (JSC::InstanceOfNode::emitBytecode): Ditto. + (JSC::LogicalOpNode::emitBytecode): Ditto. + (JSC::ConditionalNode::emitBytecode): Ditto. + (JSC::ReadModifyResolveNode::emitBytecode): Ditto. + (JSC::AssignResolveNode::emitBytecode): Ditto. + (JSC::AssignDotNode::emitBytecode): Ditto. + (JSC::ReadModifyDotNode::emitBytecode): Ditto. + (JSC::AssignBracketNode::emitBytecode): Ditto. + (JSC::ReadModifyBracketNode::emitBytecode): Ditto. + (JSC::CommaNode::emitBytecode): Ditto. + (JSC::ConstDeclNode::emitCodeSingle): Ditto. + (JSC::ConstDeclNode::emitBytecode): Ditto. + (JSC::ConstStatementNode::emitBytecode): Ditto. + (JSC::statementListEmitCode): Ditto. + (JSC::BlockNode::emitBytecode): Ditto. + (JSC::ExprStatementNode::emitBytecode): Ditto. + (JSC::VarStatementNode::emitBytecode): Ditto. + (JSC::IfNode::emitBytecode): Ditto. + (JSC::IfElseNode::emitBytecode): Ditto. + (JSC::DoWhileNode::emitBytecode): Ditto. + (JSC::WhileNode::emitBytecode): Ditto. + (JSC::ForNode::emitBytecode): Ditto. + (JSC::ForInNode::emitBytecode): Ditto. + (JSC::ReturnNode::emitBytecode): Ditto. + (JSC::WithNode::emitBytecode): Ditto. + (JSC::CaseBlockNode::tryOptimizedSwitch): Ditto. + (JSC::CaseBlockNode::emitBytecodeForBlock): Ditto. + (JSC::SwitchNode::emitBytecode): Ditto. + (JSC::LabelNode::emitBytecode): Ditto. + (JSC::ThrowNode::emitBytecode): Ditto. + (JSC::TryNode::emitBytecode): Ditto. + (JSC::ScopeNodeData::ScopeNodeData): Use swap to transfer ownership + of the arena, varStack and functionStack. + (JSC::ScopeNode::ScopeNode): Pass in the arena when creating the + ScopeNodeData. + (JSC::ProgramNode::ProgramNode): Made this inline since it's used + in only one place. + (JSC::ProgramNode::create): Changed this to return a PassRefPtr since + we plan to have the scope nodes be outside the arena, so they will need + some kind of ownership transfer (maybe auto_ptr instead of PassRefPtr + in the future, though). Remove the node from the newly-created arena to + avoid a circular reference. Later we'll keep the node out of the arena + by using a different operator new, but for now it's the ParserRefCounted + constructor that puts the node into the arena, and there's no way to + bypass that. + (JSC::EvalNode::EvalNode): Ditto. + (JSC::EvalNode::create): Ditto. + (JSC::FunctionBodyNode::FunctionBodyNode): Ditto. + (JSC::FunctionBodyNode::createNativeThunk): Moved the code that + reseets the arena here instead of the caller. + (JSC::FunctionBodyNode::create): Same change as the other create + functions above. + (JSC::FunctionBodyNode::emitBytecode): Use raw pointers. + + * parser/Nodes.h: Removed NodeReleaser. Changed FunctionStack to + use raw pointers. Removed the releaseNodes function. Added an override + of operator new that takes a JSGlobalData* to prepare for future arena use. + Use raw pointers instead of RefPtr everywhere possible. + + * parser/Parser.cpp: + (JSC::Parser::reparseInPlace): Pass the arena in. + + * parser/Parser.h: + (JSC::Parser::parse): Updated for name change of parserObjects to parserArena. + (JSC::Parser::reparse): Ditto. + * runtime/FunctionConstructor.cpp: + (JSC::extractFunctionBody): Ditto. + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::~JSGlobalData): Ditto. + (JSC::JSGlobalData::createNativeThunk): Moved arena manipulation into the + FunctionBodyNode::createNativeThunk function. + + * runtime/JSGlobalData.h: Tweaked formatting and renamed parserObjects to + parserArena. + + * wtf/NotFound.h: Added the usual "using WTF" to this header to match the + rest of WTF. + +2009-05-10 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=25670 + Remove no longer valid chunk of code from dtoa. + + * wtf/dtoa.cpp: + (WTF::dtoa): Removed invalid code. + +2009-05-10 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Geoff Garen. + + "Class const *" is the same as "const Class*", use the latter syntax consistently. + + See <http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.9>. + + * pcre/pcre_compile.cpp: + (calculateCompiledPatternLength): + * runtime/JSObject.h: + (JSC::JSObject::offsetForLocation): + (JSC::JSObject::locationForOffset): + +2009-05-10 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Alexey Proskuryakov. + + - speedup dtoa/strtod + + Added a bunch of inlining, and replaced malloc with stack allocation. + + 0.5% SunSpider speedup (7% on string-tagcloud). + + * runtime/NumberPrototype.cpp: + (JSC::integerPartNoExp): + (JSC::numberProtoFuncToExponential): + * runtime/UString.cpp: + (JSC::concatenate): + (JSC::UString::from): + * wtf/dtoa.cpp: + (WTF::BigInt::BigInt): + (WTF::BigInt::operator=): + (WTF::Balloc): + (WTF::Bfree): + (WTF::multadd): + (WTF::s2b): + (WTF::i2b): + (WTF::mult): + (WTF::pow5mult): + (WTF::lshift): + (WTF::cmp): + (WTF::diff): + (WTF::b2d): + (WTF::d2b): + (WTF::ratio): + (WTF::strtod): + (WTF::quorem): + (WTF::freedtoa): + (WTF::dtoa): + * wtf/dtoa.h: + +2009-05-09 Mike Hommey <glandium@debian.org> + + Reviewed by Geoffrey Garen. Landed by Jan Alonzo. + + Enable JIT on x86-64 gtk+ + https://bugs.webkit.org/show_bug.cgi?id=24724 + + * GNUmakefile.am: + +2009-05-09 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Removed the last non-call-related manually managed JIT stub call. + + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArithSlow_op_rshift): Fully use the JITStubCall + abstraction, instead of emitPutJITStubArg. + +2009-05-09 Sebastian Andrzej Siewior <sebastian@breakpoint.cc> + + Reviewed by Gustavo Noronha. + + https://bugs.webkit.org/show_bug.cgi?id=25653 + PLATFORM(X86_64) inherits ia64 + + __ia64__ is defined by gcc in an IA64 arch and has completely + nothing in common with X86-64 exept both are from Intel and have + an 64bit address space. That's it. Since code seems to expect x86 + here, ia64 has to go. + + * wtf/Platform.h: + +2009-05-09 Gustavo Noronha Silva <gns@gnome.org> + + Suggested by Geoffrey Garen. + + Assume SSE2 is present on X86-64 and on MAC X86-32. This fixes a + build breakage on non-Mac X86-64 when JIT is enabled. + + * jit/JITArithmetic.cpp: + +2009-05-09 Gustavo Noronha Silva <gns@gnome.org> + + Build fix, adding missing files to make dist. + + * GNUmakefile.am: + +2009-05-09 Geoffrey Garen <ggaren@apple.com> + + Windows build fix. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::patchLoadToLEA): + +2009-05-09 Geoffrey Garen <ggaren@apple.com> + + Windows build fix. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::patchLoadToLEA): + +2009-05-09 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Gavin Barraclough. + + Original patch by John McCall. Updated by Cameron Zwarich. Further refined by me. + + - Assorted speedups to property access + + ~.3%-1% speedup on SunSpider + + 1) When we know from the structure ID that an object is using inline storage, plant direct + loads and stores against it; no need to indirect through storage pointer. + + 2) Also because of the above, union the property storage pointer with the first inline property + slot and add an extra inline property slot. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::CodeLocationInstruction::CodeLocationInstruction): + (JSC::AbstractMacroAssembler::CodeLocationInstruction::patchLoadToLEA): + (JSC::::CodeLocationCommon::instructionAtOffset): + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::storePtr): + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::store32): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::storePtr): + * assembler/X86Assembler.h: + (JSC::X86Assembler::movq_EAXm): + (JSC::X86Assembler::movl_rm): + (JSC::X86Assembler::patchLoadToLEA): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compilePutByIdHotPath): + (JSC::JIT::compilePutDirectOffset): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompileGetByIdSelf): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::privateCompilePutByIdReplace): + * runtime/JSObject.cpp: + (JSC::JSObject::mark): + (JSC::JSObject::removeDirect): + * runtime/JSObject.h: + (JSC::JSObject::propertyStorage): + (JSC::JSObject::getDirect): + (JSC::JSObject::getOffset): + (JSC::JSObject::offsetForLocation): + (JSC::JSObject::locationForOffset): + (JSC::JSObject::getDirectOffset): + (JSC::JSObject::putDirectOffset): + (JSC::JSObject::isUsingInlineStorage): + (JSC::JSObject::): + (JSC::JSObject::JSObject): + (JSC::JSObject::~JSObject): + (JSC::Structure::isUsingInlineStorage): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectWithoutTransition): + (JSC::JSObject::allocatePropertyStorageInline): + * runtime/Structure.h: + +2009-05-09 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + Changed all our JIT stubs so that they return a maximum of 1 JS value or + two non-JS pointers, and do all other value returning through out + parameters, in preparation for 64bit JS values on a 32bit system. + + Stubs that used to return two JSValues now return one JSValue and take + and out parameter specifying where in the register array the second + value should go. + + SunSpider reports no change. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArithSlow_op_post_inc): + (JSC::JIT::compileFastArithSlow_op_post_dec): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_call_arityCheck): + (JSC::JITStubs::cti_op_resolve_func): + (JSC::JITStubs::cti_op_post_inc): + (JSC::JITStubs::cti_op_resolve_with_base): + (JSC::JITStubs::cti_op_post_dec): + * jit/JITStubs.h: + (JSC::): + +2009-05-08 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Fixed <rdar://problem/6634956> CrashTracer: [REGRESSION] >400 crashes + in Safari at com.apple.JavaScriptCore • JSC::BytecodeGenerator::emitComplexJumpScopes + 468 + https://bugs.webkit.org/show_bug.cgi?id=25658 + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitComplexJumpScopes): Guard the whole loop + with a bounds check. The old loop logic would decrement and read topScope + without a bounds check, which could cause crashes on page boundaries. + +2009-05-08 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by NOBODY (BuildFix). + + Gtk fix: add LiteralParser to the build script per r43424. + + Add LiteralParser to the Qt and Wx build scripts too. + + * GNUmakefile.am: + * JavaScriptCore.pri: + * JavaScriptCoreSources.bkl: + +2009-05-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough and Darin Adler. + + Add a limited literal parser for eval to handle object and array literals fired at eval + + This is a simplified parser and lexer that we can throw at strings passed to eval + in case a site is using eval to parse JSON (eg. json2.js). The lexer is intentionally + limited (in effect it's whitelisting a limited "common" subset of the JSON grammar) + as this decreases the likelihood of us wating time attempting to parse any significant + amount of non-JSON content. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + * runtime/LiteralParser.cpp: Added. + (JSC::isStringCharacter): + (JSC::LiteralParser::Lexer::lex): + (JSC::LiteralParser::Lexer::lexString): + (JSC::LiteralParser::Lexer::lexNumber): + (JSC::LiteralParser::parseStatement): + (JSC::LiteralParser::parseExpression): + (JSC::LiteralParser::parseArray): + (JSC::LiteralParser::parseObject): + (JSC::LiteralParser::StackGuard::StackGuard): + (JSC::LiteralParser::StackGuard::~StackGuard): + (JSC::LiteralParser::StackGuard::isSafe): + * runtime/LiteralParser.h: Added. + (JSC::LiteralParser::LiteralParser): + (JSC::LiteralParser::attemptJSONParse): + (JSC::LiteralParser::): + (JSC::LiteralParser::Lexer::Lexer): + (JSC::LiteralParser::Lexer::next): + (JSC::LiteralParser::Lexer::currentToken): + (JSC::LiteralParser::abortParse): + +2009-05-08 Geoffrey Garen <ggaren@apple.com> + + Not reviewed. + + Restored a Mozilla JS test I accidentally gutted. + + * tests/mozilla/ecma/Array/15.4.4.2.js: + (getTestCases): + (test): + +2009-05-08 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + More abstraction for JITStub calls from JITed code. + + Added a JITStubCall class that automatically handles things like assigning + arguments to different stack slots and storing return values. Deployed + the class in about a billion places. A bunch more places remain to be + fixed up, but this is a good stopping point for now. + + * jit/JIT.cpp: + (JSC::JIT::emitTimeoutCheck): + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::JIT::JSRInfo::JSRInfo): + (JSC::JITStubCall::JITStubCall): + (JSC::JITStubCall::addArgument): + (JSC::JITStubCall::call): + (JSC::JITStubCall::): + (JSC::CallEvalJITStub::CallEvalJITStub): + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArithSlow_op_lshift): + (JSC::JIT::compileFastArithSlow_op_rshift): + (JSC::JIT::compileFastArithSlow_op_jnless): + (JSC::JIT::compileFastArithSlow_op_bitand): + (JSC::JIT::compileFastArithSlow_op_mod): + (JSC::JIT::compileFastArith_op_mod): + (JSC::JIT::compileFastArithSlow_op_post_inc): + (JSC::JIT::compileFastArithSlow_op_post_dec): + (JSC::JIT::compileFastArithSlow_op_pre_inc): + (JSC::JIT::compileFastArithSlow_op_pre_dec): + (JSC::JIT::compileFastArith_op_add): + (JSC::JIT::compileFastArith_op_mul): + (JSC::JIT::compileFastArith_op_sub): + (JSC::JIT::compileBinaryArithOpSlowCase): + (JSC::JIT::compileFastArithSlow_op_add): + (JSC::JIT::compileFastArithSlow_op_mul): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + (JSC::): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compilePutByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::compilePutByIdSlowCase): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_resolve_func): + (JSC::JITStubs::cti_op_resolve_with_base): + +2009-05-08 Cameron Zwarich <cwzwarich@uwaterloo.ca> + + Reviewed by Maciej Stachowiak. + + Add a new opcode jnlesseq, and optimize its compilation in the JIT using + techniques similar to what were used to optimize jnless in r43363. + + This gives a 0.7% speedup on SunSpider, particularly on the tests 3d-cube, + control-flow-recursive, date-format-xparb, and string-base64. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): Add support for dumping op_jnlesseq. + * bytecode/Opcode.h: Add op_jnlesseq to the list of opcodes. + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJumpIfFalse): Add a peephole optimization + for op_jnlesseq when emitting lesseq followed by a jump. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Add case for op_jnlesseq. + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): Add case for op_jnlesseq. + (JSC::JIT::privateCompileSlowCases): Add case for op_jnlesseq. + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArith_op_jnlesseq): Added. + (JSC::JIT::compileFastArithSlow_op_jnlesseq): Added. + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_jlesseq): Added. + * jit/JITStubs.h: + +2009-05-08 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Cameron Zwarich. + + - fix test failures on 64-bit + + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArithSlow_op_jnless): Avoid accidentaly treating an + immediate int as an immediate float in the 64-bit value representation. + +2009-05-08 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Oliver Hunt. + + Removing an empty constructor and an uncalled, empty function seems to be a + pretty solid 1% regeression on my machine, so I'm going to put them back. + Um. Yeah, this this pretty pointles and makes no sense at all. I officially + lose the will to live in 3... 2... + + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::notifyOfScope): + * bytecode/SamplingTool.h: + (JSC::SamplingTool::~SamplingTool): + +2009-05-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver "I see lots of ifdefs" Hunt. + + Fix (kinda) for sampling tool breakage. The codeblock sampling tool has become + b0rked due to recent changes in native function calling. The initialization of + a ScopeNode appears to now occur before the sampling tool (or possibly the + interpreter has been brought into existence, wihich leads to crashyness). + + This patch doesn't fix the problem. The crash occurs when tracking a Scope, but + we shouldn't need to track scopes when we're just sampling opcodes, not + codeblocks. Not retaining Scopes when just opcode sampling will reduce sampling + overhead reducing any instrumentation skew, which is a good thing. As a side + benefit this patch also gets the opcode sampling going again, albeit in a bit of + a lame way. Will come back later with a proper fix from codeblock sampling. + + * JavaScriptCore.exp: + * bytecode/SamplingTool.cpp: + (JSC::compareLineCountInfoSampling): + (JSC::SamplingTool::dump): + * bytecode/SamplingTool.h: + (JSC::SamplingTool::SamplingTool): + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): + +2009-05-07 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Oliver Hunt. + + Fix <https://bugs.webkit.org/show_bug.cgi?id=25640>. + Bug 25640: Crash on quit in r43384 nightly build on Leopard w/ Safari 4 beta installed + + Roll out r43366 as it removed symbols that Safari 4 Beta uses. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * bytecode/SamplingTool.cpp: + (JSC::SamplingThread::start): + (JSC::SamplingThread::stop): + * bytecode/SamplingTool.h: + * wtf/CrossThreadRefCounted.h: + (WTF::CrossThreadRefCounted::CrossThreadRefCounted): + (WTF::::ref): + (WTF::::deref): + * wtf/Threading.h: + * wtf/ThreadingNone.cpp: + * wtf/ThreadingPthreads.cpp: + (WTF::threadMapMutex): + (WTF::initializeThreading): + (WTF::threadMap): + (WTF::identifierByPthreadHandle): + (WTF::establishIdentifierForPthreadHandle): + (WTF::pthreadHandleForIdentifier): + (WTF::clearPthreadHandleForIdentifier): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::detachThread): + (WTF::currentThread): + * wtf/ThreadingWin.cpp: + (WTF::threadMapMutex): + (WTF::initializeThreading): + (WTF::threadMap): + (WTF::storeThreadHandleByIdentifier): + (WTF::threadHandleForIdentifier): + (WTF::clearThreadHandleForIdentifier): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::detachThread): + (WTF::currentThread): + * wtf/gtk/ThreadingGtk.cpp: + (WTF::threadMapMutex): + (WTF::initializeThreading): + (WTF::threadMap): + (WTF::identifierByGthreadHandle): + (WTF::establishIdentifierForThread): + (WTF::threadForIdentifier): + (WTF::clearThreadForIdentifier): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + * wtf/qt/ThreadingQt.cpp: + (WTF::threadMapMutex): + (WTF::threadMap): + (WTF::identifierByQthreadHandle): + (WTF::establishIdentifierForThread): + (WTF::clearThreadForIdentifier): + (WTF::threadForIdentifier): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + +2009-05-07 Gustavo Noronha Silva <gns@gnome.org> + + Suggested by Oliver Hunt. + + Also check for Linux for the special-cased calling convention. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * wtf/Platform.h: + +2009-05-07 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Maciej Stachowiak. + + Previously, when appending to an existing string and growing the underlying buffer, + we would actually allocate 110% of the required size in order to give us some space + to expand into. Now we treat strings differently based on their size: + + Small Strings (up to 4 pages): + Expand the allocation size to 112.5% of the amount requested. This is largely sicking + to our previous policy, however 112.5% is cheaper to calculate. + + Medium Strings (up to 128 pages): + For pages covering multiple pages over-allocation is less of a concern - any unused + space will not be paged in if it is not used, so this is purely a VM overhead. For + these strings allocate 2x the requested size. + + Large Strings (to infinity and beyond!): + Revert to our 112.5% policy - probably best to limit the amount of unused VM we allow + any individual string be responsible for. + + Additionally, round small allocations up to a multiple of 16 bytes, and medium and + large allocations up to a multiple of page size. + + ~1.5% progression on Sunspider, due to 5% improvement on tagcloud & 15% on validate. + + * runtime/UString.cpp: + (JSC::expandedSize): + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Fixed a minor sequencing error introduced by recent Parser speedups. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::createNativeThunk): Missed a spot in my last patch. + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Not reviewed. + + * wtf/Platform.h: Reverted an accidental (and performance-catastrophic) + change. + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Fixed a minor sequencing error introduced by recent Parser speedups. + + * parser/Parser.cpp: + (JSC::Parser::reparseInPlace): Missed a spot in my last patch. + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Fixed a minor sequencing error introduced by recent Parser speedups. + + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + (JSC::Parser::reparse): Shrink the parsedObjects vector after allocating + the root node, to avoid leaving a stray node in the vector, since that's + a slight memory leak, and it causes problems during JSGlobalData teardown. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::~JSGlobalData): ASSERT that we're not being torn + down while we think we're still parsing, since that would cause lots of + bad memory references during our destruction. + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Replaced two more macros with references to the JITStackFrame structure. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JITInlineMethods.h: + (JSC::JIT::restoreArgumentReference): + * jit/JITStubs.cpp: + (JSC::): + * jit/JITStubs.h: + +2009-05-07 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve native call performance + + Fix the windows build by adding calling convention declarations everywhere, + chose fastcall as that seemed most sensible given we were having to declare + the convention explicitly. In addition switched to fastcall on mac in the + deluded belief that documented fastcall behavior on windows would match + actual its actual behavior. + + * API/JSCallbackFunction.h: + * API/JSCallbackObject.h: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * interpreter/CallFrame.h: + (JSC::ExecState::argumentCount): + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jsc.cpp: + (functionPrint): + (functionDebug): + (functionGC): + (functionVersion): + (functionRun): + (functionLoad): + (functionSetSamplingFlags): + (functionClearSamplingFlags): + (functionReadline): + (functionQuit): + * runtime/ArrayConstructor.cpp: + (JSC::callArrayConstructor): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::callBooleanConstructor): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/CallData.h: + * runtime/DateConstructor.cpp: + (JSC::callDate): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + * runtime/ErrorConstructor.cpp: + (JSC::callErrorConstructor): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/FunctionConstructor.cpp: + (JSC::callFunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::callFunctionPrototype): + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/JSFunction.h: + (JSC::JSFunction::nativeFunction): + (JSC::JSFunction::setScopeChain): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + (JSC::globalFuncIsNaN): + (JSC::globalFuncIsFinite): + (JSC::globalFuncDecodeURI): + (JSC::globalFuncDecodeURIComponent): + (JSC::globalFuncEncodeURI): + (JSC::globalFuncEncodeURIComponent): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + (JSC::globalFuncJSCPrint): + * runtime/JSGlobalObjectFunctions.h: + * runtime/MathObject.cpp: + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::callNativeErrorConstructor): + * runtime/NativeFunctionWrapper.h: + * runtime/NumberConstructor.cpp: + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::callObjectConstructor): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncValueOf): + (JSC::objectProtoFuncHasOwnProperty): + (JSC::objectProtoFuncIsPrototypeOf): + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + (JSC::objectProtoFuncLookupGetter): + (JSC::objectProtoFuncLookupSetter): + (JSC::objectProtoFuncPropertyIsEnumerable): + (JSC::objectProtoFuncToLocaleString): + (JSC::objectProtoFuncToString): + * runtime/ObjectPrototype.h: + * runtime/RegExpConstructor.cpp: + (JSC::callRegExpConstructor): + * runtime/RegExpObject.cpp: + (JSC::callRegExpObject): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCode): + (JSC::callStringConstructor): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToString): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + * wtf/Platform.h: + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Not reviewed. + + Rolled out a portion of r43352 because it broke 64bit. + + * jit/JITStubs.h: + +2009-05-07 Kevin Ollivier <kevino@theolliviers.com> + + Build fix for functions reaturning ThreadIdentifier. + + * wtf/ThreadingNone.cpp: + (WTF::createThreadInternal): + (WTF::currentThread): + +2009-05-07 Maciej Stachowiak <mjs@apple.com> + + Reviewed by John Honeycutt. + + - enable optimization case im the last patch that I accidentally had disabled. + + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArithSlow_op_jnless): + +2009-05-07 Dmitry Titov <dimich@chromium.org> + + Attempt to fix Win build. + + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArithSlow_op_jnless): + +2009-05-07 Dmitry Titov <dimich@chromium.org> + + Reviewed by Alexey Proskuryakov and Adam Roben. + + https://bugs.webkit.org/show_bug.cgi?id=25348 + Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. + + * wtf/Threading.h: + (WTF::ThreadIdentifier::ThreadIdentifier): + (WTF::ThreadIdentifier::isValid): + (WTF::ThreadIdentifier::invalidate): + (WTF::ThreadIdentifier::platformId): + ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and + methods that are used across the code on thread ids: construction, comparisons, + check for 'valid' state etc. '0' is used as invalid id, which happens to just work + with all platform-specific thread id implementations. + + All the following files repeatedly reflect the new ThreadIdentifier for each platform. + We remove ThreadMap and threadMapMutex from all of them, remove the functions that + populated/searched/cleared the map and add platform-specific comparison operators + for ThreadIdentifier. + + * wtf/gtk/ThreadingGtk.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + + * wtf/ThreadingNone.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + + * wtf/ThreadingPthreads.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::detachThread): + (WTF::currentThread): + + * wtf/qt/ThreadingQt.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): + (WTF::waitForThreadCompletion): + (WTF::currentThread): + + * wtf/ThreadingWin.cpp: + (WTF::ThreadIdentifier::operator==): + (WTF::ThreadIdentifier::operator!=): + (WTF::initializeThreading): + (WTF::createThreadInternal): All the platforms (except Windows) used a sequential + counter as a thread ID and mapped it into platform ID. Windows was using native thread + id and mapped it into thread handle. Since we can always obtain a thread handle + by thread id, createThread now closes the handle. + (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle, + it means the thread already exited. + (WTF::detachThread): + (WTF::currentThread): + (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now). + (WTF::waitForThreadCompletionDeprecated): same. + (WTF::currentThreadDeprecated): same. + (WTF::createThreadDeprecated): same. + + * bytecode/SamplingTool.h: + * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor. + + * JavaScriptCore.exp: export lists - updated the WTF threading functions decorated names + since they now take a different type as a parameter. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions + that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto. + +2009-05-07 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Sam Weinig. + + - optimize various cases of branch-fused less + + 1% speedup on SunSpider overall + 13% speedup on math-cordic + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + op_loop_if_less: Optimize case of constant as first operand, just as case of constant as + second operand. + op_jnless: Factored out into compileFastArith_op_jnless. + (JSC::JIT::privateCompileSlowCases): + op_jnless: Factored out into compileFastArithSlow_op_jnless. + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArith_op_jnless): Factored out from main compile loop. + - Generate inline code for comparison of constant immediate int as first operand to another + immediate int, as for loop_if_less + + (JSC::JIT::compileFastArithSlow_op_jnless): + - Generate inline code for comparing two floating point numbers. + - Generate code for both cases of comparing a floating point number to a constant immediate + int. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): Fix dumping of op_jnless (tangentially related bugfix). + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Added the return address of a stub function to the JITStackFrame abstraction. + + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITStubs.cpp: + (JSC::): + (JSC::StackHack::StackHack): + (JSC::StackHack::~StackHack): + (JSC::returnToThrowTrampoline): + (JSC::JITStubs::cti_op_convert_this): + (JSC::JITStubs::cti_op_end): + (JSC::JITStubs::cti_op_add): + (JSC::JITStubs::cti_op_pre_inc): + (JSC::JITStubs::cti_timeout_check): + (JSC::JITStubs::cti_register_file_check): + (JSC::JITStubs::cti_op_loop_if_less): + (JSC::JITStubs::cti_op_loop_if_lesseq): + (JSC::JITStubs::cti_op_new_object): + (JSC::JITStubs::cti_op_put_by_id_generic): + (JSC::JITStubs::cti_op_get_by_id_generic): + (JSC::JITStubs::cti_op_put_by_id): + (JSC::JITStubs::cti_op_put_by_id_second): + (JSC::JITStubs::cti_op_put_by_id_fail): + (JSC::JITStubs::cti_op_get_by_id): + (JSC::JITStubs::cti_op_get_by_id_second): + (JSC::JITStubs::cti_op_get_by_id_self_fail): + (JSC::JITStubs::cti_op_get_by_id_proto_list): + (JSC::JITStubs::cti_op_get_by_id_proto_list_full): + (JSC::JITStubs::cti_op_get_by_id_proto_fail): + (JSC::JITStubs::cti_op_get_by_id_array_fail): + (JSC::JITStubs::cti_op_get_by_id_string_fail): + (JSC::JITStubs::cti_op_instanceof): + (JSC::JITStubs::cti_op_del_by_id): + (JSC::JITStubs::cti_op_mul): + (JSC::JITStubs::cti_op_new_func): + (JSC::JITStubs::cti_op_call_JSFunction): + (JSC::JITStubs::cti_op_call_arityCheck): + (JSC::JITStubs::cti_vm_dontLazyLinkCall): + (JSC::JITStubs::cti_vm_lazyLinkCall): + (JSC::JITStubs::cti_op_push_activation): + (JSC::JITStubs::cti_op_call_NotJSFunction): + (JSC::JITStubs::cti_op_create_arguments): + (JSC::JITStubs::cti_op_create_arguments_no_params): + (JSC::JITStubs::cti_op_tear_off_activation): + (JSC::JITStubs::cti_op_tear_off_arguments): + (JSC::JITStubs::cti_op_profile_will_call): + (JSC::JITStubs::cti_op_profile_did_call): + (JSC::JITStubs::cti_op_ret_scopeChain): + (JSC::JITStubs::cti_op_new_array): + (JSC::JITStubs::cti_op_resolve): + (JSC::JITStubs::cti_op_construct_JSConstruct): + (JSC::JITStubs::cti_op_construct_NotJSConstruct): + (JSC::JITStubs::cti_op_get_by_val): + (JSC::JITStubs::cti_op_get_by_val_string): + (JSC::JITStubs::cti_op_get_by_val_byte_array): + (JSC::JITStubs::cti_op_resolve_func): + (JSC::JITStubs::cti_op_sub): + (JSC::JITStubs::cti_op_put_by_val): + (JSC::JITStubs::cti_op_put_by_val_array): + (JSC::JITStubs::cti_op_put_by_val_byte_array): + (JSC::JITStubs::cti_op_lesseq): + (JSC::JITStubs::cti_op_loop_if_true): + (JSC::JITStubs::cti_op_load_varargs): + (JSC::JITStubs::cti_op_negate): + (JSC::JITStubs::cti_op_resolve_base): + (JSC::JITStubs::cti_op_resolve_skip): + (JSC::JITStubs::cti_op_resolve_global): + (JSC::JITStubs::cti_op_div): + (JSC::JITStubs::cti_op_pre_dec): + (JSC::JITStubs::cti_op_jless): + (JSC::JITStubs::cti_op_not): + (JSC::JITStubs::cti_op_jtrue): + (JSC::JITStubs::cti_op_post_inc): + (JSC::JITStubs::cti_op_eq): + (JSC::JITStubs::cti_op_lshift): + (JSC::JITStubs::cti_op_bitand): + (JSC::JITStubs::cti_op_rshift): + (JSC::JITStubs::cti_op_bitnot): + (JSC::JITStubs::cti_op_resolve_with_base): + (JSC::JITStubs::cti_op_new_func_exp): + (JSC::JITStubs::cti_op_mod): + (JSC::JITStubs::cti_op_less): + (JSC::JITStubs::cti_op_neq): + (JSC::JITStubs::cti_op_post_dec): + (JSC::JITStubs::cti_op_urshift): + (JSC::JITStubs::cti_op_bitxor): + (JSC::JITStubs::cti_op_new_regexp): + (JSC::JITStubs::cti_op_bitor): + (JSC::JITStubs::cti_op_call_eval): + (JSC::JITStubs::cti_op_throw): + (JSC::JITStubs::cti_op_get_pnames): + (JSC::JITStubs::cti_op_next_pname): + (JSC::JITStubs::cti_op_push_scope): + (JSC::JITStubs::cti_op_pop_scope): + (JSC::JITStubs::cti_op_typeof): + (JSC::JITStubs::cti_op_is_undefined): + (JSC::JITStubs::cti_op_is_boolean): + (JSC::JITStubs::cti_op_is_number): + (JSC::JITStubs::cti_op_is_string): + (JSC::JITStubs::cti_op_is_object): + (JSC::JITStubs::cti_op_is_function): + (JSC::JITStubs::cti_op_stricteq): + (JSC::JITStubs::cti_op_to_primitive): + (JSC::JITStubs::cti_op_strcat): + (JSC::JITStubs::cti_op_nstricteq): + (JSC::JITStubs::cti_op_to_jsnumber): + (JSC::JITStubs::cti_op_in): + (JSC::JITStubs::cti_op_push_new_scope): + (JSC::JITStubs::cti_op_jmp_scopes): + (JSC::JITStubs::cti_op_put_by_index): + (JSC::JITStubs::cti_op_switch_imm): + (JSC::JITStubs::cti_op_switch_char): + (JSC::JITStubs::cti_op_switch_string): + (JSC::JITStubs::cti_op_del_by_val): + (JSC::JITStubs::cti_op_put_getter): + (JSC::JITStubs::cti_op_put_setter): + (JSC::JITStubs::cti_op_new_error): + (JSC::JITStubs::cti_op_debug): + (JSC::JITStubs::cti_vm_throw): + * jit/JITStubs.h: + (JSC::JITStackFrame::returnAddressSlot): + +2009-05-07 Darin Adler <darin@apple.com> + + Reviewed by Geoff Garen. + + * parser/Lexer.cpp: + (JSC::Lexer::lex): Fix missing braces. This would make us always + take the slower case for string parsing and Visual Studio correctly + noticed unreachable code. + +2009-05-07 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Bug 25589: goto instead of state machine in lexer + https://bugs.webkit.org/show_bug.cgi?id=25589 + + SunSpider is 0.8% faster. + + * parser/Lexer.cpp: + (JSC::Lexer::currentCharacter): Added. + (JSC::Lexer::currentOffset): Changed to call currentCharacter for clarity. + (JSC::Lexer::setCode): Removed code to set now-obsolete m_skipLineEnd. + (JSC::Lexer::shiftLineTerminator): Added. Handles line numbers and the + two-character line terminators. + (JSC::Lexer::makeIdentifier): Changed to take characters and length rather + than a vector, since we now make these directly out of the source buffer + when possible. + (JSC::Lexer::lastTokenWasRestrKeyword): Added. + (JSC::isNonASCIIIdentStart): Broke out the non-inline part. + (JSC::isIdentStart): Moved here. + (JSC::isNonASCIIIdentPart): Broke out the non-inline part. + (JSC::isIdentPart): Moved here. + (JSC::singleEscape): Moved here, and removed some unneeded cases. + (JSC::Lexer::record8): Moved here. + (JSC::Lexer::record16): Moved here. + (JSC::Lexer::lex): Rewrote this whole function to use goto and not use + a state machine. Got rid of most of the local variables. Also rolled the + matchPunctuator function in here. + (JSC::Lexer::scanRegExp): Changed to use the new version of isLineTerminator. + Clear m_buffer16 after using it instead of before. + + * parser/Lexer.h: Removed State enum, setDone function, nextLine function, + lookupKeywordFunction, one of the isLineTerminator functions, m_done data member, + m_skipLineEnd data member, and m_state data member. Added shiftLineTerminator + function, currentCharacter function, and changed the arguments to the makeIdentifier + function. Removed one branch from the isLineTerminator function. + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): Streamlined the case where we don't replace anything. + +2009-05-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + Removed a few more special constants, and replaced them with uses of + the JITStackFrame struct. + + Removed one of the two possible definitions of VoidPtrPair. The Mac + definition was more elegant, but SunSpider doesn't think it's any + faster, and it's net less elegant to have two ways of doing things. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompile): + * jit/JITStubs.h: + (JSC::): + +2009-05-07 Darin Adler <darin@apple.com> + + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::~ScopeChainNode): Tweak formatting. + +2009-05-07 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + Fix the build thread stack base determination build on Symbian, + by moving the code block before PLATFORM(UNIX), which is also + enabled on Symbian builds. + + * runtime/Collector.cpp: + (JSC::currentThreadStackBase): + +2009-05-07 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Fix crash due to incorrectly using an invalid scopechain + + stringProtoFuncReplace was checking for an exception on a CachedCall + by asking for the cached callframes exception. Unfortunately this + could crash in certain circumstances as CachedCall does not guarantee + a valid callframe following a call. Even more unfortunately the check + was entirely unnecessary as there is only a single exception slot per + global data, so it was already checked via the initial exec->hadException() + check. + + To make bugs like this more obvious, i've added a debug only destructor + to ScopeChainNode that 0's all of its fields. This exposed a crash in + the standard javascriptcore tests. + + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::~ScopeChainNode): + (JSC::ScopeChain::~ScopeChain): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + +2009-05-07 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Enable op_strcat across += assignments. This patch allows the lhs of a read/modify node + to be included within the concatenation operation, and also modifies the implementation + of the concatenation to attempt to reuse and cat onto the leftmost string, rather than + always allocating a new empty output string to copy into (as was previously the behaviour). + + ~0.5% progression, due to a 3%-3.5% progression on the string tests (particularly validate). + + * parser/Nodes.cpp: + (JSC::BinaryOpNode::emitStrcat): + (JSC::emitReadModifyAssignment): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::ReadModifyDotNode::emitBytecode): + (JSC::ReadModifyBracketNode::emitBytecode): + * parser/Nodes.h: + * runtime/Operations.h: + (JSC::concatenateStrings): + * runtime/UString.cpp: + (JSC::UString::reserveCapacity): + * runtime/UString.h: + +2009-05-07 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Oliver Hunt. + + Fix the build on Windows without JIT: interpreter/RegisterFile.h needs + roundUpAllocationSize, which is protected by #if ENABLED(ASSEMBLER). + Moved the #ifdef down and always offer the function. + + * jit/ExecutableAllocator.h: + +2009-05-06 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin "++" Barraclough. + + Added some abstraction around the JIT stub calling convention by creating + a struct to represent the persistent stack frame JIT code shares with + JIT stubs. + + SunSpider reports no change. + + * jit/JIT.h: + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_convert_this): + (JSC::JITStubs::cti_op_end): + (JSC::JITStubs::cti_op_add): + (JSC::JITStubs::cti_op_pre_inc): + (JSC::JITStubs::cti_timeout_check): + (JSC::JITStubs::cti_register_file_check): + (JSC::JITStubs::cti_op_loop_if_less): + (JSC::JITStubs::cti_op_loop_if_lesseq): + (JSC::JITStubs::cti_op_new_object): + (JSC::JITStubs::cti_op_put_by_id_generic): + (JSC::JITStubs::cti_op_get_by_id_generic): + (JSC::JITStubs::cti_op_put_by_id): + (JSC::JITStubs::cti_op_put_by_id_second): + (JSC::JITStubs::cti_op_put_by_id_fail): + (JSC::JITStubs::cti_op_get_by_id): + (JSC::JITStubs::cti_op_get_by_id_second): + (JSC::JITStubs::cti_op_get_by_id_self_fail): + (JSC::JITStubs::cti_op_get_by_id_proto_list): + (JSC::JITStubs::cti_op_get_by_id_proto_list_full): + (JSC::JITStubs::cti_op_get_by_id_proto_fail): + (JSC::JITStubs::cti_op_get_by_id_array_fail): + (JSC::JITStubs::cti_op_get_by_id_string_fail): + (JSC::JITStubs::cti_op_instanceof): + (JSC::JITStubs::cti_op_del_by_id): + (JSC::JITStubs::cti_op_mul): + (JSC::JITStubs::cti_op_new_func): + (JSC::JITStubs::cti_op_call_JSFunction): + (JSC::JITStubs::cti_op_call_arityCheck): + (JSC::JITStubs::cti_vm_dontLazyLinkCall): + (JSC::JITStubs::cti_vm_lazyLinkCall): + (JSC::JITStubs::cti_op_push_activation): + (JSC::JITStubs::cti_op_call_NotJSFunction): + (JSC::JITStubs::cti_op_create_arguments): + (JSC::JITStubs::cti_op_create_arguments_no_params): + (JSC::JITStubs::cti_op_tear_off_activation): + (JSC::JITStubs::cti_op_tear_off_arguments): + (JSC::JITStubs::cti_op_profile_will_call): + (JSC::JITStubs::cti_op_profile_did_call): + (JSC::JITStubs::cti_op_ret_scopeChain): + (JSC::JITStubs::cti_op_new_array): + (JSC::JITStubs::cti_op_resolve): + (JSC::JITStubs::cti_op_construct_JSConstruct): + (JSC::JITStubs::cti_op_construct_NotJSConstruct): + (JSC::JITStubs::cti_op_get_by_val): + (JSC::JITStubs::cti_op_get_by_val_string): + (JSC::JITStubs::cti_op_get_by_val_byte_array): + (JSC::JITStubs::cti_op_resolve_func): + (JSC::JITStubs::cti_op_sub): + (JSC::JITStubs::cti_op_put_by_val): + (JSC::JITStubs::cti_op_put_by_val_array): + (JSC::JITStubs::cti_op_put_by_val_byte_array): + (JSC::JITStubs::cti_op_lesseq): + (JSC::JITStubs::cti_op_loop_if_true): + (JSC::JITStubs::cti_op_load_varargs): + (JSC::JITStubs::cti_op_negate): + (JSC::JITStubs::cti_op_resolve_base): + (JSC::JITStubs::cti_op_resolve_skip): + (JSC::JITStubs::cti_op_resolve_global): + (JSC::JITStubs::cti_op_div): + (JSC::JITStubs::cti_op_pre_dec): + (JSC::JITStubs::cti_op_jless): + (JSC::JITStubs::cti_op_not): + (JSC::JITStubs::cti_op_jtrue): + (JSC::JITStubs::cti_op_post_inc): + (JSC::JITStubs::cti_op_eq): + (JSC::JITStubs::cti_op_lshift): + (JSC::JITStubs::cti_op_bitand): + (JSC::JITStubs::cti_op_rshift): + (JSC::JITStubs::cti_op_bitnot): + (JSC::JITStubs::cti_op_resolve_with_base): + (JSC::JITStubs::cti_op_new_func_exp): + (JSC::JITStubs::cti_op_mod): + (JSC::JITStubs::cti_op_less): + (JSC::JITStubs::cti_op_neq): + (JSC::JITStubs::cti_op_post_dec): + (JSC::JITStubs::cti_op_urshift): + (JSC::JITStubs::cti_op_bitxor): + (JSC::JITStubs::cti_op_new_regexp): + (JSC::JITStubs::cti_op_bitor): + (JSC::JITStubs::cti_op_call_eval): + (JSC::JITStubs::cti_op_throw): + (JSC::JITStubs::cti_op_get_pnames): + (JSC::JITStubs::cti_op_next_pname): + (JSC::JITStubs::cti_op_push_scope): + (JSC::JITStubs::cti_op_pop_scope): + (JSC::JITStubs::cti_op_typeof): + (JSC::JITStubs::cti_op_is_undefined): + (JSC::JITStubs::cti_op_is_boolean): + (JSC::JITStubs::cti_op_is_number): + (JSC::JITStubs::cti_op_is_string): + (JSC::JITStubs::cti_op_is_object): + (JSC::JITStubs::cti_op_is_function): + (JSC::JITStubs::cti_op_stricteq): + (JSC::JITStubs::cti_op_to_primitive): + (JSC::JITStubs::cti_op_strcat): + (JSC::JITStubs::cti_op_nstricteq): + (JSC::JITStubs::cti_op_to_jsnumber): + (JSC::JITStubs::cti_op_in): + (JSC::JITStubs::cti_op_push_new_scope): + (JSC::JITStubs::cti_op_jmp_scopes): + (JSC::JITStubs::cti_op_put_by_index): + (JSC::JITStubs::cti_op_switch_imm): + (JSC::JITStubs::cti_op_switch_char): + (JSC::JITStubs::cti_op_switch_string): + (JSC::JITStubs::cti_op_del_by_val): + (JSC::JITStubs::cti_op_put_getter): + (JSC::JITStubs::cti_op_put_setter): + (JSC::JITStubs::cti_op_new_error): + (JSC::JITStubs::cti_op_debug): + (JSC::JITStubs::cti_vm_throw): + * jit/JITStubs.h: + (JSC::): + +2009-05-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Maciej Stachowiak & Darin Adler. + + Improve string concatenation (as coded in JS as a sequence of adds). + + Detect patterns corresponding to string concatenation, and change the bytecode + generation to emit a new op_strcat instruction. By handling the full set of + additions within a single function we do not need allocate JSString wrappers + for intermediate results, and we can calculate the size of the output string + prior to allocating storage, in order to prevent reallocation of the buffer. + + 1.5%-2% progression on Sunspider, largely due to a 30% progression on date-format-xparb. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + Add new opcodes. + * bytecode/Opcode.h: + Add new opcodes. + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitStrcat): + (JSC::BytecodeGenerator::emitToPrimitive): + Add generation of new opcodes. + * bytecompiler/BytecodeGenerator.h: + Add generation of new opcodes. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + Add implmentation of new opcodes. + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + Add implmentation of new opcodes. + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_to_primitive): + (JSC::JITStubs::cti_op_strcat): + Add implmentation of new opcodes. + * jit/JITStubs.h: + Add implmentation of new opcodes. + * parser/Nodes.cpp: + (JSC::BinaryOpNode::emitStrcat): + (JSC::BinaryOpNode::emitBytecode): + (JSC::ReadModifyResolveNode::emitBytecode): + Add generation of new opcodes. + * parser/Nodes.h: + (JSC::ExpressionNode::): + (JSC::AddNode::): + Add methods to allow identification of add nodes. + * parser/ResultType.h: + (JSC::ResultType::definitelyIsString): + (JSC::ResultType::forAdd): + Fix error in detection of adds that will produce string results. + * runtime/Operations.h: + (JSC::concatenateStrings): + Add implmentation of new opcodes. + * runtime/UString.cpp: + (JSC::UString::appendNumeric): + Add methods to append numbers to an existing string. + * runtime/UString.h: + (JSC::UString::Rep::createEmptyBuffer): + (JSC::UString::BaseString::BaseString): + Add support for creating an empty string with a non-zero capacity available in the BaseString. + +2009-05-06 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Made RefCounted::m_refCount private. + + * runtime/Structure.h: Removed addressOfCount. + * wtf/RefCounted.h: Made m_refCount private. + Added addressOfCount. + +2009-05-06 Darin Adler <darin@apple.com> + + Fixed assertion seen a lot! + + * parser/Nodes.cpp: + (JSC::FunctionBodyNode::~FunctionBodyNode): Removed now-bogus assertion. + +2009-05-06 Darin Adler <darin@apple.com> + + Working with Sam Weinig. + + Redo parse tree constructor optimization without breaking the Windows + build the way I did yesterday. The previous try broke the build by adding + an include of Lexer.h and all its dependencies that had to work outside + the JavaScriptCore project. + + * GNUmakefile.am: Added NodeConstructors.h. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + Removed byteocde directory -- we no longer are trying to include Lexer.h + outside JavaScriptCore. + + * JavaScriptCore.xcodeproj/project.pbxproj: Change SegmentedVector.h + and Lexer.h back to internal files. Added NodeConstructors.h. + + * parser/Grammar.y: Added include of NodeConstructors.h. + Changed use of ConstDeclNode to use public functions. + + * parser/NodeConstructors.h: Copied from parser/Nodes.h. + Just contains the inlined constructors now. + + * parser/Nodes.cpp: Added include of NodeConstructors.h. + Moved node constructors into the header. + (JSC::FunctionBodyNode::FunctionBodyNode): Removed m_refCount + initialization. + + * parser/Nodes.h: Removed all the constructor definitions, and also + removed the JSC_FAST_CALL from them since these are all inlined, so the + calling convention is irrelevant. Made more things private. Used a data + member for operator opcodes instead of a virtual function. Removed the + special FunctionBodyNode::ref/deref functions since the default functions + are now just as fast. + + * runtime/FunctionConstructor.cpp: + (JSC::extractFunctionBody): Fixed types here so we don't typecast until + after we do type checking. + +2009-05-06 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Ariya Hidayat. + + Fix the Qt build on Windows. + + * JavaScriptCore.pri: Define BUILDING_JavaScriptCore/WTF to get the meaning + of the JS_EXPORTDATA macros correct + +2009-05-06 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Ariya Hidayat. + + Enable the JIT for the Qt build on Windows. + + * JavaScriptCore.pri: + +2009-05-06 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + Tweak JavaScriptCore.pri for being able to override the generated sources dir for the + generated_files target. + + * JavaScriptCore.pri: + +2009-05-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Build QtWebKit as a framework on Mac + + This implies both debug and release build by default, unless + one of the --debug or --release config options are passed to + the build-webkit script. + + Frameworks can be disabled by passing CONFIG+=webkit_no_framework + to the build-webkit script. + + To be able to build both debug and release targets in parallel + we have to use separate output directories for the generated + sources, which is not optimal, but required to avoid race conditions. + + An optimization would be to only require this spit-up on Mac. + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + * jsc.pro: + +2009-05-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Use $$GENERATED_SOURCES_DIR as output when running bison + + A couple of the generators left the bison output file in the source + tree, and then moved it into $$GENERATED_SOURCES_DIR, which did not + work well when building release and debug configurations in parallel. + + * JavaScriptCore.pri: + +2009-05-05 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + Simplified a bit of codegen. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + +2009-05-05 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Moved all the JIT stub related code into one place. + + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITCode.h: + * jit/JITStubs.cpp: + (JSC::): + * jit/JITStubs.h: + +2009-05-05 Sam Weinig <sam@webkit.org> + + Try to fix Windows build. + + Move Node constructor to the .cpp file. + + * parser/Nodes.cpp: + * parser/Nodes.h: + +2009-05-05 Darin Adler <darin@apple.com> + + Try to fix Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + + Try to fix Mac build. + + * JavaScriptCore.xcodeproj/project.pbxproj: Made SegmentedVector.h private. + +2009-05-05 Darin Adler <darin@apple.com> + + Try to fix Mac build. + + * JavaScriptCore.xcodeproj/project.pbxproj: Made Lexer.h private. + +2009-05-05 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Bug 25569: make ParserRefCounted use conventional reference counting + https://bugs.webkit.org/show_bug.cgi?id=25569 + + SunSpider speedup of about 1.6%. + + * JavaScriptCore.exp: Updated. + + * parser/Nodes.cpp: + (JSC::NodeReleaser::releaseAllNodes): ALWAYS_INLINE. + (JSC::NodeReleaser::adopt): Ditto. + (JSC::ParserRefCounted::ParserRefCounted): Removed most of the code. + Add the object to a Vector<RefPtr> that gets cleared after parsing. + (JSC::ParserRefCounted::~ParserRefCounted): Removed most of the code. + + * parser/Nodes.h: Made ParserRefCounted inherit from RefCounted and + made inline versions of the constructor and destructor. Made the + Node constructor inline. + + * parser/Parser.cpp: + (JSC::Parser::parse): Call globalData->parserObjects.shrink(0) after + parsing, where it used to call ParserRefCounted::deleteNewObjects. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): Eliminated code to manage the + newParserObjects and parserObjectExtraRefCounts. + (JSC::JSGlobalData::~JSGlobalData): Ditto. + + * runtime/JSGlobalData.h: Replaced the HashSet and HashCountedSet + with a Vector. + + * wtf/PassRefPtr.h: + (WTF::PassRefPtr::~PassRefPtr): The most common thing to do with a + PassRefPtr in hot code is to pass it and then destroy it once it's + set to zero. Help the optimizer by telling it that's true. + +2009-05-05 Xan Lopez <xlopez@igalia.com> and Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Oliver Hunt. + + Disable the NativeFunctionWrapper for all non-Mac ports for now, + as it is also crashing on Linux/x86. + + * runtime/NativeFunctionWrapper.h: + +2009-05-05 Steve Falkenburg <sfalken@apple.com> + + Fix build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Expose toThisObject for the DOM Window + + * JavaScriptCore.exp: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Make windows go again until i work out the + accursed calling convention). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * jit/JIT.cpp: + * runtime/NativeFunctionWrapper.h: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Fix windows debug builds). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Hopefully the last fix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Fix the build fix caused by a different build fix). + + * parser/Nodes.cpp: + * parser/Nodes.h: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (No idea how my changes could have broken these). + + * runtime/DatePrototype.cpp: + * runtime/RegExpObject.cpp: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Why should i expect msvc to list all the errors in a file?). + + * parser/Nodes.cpp: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Fix warning, and another missing include). + + * jit/JIT.cpp: + * parser/Nodes.h: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (More build fixes). + + * runtime/ErrorPrototype.cpp: + * runtime/JSGlobalObject.cpp: + * runtime/NumberPrototype.cpp: + * runtime/ObjectPrototype.cpp: + * runtime/StringConstructor.cpp: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Will the fixes never end?). + + * runtime/FunctionPrototype.h: + * runtime/Lookup.cpp: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (More build fixes). + + * jit/JIT.cpp: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (More build fixing). + + * runtime/CallData.h: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + * runtime/ArrayConstructor.cpp: + * runtime/BooleanPrototype.cpp: + * runtime/DateConstructor.cpp: + * runtime/Error.cpp: + * runtime/ObjectConstructor.cpp: + * runtime/RegExpPrototype.cpp: + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Buildfix). + + Add missing file + + * runtime/NativeFunctionWrapper.h: Copied from JavaScriptCore/jit/ExecutableAllocator.cpp. + +2009-05-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Bug 25559: Improve native function call performance + <https://bugs.webkit.org/show_bug.cgi?id=25559> + + In order to cache calls to native functions we now make the standard + prototype functions use a small assembly thunk that converts the JS + calling convention into the native calling convention. As this is + only beneficial in the JIT we use the NativeFunctionWrapper typedef + to alternate between PrototypeFunction and JSFunction to keep the + code sane. This change from PrototypeFunction to NativeFunctionWrapper + is the bulk of this patch. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::call): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::addPtr): + * assembler/X86Assembler.h: + (JSC::X86Assembler::leaq_mr): + (JSC::X86Assembler::call_m): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::prepareForRepeatCall): + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JIT.h: + (JSC::JIT::compileCTIMachineTrampolines): + * jit/JITCall.cpp: + (JSC::JIT::linkCall): + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCall): + * jit/JITCode.h: + (JSC::JITCode::operator bool): + * jit/JITInlineMethods.h: + (JSC::JIT::emitGetFromCallFrameHeader): + (JSC::JIT::emitGetFromCallFrameHeader32): + * jit/JITStubs.cpp: + (JSC::JITStubs::JITStubs): + (JSC::JITStubs::cti_op_call_JSFunction): + (JSC::JITStubs::cti_vm_dontLazyLinkCall): + (JSC::JITStubs::cti_vm_lazyLinkCall): + (JSC::JITStubs::cti_op_construct_JSConstruct): + * jit/JITStubs.h: + (JSC::JITStubs::ctiNativeCallThunk): + * jsc.cpp: + (GlobalObject::GlobalObject): + * parser/Nodes.cpp: + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::createNativeThunk): + (JSC::FunctionBodyNode::generateJITCode): + * parser/Nodes.h: + (JSC::FunctionBodyNode::): + (JSC::FunctionBodyNode::generatedJITCode): + (JSC::FunctionBodyNode::jitCode): + * profiler/Profiler.cpp: + (JSC::Profiler::createCallIdentifier): + * runtime/ArgList.h: + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::addFunctionProperties): + (JSC::functionProtoFuncToString): + * runtime/FunctionPrototype.h: + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::~JSFunction): + (JSC::JSFunction::mark): + (JSC::JSFunction::getCallData): + (JSC::JSFunction::call): + (JSC::JSFunction::argumentsGetter): + (JSC::JSFunction::callerGetter): + (JSC::JSFunction::lengthGetter): + (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSFunction::put): + (JSC::JSFunction::deleteProperty): + (JSC::JSFunction::getConstructData): + (JSC::JSFunction::construct): + * runtime/JSFunction.h: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::setScope): + (JSC::JSFunction::scope): + (JSC::JSFunction::isHostFunction): + (JSC::JSFunction::scopeChain): + (JSC::JSFunction::clearScopeChain): + (JSC::JSFunction::setScopeChain): + (JSC::JSFunction::nativeFunction): + (JSC::JSFunction::setNativeFunction): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::~JSGlobalData): + (JSC::JSGlobalData::createNativeThunk): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::nativeFunctionThunk): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObject.h: + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::ObjectPrototype): + * runtime/RegExpPrototype.cpp: + (JSC::RegExpPrototype::RegExpPrototype): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + +2009-05-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + For convenience, let the sampling flags tool clear multiple flags at once. + + * jsc.cpp: + (GlobalObject::GlobalObject): + (functionSetSamplingFlags): + (functionClearSamplingFlags): + +2009-05-04 Maciej Stachowiak <mjs@apple.com> + + Rubber stamped by Gavin. + + - inline Vector::resize for a ~1.5% speedup on string-tagcloud + + * wtf/Vector.h: + (WTF::Vector::resize): Inline + +2009-05-03 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: + +2009-05-03 Mark Rowe <mrowe@apple.com> + + Fix the 64-bit build. + + * API/APICast.h: + (toJS): + (toRef): + * runtime/JSNumberCell.cpp: + (JSC::jsAPIMangledNumber): + * runtime/JSNumberCell.h: + +2009-05-02 Sam Weinig <sam@webkit.org> + + Roll JSC API number marshaling back in one last time (I hope). + +2009-05-03 Sam Weinig <sam@webkit.org> + + Roll JSC API number marshaling back out. It still breaks windows. + +2009-05-03 Sam Weinig <sam@webkit.org> + + Roll JSC API number marshaling back in. + +2009-05-02 Darin Adler <darin@apple.com> + + Reviewed by Maciej Stachowiak. + + Bug 25519: streamline lexer by handling BOMs differently + https://bugs.webkit.org/show_bug.cgi?id=25519 + + Roughly 1% faster SunSpider. + + * parser/Grammar.y: Tweak formatting a bit. + + * parser/Lexer.cpp: + (JSC::Lexer::Lexer): Remove unnnecessary initialization of data members + that are set up by setCode. + (JSC::Lexer::currentOffset): Added. Used where the old code would look at + m_currentOffset. + (JSC::Lexer::shift1): Replaces the old shift function. No longer does anything + to handle BOM characters. + (JSC::Lexer::shift2): Ditto. + (JSC::Lexer::shift3): Ditto. + (JSC::Lexer::shift4): Ditto. + (JSC::Lexer::setCode): Updated for name change from yylineno to m_line. + Removed now-unused m_eatNextIdentifier, m_stackToken, and m_restrKeyword. + Replaced m_skipLF and m_skipCR with m_skipLineEnd. Replaced the old + m_length with m_codeEnd and m_currentOffset with m_codeStart. Added code + to scan for a BOM character and call copyCodeWithoutBOMs() if we find any. + (JSC::Lexer::copyCodeWithoutBOMs): Added. + (JSC::Lexer::nextLine): Updated for name change from yylineno to m_line. + (JSC::Lexer::makeIdentifier): Moved up higher in the file. + (JSC::Lexer::matchPunctuator): Moved up higher in the file and changed to + use a switch statement instead of just if statements. + (JSC::Lexer::isLineTerminator): Moved up higher in the file and changed to + have fewer branches. + (JSC::Lexer::lastTokenWasRestrKeyword): Added. This replaces the old + m_restrKeyword boolean. + (JSC::Lexer::isIdentStart): Moved up higher in the file. Changed to use + fewer branches in the ASCII but not identifier case. + (JSC::Lexer::isIdentPart): Ditto. + (JSC::Lexer::singleEscape): Moved up higher in the file. + (JSC::Lexer::convertOctal): Moved up higher in the file. + (JSC::Lexer::convertHex): Moved up higher in the file. Changed to use + toASCIIHexValue instead of rolling our own here. + (JSC::Lexer::convertUnicode): Ditto. + (JSC::Lexer::record8): Moved up higher in the file. + (JSC::Lexer::record16): Moved up higher in the file. + (JSC::Lexer::lex): Changed type of stringType to int. Replaced m_skipLF + and m_skipCR with m_skipLineEnd, which requires fewer branches in the + main lexer loop. Use currentOffset instead of m_currentOffset. Removed + unneeded m_stackToken. Use isASCIIDigit instead of isDecimalDigit. + Split out the two cases for InIdentifierOrKeyword and InIdentifier. + Added special case tight loops for identifiers and other simple states. + Removed a branch from the code that sets m_atLineStart to false using goto. + Streamlined the number-handling code so we don't check for the same types + twice for non-numeric cases and don't add a null to m_buffer8 when it's + not being used. Removed m_eatNextIdentifier, which wasn't working anyway, + and m_restrKeyword, which is redundant with m_lastToken. Set the + m_delimited flag without using a branch. + (JSC::Lexer::scanRegExp): Tweaked style a bit. + (JSC::Lexer::clear): Clear m_codeWithoutBOMs so we don't use memory after + parsing. Clear out UString objects in the more conventional way. + (JSC::Lexer::sourceCode): Made this no-longer inline since it has more + work to do in the case where we stripped BOMs. + + * parser/Lexer.h: Renamed yylineno to m_lineNumber. Removed convertHex + function, which is the same as toASCIIHexValue. Removed isHexDigit + function, which is the same as isASCIIHedDigit. Replaced shift with four + separate shift functions. Removed isWhiteSpace function that passes + m_current, instead just passing m_current explicitly. Removed isOctalDigit, + which is the same as isASCIIOctalDigit. Eliminated unused arguments from + matchPunctuator. Added copyCoodeWithoutBOMs and currentOffset. Moved the + makeIdentifier function out of the header. Added lastTokenWasRestrKeyword + function. Added new constants for m_skipLineEnd. Removed unused yycolumn, + m_restrKeyword, m_skipLF, m_skipCR, m_eatNextIdentifier, m_stackToken, + m_position, m_length, m_currentOffset, m_nextOffset1, m_nextOffset2, + m_nextOffset3. Added m_skipLineEnd, m_codeStart, m_codeEnd, and + m_codeWithoutBOMs. + + * parser/SourceProvider.h: Added hasBOMs function. In the future this can + be used to tell the lexer about strings known not to have BOMs. + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncUnescape): Changed to use isASCIIHexDigit. + + * wtf/ASCIICType.h: Added using statements to match the design of the + other WTF headers. + +2009-05-02 Ada Chan <adachan@apple.com> + + Fix windows build (when doing a clean build) + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-02 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Simplified null-ish JSValues. + + Replaced calls to noValue() with calls to JSValue() (which is what + noValue() returned). Removed noValue(). + + Replaced almost all uses of jsImpossibleValue() with uses of JSValue(). + Its one remaining use is for construction of hash table deleted values. + For that specific task, I made a new, private constructor with a special + tag. Removed jsImpossibleValue(). + + Removed "JSValue()" initialiazers, since default construction happens... + by default. + + * API/JSCallbackObjectFunctions.h: + (JSC::::call): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoad): + * bytecompiler/BytecodeGenerator.h: + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * debugger/DebuggerCallFrame.h: + (JSC::DebuggerCallFrame::DebuggerCallFrame): + * interpreter/CallFrame.h: + (JSC::ExecState::clearException): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveLastCaller): + * interpreter/Register.h: + (JSC::Register::Register): + * jit/JITCall.cpp: + (JSC::JIT::unlinkCall): + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCall): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_call_eval): + (JSC::JITStubs::cti_vm_throw): + * profiler/Profiler.cpp: + (JSC::Profiler::willExecute): + (JSC::Profiler::didExecute): + * runtime/ArrayPrototype.cpp: + (JSC::getProperty): + * runtime/Completion.cpp: + (JSC::evaluate): + * runtime/Completion.h: + (JSC::Completion::Completion): + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::getPrimitiveNumber): + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::sort): + (JSC::JSArray::compactForSorting): + * runtime/JSCell.cpp: + (JSC::JSCell::getJSNumber): + * runtime/JSCell.h: + (JSC::JSValue::getJSNumber): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSImmediate.h: + (JSC::JSImmediate::fromNumberOutsideIntegerRange): + (JSC::JSImmediate::from): + * runtime/JSNumberCell.cpp: + (JSC::jsNumberCell): + * runtime/JSObject.cpp: + (JSC::callDefaultValueFunction): + * runtime/JSObject.h: + (JSC::JSObject::getDirect): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::toPrimitive): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::next): + * runtime/JSValue.h: + (JSC::JSValue::): + (JSC::JSValueHashTraits::constructDeletedValue): + (JSC::JSValueHashTraits::isDeletedValue): + (JSC::JSValue::JSValue): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::JSWrapperObject): + * runtime/Operations.h: + (JSC::resolveBase): + * runtime/PropertySlot.h: + (JSC::PropertySlot::clearBase): + (JSC::PropertySlot::clearValue): + +2009-05-02 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Cameron Zwarich. + + - speed up the lexer in various ways + + ~2% command-line SunSpider speedup + + * parser/Lexer.cpp: + (JSC::Lexer::setCode): Moved below shift() so it can inline. + (JSC::Lexer::scanRegExp): Use resize(0) instead of clear() on Vectors, since the intent + here is not to free the underlying buffer. + (JSC::Lexer::lex): ditto; also, change the loop logic a bit for the main lexing loop + to avoid branching on !m_done twice per iteration. Now we only check it once. + (JSC::Lexer::shift): Make this ALWAYS_INLINE and tag an unusual branch as UNLIKELY + * parser/Lexer.h: + (JSC::Lexer::makeIdentifier): force to be ALWAYS_INLINE + * wtf/Vector.h: + (WTF::::append): force to be ALWAYS_INLINE (may have helped in ways other than parsing but it wasn't + getting inlined in a hot code path in the lexer) + +2009-05-01 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore.make: + +2009-05-01 Sam Weinig <sam@webkit.org> + + Fix 64bit build. + + * runtime/JSNumberCell.h: + (JSC::JSValue::JSValue): + * runtime/JSValue.h: + (JSC::jsNumber): + +2009-05-01 Sam Weinig <sam@webkit.org> + + Roll out JavaScriptCore API number marshaling. + + * API/APICast.h: + (toJS): + (toRef): + * API/JSBase.cpp: + (JSEvaluateScript): + (JSCheckScriptSyntax): + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::construct): + (JSC::::hasInstance): + (JSC::::call): + (JSC::::toNumber): + (JSC::::toString): + (JSC::::staticValueGetter): + (JSC::::callbackGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeFunction): + (JSObjectMakeArray): + (JSObjectMakeDate): + (JSObjectMakeError): + (JSObjectMakeRegExp): + (JSObjectGetPrototype): + (JSObjectSetPrototype): + (JSObjectGetProperty): + (JSObjectSetProperty): + (JSObjectGetPropertyAtIndex): + (JSObjectSetPropertyAtIndex): + (JSObjectDeleteProperty): + (JSObjectCallAsFunction): + (JSObjectCallAsConstructor): + * API/JSValueRef.cpp: + (JSValueGetType): + (JSValueIsUndefined): + (JSValueIsNull): + (JSValueIsBoolean): + (JSValueIsNumber): + (JSValueIsString): + (JSValueIsObject): + (JSValueIsObjectOfClass): + (JSValueIsEqual): + (JSValueIsStrictEqual): + (JSValueIsInstanceOfConstructor): + (JSValueMakeUndefined): + (JSValueMakeNull): + (JSValueMakeBoolean): + (JSValueMakeNumber): + (JSValueMakeString): + (JSValueToBoolean): + (JSValueToNumber): + (JSValueToStringCopy): + (JSValueToObject): + (JSValueProtect): + (JSValueUnprotect): + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * runtime/JSNumberCell.cpp: + * runtime/JSNumberCell.h: + * runtime/JSValue.h: + +2009-05-01 Sam Weinig <sam@webkit.org> + + Fix windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-01 Sam Weinig <sam@webkit.org> + + Fix the build. + + * JavaScriptCore.exp: + +2009-05-01 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey "Too Far!" Garen. + + Move JS number construction into JSValue. + + * runtime/JSImmediate.h: + * runtime/JSNumberCell.h: + (JSC::JSValue::JSValue): + * runtime/JSValue.h: + (JSC::jsNumber): + +2009-05-01 Sam Weinig <sam@webkit.org> + + Reviewed by Geoff "The Minneapolis" Garen. + + Add mechanism to vend heap allocated JS numbers to JavaScriptCore API clients with a + representation that is independent of the number representation in the VM. + - Numbers leaving the interpreter are converted to a tagged JSNumberCell. + - The numbers coming into the interpreter (asserted to be the tagged JSNumberCell) are + converted back to the VM's internal number representation. + + * API/APICast.h: + (toJS): + (toRef): + * API/JSBase.cpp: + (JSEvaluateScript): + (JSCheckScriptSyntax): + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::construct): + (JSC::::hasInstance): + (JSC::::call): + (JSC::::toNumber): + (JSC::::toString): + (JSC::::staticValueGetter): + (JSC::::callbackGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeFunction): + (JSObjectMakeArray): + (JSObjectMakeDate): + (JSObjectMakeError): + (JSObjectMakeRegExp): + (JSObjectGetPrototype): + (JSObjectSetPrototype): + (JSObjectGetProperty): + (JSObjectSetProperty): + (JSObjectGetPropertyAtIndex): + (JSObjectSetPropertyAtIndex): + (JSObjectDeleteProperty): + (JSObjectCallAsFunction): + (JSObjectCallAsConstructor): + * API/JSValueRef.cpp: + (JSValueGetType): + (JSValueIsUndefined): + (JSValueIsNull): + (JSValueIsBoolean): + (JSValueIsNumber): + (JSValueIsString): + (JSValueIsObject): + (JSValueIsObjectOfClass): + (JSValueIsEqual): + (JSValueIsStrictEqual): + (JSValueIsInstanceOfConstructor): + (JSValueMakeUndefined): + (JSValueMakeNull): + (JSValueMakeBoolean): + (JSValueMakeNumber): + (JSValueMakeString): + (JSValueToBoolean): + (JSValueToNumber): + (JSValueToStringCopy): + (JSValueToObject): + (JSValueProtect): + (JSValueUnprotect): + * runtime/JSNumberCell.cpp: + (JSC::jsAPIMangledNumber): + * runtime/JSNumberCell.h: + (JSC::JSNumberCell::isAPIMangledNumber): + (JSC::JSNumberCell::): + (JSC::JSNumberCell::JSNumberCell): + (JSC::JSValue::isAPIMangledNumber): + * runtime/JSValue.h: + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Windows build fix take 6. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Windows build fix take 5. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Windows build fix take 4. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Windows build fix take 3. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Windows build fix take 2. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Windows build fix take 1. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Rubber Stamped by Sam Weinig. + + Renamed JSValuePtr => JSValue. + + * API/APICast.h: + (toJS): + (toRef): + * API/JSCallbackConstructor.h: + (JSC::JSCallbackConstructor::createStructure): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackFunction.h: + (JSC::JSCallbackFunction::createStructure): + * API/JSCallbackObject.h: + (JSC::JSCallbackObject::createStructure): + * API/JSCallbackObjectFunctions.h: + (JSC::::asCallbackObject): + (JSC::::put): + (JSC::::hasInstance): + (JSC::::call): + (JSC::::staticValueGetter): + (JSC::::staticFunctionGetter): + (JSC::::callbackGetter): + * API/JSContextRef.cpp: + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): + (JSObjectSetPrototype): + (JSObjectGetProperty): + (JSObjectSetProperty): + (JSObjectGetPropertyAtIndex): + (JSObjectSetPropertyAtIndex): + * API/JSValueRef.cpp: + (JSValueGetType): + (JSValueIsUndefined): + (JSValueIsNull): + (JSValueIsBoolean): + (JSValueIsNumber): + (JSValueIsString): + (JSValueIsObject): + (JSValueIsObjectOfClass): + (JSValueIsEqual): + (JSValueIsStrictEqual): + (JSValueIsInstanceOfConstructor): + (JSValueToBoolean): + (JSValueToNumber): + (JSValueToStringCopy): + (JSValueToObject): + (JSValueProtect): + (JSValueUnprotect): + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::valueToSourceString): + (JSC::constantName): + (JSC::CodeBlock::dump): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getConstant): + (JSC::CodeBlock::addUnexpectedConstant): + (JSC::CodeBlock::unexpectedConstant): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::addConstant): + (JSC::BytecodeGenerator::addUnexpectedConstant): + (JSC::BytecodeGenerator::emitLoad): + (JSC::BytecodeGenerator::emitGetScopedVar): + (JSC::BytecodeGenerator::emitPutScopedVar): + (JSC::BytecodeGenerator::emitNewError): + (JSC::keyForImmediateSwitch): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue): + (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/Debugger.h: + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::put): + (JSC::DebuggerActivation::putWithAttributes): + (JSC::DebuggerActivation::lookupGetter): + (JSC::DebuggerActivation::lookupSetter): + * debugger/DebuggerActivation.h: + (JSC::DebuggerActivation::createStructure): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * debugger/DebuggerCallFrame.h: + (JSC::DebuggerCallFrame::DebuggerCallFrame): + (JSC::DebuggerCallFrame::exception): + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + (JSC::CachedCall::call): + (JSC::CachedCall::setThis): + (JSC::CachedCall::setArgument): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::thisValue): + (JSC::CallFrame::dumpCaller): + * interpreter/CallFrame.h: + (JSC::ExecState::setException): + (JSC::ExecState::exception): + (JSC::ExecState::exceptionSlot): + * interpreter/CallFrameClosure.h: + (JSC::CallFrameClosure::setArgument): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::resolveBaseAndFunc): + (JSC::isNotObject): + (JSC::Interpreter::callEval): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::createExceptionScope): + (JSC::Interpreter::tryCachePutByID): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveArguments): + (JSC::Interpreter::retrieveCaller): + (JSC::Interpreter::retrieveLastCaller): + * interpreter/Interpreter.h: + * interpreter/Register.h: + (JSC::Register::): + (JSC::Register::Register): + (JSC::Register::jsValue): + * jit/JIT.cpp: + (JSC::): + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArith_op_mod): + * jit/JITCall.cpp: + (JSC::JIT::unlinkCall): + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCall): + * jit/JITCode.h: + (JSC::): + (JSC::JITCode::execute): + * jit/JITInlineMethods.h: + (JSC::JIT::emitGetVirtualRegister): + (JSC::JIT::getConstantOperand): + (JSC::JIT::emitPutJITStubArgFromVirtualRegister): + (JSC::JIT::emitInitRegister): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompileGetByIdSelf): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::privateCompilePutByIdReplace): + * jit/JITStubs.cpp: + (JSC::JITStubs::tryCachePutByID): + (JSC::JITStubs::tryCacheGetByID): + (JSC::JITStubs::cti_op_convert_this): + (JSC::JITStubs::cti_op_add): + (JSC::JITStubs::cti_op_pre_inc): + (JSC::JITStubs::cti_op_loop_if_less): + (JSC::JITStubs::cti_op_loop_if_lesseq): + (JSC::JITStubs::cti_op_get_by_id_generic): + (JSC::JITStubs::cti_op_get_by_id): + (JSC::JITStubs::cti_op_get_by_id_second): + (JSC::JITStubs::cti_op_get_by_id_self_fail): + (JSC::JITStubs::cti_op_get_by_id_proto_list): + (JSC::JITStubs::cti_op_get_by_id_proto_list_full): + (JSC::JITStubs::cti_op_get_by_id_proto_fail): + (JSC::JITStubs::cti_op_get_by_id_array_fail): + (JSC::JITStubs::cti_op_get_by_id_string_fail): + (JSC::JITStubs::cti_op_instanceof): + (JSC::JITStubs::cti_op_del_by_id): + (JSC::JITStubs::cti_op_mul): + (JSC::JITStubs::cti_op_call_NotJSFunction): + (JSC::JITStubs::cti_op_resolve): + (JSC::JITStubs::cti_op_construct_NotJSConstruct): + (JSC::JITStubs::cti_op_get_by_val): + (JSC::JITStubs::cti_op_get_by_val_string): + (JSC::JITStubs::cti_op_get_by_val_byte_array): + (JSC::JITStubs::cti_op_resolve_func): + (JSC::JITStubs::cti_op_sub): + (JSC::JITStubs::cti_op_put_by_val): + (JSC::JITStubs::cti_op_put_by_val_array): + (JSC::JITStubs::cti_op_put_by_val_byte_array): + (JSC::JITStubs::cti_op_lesseq): + (JSC::JITStubs::cti_op_loop_if_true): + (JSC::JITStubs::cti_op_load_varargs): + (JSC::JITStubs::cti_op_negate): + (JSC::JITStubs::cti_op_resolve_base): + (JSC::JITStubs::cti_op_resolve_skip): + (JSC::JITStubs::cti_op_resolve_global): + (JSC::JITStubs::cti_op_div): + (JSC::JITStubs::cti_op_pre_dec): + (JSC::JITStubs::cti_op_jless): + (JSC::JITStubs::cti_op_not): + (JSC::JITStubs::cti_op_jtrue): + (JSC::JITStubs::cti_op_post_inc): + (JSC::JITStubs::cti_op_eq): + (JSC::JITStubs::cti_op_lshift): + (JSC::JITStubs::cti_op_bitand): + (JSC::JITStubs::cti_op_rshift): + (JSC::JITStubs::cti_op_bitnot): + (JSC::JITStubs::cti_op_resolve_with_base): + (JSC::JITStubs::cti_op_mod): + (JSC::JITStubs::cti_op_less): + (JSC::JITStubs::cti_op_neq): + (JSC::JITStubs::cti_op_post_dec): + (JSC::JITStubs::cti_op_urshift): + (JSC::JITStubs::cti_op_bitxor): + (JSC::JITStubs::cti_op_bitor): + (JSC::JITStubs::cti_op_call_eval): + (JSC::JITStubs::cti_op_throw): + (JSC::JITStubs::cti_op_next_pname): + (JSC::JITStubs::cti_op_typeof): + (JSC::JITStubs::cti_op_is_undefined): + (JSC::JITStubs::cti_op_is_boolean): + (JSC::JITStubs::cti_op_is_number): + (JSC::JITStubs::cti_op_is_string): + (JSC::JITStubs::cti_op_is_object): + (JSC::JITStubs::cti_op_is_function): + (JSC::JITStubs::cti_op_stricteq): + (JSC::JITStubs::cti_op_nstricteq): + (JSC::JITStubs::cti_op_to_jsnumber): + (JSC::JITStubs::cti_op_in): + (JSC::JITStubs::cti_op_switch_imm): + (JSC::JITStubs::cti_op_switch_char): + (JSC::JITStubs::cti_op_switch_string): + (JSC::JITStubs::cti_op_del_by_val): + (JSC::JITStubs::cti_op_new_error): + (JSC::JITStubs::cti_vm_throw): + * jit/JITStubs.h: + * jsc.cpp: + (functionPrint): + (functionDebug): + (functionGC): + (functionVersion): + (functionRun): + (functionLoad): + (functionSetSamplingFlag): + (functionClearSamplingFlag): + (functionReadline): + (functionQuit): + * parser/Nodes.cpp: + (JSC::processClauseList): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + * profiler/Profiler.cpp: + (JSC::Profiler::willExecute): + (JSC::Profiler::didExecute): + (JSC::Profiler::createCallIdentifier): + * profiler/Profiler.h: + * runtime/ArgList.cpp: + (JSC::MarkedArgumentBuffer::slowAppend): + * runtime/ArgList.h: + (JSC::MarkedArgumentBuffer::at): + (JSC::MarkedArgumentBuffer::append): + (JSC::ArgList::ArgList): + (JSC::ArgList::at): + * runtime/Arguments.cpp: + (JSC::Arguments::put): + * runtime/Arguments.h: + (JSC::Arguments::createStructure): + (JSC::asArguments): + * runtime/ArrayConstructor.cpp: + (JSC::callArrayConstructor): + * runtime/ArrayPrototype.cpp: + (JSC::getProperty): + (JSC::putProperty): + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::callBooleanConstructor): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanConstructor.h: + * runtime/BooleanObject.h: + (JSC::asBooleanObject): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/CallData.cpp: + (JSC::call): + * runtime/CallData.h: + * runtime/Collector.cpp: + (JSC::Heap::protect): + (JSC::Heap::unprotect): + (JSC::Heap::heap): + * runtime/Collector.h: + * runtime/Completion.cpp: + (JSC::evaluate): + * runtime/Completion.h: + (JSC::Completion::Completion): + (JSC::Completion::value): + (JSC::Completion::setValue): + * runtime/ConstructData.cpp: + (JSC::construct): + * runtime/ConstructData.h: + * runtime/DateConstructor.cpp: + (JSC::constructDate): + (JSC::callDate): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): + * runtime/DateInstance.h: + (JSC::asDateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + * runtime/DatePrototype.h: + (JSC::DatePrototype::createStructure): + * runtime/ErrorConstructor.cpp: + (JSC::callErrorConstructor): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/ExceptionHelpers.cpp: + (JSC::createInterruptedExecutionException): + (JSC::createError): + (JSC::createStackOverflowError): + (JSC::createUndefinedVariableError): + (JSC::createErrorMessage): + (JSC::createInvalidParamError): + (JSC::createNotAConstructorError): + (JSC::createNotAFunctionError): + * runtime/ExceptionHelpers.h: + * runtime/FunctionConstructor.cpp: + (JSC::callFunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::callFunctionPrototype): + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/FunctionPrototype.h: + (JSC::FunctionPrototype::createStructure): + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::toPrimitive): + (JSC::GetterSetter::getPrimitiveNumber): + * runtime/GetterSetter.h: + (JSC::asGetterSetter): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::displayName): + * runtime/InternalFunction.h: + (JSC::InternalFunction::createStructure): + (JSC::asInternalFunction): + * runtime/JSActivation.cpp: + (JSC::JSActivation::getOwnPropertySlot): + (JSC::JSActivation::put): + (JSC::JSActivation::putWithAttributes): + (JSC::JSActivation::argumentsGetter): + * runtime/JSActivation.h: + (JSC::JSActivation::createStructure): + (JSC::asActivation): + * runtime/JSArray.cpp: + (JSC::storageSize): + (JSC::JSArray::JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::mark): + (JSC::compareNumbersForQSort): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::checkConsistency): + (JSC::constructArray): + * runtime/JSArray.h: + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::createStructure): + (JSC::asArray): + (JSC::isJSArray): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::createStructure): + (JSC::JSByteArray::put): + * runtime/JSByteArray.h: + (JSC::JSByteArray::getIndex): + (JSC::JSByteArray::setIndex): + (JSC::asByteArray): + (JSC::isJSByteArray): + * runtime/JSCell.cpp: + (JSC::JSCell::put): + (JSC::JSCell::getJSNumber): + * runtime/JSCell.h: + (JSC::asCell): + (JSC::JSValue::asCell): + (JSC::JSValue::isString): + (JSC::JSValue::isGetterSetter): + (JSC::JSValue::isObject): + (JSC::JSValue::getString): + (JSC::JSValue::getObject): + (JSC::JSValue::getCallData): + (JSC::JSValue::getConstructData): + (JSC::JSValue::getUInt32): + (JSC::JSValue::getTruncatedInt32): + (JSC::JSValue::getTruncatedUInt32): + (JSC::JSValue::mark): + (JSC::JSValue::marked): + (JSC::JSValue::toPrimitive): + (JSC::JSValue::getPrimitiveNumber): + (JSC::JSValue::toBoolean): + (JSC::JSValue::toNumber): + (JSC::JSValue::toString): + (JSC::JSValue::toObject): + (JSC::JSValue::toThisObject): + (JSC::JSValue::needsThisConversion): + (JSC::JSValue::toThisString): + (JSC::JSValue::getJSNumber): + * runtime/JSFunction.cpp: + (JSC::JSFunction::call): + (JSC::JSFunction::argumentsGetter): + (JSC::JSFunction::callerGetter): + (JSC::JSFunction::lengthGetter): + (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSFunction::put): + (JSC::JSFunction::construct): + * runtime/JSFunction.h: + (JSC::JSFunction::createStructure): + (JSC::asFunction): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + (JSC::JSGlobalObject::put): + (JSC::JSGlobalObject::putWithAttributes): + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::resetPrototype): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::createStructure): + (JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo): + (JSC::asGlobalObject): + (JSC::Structure::prototypeForLookup): + (JSC::Structure::prototypeChain): + (JSC::Structure::isValid): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEval): + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + (JSC::globalFuncIsNaN): + (JSC::globalFuncIsFinite): + (JSC::globalFuncDecodeURI): + (JSC::globalFuncDecodeURIComponent): + (JSC::globalFuncEncodeURI): + (JSC::globalFuncEncodeURIComponent): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + (JSC::globalFuncJSCPrint): + * runtime/JSGlobalObjectFunctions.h: + * runtime/JSImmediate.cpp: + (JSC::JSImmediate::toThisObject): + (JSC::JSImmediate::toObject): + (JSC::JSImmediate::prototype): + (JSC::JSImmediate::toString): + * runtime/JSImmediate.h: + (JSC::JSImmediate::isImmediate): + (JSC::JSImmediate::isNumber): + (JSC::JSImmediate::isIntegerNumber): + (JSC::JSImmediate::isDoubleNumber): + (JSC::JSImmediate::isPositiveIntegerNumber): + (JSC::JSImmediate::isBoolean): + (JSC::JSImmediate::isUndefinedOrNull): + (JSC::JSImmediate::isEitherImmediate): + (JSC::JSImmediate::areBothImmediate): + (JSC::JSImmediate::areBothImmediateIntegerNumbers): + (JSC::JSImmediate::makeValue): + (JSC::JSImmediate::makeInt): + (JSC::JSImmediate::makeDouble): + (JSC::JSImmediate::makeBool): + (JSC::JSImmediate::makeUndefined): + (JSC::JSImmediate::makeNull): + (JSC::JSImmediate::doubleValue): + (JSC::JSImmediate::intValue): + (JSC::JSImmediate::uintValue): + (JSC::JSImmediate::boolValue): + (JSC::JSImmediate::rawValue): + (JSC::JSImmediate::trueImmediate): + (JSC::JSImmediate::falseImmediate): + (JSC::JSImmediate::undefinedImmediate): + (JSC::JSImmediate::nullImmediate): + (JSC::JSImmediate::zeroImmediate): + (JSC::JSImmediate::oneImmediate): + (JSC::JSImmediate::impossibleValue): + (JSC::JSImmediate::toBoolean): + (JSC::JSImmediate::getTruncatedUInt32): + (JSC::JSImmediate::fromNumberOutsideIntegerRange): + (JSC::JSImmediate::from): + (JSC::JSImmediate::getTruncatedInt32): + (JSC::JSImmediate::toDouble): + (JSC::JSImmediate::getUInt32): + (JSC::JSValue::JSValue): + (JSC::JSValue::isUndefinedOrNull): + (JSC::JSValue::isBoolean): + (JSC::JSValue::getBoolean): + (JSC::JSValue::toInt32): + (JSC::JSValue::toUInt32): + (JSC::JSValue::isCell): + (JSC::JSValue::isInt32Fast): + (JSC::JSValue::getInt32Fast): + (JSC::JSValue::isUInt32Fast): + (JSC::JSValue::getUInt32Fast): + (JSC::JSValue::makeInt32Fast): + (JSC::JSValue::areBothInt32Fast): + (JSC::JSFastMath::canDoFastBitwiseOperations): + (JSC::JSFastMath::equal): + (JSC::JSFastMath::notEqual): + (JSC::JSFastMath::andImmediateNumbers): + (JSC::JSFastMath::xorImmediateNumbers): + (JSC::JSFastMath::orImmediateNumbers): + (JSC::JSFastMath::canDoFastRshift): + (JSC::JSFastMath::canDoFastUrshift): + (JSC::JSFastMath::rightShiftImmediateNumbers): + (JSC::JSFastMath::canDoFastAdditiveOperations): + (JSC::JSFastMath::addImmediateNumbers): + (JSC::JSFastMath::subImmediateNumbers): + (JSC::JSFastMath::incImmediateNumber): + (JSC::JSFastMath::decImmediateNumber): + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::toPrimitive): + (JSC::JSNotAnObject::getPrimitiveNumber): + (JSC::JSNotAnObject::put): + * runtime/JSNotAnObject.h: + (JSC::JSNotAnObject::createStructure): + * runtime/JSNumberCell.cpp: + (JSC::JSNumberCell::toPrimitive): + (JSC::JSNumberCell::getPrimitiveNumber): + (JSC::JSNumberCell::getJSNumber): + (JSC::jsNumberCell): + * runtime/JSNumberCell.h: + (JSC::JSNumberCell::createStructure): + (JSC::isNumberCell): + (JSC::asNumberCell): + (JSC::jsNumber): + (JSC::JSValue::isDoubleNumber): + (JSC::JSValue::getDoubleNumber): + (JSC::JSValue::isNumber): + (JSC::JSValue::uncheckedGetNumber): + (JSC::jsNaN): + (JSC::JSValue::toJSNumber): + (JSC::JSValue::getNumber): + (JSC::JSValue::numberToInt32): + (JSC::JSValue::numberToUInt32): + * runtime/JSObject.cpp: + (JSC::JSObject::mark): + (JSC::JSObject::put): + (JSC::JSObject::putWithAttributes): + (JSC::callDefaultValueFunction): + (JSC::JSObject::getPrimitiveNumber): + (JSC::JSObject::defaultValue): + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::JSObject::lookupGetter): + (JSC::JSObject::lookupSetter): + (JSC::JSObject::hasInstance): + (JSC::JSObject::toNumber): + (JSC::JSObject::toString): + (JSC::JSObject::fillGetterPropertySlot): + * runtime/JSObject.h: + (JSC::JSObject::getDirect): + (JSC::JSObject::getDirectLocation): + (JSC::JSObject::offsetForLocation): + (JSC::JSObject::locationForOffset): + (JSC::JSObject::getDirectOffset): + (JSC::JSObject::putDirectOffset): + (JSC::JSObject::createStructure): + (JSC::asObject): + (JSC::JSObject::prototype): + (JSC::JSObject::setPrototype): + (JSC::JSValue::isObject): + (JSC::JSObject::inlineGetOwnPropertySlot): + (JSC::JSObject::getOwnPropertySlotForWrite): + (JSC::JSObject::getPropertySlot): + (JSC::JSObject::get): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectWithoutTransition): + (JSC::JSObject::toPrimitive): + (JSC::JSValue::get): + (JSC::JSValue::put): + (JSC::JSObject::allocatePropertyStorageInline): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::toPrimitive): + (JSC::JSPropertyNameIterator::getPrimitiveNumber): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::create): + (JSC::JSPropertyNameIterator::next): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::put): + (JSC::JSStaticScopeObject::putWithAttributes): + * runtime/JSStaticScopeObject.h: + (JSC::JSStaticScopeObject::JSStaticScopeObject): + (JSC::JSStaticScopeObject::createStructure): + * runtime/JSString.cpp: + (JSC::JSString::toPrimitive): + (JSC::JSString::getPrimitiveNumber): + (JSC::JSString::getOwnPropertySlot): + * runtime/JSString.h: + (JSC::JSString::createStructure): + (JSC::asString): + (JSC::isJSString): + (JSC::JSValue::toThisJSString): + * runtime/JSValue.cpp: + (JSC::JSValue::toInteger): + (JSC::JSValue::toIntegerPreserveNaN): + * runtime/JSValue.h: + (JSC::JSValue::makeImmediate): + (JSC::JSValue::asValue): + (JSC::noValue): + (JSC::jsImpossibleValue): + (JSC::jsNull): + (JSC::jsUndefined): + (JSC::jsBoolean): + (JSC::operator==): + (JSC::operator!=): + (JSC::JSValue::encode): + (JSC::JSValue::decode): + (JSC::JSValue::JSValue): + (JSC::JSValue::operator bool): + (JSC::JSValue::operator==): + (JSC::JSValue::operator!=): + (JSC::JSValue::isUndefined): + (JSC::JSValue::isNull): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::symbolTablePut): + (JSC::JSVariableObject::symbolTablePutWithAttributes): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::internalValue): + (JSC::JSWrapperObject::setInternalValue): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::lookupPut): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/MathObject.h: + (JSC::MathObject::createStructure): + * runtime/NativeErrorConstructor.cpp: + (JSC::callNativeErrorConstructor): + * runtime/NumberConstructor.cpp: + (JSC::numberConstructorNaNValue): + (JSC::numberConstructorNegInfinity): + (JSC::numberConstructorPosInfinity): + (JSC::numberConstructorMaxValue): + (JSC::numberConstructorMinValue): + (JSC::callNumberConstructor): + * runtime/NumberConstructor.h: + (JSC::NumberConstructor::createStructure): + * runtime/NumberObject.cpp: + (JSC::NumberObject::getJSNumber): + (JSC::constructNumber): + * runtime/NumberObject.h: + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::constructObject): + (JSC::callObjectConstructor): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncValueOf): + (JSC::objectProtoFuncHasOwnProperty): + (JSC::objectProtoFuncIsPrototypeOf): + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + (JSC::objectProtoFuncLookupGetter): + (JSC::objectProtoFuncLookupSetter): + (JSC::objectProtoFuncPropertyIsEnumerable): + (JSC::objectProtoFuncToLocaleString): + (JSC::objectProtoFuncToString): + * runtime/ObjectPrototype.h: + * runtime/Operations.cpp: + (JSC::JSValue::equalSlowCase): + (JSC::JSValue::strictEqualSlowCase): + (JSC::throwOutOfMemoryError): + (JSC::jsAddSlowCase): + (JSC::jsTypeStringForValue): + (JSC::jsIsObjectType): + (JSC::jsIsFunctionType): + * runtime/Operations.h: + (JSC::JSValue::equal): + (JSC::JSValue::equalSlowCaseInline): + (JSC::JSValue::strictEqual): + (JSC::JSValue::strictEqualSlowCaseInline): + (JSC::jsLess): + (JSC::jsLessEq): + (JSC::jsAdd): + (JSC::countPrototypeChainEntriesAndCheckForProxies): + (JSC::resolveBase): + * runtime/PropertySlot.cpp: + (JSC::PropertySlot::functionGetter): + * runtime/PropertySlot.h: + (JSC::PropertySlot::PropertySlot): + (JSC::PropertySlot::getValue): + (JSC::PropertySlot::putValue): + (JSC::PropertySlot::setValueSlot): + (JSC::PropertySlot::setValue): + (JSC::PropertySlot::setCustom): + (JSC::PropertySlot::setCustomIndex): + (JSC::PropertySlot::slotBase): + (JSC::PropertySlot::setBase): + (JSC::PropertySlot::): + * runtime/Protect.h: + (JSC::gcProtect): + (JSC::gcUnprotect): + (JSC::ProtectedPtr::operator JSValue): + (JSC::ProtectedJSValue::ProtectedJSValue): + (JSC::ProtectedJSValue::get): + (JSC::ProtectedJSValue::operator JSValue): + (JSC::ProtectedJSValue::operator->): + (JSC::ProtectedJSValue::~ProtectedJSValue): + (JSC::ProtectedJSValue::operator=): + (JSC::operator==): + (JSC::operator!=): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::getBackref): + (JSC::RegExpConstructor::getLastParen): + (JSC::RegExpConstructor::getLeftContext): + (JSC::RegExpConstructor::getRightContext): + (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): + (JSC::RegExpConstructor::put): + (JSC::setRegExpConstructorInput): + (JSC::setRegExpConstructorMultiline): + (JSC::constructRegExp): + (JSC::callRegExpConstructor): + * runtime/RegExpConstructor.h: + (JSC::RegExpConstructor::createStructure): + (JSC::asRegExpConstructor): + * runtime/RegExpMatchesArray.h: + (JSC::RegExpMatchesArray::put): + * runtime/RegExpObject.cpp: + (JSC::regExpObjectGlobal): + (JSC::regExpObjectIgnoreCase): + (JSC::regExpObjectMultiline): + (JSC::regExpObjectSource): + (JSC::regExpObjectLastIndex): + (JSC::RegExpObject::put): + (JSC::setRegExpObjectLastIndex): + (JSC::RegExpObject::test): + (JSC::RegExpObject::exec): + (JSC::callRegExpObject): + * runtime/RegExpObject.h: + (JSC::RegExpObject::createStructure): + (JSC::asRegExpObject): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + (JSC::stringFromCharCode): + (JSC::callStringConstructor): + * runtime/StringObject.cpp: + (JSC::StringObject::put): + * runtime/StringObject.h: + (JSC::StringObject::createStructure): + (JSC::asStringObject): + * runtime/StringObjectThatMasqueradesAsUndefined.h: + (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToString): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::changePrototypeTransition): + * runtime/Structure.h: + (JSC::Structure::create): + (JSC::Structure::setPrototypeWithoutTransition): + (JSC::Structure::storedPrototype): + +2009-05-01 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam "That doesn't look like what I thought it looks like" Weinig. + + Beefed up the JSValuePtr class and removed some non-JSValuePtr dependencies + on JSImmediate, in prepapration for making JSImmediate an implementation + detail of JSValuePtr. + + SunSpider reports no change. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArith_op_mod): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncParseInt): Updated for interface changes. + + * runtime/JSImmediate.h: + (JSC::JSValuePtr::JSValuePtr): + * runtime/JSValue.h: + (JSC::JSValuePtr::): + (JSC::jsImpossibleValue): + (JSC::jsNull): + (JSC::jsUndefined): + (JSC::jsBoolean): + (JSC::JSValuePtr::encode): + (JSC::JSValuePtr::decode): + (JSC::JSValuePtr::JSValuePtr): + (JSC::JSValuePtr::operator bool): + (JSC::JSValuePtr::operator==): + (JSC::JSValuePtr::operator!=): + (JSC::JSValuePtr::isUndefined): + (JSC::JSValuePtr::isNull): Changed jsImpossibleValue(), jsNull(), + jsUndefined(), and jsBoolean() to operate in terms of JSValuePtr instead + of JSImmediate. + + * wtf/StdLibExtras.h: + (WTF::bitwise_cast): Fixed up for clarity. + +2009-04-30 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug fix for rdar:/6845379. If a case-insensitive regex contains + a character class containing a range with an upper bound of \uFFFF + the parser will infinite-loop whist adding other-case characters + for characters in the range that do have another case. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::CharacterClassConstructor::putRange): + +2009-04-30 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + OPCODE_SAMPLING without CODEBLOCK_SAMPLING is currently broken, + since SamplingTool::Sample::isNull() checks the m_codeBlock + member (which is always null without CODEBLOCK_SAMPLING). + + Restructure the checks so make this work again. + + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::doRun): + * bytecode/SamplingTool.h: + (JSC::SamplingTool::Sample::isNull): + +2009-04-30 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Gavin Barraclough. + + - Concatenate final three strings in simple replace case at one go + + ~0.2% SunSpider speedup + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): Use new replaceRange helper instead of + taking substrings and concatenating three strings. + * runtime/UString.cpp: + (JSC::UString::replaceRange): New helper function. + * runtime/UString.h: + +2009-04-30 Geoffrey Garen <ggaren@apple.com> + + Rubber Stamped by Gavin Barraclough. + + Changed JSValueEncodedAsPtr* => EncodedJSValuePtr to support a non-pointer + encoding for JSValuePtrs. + + * API/APICast.h: + (toJS): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue): + (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue): + * interpreter/Register.h: + (JSC::Register::): + * jit/JIT.cpp: + (JSC::): + * jit/JIT.h: + * jit/JITCode.h: + (JSC::): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_add): + (JSC::JITStubs::cti_op_pre_inc): + (JSC::JITStubs::cti_op_get_by_id_generic): + (JSC::JITStubs::cti_op_get_by_id): + (JSC::JITStubs::cti_op_get_by_id_second): + (JSC::JITStubs::cti_op_get_by_id_self_fail): + (JSC::JITStubs::cti_op_get_by_id_proto_list): + (JSC::JITStubs::cti_op_get_by_id_proto_list_full): + (JSC::JITStubs::cti_op_get_by_id_proto_fail): + (JSC::JITStubs::cti_op_get_by_id_array_fail): + (JSC::JITStubs::cti_op_get_by_id_string_fail): + (JSC::JITStubs::cti_op_instanceof): + (JSC::JITStubs::cti_op_del_by_id): + (JSC::JITStubs::cti_op_mul): + (JSC::JITStubs::cti_op_call_NotJSFunction): + (JSC::JITStubs::cti_op_resolve): + (JSC::JITStubs::cti_op_construct_NotJSConstruct): + (JSC::JITStubs::cti_op_get_by_val): + (JSC::JITStubs::cti_op_get_by_val_string): + (JSC::JITStubs::cti_op_get_by_val_byte_array): + (JSC::JITStubs::cti_op_sub): + (JSC::JITStubs::cti_op_lesseq): + (JSC::JITStubs::cti_op_negate): + (JSC::JITStubs::cti_op_resolve_base): + (JSC::JITStubs::cti_op_resolve_skip): + (JSC::JITStubs::cti_op_resolve_global): + (JSC::JITStubs::cti_op_div): + (JSC::JITStubs::cti_op_pre_dec): + (JSC::JITStubs::cti_op_not): + (JSC::JITStubs::cti_op_eq): + (JSC::JITStubs::cti_op_lshift): + (JSC::JITStubs::cti_op_bitand): + (JSC::JITStubs::cti_op_rshift): + (JSC::JITStubs::cti_op_bitnot): + (JSC::JITStubs::cti_op_mod): + (JSC::JITStubs::cti_op_less): + (JSC::JITStubs::cti_op_neq): + (JSC::JITStubs::cti_op_urshift): + (JSC::JITStubs::cti_op_bitxor): + (JSC::JITStubs::cti_op_bitor): + (JSC::JITStubs::cti_op_call_eval): + (JSC::JITStubs::cti_op_throw): + (JSC::JITStubs::cti_op_next_pname): + (JSC::JITStubs::cti_op_typeof): + (JSC::JITStubs::cti_op_is_undefined): + (JSC::JITStubs::cti_op_is_boolean): + (JSC::JITStubs::cti_op_is_number): + (JSC::JITStubs::cti_op_is_string): + (JSC::JITStubs::cti_op_is_object): + (JSC::JITStubs::cti_op_is_function): + (JSC::JITStubs::cti_op_stricteq): + (JSC::JITStubs::cti_op_nstricteq): + (JSC::JITStubs::cti_op_to_jsnumber): + (JSC::JITStubs::cti_op_in): + (JSC::JITStubs::cti_op_del_by_val): + (JSC::JITStubs::cti_vm_throw): + * jit/JITStubs.h: + * runtime/JSValue.h: + (JSC::JSValuePtr::encode): + (JSC::JSValuePtr::decode): + +2009-04-30 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver "Abandon Ship!" Hunt. + + Fix a leak in Yarr. + + All Disjunctions should be recorded in RegexPattern::m_disjunctions, + so that they can be freed at the end of compilation - copyDisjunction + is failing to do so. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::copyDisjunction): + +2009-04-30 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Add function to CallFrame for dumping the current JS caller + + Added debug only method CallFrame::dumpCaller() that provide the call location + of the deepest currently executing JS function. + + * interpreter/CallFrame.cpp: + (JSC::CallFrame::dumpCaller): + * interpreter/CallFrame.h: + +2009-04-30 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Geoff Garen. + + - make BaseStrings have themselves as a base, instead of nothing, to remove common branches + + ~0.7% SunSpider speedup + + * runtime/UString.h: + (JSC::UString::Rep::Rep): For the constructor without a base, set self as base instead of null. + (JSC::UString::Rep::baseString): Just read m_baseString - no more branching. + +2009-04-30 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Two quick improvements to SamplingFlags mechanism. + + SamplingFlags::ScopedFlag class to provide support for automagically + clearing a flag as it goes out of scope, and add a little more detail + to the output generated by the tool. + + * bytecode/SamplingTool.cpp: + (JSC::SamplingFlags::stop): + * bytecode/SamplingTool.h: + (JSC::SamplingFlags::ScopedFlag::ScopedFlag): + (JSC::SamplingFlags::ScopedFlag::~ScopedFlag): + +2009-04-30 Adam Roben <aroben@apple.com> + + Restore build event steps that were truncated in r43082 + + Rubber-stamped by Steve Falkenburg. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + Re-copied the command lines for the build events from the pre-r43082 + .vcproj files. + + * JavaScriptCore.vcproj/jsc/jsc.vcproj: Removed an unnecessary + attribute. + +2009-04-30 Adam Roben <aroben@apple.com> + + Move settings from .vcproj files to .vsprops files within the + JavaScriptCore directory + + Moving the settings to a .vsprops file means that we will only have to + change a single setting to affect all configurations, instead of one + setting per configuration. + + Reviewed by Steve Falkenburg. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + Moved settings from these files to the new .vsprops files. Note that + testapi.vcproj had a lot of overrides of default settings that were + the same as the defaults, which I've removed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added. + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added. + +2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Timothy Hatcher. + + https://bugs.webkit.org/show_bug.cgi?id=25470 + Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler. + + * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define. + +2009-04-30 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Alexey Proskuryakov. + + - speed up string concatenation by reorganizing some simple cases + + 0.7% SunSpider speedup + + * runtime/UString.cpp: + (JSC::concatenate): Put fast case for appending a single character + before the empty string special cases; streamline code a bit to + delay computing values that are not needed in the fast path. + +2009-04-30 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Maciej Stachowiak. + + Add SamplingFlags mechanism. + + This mechanism allows fine-grained JSC and JavaScript program aware + performance measurement. The mechanism provides a set of 32 flags, + numbered #1..#32. Flag #16 is initially set, and all other flags + are cleared. Flags may be set and cleared from within + + Enable by setting ENABLE_SAMPLING_FLAGS to 1 in wtf/Platform.h. + Disabled by default, no performance impact. Flags may be modified + by calling SamplingFlags::setFlag() and SamplingFlags::clearFlag() + from within JSC implementation, or by calling setSamplingFlag() and + clearSamplingFlag() from JavaScript. + + The flags are sampled with a frequency of 10000Hz, and the highest + set flag in recorded, allowing multiple events to be measured (with + the highest flag number representing the highest priority). + + Disabled by default; no performance impact. + + * JavaScriptCore.exp: + * bytecode/SamplingTool.cpp: + (JSC::SamplingFlags::sample): + (JSC::SamplingFlags::start): + (JSC::SamplingFlags::stop): + (JSC::SamplingThread::threadStartFunc): + (JSC::SamplingThread::start): + (JSC::SamplingThread::stop): + (JSC::ScopeSampleRecord::sample): + (JSC::SamplingTool::doRun): + (JSC::SamplingTool::sample): + (JSC::SamplingTool::start): + (JSC::SamplingTool::stop): + * bytecode/SamplingTool.h: + (JSC::SamplingFlags::setFlag): + (JSC::SamplingFlags::clearFlag): + (JSC::SamplingTool::SamplingTool): + * jsc.cpp: + (GlobalObject::GlobalObject): + (functionSetSamplingFlag): + (functionClearSamplingFlag): + (runWithScripts): + * wtf/Platform.h: + +2009-04-29 Sam Weinig <sam@webkit.org> + + Another attempt to fix the windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-04-29 Sam Weinig <sam@webkit.org> + + Try and fix the windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-04-29 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver "Peg-Leg" Hunt. + + Coallesce input checking and reduce futzing with the index position + between alternatives and iterations of the main loop of a regex, + when run in YARR. + + Consider the following regex: /foo|bar/ + + Prior to this patch, this will be implemented something like this pseudo-code description: + + loop: + check_for_available_input(3) // this increments the index by 3, for the first alterantive. + if (available) { test "foo" } + decrement_index(3) + check_for_available_input(3) // this increments the index by 3, for the second alterantive. + if (available) { test "bar" } + decrement_index(3) + check_for_available_input(1) // can we loop again? + if (available) { goto loop } + + With these changes it will look more like this: + + check_for_available_input(3) // this increments the index by 3, for the first alterantive. + if (!available) { goto fail } + loop: + test "foo" + test "bar" + check_for_available_input(1) // can we loop again? + if (available) { goto loop } + fail: + + + This gives about a 5% gain on v8-regex, no change on Sunspider. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo): + (JSC::Yarr::RegexGenerator::generateDisjunction): + +2009-04-29 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Clean up ArgList to be a trivial type + + Separate out old ArgList logic to handle buffering and marking arguments + into a distinct MarkedArgumentBuffer type. ArgList becomes a trivial + struct of a pointer and length. + + * API/JSObjectRef.cpp: + (JSObjectMakeFunction): + (JSObjectMakeArray): + (JSObjectMakeDate): + (JSObjectMakeError): + (JSObjectMakeRegExp): + (JSObjectCallAsFunction): + (JSObjectCallAsConstructor): + * JavaScriptCore.exp: + * interpreter/CallFrame.h: + (JSC::ExecState::emptyList): + * runtime/ArgList.cpp: + (JSC::ArgList::getSlice): + (JSC::MarkedArgumentBuffer::markLists): + (JSC::MarkedArgumentBuffer::slowAppend): + * runtime/ArgList.h: + (JSC::MarkedArgumentBuffer::MarkedArgumentBuffer): + (JSC::MarkedArgumentBuffer::~MarkedArgumentBuffer): + (JSC::ArgList::ArgList): + (JSC::ArgList::at): + (JSC::ArgList::isEmpty): + (JSC::ArgList::size): + (JSC::ArgList::begin): + (JSC::ArgList::end): + * runtime/Arguments.cpp: + (JSC::Arguments::fillArgList): + * runtime/Arguments.h: + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + * runtime/Collector.cpp: + (JSC::Heap::collect): + * runtime/Collector.h: + (JSC::Heap::markListSet): + * runtime/CommonIdentifiers.h: + * runtime/Error.cpp: + (JSC::Error::create): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncApply): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): + (JSC::JSArray::fillArgList): + (JSC::constructArray): + * runtime/JSArray.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSObject.cpp: + (JSC::JSObject::put): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncMatch): + +2009-04-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=25334 + + Fix Qt build when ENABLE_JIT is explicitly set to 1 + to overrule defaults. + + * JavaScriptCore.pri: + +2009-04-29 Oliver Hunt <oliver@apple.com> + + Reviewed by Steve Falkenburg. + + Crash in profiler due to incorrect assuming displayName would be a string. + + Fixed by adding a type guard. + + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::displayName): + +2009-04-28 Geoffrey Garen <ggaren@apple.com> + + Rubber stamped by Beth Dakin. + + Removed scaffolding supporting dynamically converting between 32bit and + 64bit value representations. + + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackObjectFunctions.h: + (JSC::::construct): + (JSC::::call): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getConstant): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitEqualityOp): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::thisValue): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::throwException): + (JSC::Interpreter::createExceptionScope): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveArguments): + * interpreter/Register.h: + (JSC::Register::): + (JSC::Register::Register): + (JSC::Register::jsValue): + (JSC::Register::marked): + (JSC::Register::mark): + (JSC::Register::i): + (JSC::Register::activation): + (JSC::Register::arguments): + (JSC::Register::callFrame): + (JSC::Register::codeBlock): + (JSC::Register::function): + (JSC::Register::propertyNameIterator): + (JSC::Register::scopeChain): + (JSC::Register::vPC): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_call_NotJSFunction): + (JSC::JITStubs::cti_op_load_varargs): + (JSC::JITStubs::cti_op_call_eval): + * jsc.cpp: + (functionPrint): + (functionDebug): + (functionRun): + (functionLoad): + * runtime/ArgList.h: + (JSC::ArgList::at): + * runtime/Arguments.cpp: + (JSC::Arguments::copyToRegisters): + (JSC::Arguments::fillArgList): + (JSC::Arguments::getOwnPropertySlot): + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::constructBoolean): + (JSC::callBooleanConstructor): + * runtime/DateConstructor.cpp: + (JSC::constructDate): + (JSC::dateParse): + (JSC::dateUTC): + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + (JSC::fillStructuresUsingTimeArgs): + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncSetTime): + (JSC::dateProtoFuncSetYear): + * runtime/ErrorConstructor.cpp: + (JSC::constructError): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::constructArray): + * runtime/JSArray.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEval): + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + (JSC::globalFuncIsNaN): + (JSC::globalFuncIsFinite): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + (JSC::globalFuncJSCPrint): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::construct): + * runtime/NumberConstructor.cpp: + (JSC::constructWithNumberConstructor): + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::constructObject): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncHasOwnProperty): + (JSC::objectProtoFuncIsPrototypeOf): + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + (JSC::objectProtoFuncLookupGetter): + (JSC::objectProtoFuncLookupSetter): + (JSC::objectProtoFuncPropertyIsEnumerable): + * runtime/PropertySlot.h: + (JSC::PropertySlot::getValue): + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncCompile): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + (JSC::stringFromCharCode): + (JSC::constructWithStringConstructor): + (JSC::callStringConstructor): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncLocaleCompare): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + +2009-04-28 David Kilzer <ddkilzer@apple.com> + + A little more hardening for UString + + Reviewed by Maciej Stachowiak. + + Revised fix for <rdar://problem/5861045> in r42644. + + * runtime/UString.cpp: + (JSC::newCapacityWithOverflowCheck): Added. + (JSC::concatenate): Used newCapacityWithOverflowCheck(). + (JSC::UString::append): Ditto. + +2009-04-28 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Bring back r42969, this time with correct codegen + + Add logic to the codegen for right shift to avoid jumping to a helper function + when shifting a small floating point value. + + * jit/JITArithmetic.cpp: + (isSSE2Present): + (JSC::JIT::compileFastArith_op_rshift): + (JSC::JIT::compileFastArithSlow_op_rshift): + +2009-04-28 Kevin Ollivier <kevino@theolliviers.com> + + wxMSW build fix. Switch JSCore build back to static. + + * API/JSBase.h: + * config.h: + * jscore.bkl: + +2009-04-28 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Roll out r42969, due to hangs in build bot. + + * jit/JITArithmetic.cpp: + (JSC::JIT::compileFastArith_op_rshift): + (JSC::JIT::compileFastArithSlow_op_rshift): + (JSC::isSSE2Present): + +2009-04-28 Xan Lopez <xlopez@igalia.com> + + Unreviewed: fix distcheck build, add (even more) missing files to list. + + * GNUmakefile.am: + +2009-04-28 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Improve performance of string indexing + + Add a cti_get_by_val_string function to specialise indexing into a string object. + This gives us a slight performance win on a number of string tests. + + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_get_by_val): + (JSC::JITStubs::cti_op_get_by_val_string): + * jit/JITStubs.h: + +2009-04-28 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Improve performance of right shifts of large or otherwise floating point values. + + Add logic to the codegen for right shift to avoid jumping to a helper function + when shifting a small floating point value. + + * jit/JITArithmetic.cpp: + (isSSE2Present): Moved to the head of file. + (JSC::JIT::compileFastArith_op_rshift): + (JSC::JIT::compileFastArithSlow_op_rshift): + +2009-04-28 Xan Lopez <xlopez@igalia.com> + + Unreviewed: fix distcheck build, add (more) missing files to list. + + * GNUmakefile.am: + +2009-04-28 Xan Lopez <xlopez@igalia.com> + + Unreviewed: fix distcheck build, add missing header to file list. + + * GNUmakefile.am: + +2009-04-28 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Maciej "Henry Morgan" Stachowiak. + + Enable YARR. + (Again.) + + * wtf/Platform.h: + +2009-04-27 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Maciej Stachowiak. + + Tweak a loop condition to keep GCC happy, + some GCCs seem to be having issues with this. :-/ + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::breakTarget): + * wtf/Platform.h: + +2009-04-27 Adam Roben <aroben@apple.com> + + Windows Debug build fix + + Not sure why the buildbots weren't affected by this problem. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS + re-order the file list, and added JavaScriptCore[_debug].def to the + project. This was not necessary for the fix, but made making the fix + easier. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Removed a function that no longer exists. + +2009-04-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Weinig Sam. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=25416 + "Cached prototype accesses unsafely hoist property storage load above structure checks." + + Do not hoist the load of the pointer to the property storage array. + + No performance impact. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + +2009-04-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoffrey "Gaffe or energy?" Garen. + + Randomize address requested by ExecutableAllocatorFixedVMPool. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + +2009-04-26 Sam Weinig <sam@webkit.org> + + Reviewed by Eric Seidel. + + Remove scons-based build system. + + * JavaScriptCore.scons: Removed. + +2009-04-25 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Buildfix). + + Make HAVE_MADV_FREE darwin only for now + + * wtf/Platform.h: + +2009-04-25 Jan Michael Alonzo <jmalonzo@webkit.org> + + Reviewed by Oliver Hunt. + + Gtk build fix - check if we have MADV_FREE before using it. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::releaseExcessCapacity): + * wtf/Platform.h: + +2009-04-24 Kevin Ollivier <kevino@theolliviers.com> + + wx build fix. Switching JSCore from a static lib to a dynamic lib + to match the Apple build and fix symbol exports. + + * jscore.bkl: + +2009-04-24 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Rubber-stamped by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=25337 + Move ThreadingQt.cpp under the qt directory. + + * JavaScriptCore.pri: + * wtf/ThreadingQt.cpp: Removed. + * wtf/qt/ThreadingQt.cpp: Copied from JavaScriptCore/wtf/ThreadingQt.cpp. + +2009-04-24 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Rubber-stamped by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=25338 + Move ThreadingGtk.cpp under the gtk directory. + + * GNUmakefile.am: + * wtf/ThreadingGtk.cpp: Removed. + * wtf/gtk/ThreadingGtk.cpp: Copied from JavaScriptCore/wtf/ThreadingGtk.cpp. + +2009-04-24 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam "Wesley" Weinig. + + Improve performance to YARR interpreter. + (From about 3x slower than PCRE on regex-dna to about 30% slower). + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::checkCharacter): + (JSC::Yarr::Interpreter::checkCasedCharacter): + (JSC::Yarr::Interpreter::backtrackPatternCharacter): + (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter): + (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin): + (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd): + (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin): + (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::Interpreter::interpret): + (JSC::Yarr::ByteCompiler::atomPatternCharacter): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): + (JSC::Yarr::ByteCompiler::closeAlternative): + (JSC::Yarr::ByteCompiler::closeBodyAlternative): + (JSC::Yarr::ByteCompiler::atomParenthesesEnd): + (JSC::Yarr::ByteCompiler::regexBegin): + (JSC::Yarr::ByteCompiler::regexEnd): + (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction): + (JSC::Yarr::ByteCompiler::alterantiveDisjunction): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexInterpreter.h: + (JSC::Yarr::ByteTerm::): + (JSC::Yarr::ByteTerm::ByteTerm): + (JSC::Yarr::ByteTerm::BodyAlternativeBegin): + (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction): + (JSC::Yarr::ByteTerm::BodyAlternativeEnd): + (JSC::Yarr::ByteTerm::AlternativeBegin): + (JSC::Yarr::ByteTerm::AlternativeDisjunction): + (JSC::Yarr::ByteTerm::AlternativeEnd): + (JSC::Yarr::ByteTerm::SubpatternBegin): + (JSC::Yarr::ByteTerm::SubpatternEnd): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): + * yarr/RegexPattern.h: + +2009-04-24 Rob Raguet-Schofield <ragfield@gmail.com> + + Rubber-stamped by Mark Rowe. + + * wtf/CurrentTime.h: Fix a typo in a comment. + +2009-04-24 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Add reinterpret_cast + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::releaseExcessCapacity): + +2009-04-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + <rdar://problem/6050421> JavaScript register file should remap to release physical pages accumulated during deep recursion + + We now track the maximum extent of the RegisterFile, and when we reach the final + return from JS (so the stack portion of the registerfile becomes empty) we see + if that extent is greater than maxExcessCapacity. If it is we use madvise or + VirtualFree to release the physical pages that were backing the excess. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::releaseExcessCapacity): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::shrink): + (JSC::RegisterFile::grow): + +2009-04-23 Mark Rowe <mrowe@apple.com> + + With great sadness and a heavy heart I switch us back from YARR to WREC in + order to restore greenness to the world once more. + + * wtf/Platform.h: + +2009-04-23 Mark Rowe <mrowe@apple.com> + + More Windows build fixage. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-04-23 Mark Rowe <mrowe@apple.com> + + Attempt to fix the Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove a symbol that no longer exists. + +2009-04-23 Francisco Tolmasky <francisco@280north.com> + + BUG 24604: WebKit profiler reports incorrect total times + <https://bugs.webkit.org/show_bug.cgi?id=24604> + + Reviewed by Timothy Hatcher and Kevin McCullough. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::Hash::hash): + (JSC::CallIdentifier::Hash::equal): + (JSC::CallIdentifier::hash): + (WTF::): + * profiler/HeavyProfile.cpp: Removed. + * profiler/HeavyProfile.h: Removed. + * profiler/Profile.cpp: No more need for TreeProfile/HeavyProfile + (JSC::Profile::create): + * profiler/Profile.h: + * profiler/ProfileNode.cpp: + * profiler/ProfileNode.h: + * profiler/TreeProfile.cpp: Removed. + * profiler/TreeProfile.h: Removed. + +2009-04-23 Gavin Barraclough <barraclough@apple.com> + + Not Reviewed. + + Speculative Windows build fix II. + + * yarr/RegexInterpreter.cpp: + +2009-04-23 Gavin Barraclough <barraclough@apple.com> + + Not Reviewed. + + Speculative Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * runtime/RegExp.cpp: + +2009-04-23 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by salty sea dogs Sam & Geoff. + + Enable YARR_JIT by default (where supported), replacing WREC. + + * wtf/Platform.h: + +2009-04-23 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff "Dread Pirate Roberts" Garen. + + Various small fixes to YARR JIT, in preparation for enabling it by default. + + * Correctly index into the callframe when storing restart addresses for + nested alternatives. + * Allow backtracking back into matched alternatives of parentheses. + * Fix callframe offset calculation for parenthetical assertions. + * When a set of parenthese are quantified with a fixed and variable portion, + and the variable portion is quantified once, this should not reset the + pattern match on failure to match (the last match from the firxed portion + should be preserved). + * Up the pattern size limit to match PCRE's new limit. + * Unlclosed parentheses should be reported with the message "missing )". + + * wtf/Platform.h: + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchParentheses): + (JSC::Yarr::Interpreter::backtrackParentheses): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::loadFromFrameAndJump): + (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction): + (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::executeRegex): + * yarr/RegexParser.h: + (JSC::Yarr::Parser::): + (JSC::Yarr::Parser::parseTokens): + (JSC::Yarr::Parser::parse): + * yarr/RegexPattern.h: + (JSC::Yarr::PatternTerm::): + (JSC::Yarr::PatternTerm::PatternTerm): + +2009-04-22 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Gavin Barraclough. + + Add the m_ prefix on FixedVMPoolAllocator's member variables, and fix typos in a few comments. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::addToFreeList): + (JSC::FixedVMPoolAllocator::coalesceFreeSpace): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + +2009-04-22 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Gavin Barraclough. + + Add some assertions to FixedVMPoolAllocator to guard against cases where we + attempt to free memory that didn't originate from the pool, or we attempt to + hand out a bogus address from alloc. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + +2009-04-22 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam "Blackbeard" Weinig. + + Although pirates do spell the word 'generate' as 'genertate', + webkit developers do not. Fixertate. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateAssertionBOL): + (JSC::Yarr::RegexGenerator::generateAssertionEOL): + (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary): + (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle): + (JSC::Yarr::RegexGenerator::generatePatternCharacterPair): + (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed): + (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): + (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): + (JSC::Yarr::RegexGenerator::generateCharacterClassSingle): + (JSC::Yarr::RegexGenerator::generateCharacterClassFixed): + (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): + (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy): + (JSC::Yarr::RegexGenerator::generateTerm): + +2009-04-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam "Blackbeard" Weinig. + + Improvements to YARR JIT. This patch expands support in three key areas: + * Add (temporary) support for falling back to PCRE for expressions not supported. + * Add support for x86_64 and Windows. + * Add support for singly quantified parentheses (? and ??), alternatives within + parentheses, and parenthetical assertions. + + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::storeToFrame): + (JSC::Yarr::RegexGenerator::storeToFrameWithPatch): + (JSC::Yarr::RegexGenerator::loadFromFrameAndJump): + (JSC::Yarr::RegexGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord): + (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative): + (JSC::Yarr::RegexGenerator::TermGenerationState::resetTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack): + (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists): + (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump): + (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks): + (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom): + (JSC::Yarr::RegexGenerator::genertateAssertionBOL): + (JSC::Yarr::RegexGenerator::genertateAssertionEOL): + (JSC::Yarr::RegexGenerator::matchAssertionWordchar): + (JSC::Yarr::RegexGenerator::genertateAssertionWordBoundary): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterSingle): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterPair): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterFixed): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterGreedy): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterNonGreedy): + (JSC::Yarr::RegexGenerator::genertateCharacterClassSingle): + (JSC::Yarr::RegexGenerator::genertateCharacterClassFixed): + (JSC::Yarr::RegexGenerator::genertateCharacterClassGreedy): + (JSC::Yarr::RegexGenerator::genertateCharacterClassNonGreedy): + (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::generateDisjunction): + (JSC::Yarr::RegexGenerator::generateEnter): + (JSC::Yarr::RegexGenerator::generateReturn): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::RegexGenerator::generate): + (JSC::Yarr::RegexGenerator::compile): + (JSC::Yarr::RegexGenerator::generationFailed): + (JSC::Yarr::jitCompileRegex): + (JSC::Yarr::executeRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): + +2009-04-22 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Darin Adler. + + Fix for <rdar://problem/6816957> + Turn off Geolocation by default + + * Configurations/FeatureDefines.xcconfig: + +2009-04-22 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Buildfix). + + * interpreter/CachedCall.h: + +2009-04-21 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + * runtime/StringPrototype.cpp: + +2009-04-21 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Improve String.replace performance slightly + + Apply our vm reentry caching logic to String.replace with global + regexes. + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + +2009-04-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich and Oliver Hunt. + + Re-Fixed <rdar://problem/6406045> REGRESSION: Stack overflow on PowerPC on + fast/workers/use-machine-stack.html (22531) + + SunSpider reports no change. + + Use a larger recursion limit on the main thread (because we can, and + there's some evidence that it may improve compatibility), and a smaller + recursion limit on secondary threads (because they tend to have smaller + stacks). + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::prepareForRepeatCall): + * interpreter/Interpreter.h: + (JSC::): Ditto. I wrote the recursion test slightly funny, so that the + common case remains a simple compare to constant. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): Conservatively, set the array recursion limits + to the lower, secondary thread limit. We can do something fancier if + compatibility moves us, but this seems sufficient for now. + +2009-04-21 Geoffrey Garen <ggaren@apple.com> + + Rubber-stamped by Adam Roben. + + Disabled one more Mozilla JS test because it fails intermittently on Windows. + (See https://bugs.webkit.org/show_bug.cgi?id=25160.) + + * tests/mozilla/expected.html: + +2009-04-21 Adam Roben <aroben@apple.com> + + Rename JavaScriptCore_debug.dll to JavaScriptCore.dll in the Debug + configuration + + This matches the naming scheme for WebKit.dll, and will be necessary + once Safari links against JavaScriptCore.dll. This change also causes + run-safari not to fail (because the launcher printed by FindSafari was + always looking for JavaScriptCore.dll, never + JavaScriptCore_debug.dll). + + Part of Bug 25305: can't run safari or drt on windows + <https://bugs.webkit.org/show_bug.cgi?id=25305> + + Reviewed by Steve Falkenburg and Sam Weinig. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + Use $(WebKitDLLConfigSuffix) for naming JavaScriptCore.{dll,lib}. + +2009-04-21 Adam Roben <aroben@apple.com> + + Fix JavaScriptCore build on VC++ Express + + Reviewed by Steve Falkenburg and Sam Weinig. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Link + explicitly against gdi32.lib and oleaut32.lib. + +2009-04-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Mark Rowe. + + Tiger crash fix: Put VM tags in their own header file, and fixed up the + #ifdefs so they're not used on Tiger. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutablePool::systemAlloc): + * runtime/Collector.cpp: + (JSC::allocateBlock): + * wtf/VMTags.h: Added. + +2009-04-20 Steve Falkenburg <sfalken@apple.com> + + More Windows build fixes. + + * JavaScriptCore.vcproj/JavaScriptCore.make: Copy DLLs, PDBs. + * JavaScriptCore.vcproj/JavaScriptCore.resources: Added. + * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add version stamping, resource copying. + +2009-04-20 Steve Falkenburg <sfalken@apple.com> + + Separate JavaScriptCore.dll from WebKit.dll. + Slight performance improvement or no change on benchmarks. + + Allows us to break a circular dependency between CFNetwork and WebKit on Windows, + and simplifies standalone JavaScriptCore builds. + + Reviewed by Oliver Hunt. + + * API/JSBase.h: Export symbols with JS_EXPORT when using MSVC. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Build JavaScriptCore as a DLL instead of a static library. + * config.h: Specify __declspec(dllexport/dllimport) appropriately when exporting data. + * runtime/InternalFunction.h: Specify JS_EXPORTDATA on exported data. + * runtime/JSArray.h: Specify JS_EXPORTDATA on exported data. + * runtime/JSFunction.h: Specify JS_EXPORTDATA on exported data. + * runtime/StringObject.h: Specify JS_EXPORTDATA on exported data. + * runtime/UString.h: Specify JS_EXPORTDATA on exported data. + +2009-04-20 Sam Weinig <sam@webkit.org> + + Reviewed by Kevin McCullough. + + Always tag mmaped memory on darwin and clean up #defines + now that they are a little bigger. + + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutablePool::systemAlloc): + * runtime/Collector.cpp: + (JSC::allocateBlock): + +2009-04-20 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Tim Hatcher. + + Add licenses for xcconfig files. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/FeatureDefines.xcconfig: + * Configurations/JavaScriptCore.xcconfig: + * Configurations/Version.xcconfig: + +2009-04-20 Ariya Hidayat <ariya.hidayat@nokia.com> + + Build fix for Qt port (after r42646). Not reviewed. + + * wtf/unicode/qt4/UnicodeQt4.h: Added U16_PREV. + +2009-04-19 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Better fix for JSStringCreateWithCFString hardening. + + * API/JSStringRefCF.cpp: + (JSStringCreateWithCFString): + +2009-04-19 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix for <rdar://problem/5860954> + Harden JSStringCreateWithCFString against malformed CFStringRefs. + + * API/JSStringRefCF.cpp: + (JSStringCreateWithCFString): + +2009-04-19 David Kilzer <ddkilzer@apple.com> + + Make FEATURE_DEFINES completely dynamic + + Reviewed by Darin Adler. + + Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME + variables for each feature, making it possible to remove all + knowledge of FEATURE_DEFINES from build-webkit. + + * Configurations/FeatureDefines.xcconfig: Extract a variable + from FEATURE_DEFINES for each feature setting. + +2009-04-18 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Fix typo. s/VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE/VM_MEMORY_JAVASCRIPT_CORE/ + + * runtime/Collector.cpp: + (JSC::allocateBlock): Fix bozo typo. + +2009-04-18 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Fix for <rdar://problem/6801555> Tag JavaScript memory on SnowLeopard + + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutablePool::systemAlloc): + * runtime/Collector.cpp: + (JSC::allocateBlock): + +2009-04-18 Drew Wilson <amw@apple.com> + + <rdar://problem/6781407> VisiblePosition.characterAfter should return UChar32 + + Reviewed by Dan Bernstein. + + * wtf/unicode/icu/UnicodeIcu.h: + (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic): Added. + +2009-04-18 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Fix for <rdar://problem/5861045> + A little bit of hardening for UString. + + * runtime/UString.cpp: + (JSC::concatenate): + (JSC::UString::append): + +2009-04-18 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe and Dan Bernstein. + + Fix for <rdar://problem/5861188> + A little bit of hardening for Vector. + + * wtf/Vector.h: + (WTF::Vector<T, inlineCapacity>::append): + (WTF::Vector<T, inlineCapacity>::insert): + +2009-04-17 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + On x86_64, make all JIT-code allocations from a new heap, managed + by FixedVMPoolAllocator. This class allocates a single large (2Gb) + pool of virtual memory from which all further allocations take place. + Since all JIT code is allocated from this pool, we can continue to + safely assume (as is already asserted) that it will always be possible + to link any JIT-code to JIT-code jumps and calls. + + * JavaScriptCore.xcodeproj/project.pbxproj: + Add new file. + * jit/ExecutableAllocatorFixedVMPool.cpp: Added. + (JSC::FreeListEntry::FreeListEntry): + (JSC::AVLTreeAbstractorForFreeList::get_less): + (JSC::AVLTreeAbstractorForFreeList::set_less): + (JSC::AVLTreeAbstractorForFreeList::get_greater): + (JSC::AVLTreeAbstractorForFreeList::set_greater): + (JSC::AVLTreeAbstractorForFreeList::get_balance_factor): + (JSC::AVLTreeAbstractorForFreeList::set_balance_factor): + (JSC::AVLTreeAbstractorForFreeList::null): + (JSC::AVLTreeAbstractorForFreeList::compare_key_key): + (JSC::AVLTreeAbstractorForFreeList::compare_key_node): + (JSC::AVLTreeAbstractorForFreeList::compare_node_node): + (JSC::sortFreeListEntriesByPointer): + (JSC::sortCommonSizedAllocations): + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::addToFreeList): + (JSC::FixedVMPoolAllocator::coalesceFreeSpace): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + The new 2Gb heap class! + * jit/ExecutableAllocatorPosix.cpp: + Disable use of this implementation on x86_64. + * wtf/AVLTree.h: + Add missing variable initialization. + (WTF::::remove): + +2009-04-17 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + Fix bug where the VM reentry cache would not correctly unroll the cached callframe + + Fix a check that was intended to mark a cached call as invalid when the callframe could + not be constructed. Instead it was just checking that there was a place to put the + exception. This eventually results in a non-recoverable RegisterFile starvation. + + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + (JSC::CachedCall::call): add assertion to ensure we don't use a bad callframe + +2009-04-17 David Kilzer <ddkilzer@apple.com> + + Simplify FEATURE_DEFINES definition + + Reviewed by Darin Adler. + + This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME + variables to their own FeatureDefines.xcconfig file. It also + extracts a new ENABLE_GEOLOCATION variable so that + FEATURE_DEFINES only needs to be defined once. + + * Configurations/FeatureDefines.xcconfig: Added. + * Configurations/JavaScriptCore.xcconfig: Removed definition of + ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES. Added include + of FeatureDefines.xcconfig. + * JavaScriptCore.xcodeproj/project.pbxproj: Added + FeatureDefines.xcconfig file. + +2009-04-08 Mihnea Ovidenie <mihnea@adobe.com> + + Reviewed by Oliver Hunt. + + Bug 25027: JavaScript parseInt wrong on negative numbers + <https://bugs.webkit.org/show_bug.cgi?id=25027> + + When dealing with negative numbers, parseInt should use ceil instead of floor. + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncParseInt): + +2009-04-16 Stephanie Lewis <slewis@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/6744652> 32-bit to 64-bit: Javascript hash tables double in size + + Remove perfect hash optimization which removes 1 MB of overhead on 32-bit and almost 2 MB on 64-bit. Removing the optimization was not a regression on SunSpider and the acid 3 test still passes. + + * create_hash_table: + * runtime/Lookup.cpp: + (JSC::HashTable::createTable): + (JSC::HashTable::deleteTable): + * runtime/Lookup.h: + (JSC::HashEntry::initialize): + (JSC::HashEntry::next): + (JSC::HashTable::entry): + * runtime/Structure.cpp: + (JSC::Structure::getEnumerableNamesFromClassInfoTable): + +2009-04-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Fix subtle error in optimised VM reentry in Array.sort + + Basically to ensure we don't accidentally invalidate the cached callframe + we should be using the cached callframe rather than our own exec state. + While the old behaviour was wrong i have been unable to actually create a + test case where anything actually ends up going wrong. + + * interpreter/CachedCall.h: + (JSC::CachedCall::newCallFrame): + * runtime/JSArray.cpp: + (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): + +2009-04-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Optimise op_resolve_base + + If we can statically find a property we are trying to resolve + the base of, the base is guaranteed to be the global object. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitResolveBase): + +2009-04-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve performance of read-write-modify operators + + Implement cross scope optimisation for read-write-modify + operators, to avoid unnecessary calls to property resolve + helper functions. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitLoadGlobalObject): + (JSC::BytecodeGenerator::emitResolveWithBase): + * bytecompiler/BytecodeGenerator.h: + +2009-04-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve performance of remaining array enumeration functions + + Make use of function entry cache for remaining Array enumeration functions. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + +2009-04-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve performance of Array.sort + + Cache the VM entry for Array.sort when using a JS comparison function. + + * runtime/JSArray.cpp: + (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): + (JSC::JSArray::sort): + +2009-04-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Bug 25229: Need support for Array.prototype.reduceRight + <https://bugs.webkit.org/show_bug.cgi?id=25229> + + Implement Array.reduceRight + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncReduceRight): + +2009-04-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Bug 25227: Array.filter triggers an assertion when the target array shrinks while being filtered + <https://bugs.webkit.org/show_bug.cgi?id=25227> + + We correct this simply by making the fast array path fall back on the slow path if + we ever discover the fast access is unsafe. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncFilter): + +2009-04-13 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Bug 25159: Support Array.prototype.reduce + <https://bugs.webkit.org/show_bug.cgi?id=25159> + + Implement Array.prototype.reduce + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncReduce): + +2009-04-15 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Move CallFrameClosure from inside the Interpreter class to its own file. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/CachedCall.h: + * interpreter/CallFrameClosure.h: Copied from JavaScriptCore/yarr/RegexJIT.h. + (JSC::CallFrameClosure::setArgument): + (JSC::CallFrameClosure::resetCallFrame): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::prepareForRepeatCall): + * interpreter/Interpreter.h: + +2009-04-14 Oliver Hunt <oliver@apple.com> + + Reviewed by Cameron Zwarich. + + Bug 25202: Improve performance of repeated callbacks into the VM + + Add the concept of a CachedCall to native code for use in Array + prototype and similar functions where a single callback function + is called repeatedly with the same number of arguments. + + Used Array.prototype.filter as the test function and got a 50% win + over a naive non-caching specialised version. This makes the native + implementation of Array.prototype.filter faster than the JS one once + more. + + * JavaScriptCore.vcproj/JavaScriptCore.sln: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/CachedCall.h: Added. + (JSC::CachedCall::CachedCall): + (JSC::CachedCall::call): + (JSC::CachedCall::setThis): + (JSC::CachedCall::setArgument): + (JSC::CachedCall::~CachedCall): + CachedCall is a wrapper that automates the calling and teardown + for a CallFrameClosure + * interpreter/CallFrame.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::prepareForRepeatCall): + Create the basic entry closure for a function + (JSC::Interpreter::execute): + A new ::execute method to enter the interpreter from a closure + (JSC::Interpreter::endRepeatCall): + Clear the entry closure + * interpreter/Interpreter.h: + (JSC::Interpreter::CallFrameClosure::setArgument): + (JSC::Interpreter::CallFrameClosure::resetCallFrame): + Helper functions to simplify setting up the closure's callframe + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncFilter): + +2009-04-14 Xan Lopez <xlopez@igalia.com> + + Fix the build. + + Add the yarr headers (and only the headers) to the build, so that + RegExp.cpp can compile. The headers are ifdefed out with yarr + disabled, so we don't need anything else for now. + + * GNUmakefile.am: + +2009-04-14 Adam Roben <aroben@apple.com> + + Remove support for profile-guided optimization on Windows + + Rubber-stamped by Steve Falkenburg. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed + the Release_PGO configuration. Also let VS re-order the source files + list. + +2009-04-14 Xan Lopez <xlopez@igalia.com> + + Unreviewed build fix. + + * GNUmakefile.am: + +2009-04-14 Jan Michael Alonzo <jmalonzo@webkit.org> + + Gtk build fix when building minidom. Not reviewed. + + Use C-style comment instead of C++ style since autotools builds + minidom using gcc and not g++. + + * wtf/Platform.h: + +2009-04-14 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY - speculative build fix. + + * runtime/RegExp.h: + +2009-04-13 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Cap'n Geoff Garen. + + Yarr! + (Yet another regex runtime). + + Currently disabled by default since the interpreter, whilst awesomely + functional, has not been optimized and is likely slower than PCRE, and + the JIT, whilst faster than WREC, is presently incomplete and does not + fallback to using an interpreter for the cases it cannot handle. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::move): + (JSC::MacroAssemblerX86Common::swap): + (JSC::MacroAssemblerX86Common::signExtend32ToPtr): + (JSC::MacroAssemblerX86Common::zeroExtend32ToPtr): + (JSC::MacroAssemblerX86Common::branch32): + (JSC::MacroAssemblerX86Common::branch16): + * assembler/X86Assembler.h: + (JSC::X86Assembler::cmpw_im): + (JSC::X86Assembler::testw_rr): + (JSC::X86Assembler::X86InstructionFormatter::immediate16): + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::~RegExp): + (JSC::RegExp::create): + (JSC::RegExp::compile): + (JSC::RegExp::match): + * runtime/RegExp.h: + * wtf/Platform.h: + * yarr: Added. + * yarr/RegexCompiler.cpp: Added. + (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor): + (JSC::Yarr::CharacterClassConstructor::reset): + (JSC::Yarr::CharacterClassConstructor::append): + (JSC::Yarr::CharacterClassConstructor::putChar): + (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper): + (JSC::Yarr::CharacterClassConstructor::isUnicodeLower): + (JSC::Yarr::CharacterClassConstructor::putRange): + (JSC::Yarr::CharacterClassConstructor::charClass): + (JSC::Yarr::CharacterClassConstructor::addSorted): + (JSC::Yarr::CharacterClassConstructor::addSortedRange): + (JSC::Yarr::newlineCreate): + (JSC::Yarr::digitsCreate): + (JSC::Yarr::spacesCreate): + (JSC::Yarr::wordcharCreate): + (JSC::Yarr::nondigitsCreate): + (JSC::Yarr::nonspacesCreate): + (JSC::Yarr::nonwordcharCreate): + (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor): + (JSC::Yarr::RegexPatternConstructor::~RegexPatternConstructor): + (JSC::Yarr::RegexPatternConstructor::reset): + (JSC::Yarr::RegexPatternConstructor::assertionBOL): + (JSC::Yarr::RegexPatternConstructor::assertionEOL): + (JSC::Yarr::RegexPatternConstructor::assertionWordBoundary): + (JSC::Yarr::RegexPatternConstructor::atomPatternCharacter): + (JSC::Yarr::RegexPatternConstructor::atomBuiltInCharacterClass): + (JSC::Yarr::RegexPatternConstructor::atomCharacterClassBegin): + (JSC::Yarr::RegexPatternConstructor::atomCharacterClassAtom): + (JSC::Yarr::RegexPatternConstructor::atomCharacterClassRange): + (JSC::Yarr::RegexPatternConstructor::atomCharacterClassBuiltIn): + (JSC::Yarr::RegexPatternConstructor::atomCharacterClassEnd): + (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin): + (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin): + (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::copyDisjunction): + (JSC::Yarr::RegexPatternConstructor::copyTerm): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + (JSC::Yarr::RegexPatternConstructor::disjunction): + (JSC::Yarr::RegexPatternConstructor::regexBegin): + (JSC::Yarr::RegexPatternConstructor::regexEnd): + (JSC::Yarr::RegexPatternConstructor::regexError): + (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): + (JSC::Yarr::RegexPatternConstructor::setupDisjunctionOffsets): + (JSC::Yarr::RegexPatternConstructor::setupOffsets): + (JSC::Yarr::compileRegex): + * yarr/RegexCompiler.h: Added. + * yarr/RegexInterpreter.cpp: Added. + (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext): + (JSC::Yarr::Interpreter::DisjunctionContext::operator new): + (JSC::Yarr::Interpreter::allocDisjunctionContext): + (JSC::Yarr::Interpreter::freeDisjunctionContext): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext): + (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::InputStream::InputStream): + (JSC::Yarr::Interpreter::InputStream::next): + (JSC::Yarr::Interpreter::InputStream::rewind): + (JSC::Yarr::Interpreter::InputStream::read): + (JSC::Yarr::Interpreter::InputStream::readChecked): + (JSC::Yarr::Interpreter::InputStream::reread): + (JSC::Yarr::Interpreter::InputStream::prev): + (JSC::Yarr::Interpreter::InputStream::getPos): + (JSC::Yarr::Interpreter::InputStream::setPos): + (JSC::Yarr::Interpreter::InputStream::atStart): + (JSC::Yarr::Interpreter::InputStream::atEnd): + (JSC::Yarr::Interpreter::InputStream::checkInput): + (JSC::Yarr::Interpreter::InputStream::uncheckInput): + (JSC::Yarr::Interpreter::testCharacterClass): + (JSC::Yarr::Interpreter::tryConsumeCharacter): + (JSC::Yarr::Interpreter::checkCharacter): + (JSC::Yarr::Interpreter::tryConsumeCharacterClass): + (JSC::Yarr::Interpreter::checkCharacterClass): + (JSC::Yarr::Interpreter::tryConsumeBackReference): + (JSC::Yarr::Interpreter::matchAssertionBOL): + (JSC::Yarr::Interpreter::matchAssertionEOL): + (JSC::Yarr::Interpreter::matchAssertionWordBoundary): + (JSC::Yarr::Interpreter::matchPatternCharacter): + (JSC::Yarr::Interpreter::backtrackPatternCharacter): + (JSC::Yarr::Interpreter::matchCharacterClass): + (JSC::Yarr::Interpreter::backtrackCharacterClass): + (JSC::Yarr::Interpreter::matchBackReference): + (JSC::Yarr::Interpreter::backtrackBackReference): + (JSC::Yarr::Interpreter::recordParenthesesMatch): + (JSC::Yarr::Interpreter::resetMatches): + (JSC::Yarr::Interpreter::resetAssertionMatches): + (JSC::Yarr::Interpreter::parenthesesDoBacktrack): + (JSC::Yarr::Interpreter::matchParenthesesOnceBegin): + (JSC::Yarr::Interpreter::matchParenthesesOnceEnd): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): + (JSC::Yarr::Interpreter::matchParentheticalAssertionOnceBegin): + (JSC::Yarr::Interpreter::matchParentheticalAssertionOnceEnd): + (JSC::Yarr::Interpreter::backtrackParentheticalAssertionOnceBegin): + (JSC::Yarr::Interpreter::backtrackParentheticalAssertionOnceEnd): + (JSC::Yarr::Interpreter::matchParentheses): + (JSC::Yarr::Interpreter::backtrackParentheses): + (JSC::Yarr::Interpreter::matchTerm): + (JSC::Yarr::Interpreter::backtrackTerm): + (JSC::Yarr::Interpreter::matchAlternative): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::Interpreter::matchNonZeroDisjunction): + (JSC::Yarr::Interpreter::interpret): + (JSC::Yarr::Interpreter::Interpreter): + (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry): + (JSC::Yarr::ByteCompiler::ByteCompiler): + (JSC::Yarr::ByteCompiler::compile): + (JSC::Yarr::ByteCompiler::checkInput): + (JSC::Yarr::ByteCompiler::assertionBOL): + (JSC::Yarr::ByteCompiler::assertionEOL): + (JSC::Yarr::ByteCompiler::assertionWordBoundary): + (JSC::Yarr::ByteCompiler::atomPatternCharacter): + (JSC::Yarr::ByteCompiler::atomCharacterClass): + (JSC::Yarr::ByteCompiler::atomBackReference): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): + (JSC::Yarr::ByteCompiler::popParenthesesStack): + (JSC::Yarr::ByteCompiler::dumpDisjunction): + (JSC::Yarr::ByteCompiler::closeAlternative): + (JSC::Yarr::ByteCompiler::atomParenthesesEnd): + (JSC::Yarr::ByteCompiler::regexBegin): + (JSC::Yarr::ByteCompiler::regexEnd): + (JSC::Yarr::ByteCompiler::alterantiveDisjunction): + (JSC::Yarr::ByteCompiler::emitDisjunction): + (JSC::Yarr::byteCompileRegex): + (JSC::Yarr::interpretRegex): + * yarr/RegexInterpreter.h: Added. + (JSC::Yarr::ByteTerm::): + (JSC::Yarr::ByteTerm::ByteTerm): + (JSC::Yarr::ByteTerm::BOL): + (JSC::Yarr::ByteTerm::CheckInput): + (JSC::Yarr::ByteTerm::EOL): + (JSC::Yarr::ByteTerm::WordBoundary): + (JSC::Yarr::ByteTerm::BackReference): + (JSC::Yarr::ByteTerm::AlternativeBegin): + (JSC::Yarr::ByteTerm::AlternativeDisjunction): + (JSC::Yarr::ByteTerm::AlternativeEnd): + (JSC::Yarr::ByteTerm::PatternEnd): + (JSC::Yarr::ByteTerm::invert): + (JSC::Yarr::ByteTerm::capture): + (JSC::Yarr::ByteDisjunction::ByteDisjunction): + (JSC::Yarr::BytecodePattern::BytecodePattern): + (JSC::Yarr::BytecodePattern::~BytecodePattern): + * yarr/RegexJIT.cpp: Added. + (JSC::Yarr::RegexGenerator::optimizeAlternative): + (JSC::Yarr::RegexGenerator::matchCharacterClassRange): + (JSC::Yarr::RegexGenerator::matchCharacterClass): + (JSC::Yarr::RegexGenerator::jumpIfNoAvailableInput): + (JSC::Yarr::RegexGenerator::jumpIfAvailableInput): + (JSC::Yarr::RegexGenerator::checkInput): + (JSC::Yarr::RegexGenerator::atEndOfInput): + (JSC::Yarr::RegexGenerator::notAtEndOfInput): + (JSC::Yarr::RegexGenerator::jumpIfCharEquals): + (JSC::Yarr::RegexGenerator::jumpIfCharNotEquals): + (JSC::Yarr::RegexGenerator::readCharacter): + (JSC::Yarr::RegexGenerator::storeToFrame): + (JSC::Yarr::RegexGenerator::loadFromFrame): + (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState): + (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative): + (JSC::Yarr::RegexGenerator::TermGenerationState::alternativeValid): + (JSC::Yarr::RegexGenerator::TermGenerationState::nextAlternative): + (JSC::Yarr::RegexGenerator::TermGenerationState::alternative): + (JSC::Yarr::RegexGenerator::TermGenerationState::resetTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::termValid): + (JSC::Yarr::RegexGenerator::TermGenerationState::nextTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::term): + (JSC::Yarr::RegexGenerator::TermGenerationState::lookaheadTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::inputOffset): + (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack): + (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackGenerated): + (JSC::Yarr::RegexGenerator::jumpToBacktrackCheckEmitPending): + (JSC::Yarr::RegexGenerator::genertateAssertionBOL): + (JSC::Yarr::RegexGenerator::genertateAssertionEOL): + (JSC::Yarr::RegexGenerator::matchAssertionWordchar): + (JSC::Yarr::RegexGenerator::genertateAssertionWordBoundary): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterSingle): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterPair): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterFixed): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterGreedy): + (JSC::Yarr::RegexGenerator::genertatePatternCharacterNonGreedy): + (JSC::Yarr::RegexGenerator::genertateCharacterClassSingle): + (JSC::Yarr::RegexGenerator::genertateCharacterClassFixed): + (JSC::Yarr::RegexGenerator::genertateCharacterClassGreedy): + (JSC::Yarr::RegexGenerator::genertateCharacterClassNonGreedy): + (JSC::Yarr::RegexGenerator::generateParenthesesSingleDisjunctionOneAlternative): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::generateDisjunction): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::RegexGenerator::generate): + (JSC::Yarr::jitCompileRegex): + (JSC::Yarr::executeRegex): + * yarr/RegexJIT.h: Added. + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + * yarr/RegexParser.h: Added. + (JSC::Yarr::): + (JSC::Yarr::Parser::): + (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate): + (JSC::Yarr::Parser::CharacterClassParserDelegate::begin): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacterUnescaped): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass): + (JSC::Yarr::Parser::CharacterClassParserDelegate::end): + (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference): + (JSC::Yarr::Parser::CharacterClassParserDelegate::flush): + (JSC::Yarr::Parser::CharacterClassParserDelegate::): + (JSC::Yarr::Parser::Parser): + (JSC::Yarr::Parser::parseEscape): + (JSC::Yarr::Parser::parseAtomEscape): + (JSC::Yarr::Parser::parseCharacterClassEscape): + (JSC::Yarr::Parser::parseCharacterClass): + (JSC::Yarr::Parser::parseParenthesesBegin): + (JSC::Yarr::Parser::parseParenthesesEnd): + (JSC::Yarr::Parser::parseQuantifier): + (JSC::Yarr::Parser::parseTokens): + (JSC::Yarr::Parser::parse): + (JSC::Yarr::Parser::saveState): + (JSC::Yarr::Parser::restoreState): + (JSC::Yarr::Parser::atEndOfPattern): + (JSC::Yarr::Parser::peek): + (JSC::Yarr::Parser::peekIsDigit): + (JSC::Yarr::Parser::peekDigit): + (JSC::Yarr::Parser::consume): + (JSC::Yarr::Parser::consumeDigit): + (JSC::Yarr::Parser::consumeNumber): + (JSC::Yarr::Parser::consumeOctal): + (JSC::Yarr::Parser::tryConsume): + (JSC::Yarr::Parser::tryConsumeHex): + (JSC::Yarr::parse): + * yarr/RegexPattern.h: Added. + (JSC::Yarr::CharacterRange::CharacterRange): + (JSC::Yarr::): + (JSC::Yarr::PatternTerm::): + (JSC::Yarr::PatternTerm::PatternTerm): + (JSC::Yarr::PatternTerm::BOL): + (JSC::Yarr::PatternTerm::EOL): + (JSC::Yarr::PatternTerm::WordBoundary): + (JSC::Yarr::PatternTerm::invert): + (JSC::Yarr::PatternTerm::capture): + (JSC::Yarr::PatternTerm::quantify): + (JSC::Yarr::PatternAlternative::PatternAlternative): + (JSC::Yarr::PatternAlternative::lastTerm): + (JSC::Yarr::PatternAlternative::removeLastTerm): + (JSC::Yarr::PatternDisjunction::PatternDisjunction): + (JSC::Yarr::PatternDisjunction::~PatternDisjunction): + (JSC::Yarr::PatternDisjunction::addNewAlternative): + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::~RegexPattern): + (JSC::Yarr::RegexPattern::reset): + (JSC::Yarr::RegexPattern::containsIllegalBackReference): + (JSC::Yarr::RegexPattern::newlineCharacterClass): + (JSC::Yarr::RegexPattern::digitsCharacterClass): + (JSC::Yarr::RegexPattern::spacesCharacterClass): + (JSC::Yarr::RegexPattern::wordcharCharacterClass): + (JSC::Yarr::RegexPattern::nondigitsCharacterClass): + (JSC::Yarr::RegexPattern::nonspacesCharacterClass): + (JSC::Yarr::RegexPattern::nonwordcharCharacterClass): + +2009-04-13 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Missed code from last patch). + + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::displayName): + (JSC::InternalFunction::calculatedDisplayName): + * runtime/InternalFunction.h: + +2009-04-13 Francisco Tolmasky <francisco@280north.com> + + Reviewed by Oliver Hunt. + + BUG 25171: It should be possible to manually set the name of an anonymous function + <https://bugs.webkit.org/show_bug.cgi?id=25171> + + This change adds the displayName property to functions, which when set overrides the + normal name when appearing in the console. + + * profiler/Profiler.cpp: + (JSC::createCallIdentifierFromFunctionImp): Changed call to InternalFunction::name to InternalFunction::calculatedDisplayName + * runtime/CommonIdentifiers.h: Added displayName common identifier. + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::displayName): Access to user settable displayName property + (JSC::InternalFunction::calculatedDisplayName): Returns displayName if it exists, if not then the natural name + +2009-04-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Disabled another JavaScriptCore test because it fails on Windows but + not Mac, so it makes the bots red. + + * tests/mozilla/expected.html: + +2009-04-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Disabled two JavaScriptCore tests because they fail on Window or Mac but + not both, so they make the bots red. + + * tests/mozilla/expected.html: Updated expected results. + +2009-04-09 Ben Murdoch <benm@google.com> + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=25091 + The Android platform requires threads to be registered with the VM. + This patch implements this behaviour inside ThreadingPthreads.cpp. + + * wtf/ThreadingPthreads.cpp: Add a level above threadEntryPoint that takes care of (un)registering threads with the VM. + (WTF::runThreadWithRegistration): register the thread and run entryPoint. Unregister the thread afterwards. + (WTF::createThreadInternal): call runThreadWithRegistration instead of entryPoint directly. + +2009-04-09 David Kilzer <ddkilzer@apple.com> + + Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings + + Rolled r42345 back in. The build failure was caused by an + internal script which had not been updated the same way that + build-webkit was updated. + + * Configurations/JavaScriptCore.xcconfig: + +2009-04-09 Alexey Proskuryakov <ap@webkit.org> + + Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings. + It broke Mac build, and I don't know how to fix it. + + * Configurations/JavaScriptCore.xcconfig: + +2009-04-09 Xan Lopez <xlopez@igalia.com> + + Unreviewed build fix. + + Checking for __GLIBCXX__ being bigger than some date is not enough + to get std::tr1, C++0x has to be in use too. Add another check for + __GXX_EXPERIMENTAL_CXX0X__. + + * wtf/TypeTraits.h: + +2009-04-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Adam Roben. + + Fix assertion failure in function.apply + + The result of excess arguments to function.apply is irrelevant + so we don't need to provide a result register. We were providing + temporary result register but not ref'ing it resulting in an + assertion failure. + + * parser/Nodes.cpp: + (JSC::ApplyFunctionCallDotNode::emitBytecode): + +2009-04-08 David Kilzer <ddkilzer@apple.com> + + <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings + + Reviewed by Darin Adler and Maciej Stachowiak. + + Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so + that SVG DOM Objective-C bindings may be optionally disabled. + + * Configurations/JavaScriptCore.xcconfig: Added + ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in + FEATURE_DEFINES. + +2009-04-08 Paul Pedriana <ppedriana@ea.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=20422 + Allow custom memory allocation control. + + * wtf/FastAllocBase.h: + New added file. Implements allocation base class. + * wtf/TypeTraits.h: + Augments existing type traits support as needed by FastAllocBase. + * wtf/FastMalloc.h: + Changed to support FastMalloc match validation. + * wtf/FastMalloc.cpp: + Changed to support FastMalloc match validation. + * wtf/Platform.h: + Added ENABLE_FAST_MALLOC_MATCH_VALIDATION; defaults to 0. + * GNUmakefile.am: + Updated to include added FastAllocBase.h. + * JavaScriptCore.xcodeproj/project.pbxproj: + Updated to include added FastAllocBase.h. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + Updated to include added FastAllocBase.h. + +2009-04-07 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Improve function.apply performance + + Jump through a few hoops to improve performance of function.apply in the general case. + + In the case of zero or one arguments, or if there are only two arguments and the + second is an array literal we treat function.apply as function.call. + + Otherwise we use the new opcodes op_load_varargs and op_call_varargs to do the .apply call + without re-entering the virtual machine. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): + (JSC::BytecodeGenerator::emitLoadVarargs): + (JSC::BytecodeGenerator::emitCallVarargs): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallSetupArgs): + (JSC::JIT::compileOpCallVarargsSetupArgs): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_load_varargs): + * jit/JITStubs.h: + * parser/Grammar.y: + * parser/Nodes.cpp: + (JSC::ArrayNode::isSimpleArray): + (JSC::ArrayNode::toArgumentList): + (JSC::CallFunctionCallDotNode::emitBytecode): + (JSC::ApplyFunctionCallDotNode::emitBytecode): + * parser/Nodes.h: + (JSC::ExpressionNode::): + (JSC::ApplyFunctionCallDotNode::): + * runtime/Arguments.cpp: + (JSC::Arguments::copyToRegisters): + (JSC::Arguments::fillArgList): + * runtime/Arguments.h: + (JSC::Arguments::numProvidedArguments): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::addFunctionProperties): + * runtime/FunctionPrototype.h: + * runtime/JSArray.cpp: + (JSC::JSArray::copyToRegisters): + * runtime/JSArray.h: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::mark): + * runtime/JSGlobalObject.h: + +2009-04-08 Alexey Proskuryakov <ap@webkit.org> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=25073 + JavaScriptCore tests don't run if time zone is not PST + + * API/tests/testapi.c: + (timeZoneIsPST): Added a function that checks whether the time zone is PST, using the same + method as functions in DateMath.cpp do for formatting the result. + (main): Skip date string format test if the time zone is not PST. + +2009-04-07 David Levin <levin@chromium.org> + + Reviewed by Sam Weinig and Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=25039 + UString refactoring to support UChar* sharing. + + No change in sunspider perf. + + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::SmallStringsStorage): + * runtime/UString.cpp: + (JSC::initializeStaticBaseString): + (JSC::initializeUString): + (JSC::UString::BaseString::isShared): + Encapsulate the meaning behind the refcount == 1 checks because + this needs to do slightly more when sharing is added. + (JSC::concatenate): + (JSC::UString::append): + (JSC::UString::operator=): + * runtime/UString.h: + Make m_baseString part of a union to get rid of casts, but make it protected because + it is tricky to use it correctly since it is only valid when the Rep is not a BaseString. + The void* will be filled in when sharing is added. + + Add constructors due to the making members protected and it make ensuring proper + initialization work better (like in SmallStringsStorage). + (JSC::UString::Rep::create): + (JSC::UString::Rep::Rep): + (JSC::UString::Rep::): + (JSC::UString::BaseString::BaseString): + (JSC::UString::Rep::setBaseString): + (JSC::UString::Rep::baseString): + +2009-04-04 Xan Lopez <xlopez@igalia.com> + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=25033 + dtoa.cpp segfaults with g++ 4.4.0 + + g++ 4.4.0 seems to be more strict about aliasing rules, so it + produces incorrect code if dtoa.cpp is compiled with + -fstrict-aliasing (it also emits a ton of warnings, so fair enough + I guess). The problem was that we were only casting variables to + union types in order to do type punning, but GCC and the C + standard require that we actually use a union to store the value. + + This patch does just that, the code is mostly copied from the dtoa + version in GCC: + http://gcc.gnu.org/viewcvs/trunk/libjava/classpath/native/fdlibm/dtoa.c?view=markup. + + * wtf/dtoa.cpp: + (WTF::ulp): + (WTF::b2d): + (WTF::ratio): + (WTF::hexnan): + (WTF::strtod): + (WTF::dtoa): + +2009-04-04 Kevin Ollivier <kevino@theolliviers.com> + + wx build fix for Win port. Build the assembler sources to get missing functions. + + * JavaScriptCoreSources.bkl: + * jscore.bkl: + * wtf/Platform.h: + +2009-04-02 Darin Adler <darin@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/6744471> crash in GC due to uninitialized callFunction pointer + + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Initialize + callFunction as we do the other data members that are used in the mark function. + +2009-04-02 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Simon Hausmann + + https://bugs.webkit.org/show_bug.cgi?id=24490 + + Implement WTF::ThreadSpecific in the Qt build using + QThreadStorage. + + * wtf/ThreadSpecific.h: + +2009-04-01 Greg Bolsinga <bolsinga@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=24990 + Put SECTORDER_FLAGS into xcconfig files. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-03-27 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + Fix non-AllInOneFile builds. + + * bytecompiler/BytecodeGenerator.cpp: + +2009-03-27 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Improve performance of Function.prototype.call + <https://bugs.webkit.org/show_bug.cgi?id=24907> + + Optimistically assume that expression.call(..) is going to be a call to + Function.prototype.call, and handle it specially to attempt to reduce the + degree of VM reentrancy. + + When everything goes right this removes the vm reentry improving .call() + by around a factor of 10. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * parser/Grammar.y: + * parser/Nodes.cpp: + (JSC::CallFunctionCallDotNode::emitBytecode): + * parser/Nodes.h: + (JSC::CallFunctionCallDotNode::): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::addFunctionProperties): + * runtime/FunctionPrototype.h: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::mark): + * runtime/JSGlobalObject.h: + +2009-03-27 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Darin Adler. + + Bug 24884: Include strings.h for strcasecmp() + https://bugs.webkit.org/show_bug.cgi?id=24884 + + * runtime/DateMath.cpp: Reversed previous change including strings.h + * wtf/StringExtras.h: Include strings.h here is available + 2009-03-26 Adam Roben <aroben@apple.com> Copy testapi.js to $WebKitOutputDir on Windows |