2010-05-29  Geoffrey Garen  <ggaren@apple.com>

        Windows build fix: Updated exported symbols.
        
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

2010-05-29  Geoffrey Garen  <ggaren@apple.com>

        Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
        can figure out why it's crashing.

        * wtf/Platform.h:

2010-05-29  Geoffrey Garen  <ggaren@apple.com>

        Fixed Windows crash seen on buildbot.

        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
        argument in ecx.

2010-05-28  Geoffrey Garen  <ggaren@apple.com>

        Windows build fix: Updated exported symbols.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

2010-05-28  Geoffrey Garen  <ggaren@apple.com>

        Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
        is disabled.

        * runtime/Lookup.cpp:
        (JSC::setUpStaticFunctionSlot):
        * runtime/Lookup.h:
        * wtf/Platform.h:

2010-05-28  Geoffrey Garen  <ggaren@apple.com>

        Windows build fix: Updated exported symbols.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

2010-05-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.

        Simplified the host calling convention.
        
        22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
        function calls.
        
        No change on SunSpider.
        
        All JS calls (but not constructs, yet) now go through the normal JS
        calling convention via the RegisterFile. As a result, the host calling
        convention, which used to be this

            JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
            
        is now this

            JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
            
        Callee, 'this', and argument access all hapen relative to the ExecState*,
        which is a pointer into the RegisterFile.
        
        This patch comes in two parts.
        
        PART ONE: Functional code changes.
        
        * wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
        We can re-enable once we verify that host calls on these platforms are
        correct.

        * debugger/DebuggerCallFrame.cpp:
        (JSC::DebuggerCallFrame::functionName):
        (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
        ExecState::callee().

        (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().

        * interpreter/CallFrame.cpp:
        * interpreter/CallFrame.h:
        (JSC::ExecState::callee):
        (JSC::ExecState::scopeChain):
        (JSC::ExecState::init): Changed callee() to be JSObject* instead of
        JSFunction* -- now, it might be some other callable host object.

        (JSC::ExecState::hostThisRegister):
        (JSC::ExecState::hostThisValue):
        (JSC::ExecState::argumentCount):
        (JSC::ExecState::argumentCountIncludingThis):
        (JSC::ExecState::argument):
        (JSC::ExecState::setArgumentCountIncludingThis):
        (JSC::ExecState::setCallee): Added convenient accessors for arguments
        from within a host function. Removed thisValue() because it was too
        tempting to use incorrectly, and it only had one or two clients, anyway.

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().

        (JSC::Interpreter::throwException): Be sure to shrink the register file
        before invoking the exception handler, to reduce the chances that the
        handler will re-throw in the case of stack overflow. (Re-throwing is now
        more likely than it used to be, since standardizing the calling convention
        implicitly added stack overflow checks to some places where they used to be missing.)

        (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
        Updated for CallFrame::init API change.

        (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
        Updated for CallFrame::init API change. Added support for calling a host
        function.

        (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
        Updated for CallFrame::init API change. 

        (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. 

        (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
        Added some explicit JSValue(JSObject*) initialization, since relaxing
        the JSFunction* restriction on callee has made register types more ambiguous.
        Removed toThisObject() conversion, since all callees do it themselves now.
        Updated host function call for new host function signature. Updated for
        change to ExecState::argumentCount() API.

        * interpreter/Register.h:
        (JSC::Register::):
        (JSC::Register::operator=):
        (JSC::Register::function): Changed callee() to be JSObject* instead of
        JSFunction* -- now, it might be some other callable host object.

        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTINativeCall):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
        set up the arguments to host functions -- all but one of the arguments
        are gone now. This is the actual optimization.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
        changes noted above. Removed toThisObject() conversion, since all callees
        do it themselves now.
        
        * runtime/ArgList.h:
        (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
        temporary shim for converting from ExecState* to ArgList where it's still
        necessary.

        * runtime/Arguments.h:
        (JSC::Arguments::getArgumentsData):
        (JSC::Arguments::Arguments): Updated for ExecState and Register API
        changes noted above. 

        * runtime/CallData.cpp:
        (JSC::call): Changed call always to call Interpreter::executeCall, even
        for host functions. This ensures that the normal calling convention is
        set up in the RegsiterFile when calling from C++ to host function.

        * runtime/CallData.h: Changed host function signature as described above.

        * runtime/ConstructData.cpp:
        (JSC::construct): Moved JSFunction::construct code here so I could nix
        JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
        way to call and construct, so that everything works naturally for non-
        JSFunction objects. 

        * runtime/JSFunction.cpp:
        (JSC::callHostFunctionAsConstructor):
        * runtime/JSFunction.h: Updated for ExecState and Register API changes
        noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
 
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::init): Ditto.

        PART TWO: Global search and replace.
        
        In the areas below, I used global search-and-replace to change
            (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
            args.size() => exec->argumentCount()
            args.at(i) => exec->argument(i)

        * API/JSCallbackFunction.cpp:
        (JSC::JSCallbackFunction::call):
        * API/JSCallbackFunction.h:
        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        (JSC::::call):
        * JavaScriptCore.exp:
        * jsc.cpp:
        (functionPrint):
        (functionDebug):
        (functionGC):
        (functionVersion):
        (functionRun):
        (functionLoad):
        (functionCheckSyntax):
        (functionSetSamplingFlags):
        (functionClearSamplingFlags):
        (functionReadline):
        (functionQuit):
        * runtime/ArrayConstructor.cpp:
        (JSC::callArrayConstructor):
        (JSC::arrayConstructorIsArray):
        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncToString):
        (JSC::arrayProtoFuncToLocaleString):
        (JSC::arrayProtoFuncJoin):
        (JSC::arrayProtoFuncConcat):
        (JSC::arrayProtoFuncPop):
        (JSC::arrayProtoFuncPush):
        (JSC::arrayProtoFuncReverse):
        (JSC::arrayProtoFuncShift):
        (JSC::arrayProtoFuncSlice):
        (JSC::arrayProtoFuncSort):
        (JSC::arrayProtoFuncSplice):
        (JSC::arrayProtoFuncUnShift):
        (JSC::arrayProtoFuncFilter):
        (JSC::arrayProtoFuncMap):
        (JSC::arrayProtoFuncEvery):
        (JSC::arrayProtoFuncForEach):
        (JSC::arrayProtoFuncSome):
        (JSC::arrayProtoFuncReduce):
        (JSC::arrayProtoFuncReduceRight):
        (JSC::arrayProtoFuncIndexOf):
        (JSC::arrayProtoFuncLastIndexOf):
        * runtime/BooleanConstructor.cpp:
        (JSC::callBooleanConstructor):
        * runtime/BooleanPrototype.cpp:
        (JSC::booleanProtoFuncToString):
        (JSC::booleanProtoFuncValueOf):
        * runtime/DateConstructor.cpp:
        (JSC::callDate):
        (JSC::dateParse):
        (JSC::dateNow):
        (JSC::dateUTC):
        * runtime/DatePrototype.cpp:
        (JSC::formatLocaleDate):
        (JSC::fillStructuresUsingTimeArgs):
        (JSC::fillStructuresUsingDateArgs):
        (JSC::dateProtoFuncToString):
        (JSC::dateProtoFuncToUTCString):
        (JSC::dateProtoFuncToISOString):
        (JSC::dateProtoFuncToDateString):
        (JSC::dateProtoFuncToTimeString):
        (JSC::dateProtoFuncToLocaleString):
        (JSC::dateProtoFuncToLocaleDateString):
        (JSC::dateProtoFuncToLocaleTimeString):
        (JSC::dateProtoFuncGetTime):
        (JSC::dateProtoFuncGetFullYear):
        (JSC::dateProtoFuncGetUTCFullYear):
        (JSC::dateProtoFuncToGMTString):
        (JSC::dateProtoFuncGetMonth):
        (JSC::dateProtoFuncGetUTCMonth):
        (JSC::dateProtoFuncGetDate):
        (JSC::dateProtoFuncGetUTCDate):
        (JSC::dateProtoFuncGetDay):
        (JSC::dateProtoFuncGetUTCDay):
        (JSC::dateProtoFuncGetHours):
        (JSC::dateProtoFuncGetUTCHours):
        (JSC::dateProtoFuncGetMinutes):
        (JSC::dateProtoFuncGetUTCMinutes):
        (JSC::dateProtoFuncGetSeconds):
        (JSC::dateProtoFuncGetUTCSeconds):
        (JSC::dateProtoFuncGetMilliSeconds):
        (JSC::dateProtoFuncGetUTCMilliseconds):
        (JSC::dateProtoFuncGetTimezoneOffset):
        (JSC::dateProtoFuncSetTime):
        (JSC::setNewValueFromTimeArgs):
        (JSC::setNewValueFromDateArgs):
        (JSC::dateProtoFuncSetMilliSeconds):
        (JSC::dateProtoFuncSetUTCMilliseconds):
        (JSC::dateProtoFuncSetSeconds):
        (JSC::dateProtoFuncSetUTCSeconds):
        (JSC::dateProtoFuncSetMinutes):
        (JSC::dateProtoFuncSetUTCMinutes):
        (JSC::dateProtoFuncSetHours):
        (JSC::dateProtoFuncSetUTCHours):
        (JSC::dateProtoFuncSetDate):
        (JSC::dateProtoFuncSetUTCDate):
        (JSC::dateProtoFuncSetMonth):
        (JSC::dateProtoFuncSetUTCMonth):
        (JSC::dateProtoFuncSetFullYear):
        (JSC::dateProtoFuncSetUTCFullYear):
        (JSC::dateProtoFuncSetYear):
        (JSC::dateProtoFuncGetYear):
        (JSC::dateProtoFuncToJSON):
        * runtime/ErrorConstructor.cpp:
        (JSC::callErrorConstructor):
        * runtime/ErrorPrototype.cpp:
        (JSC::errorProtoFuncToString):
        * runtime/FunctionConstructor.cpp:
        (JSC::callFunctionConstructor):
        * runtime/FunctionPrototype.cpp:
        (JSC::callFunctionPrototype):
        (JSC::functionProtoFuncToString):
        (JSC::functionProtoFuncApply):
        (JSC::functionProtoFuncCall):
        * runtime/JSGlobalObjectFunctions.cpp:
        (JSC::encode):
        (JSC::decode):
        (JSC::globalFuncEval):
        (JSC::globalFuncParseInt):
        (JSC::globalFuncParseFloat):
        (JSC::globalFuncIsNaN):
        (JSC::globalFuncIsFinite):
        (JSC::globalFuncDecodeURI):
        (JSC::globalFuncDecodeURIComponent):
        (JSC::globalFuncEncodeURI):
        (JSC::globalFuncEncodeURIComponent):
        (JSC::globalFuncEscape):
        (JSC::globalFuncUnescape):
        (JSC::globalFuncJSCPrint):
        * runtime/JSGlobalObjectFunctions.h:
        * runtime/JSONObject.cpp:
        (JSC::JSONProtoFuncParse):
        (JSC::JSONProtoFuncStringify):
        * runtime/JSString.h:
        * runtime/MathObject.cpp:
        (JSC::mathProtoFuncAbs):
        (JSC::mathProtoFuncACos):
        (JSC::mathProtoFuncASin):
        (JSC::mathProtoFuncATan):
        (JSC::mathProtoFuncATan2):
        (JSC::mathProtoFuncCeil):
        (JSC::mathProtoFuncCos):
        (JSC::mathProtoFuncExp):
        (JSC::mathProtoFuncFloor):
        (JSC::mathProtoFuncLog):
        (JSC::mathProtoFuncMax):
        (JSC::mathProtoFuncMin):
        (JSC::mathProtoFuncPow):
        (JSC::mathProtoFuncRandom):
        (JSC::mathProtoFuncRound):
        (JSC::mathProtoFuncSin):
        (JSC::mathProtoFuncSqrt):
        (JSC::mathProtoFuncTan):
        * runtime/NativeErrorConstructor.cpp:
        (JSC::callNativeErrorConstructor):
        * runtime/NumberConstructor.cpp:
        (JSC::callNumberConstructor):
        * runtime/NumberPrototype.cpp:
        (JSC::numberProtoFuncToString):
        (JSC::numberProtoFuncToLocaleString):
        (JSC::numberProtoFuncValueOf):
        (JSC::numberProtoFuncToFixed):
        (JSC::numberProtoFuncToExponential):
        (JSC::numberProtoFuncToPrecision):
        * runtime/ObjectConstructor.cpp:
        (JSC::callObjectConstructor):
        (JSC::objectConstructorGetPrototypeOf):
        (JSC::objectConstructorGetOwnPropertyDescriptor):
        (JSC::objectConstructorGetOwnPropertyNames):
        (JSC::objectConstructorKeys):
        (JSC::objectConstructorDefineProperty):
        (JSC::objectConstructorDefineProperties):
        (JSC::objectConstructorCreate):
        * runtime/ObjectPrototype.cpp:
        (JSC::objectProtoFuncValueOf):
        (JSC::objectProtoFuncHasOwnProperty):
        (JSC::objectProtoFuncIsPrototypeOf):
        (JSC::objectProtoFuncDefineGetter):
        (JSC::objectProtoFuncDefineSetter):
        (JSC::objectProtoFuncLookupGetter):
        (JSC::objectProtoFuncLookupSetter):
        (JSC::objectProtoFuncPropertyIsEnumerable):
        (JSC::objectProtoFuncToLocaleString):
        (JSC::objectProtoFuncToString):
        * runtime/ObjectPrototype.h:
        * runtime/Operations.h:
        (JSC::jsString):
        * runtime/RegExpConstructor.cpp:
        (JSC::callRegExpConstructor):
        * runtime/RegExpObject.cpp:
        (JSC::RegExpObject::test):
        (JSC::RegExpObject::exec):
        (JSC::callRegExpObject):
        (JSC::RegExpObject::match):
        * runtime/RegExpObject.h:
        * runtime/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncTest):
        (JSC::regExpProtoFuncExec):
        (JSC::regExpProtoFuncCompile):
        (JSC::regExpProtoFuncToString):
        * runtime/StringConstructor.cpp:
        (JSC::stringFromCharCodeSlowCase):
        (JSC::stringFromCharCode):
        (JSC::callStringConstructor):
        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncReplace):
        (JSC::stringProtoFuncToString):
        (JSC::stringProtoFuncCharAt):
        (JSC::stringProtoFuncCharCodeAt):
        (JSC::stringProtoFuncConcat):
        (JSC::stringProtoFuncIndexOf):
        (JSC::stringProtoFuncLastIndexOf):
        (JSC::stringProtoFuncMatch):
        (JSC::stringProtoFuncSearch):
        (JSC::stringProtoFuncSlice):
        (JSC::stringProtoFuncSplit):
        (JSC::stringProtoFuncSubstr):
        (JSC::stringProtoFuncSubstring):
        (JSC::stringProtoFuncToLowerCase):
        (JSC::stringProtoFuncToUpperCase):
        (JSC::stringProtoFuncLocaleCompare):
        (JSC::stringProtoFuncBig):
        (JSC::stringProtoFuncSmall):
        (JSC::stringProtoFuncBlink):
        (JSC::stringProtoFuncBold):
        (JSC::stringProtoFuncFixed):
        (JSC::stringProtoFuncItalics):
        (JSC::stringProtoFuncStrike):
        (JSC::stringProtoFuncSub):
        (JSC::stringProtoFuncSup):
        (JSC::stringProtoFuncFontcolor):
        (JSC::stringProtoFuncFontsize):
        (JSC::stringProtoFuncAnchor):
        (JSC::stringProtoFuncLink):
        (JSC::stringProtoFuncTrim):
        (JSC::stringProtoFuncTrimLeft):
        (JSC::stringProtoFuncTrimRight):

2010-05-28  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>

        Reviewed by Geoffrey Garen.

        Fix the JSObjectSetPrototype function.

        A cycle in a prototype chain can cause an application hang or
        even crash.
        A check for a prototype chain cycles was added to
        the JSObjectSetPrototype.

        JSObjectSetPrototype doesn't check for cycle in prototype chain.
        https://bugs.webkit.org/show_bug.cgi?id=39360

        * API/JSObjectRef.cpp:
        (JSObjectSetPrototype):
        * API/tests/testapi.c:
        (assertTrue):
        (checkForCycleInPrototypeChain):
        (main):
        * runtime/JSObject.cpp:
        (JSC::JSObject::put):
        * runtime/JSObject.h:
        (JSC::JSObject::setPrototypeWithCycleCheck):

2010-05-28  Chao-ying Fu  <fu@mips.com>

        Reviewed by Eric Seidel.

        Fix MIPS JIT DoubleGreaterThanOrEqual Operands
        https://bugs.webkit.org/show_bug.cgi?id=39504

        Swapped two operands of left and right for DoubleGreaterThanOrEqual.
        This patch fixed two layout tests as follows.
        fast/js/comparison-operators-greater.html
        fast/js/comparison-operators-less.html

        * assembler/MacroAssemblerMIPS.h:
        (JSC::MacroAssemblerMIPS::branchDouble):

2010-05-28  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Move jit compilation from linking thunks into cti_vm_lazyLink methods.

        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):

2010-05-28  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Sam Weinig.

        Bug 39898 - Move arity check into callee.
        
        We can reduce the size of the virtual call trampolines by moving the arity check
        into the callee functions.  As a following step we will be able to remove the
        check for native function / codeblocks by performing translation in a lazy stub.
        
        * interpreter/CallFrame.h:
        (JSC::ExecState::init):
        (JSC::ExecState::setReturnPC):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompile):
        (JSC::JIT::linkCall):
        (JSC::JIT::linkConstruct):
        * jit/JIT.h:
        (JSC::JIT::compile):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * runtime/Executable.cpp:
        (JSC::FunctionExecutable::generateJITCodeForCall):
        (JSC::FunctionExecutable::generateJITCodeForConstruct):
        (JSC::FunctionExecutable::reparseExceptionInfo):
        * runtime/Executable.h:
        (JSC::NativeExecutable::NativeExecutable):
        (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
        (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):

2010-05-27  Luiz Agostini  <luiz.agostini@openbossa.org>

        Reviewed by Darin Adler.

        UTF-16 code points compare() for String objects
        https://bugs.webkit.org/show_bug.cgi?id=39701

        Moving compare() implementation from UString to StringImpl for it to be shared
        with String. Adding overloaded free functions codePointCompare() in StringImpl
        and WTFString. Renaming function compare in UString to codePointCompare to be
        consistent.

        * runtime/JSArray.cpp:
        (JSC::compareByStringPairForQSort):
        * runtime/UString.cpp:
        * runtime/UString.h:
        (JSC::codePointCompare):
        * wtf/text/StringImpl.cpp:
        (WebCore::codePointCompare):
        * wtf/text/StringImpl.h:
        * wtf/text/WTFString.cpp:
        (WebCore::codePointCompare):
        * wtf/text/WTFString.h:

2010-05-26  Darin Adler  <darin@apple.com>

        Reviewed by Kent Tamura.

        Null characters handled incorrectly in ToNumber conversion
        https://bugs.webkit.org/show_bug.cgi?id=38088

        * runtime/JSGlobalObjectFunctions.cpp:
        (JSC::parseInt): Changed code to use UTF8String().data() instead of
        ascii() to fix the thread safety issue. Code path is covered by existing
        tests in run-javascriptcore-tests.
        (JSC::parseFloat): Moved comment to UString::toDouble since the issue
        affects all clients, not just parseFloat. Specifically, this also affects
        standard JavaScript numeric conversion, ToNumber.

        * runtime/UString.cpp:
        (JSC::UString::toDouble): Added a comment about incorrect space skipping.
        Changed trailing junk check to use the length of the CString instead of
        checking for a null character. Also got rid of a little unneeded logic
        in the case where we tolerate trailing junk.

2010-05-27  Nathan Lawrence  <nlawrence@apple.com>

        Reviewed by Geoffrey Garen.

        Search for the new allocation one word at a time.  Improves
        performance on SunSpider by approximately 1%.
        http://bugs.webkit.org/show_bug.cgi?id=39758

        * runtime/Collector.cpp:
        (JSC::Heap::allocate):
        * runtime/Collector.h:
        (JSC::CollectorBitmap::advanceToNextPossibleFreeCell):

2010-05-27  Kevin Ollivier  <kevino@theolliviers.com>

        [wx] Build fixes for Windows after recent changes.

        * wscript:

2010-05-27  Gustavo Noronha Silva  <gns@gnome.org>

        More build fixage for make dist.

        * GNUmakefile.am:

2010-05-27  Kwang Yul Seo  <skyul@company100.net>

        Reviewed by Darin Adler.

        RVCT does not have strnstr.
        https://bugs.webkit.org/show_bug.cgi?id=39719

        Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.

        * wtf/StringExtras.h:

2010-05-26  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
        (relanding r60267)

        If the last item in a main disjunction is a quantified set of parentheses,
        this is easier to code generate for than the general case for quantified
        parentheses. This is because we never need to backtrack into the parentheses
        - the first match will be the final and accepted match.

        This patch also somewhat reverts a recent change to when fallback to PCRE
        occurs. At the minute the compiler is tracking on patterns which will
        require JIT fallback. This is handy from a performance perspective (it saves
        the failed attempt at JIT compilation), but it means introducing knowledge
        of the JITs capabilities into the other layers of the regex compilers. For
        the specific feature of back-references, add a flag tracking their presence
        on the pattern, and make these expressions fallback without attempting to
        JIT. For parentheses, return to detecting which cases are have or have not
        been handled during JIT compilation.

        18% progression on tagcloud, ~1.5% overall on sunspidey.

        * yarr/RegexCompiler.cpp:
        (JSC::Yarr::RegexPatternConstructor::atomBackReference):
        (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
        * yarr/RegexJIT.cpp:
        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
        (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
        (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
        (JSC::Yarr::RegexGenerator::generateTerm):
        (JSC::Yarr::RegexGenerator::RegexGenerator):
        (JSC::Yarr::RegexGenerator::shouldFallBack):
        (JSC::Yarr::jitCompileRegex):
        * yarr/RegexPattern.h:
        (JSC::Yarr::RegexPattern::RegexPattern):
        (JSC::Yarr::RegexPattern::reset):

2010-05-26  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by NOBODY (revert).

        Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.

        * yarr/RegexCompiler.cpp:
        (JSC::Yarr::RegexPatternConstructor::atomBackReference):
        (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
        * yarr/RegexJIT.cpp:
        (JSC::Yarr::RegexGenerator::TermGenerationState::term):
        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
        (JSC::Yarr::RegexGenerator::generateTerm):
        (JSC::Yarr::RegexGenerator::RegexGenerator):
        (JSC::Yarr::jitCompileRegex):
        * yarr/RegexPattern.h:
        (JSC::Yarr::RegexPattern::RegexPattern):
        (JSC::Yarr::RegexPattern::reset):

2010-05-26  Gustavo Noronha Silva  <gns@gnome.org>

        Build fixes for make distcheck.

        * GNUmakefile.am:

2010-05-26  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.

        If the last item in a main disjunction is a quantified set of parentheses,
        this is easier to code generate for than the general case for quantified
        parentheses. This is because we never need to backtrack into the parentheses
        - the first match will be the final and accepted match.

        This patch also somewhat reverts a recent change to when fallback to PCRE
        occurs. At the minute the compiler is tracking on patterns which will
        require JIT fallback. This is handy from a performance perspective (it saves
        the failed attempt at JIT compilation), but it means introducing knowledge
        of the JITs capabilities into the other layers of the regex compilers. For
        the specific feature of back-references, add a flag tracking their presence
        on the pattern, and make these expressions fallback without attempting to
        JIT. For parentheses, return to detecting which cases are have or have not
        been handled during JIT compilation.

        18% progression on tagcloud, ~1.5% overall on sunspidey.

        * yarr/RegexCompiler.cpp:
        (JSC::Yarr::RegexPatternConstructor::atomBackReference):
        (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
        * yarr/RegexJIT.cpp:
        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
        (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
        (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
        (JSC::Yarr::RegexGenerator::generateTerm):
        (JSC::Yarr::RegexGenerator::RegexGenerator):
        (JSC::Yarr::RegexGenerator::shouldFallBack):
        (JSC::Yarr::jitCompileRegex):
        * yarr/RegexPattern.h:
        (JSC::Yarr::RegexPattern::RegexPattern):
        (JSC::Yarr::RegexPattern::reset):

2010-05-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Fixed a crash seen on the Leopard bot, caused by merge.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
        since it's no longer passed to us as an argument.

2010-05-25  Geoffrey Garen  <ggaren@apple.com>

        Fixed build failure caused by merge.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
        function no longer returns a pair.

2010-05-25  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        <rdar://problem/8020221>
        
        Fixed a crash seen on Windows when calling a function with too many
        arguments.
        
        SunSpider reports no change.
        
        No test because the ASSERT I added fires in existing tests.

        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
        many arguments have been provided, since the caller only allocated enough
        registerFile space for the arguments it provided, not enough for the extra
        copy of arguments we're going to need.

2010-05-25  Kwang Yul Seo  <skyul@company100.net>

        Reviewed by Darin Adler.

        Build fix for JSFunction
        https://bugs.webkit.org/show_bug.cgi?id=39658

        MSVC can't compile one of JSFunction constructors when JIT is disabled.
        "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined. 
        Add ENABLE(JIT) guard to the constructor.

        * runtime/JSFunction.cpp:
        (JSC::JSFunction::JSFunction):
        * runtime/JSFunction.h:

2010-05-24  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Sam Weinig.

        Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.

        Presently, as soon as op-call strays off the hot path we set up a set of values on
        the stack to be passed as arguments to cti functions, in case any should be called.

        Instead, hoist the setup of the callframe to happen slightly sooner, and make the
        cti functions to compile & check arity read these values from the callframe. This
        allows up to remove the deprecated methods to manually set up cti arguments, rather
        than using JITStubCall.h.

        * interpreter/CallFrame.h:
        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::compileOpCallVarargs):
        (JSC::JIT::compileOpCallVarargsSlowCase):
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITCall32_64.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::compileOpCallVarargs):
        (JSC::JIT::compileOpCallVarargsSlowCase):
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITInlineMethods.h:
        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        * jit/JITStubs.h:
        (JSC::):

2010-05-24  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Sam Weinig.
        Relanding r60075.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
        * bytecode/CodeBlock.h:
        * bytecode/Opcode.h:
        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::BytecodeGenerator):
        (JSC::BytecodeGenerator::emitConstruct):
        * bytecompiler/BytecodeGenerator.h:
        (JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::privateExecute):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        * jit/JIT.h:
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITCall32_64.cpp:
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITOpcodes.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        (JSC::JIT::privateCompileCTINativeCall):
        (JSC::JIT::emit_op_neq_null):
        (JSC::JIT::emit_op_convert_this):
        (JSC::JIT::emit_op_get_callee):
        (JSC::JIT::emit_op_create_this):
        * jit/JITOpcodes32_64.cpp:
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        (JSC::JIT::privateCompileCTINativeCall):
        (JSC::JIT::emit_op_get_callee):
        (JSC::JIT::emit_op_create_this):
        * jit/JITStubs.cpp:
        (JSC::DEFINE_STUB_FUNCTION):
        (JSC::JITThunks::hostFunctionStub):
        * jit/JITStubs.h:
        (JSC::JITThunks::ctiNativeConstruct):
        (JSC::):
        * runtime/ExceptionHelpers.cpp:
        (JSC::createNotAnObjectError):
        * runtime/Executable.h:
        (JSC::NativeExecutable::create):
        (JSC::NativeExecutable::NativeExecutable):
        * runtime/JSFunction.cpp:
        (JSC::callHostFunctionAsConstructor):
        * runtime/JSFunction.h:
        * wtf/Platform.h:

== Rolled over to ChangeLog-2010-05-24 ==
