Changeset 190063 in webkit


Ignore:
Timestamp:
Sep 21, 2015 11:59:34 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

New tests introduced in r188545 fail on 32 bit ARM
https://bugs.webkit.org/show_bug.cgi?id=148376

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-09-19
Reviewed by Saam Barati.

Added correct support of the ARM CPU in JIT functions that are related to arrow function.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunction):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::callOperation):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emitNewFuncExprCommon):

Location:
trunk/Source/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r190062 r190063  
     12015-09-19 Aleksandr Skachkov   <gskachkov@gmail.com>
     2
     3        New tests introduced in r188545 fail on 32 bit ARM
     4        https://bugs.webkit.org/show_bug.cgi?id=148376
     5
     6        Reviewed by Saam Barati.
     7
     8        Added correct support of the ARM CPU in JIT functions that are related to arrow function.
     9
     10
     11        * dfg/DFGSpeculativeJIT.cpp:
     12        (JSC::DFG::SpeculativeJIT::compileNewFunction):
     13        * dfg/DFGSpeculativeJIT.h:
     14        (JSC::DFG::SpeculativeJIT::callOperation):
     15        * jit/JIT.h:
     16        * jit/JITInlines.h:
     17        (JSC::JIT::callOperation):
     18        * jit/JITOpcodes.cpp:
     19        (JSC::JIT::emitNewFuncExprCommon):
     20
    1212015-09-21  Sukolsak Sakshuwong  <sukolsak@gmail.com>
    222
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    • Property svn:executable set to *
    r189586 r190063  
    46394639   
    46404640    SpeculateCellOperand scope(this, node->child1());
     4641#if USE(JSVALUE64)
    46414642    GPRReg thisValueGPR;
     4643#else
     4644    GPRReg thisValuePayloadGPR;
     4645    GPRReg thisValueTagGPR;
     4646#endif
    46424647    GPRReg scopeGPR = scope.gpr();
    46434648
     
    46454650
    46464651    if (nodeType == NewArrowFunction) {
     4652#if USE(JSVALUE64)
    46474653        SpeculateCellOperand thisValue(this, node->child2());
    46484654        thisValueGPR = thisValue.gpr();
     4655#else
     4656        JSValueOperand thisValue(this, node->child2(), ManualOperandSpeculation);
     4657        thisValuePayloadGPR = thisValue.payloadGPR();
     4658        thisValueTagGPR = thisValue.tagGPR();
     4659       
     4660        DFG_TYPE_CHECK(thisValue.jsValueRegs(), node->child2(), SpecCell, m_jit.branchIfNotCell(thisValue.jsValueRegs()));
     4661#endif
    46494662    }
    46504663
     
    46564669       
    46574670        if (nodeType == NewArrowFunction)
     4671#if USE(JSVALUE64)
    46584672            callOperation(operationNewArrowFunction, resultGPR, scopeGPR, executable, thisValueGPR);
     4673#else
     4674            callOperation(operationNewArrowFunction, resultGPR, scopeGPR, executable, thisValueTagGPR, thisValuePayloadGPR);
     4675#endif
    46594676        else
    46604677            callOperation(operationNewFunction, resultGPR, scopeGPR, executable);
     
    46864703    if (nodeType == NewArrowFunction) {
    46874704        compileNewFunctionCommon<JSArrowFunction>(resultGPR, structure, scratch1GPR, scratch2GPR, scopeGPR, slowPath, JSArrowFunction::allocationSize(0), executable, JSArrowFunction::offsetOfScopeChain(), JSArrowFunction::offsetOfExecutable(), JSArrowFunction::offsetOfRareData());
    4688        
     4705#if USE(JSVALUE64)
    46894706        m_jit.storePtr(thisValueGPR, JITCompiler::Address(resultGPR, JSArrowFunction::offsetOfThisValue()));
    4690        
    46914707        addSlowPathGenerator(slowPathCall(slowPath, this, operationNewArrowFunctionWithInvalidatedReallocationWatchpoint, resultGPR, scopeGPR, executable, thisValueGPR));
     4708#else
     4709        m_jit.store32(thisValueTagGPR, MacroAssembler::Address(resultGPR, JSArrowFunction::offsetOfThisValue() + TagOffset));
     4710        m_jit.store32(thisValuePayloadGPR, MacroAssembler::Address(resultGPR, JSArrowFunction::offsetOfThisValue() + PayloadOffset));
     4711       
     4712        addSlowPathGenerator(slowPathCall(slowPath, this, operationNewArrowFunctionWithInvalidatedReallocationWatchpoint, resultGPR, scopeGPR, executable, thisValueTagGPR, thisValuePayloadGPR));
     4713#endif
    46924714    }
    46934715
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    • Property svn:executable set to *
    r189995 r190063  
    16321632        return appendCallSetResult(operation, resultPayload, resultTag);
    16331633    }
    1634     JITCompiler::Call callOperation(J_JITOperation_EJscCJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, JSCell* cell, GPRReg arg2)
    1635     {
    1636         m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(cell), arg2);
    1637         return appendCallSetResult(operation, resultPayload, resultTag);
     1634    JITCompiler::Call callOperation(J_JITOperation_EJscCJ operation, GPRReg result, GPRReg arg1, JSCell* cell, GPRReg arg2Tag, GPRReg arg2Payload)
     1635    {
     1636        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(cell), EABI_32BIT_DUMMY_ARG arg2Payload, arg2Tag);
     1637        return appendCallSetResult(operation, result);
    16381638    }
    16391639    JITCompiler::Call callOperation(J_JITOperation_ESsiCI operation, GPRReg resultTag, GPRReg resultPayload, StructureStubInfo* stubInfo, GPRReg arg1, const UniquedStringImpl* uid)
  • trunk/Source/JavaScriptCore/jit/JIT.h

    • Property svn:executable set to *
    r189920 r190063  
    823823        MacroAssembler::Call callOperation(V_JITOperation_EJZJ, RegisterID, RegisterID, int32_t, RegisterID, RegisterID);
    824824        MacroAssembler::Call callOperation(V_JITOperation_EZJ, int32_t, RegisterID, RegisterID);
     825        MacroAssembler::Call callOperation(J_JITOperation_EJscCJ, int, GPRReg, JSCell*, GPRReg, GPRReg);
    825826#endif
    826827
  • trunk/Source/JavaScriptCore/jit/JITInlines.h

    • Property svn:executable set to *
    r189920 r190063  
    747747    return appendCallWithExceptionCheck(operation);
    748748}
     749   
     750ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EJscCJ operation, int dst, GPRReg arg1, JSCell* cell, GPRReg arg2Tag, GPRReg arg2Payload)
     751{
     752    setupArgumentsWithExecState(arg1, TrustedImmPtr(cell), EABI_32BIT_DUMMY_ARG arg2Payload, arg2Tag);
     753    return appendCallWithExceptionCheckSetJSValueResult(operation, dst);
     754}
    749755
    750756#undef EABI_32BIT_DUMMY_ARG
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    • Property svn:executable set to *
    r189995 r190063  
    996996#else
    997997    emitLoadPayload(currentInstruction[2].u.operand, regT0);
    998     if (isArrowFunction)
    999         emitLoadPayload(currentInstruction[4].u.operand, regT1);
     998    if (isArrowFunction) {
     999        int value = currentInstruction[4].u.operand;
     1000        emitLoad(value, regT3, regT2);
     1001    }
    10001002    notUndefinedScope = branch32(NotEqual, tagFor(currentInstruction[2].u.operand), TrustedImm32(JSValue::UndefinedTag));
    10011003    emitStore(dst, jsUndefined());
     
    10061008    FunctionExecutable* function = m_codeBlock->functionExpr(currentInstruction[3].u.operand);
    10071009    if (isArrowFunction)
     1010#if USE(JSVALUE64)
    10081011        callOperation(operationNewArrowFunction, dst, regT0, function, regT1);
     1012#else
     1013        callOperation(operationNewArrowFunction, dst, regT0, function, regT3, regT2);
     1014#endif
    10091015    else
    10101016        callOperation(operationNewFunction, dst, regT0, function);
Note: See TracChangeset for help on using the changeset viewer.