Changeset 157411 in webkit


Ignore:
Timestamp:
Oct 14, 2013 11:39:45 AM (11 years ago)
Author:
fpizlo@apple.com
Message:

Baseline JIT should use the DFG's PutById IC
https://bugs.webkit.org/show_bug.cgi?id=122704

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

Mostly no big deal, just removing the old Baseline JIT's put_by_id IC support and forcing
that JIT to use the DFG's (i.e. JITOperations) PutById IC.

The only complicated part was that the PutById operations assumed that we first did a
cell speculation, which the baseline JIT obviously won't do. So I changed all of those
slow paths to deal with EncodedJSValue's.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::resetStubInternal):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFor):

  • dfg/DFGSpeculativeJIT.h:

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

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedPutById):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedPutById):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/JIT.cpp:

(JSC::PropertyStubCompilationInfo::copyToStubInfo):

  • jit/JIT.h:

(JSC::PropertyStubCompilationInfo::PropertyStubCompilationInfo):
(JSC::PropertyStubCompilationInfo::slowCaseInfo):

  • jit/JITInlines.h:

(JSC::JIT::callOperation):

  • jit/JITOperationWrappers.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):

  • jit/JITStubs.cpp:
  • jit/JITStubs.h:
  • jit/Repatch.cpp:

(JSC::appropriateGenericPutByIdFunction):
(JSC::appropriateListBuildingPutByIdFunction):
(JSC::resetPutByID):

LayoutTests:

Reviewed by Mark Hahnenberg.

  • js/regress/put-by-id-expected.txt: Added.
  • js/regress/put-by-id.html: Added.
  • js/regress/script-tests/put-by-id.js: Added.

(foo):
(bar):

Location:
trunk
Files:
3 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r157407 r157411  
     12013-10-14  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Baseline JIT should use the DFG's PutById IC
     4        https://bugs.webkit.org/show_bug.cgi?id=122704
     5
     6        Reviewed by Mark Hahnenberg.
     7
     8        * js/regress/put-by-id-expected.txt: Added.
     9        * js/regress/put-by-id.html: Added.
     10        * js/regress/script-tests/put-by-id.js: Added.
     11        (foo):
     12        (bar):
     13
    1142013-10-14  Mihnea Ovidenie  <mihnea@adobe.com>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r157409 r157411  
     12013-10-14  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Baseline JIT should use the DFG's PutById IC
     4        https://bugs.webkit.org/show_bug.cgi?id=122704
     5
     6        Reviewed by Mark Hahnenberg.
     7       
     8        Mostly no big deal, just removing the old Baseline JIT's put_by_id IC support and forcing
     9        that JIT to use the DFG's (i.e. JITOperations) PutById IC.
     10       
     11        The only complicated part was that the PutById operations assumed that we first did a
     12        cell speculation, which the baseline JIT obviously won't do. So I changed all of those
     13        slow paths to deal with EncodedJSValue's.
     14
     15        * bytecode/CodeBlock.cpp:
     16        (JSC::CodeBlock::resetStubInternal):
     17        * bytecode/PutByIdStatus.cpp:
     18        (JSC::PutByIdStatus::computeFor):
     19        * dfg/DFGSpeculativeJIT.h:
     20        (JSC::DFG::SpeculativeJIT::callOperation):
     21        * dfg/DFGSpeculativeJIT32_64.cpp:
     22        (JSC::DFG::SpeculativeJIT::cachedPutById):
     23        * dfg/DFGSpeculativeJIT64.cpp:
     24        (JSC::DFG::SpeculativeJIT::cachedPutById):
     25        * jit/CCallHelpers.h:
     26        (JSC::CCallHelpers::setupArgumentsWithExecState):
     27        * jit/JIT.cpp:
     28        (JSC::PropertyStubCompilationInfo::copyToStubInfo):
     29        * jit/JIT.h:
     30        (JSC::PropertyStubCompilationInfo::PropertyStubCompilationInfo):
     31        (JSC::PropertyStubCompilationInfo::slowCaseInfo):
     32        * jit/JITInlines.h:
     33        (JSC::JIT::callOperation):
     34        * jit/JITOperationWrappers.h:
     35        * jit/JITOperations.cpp:
     36        * jit/JITOperations.h:
     37        * jit/JITPropertyAccess.cpp:
     38        (JSC::JIT::compileGetByIdHotPath):
     39        (JSC::JIT::compileGetByIdSlowCase):
     40        (JSC::JIT::emit_op_put_by_id):
     41        (JSC::JIT::emitSlow_op_put_by_id):
     42        * jit/JITPropertyAccess32_64.cpp:
     43        (JSC::JIT::compileGetByIdSlowCase):
     44        (JSC::JIT::emit_op_put_by_id):
     45        (JSC::JIT::emitSlow_op_put_by_id):
     46        * jit/JITStubs.cpp:
     47        * jit/JITStubs.h:
     48        * jit/Repatch.cpp:
     49        (JSC::appropriateGenericPutByIdFunction):
     50        (JSC::appropriateListBuildingPutByIdFunction):
     51        (JSC::resetPutByID):
     52
    1532013-10-13  Filip Pizlo  <fpizlo@apple.com>
    254
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r156984 r157411  
    23832383        else {
    23842384            RELEASE_ASSERT(isPutByIdAccess(accessType));
    2385             JIT::resetPatchPutById(repatchBuffer, &stubInfo);
     2385            resetPutByID(repatchBuffer, stubInfo);
    23862386        }
    23872387        break;
  • trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp

    r153221 r157411  
    142142       
    143143    default:
     144        // FIXME: We should handle polymorphic PutById. We probably have some interesting things
     145        // we could do about it.
    144146        return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset);
    145147    }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r157329 r157411  
    13641364        return appendCallWithExceptionCheck(operation);
    13651365    }
    1366     JITCompiler::Call callOperation(V_JITOperation_EJCI operation, GPRReg arg1, GPRReg arg2, StringImpl* uid)
     1366    JITCompiler::Call callOperation(V_JITOperation_EJJI operation, GPRReg arg1, GPRReg arg2, StringImpl* uid)
    13671367    {
    13681368        m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(uid));
     
    16211621        return appendCallWithExceptionCheck(operation);
    16221622    }
    1623     JITCompiler::Call callOperation(V_JITOperation_EJCI operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2, StringImpl* uid)
    1624     {
    1625         m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2, TrustedImmPtr(uid));
     1623    JITCompiler::Call callOperation(V_JITOperation_EJJI operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Payload, StringImpl* uid)
     1624    {
     1625        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2Payload, TrustedImm32(JSValue::CellTag), TrustedImmPtr(uid));
    16261626        return appendCallWithExceptionCheck(operation);
    16271627    }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r157409 r157411  
    263263
    264264    JITCompiler::Label doneLabel = m_jit.label();
    265     V_JITOperation_EJCI optimizedCall;
     265    V_JITOperation_EJJI optimizedCall;
    266266    if (m_jit.strictModeFor(m_currentNode->codeOrigin)) {
    267267        if (putKind == Direct)
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r157409 r157411  
    255255    JITCompiler::Label doneLabel = m_jit.label();
    256256   
    257     V_JITOperation_EJCI optimizedCall;
     257    V_JITOperation_EJJI optimizedCall;
    258258    if (m_jit.strictModeFor(m_currentNode->codeOrigin)) {
    259259        if (putKind == Direct)
  • trunk/Source/JavaScriptCore/jit/CCallHelpers.h

    r157404 r157411  
    353353    }
    354354
     355    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4)
     356    {
     357        resetCallArguments();
     358        addCallArgument(GPRInfo::callFrameRegister);
     359        addCallArgument(arg1);
     360        addCallArgument(arg2);
     361        addCallArgument(arg3);
     362        addCallArgument(arg4);
     363    }
     364
    355365    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImm32 arg2, GPRReg arg3, GPRReg arg4)
    356366    {
     
    364374
    365375    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5)
     376    {
     377        resetCallArguments();
     378        addCallArgument(GPRInfo::callFrameRegister);
     379        addCallArgument(arg1);
     380        addCallArgument(arg2);
     381        addCallArgument(arg3);
     382        addCallArgument(arg4);
     383        addCallArgument(arg5);
     384    }
     385
     386    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, TrustedImmPtr arg5)
     387    {
     388        resetCallArguments();
     389        addCallArgument(GPRInfo::callFrameRegister);
     390        addCallArgument(arg1);
     391        addCallArgument(arg2);
     392        addCallArgument(arg3);
     393        addCallArgument(arg4);
     394        addCallArgument(arg5);
     395    }
     396
     397    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImmPtr arg5)
    366398    {
    367399        resetCallArguments();
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r157164 r157411  
    490490    info.codeOrigin = CodeOrigin(bytecodeIndex);
    491491    info.callReturnLocation = linkBuffer.locationOf(callReturnLocation);
    492     info.hotPathBegin = linkBuffer.locationOf(hotPathBegin);
    493492
    494493    switch (m_type) {
    495494    case GetById: {
    496495        CodeLocationLabel hotPathBeginLocation = linkBuffer.locationOf(hotPathBegin);
    497         info.patch.baseline.u.get.structureToCompare = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(getStructureToCompare));
    498         info.patch.baseline.u.get.structureCheck = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(getStructureCheck));
     496        info.hotPathBegin = hotPathBeginLocation;
     497        info.patch.baseline.u.get.structureToCompare = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(structureToCompare));
     498        info.patch.baseline.u.get.structureCheck = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(structureCheck));
    499499        info.patch.baseline.u.get.propertyStorageLoad = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(propertyStorageLoad));
    500500#if USE(JSVALUE64)
     
    504504        info.patch.baseline.u.get.displacementLabel2 = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(getDisplacementLabel2));
    505505#endif
    506         info.patch.baseline.u.get.putResult = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(getPutResult));
    507         info.patch.baseline.u.get.coldPathBegin = MacroAssembler::differenceBetweenCodePtr(linkBuffer.locationOf(getColdPathBegin), linkBuffer.locationOf(callReturnLocation));
     506        info.patch.baseline.u.get.putResult = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(done));
     507        info.patch.baseline.u.get.coldPathBegin = MacroAssembler::differenceBetweenCodePtr(linkBuffer.locationOf(coldPathBegin), linkBuffer.locationOf(callReturnLocation));
    508508        break;
    509509    }
    510510    case PutById:
    511         CodeLocationLabel hotPathBeginLocation = linkBuffer.locationOf(hotPathBegin);
    512         info.patch.baseline.u.put.structureToCompare = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(putStructureToCompare));
    513         info.patch.baseline.u.put.propertyStorageLoad = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(propertyStorageLoad));
     511        info.patch.dfg.deltaCheckImmToCall = MacroAssembler::differenceBetweenCodePtr(linkBuffer.locationOf(structureToCompare), info.callReturnLocation);
     512        info.patch.dfg.deltaCallToStructCheck = MacroAssembler::differenceBetweenCodePtr(info.callReturnLocation, linkBuffer.locationOf(structureCheck));
    514513#if USE(JSVALUE64)
    515         info.patch.baseline.u.put.displacementLabel = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(putDisplacementLabel));
     514        info.patch.dfg.deltaCallToLoadOrStore = MacroAssembler::differenceBetweenCodePtr(info.callReturnLocation, linkBuffer.locationOf(putDisplacementLabel));
    516515#else
    517         info.patch.baseline.u.put.displacementLabel1 = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(putDisplacementLabel1));
    518         info.patch.baseline.u.put.displacementLabel2 = MacroAssembler::differenceBetweenCodePtr(hotPathBeginLocation, linkBuffer.locationOf(putDisplacementLabel2));
    519 #endif
     516        info.patch.dfg.deltaCallToTagLoadOrStore = MacroAssembler::differenceBetweenCodePtr(info.callReturnLocation, linkBuffer.locationOf(putDisplacementLabel2));
     517        info.patch.dfg.deltaCallToPayloadLoadOrStore = MacroAssembler::differenceBetweenCodePtr(info.callReturnLocation, linkBuffer.locationOf(putDisplacementLabel1));
     518#endif
     519        info.patch.dfg.deltaCallToSlowCase = MacroAssembler::differenceBetweenCodePtr(info.callReturnLocation, linkBuffer.locationOf(coldPathBegin));
     520        info.patch.dfg.deltaCallToDone = MacroAssembler::differenceBetweenCodePtr(info.callReturnLocation, linkBuffer.locationOf(done));
     521        info.patch.dfg.deltaCallToStorageLoad = MacroAssembler::differenceBetweenCodePtr(info.callReturnLocation, linkBuffer.locationOf(propertyStorageLoad));
     522#if USE(JSVALUE64)
     523        info.patch.dfg.baseGPR = GPRInfo::regT0;
     524        info.patch.dfg.valueGPR = GPRInfo::regT1;
     525        RegisterSet usedRegisters;
     526        usedRegisters.set(GPRInfo::regT0);
     527        usedRegisters.set(GPRInfo::regT1);
     528        usedRegisters.copyInfo(info.patch.dfg.usedRegisters);
     529#else
     530        info.patch.dfg.baseGPR = GPRInfo::regT0;
     531        info.patch.dfg.valueGPR = GPRInfo::regT2;
     532        info.patch.dfg.valueTagGPR = GPRInfo::regT3;
     533        RegisterSet usedRegisters;
     534        usedRegisters.set(GPRInfo::regT0);
     535        usedRegisters.set(GPRInfo::regT2);
     536        usedRegisters.set(GPRInfo::regT3);
     537        usedRegisters.copyInfo(info.patch.dfg.usedRegisters);
     538#endif
     539        info.patch.dfg.registersFlushed = true;
    520540        break;
    521541    }
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r157404 r157411  
    157157        MacroAssembler::Call callReturnLocation;
    158158        MacroAssembler::Label hotPathBegin;
    159         MacroAssembler::DataLabelPtr getStructureToCompare;
    160         MacroAssembler::PatchableJump getStructureCheck;
     159        MacroAssembler::DataLabelPtr structureToCompare;
     160        MacroAssembler::PatchableJump structureCheck;
    161161        MacroAssembler::ConvertibleLoadLabel propertyStorageLoad;
    162162#if USE(JSVALUE64)
     
    166166        MacroAssembler::DataLabelCompact getDisplacementLabel2;
    167167#endif
    168         MacroAssembler::Label getPutResult;
    169         MacroAssembler::Label getColdPathBegin;
    170         MacroAssembler::DataLabelPtr putStructureToCompare;
     168        MacroAssembler::Label done;
     169        MacroAssembler::Label coldPathBegin;
    171170#if USE(JSVALUE64)
    172171        MacroAssembler::DataLabel32 putDisplacementLabel;
     
    195194            MacroAssembler::DataLabelCompact displacementLabel2,
    196195#endif
    197             MacroAssembler::Label putResult)
     196            MacroAssembler::Label done)
    198197            : m_type(GetById)
    199198            , bytecodeIndex(bytecodeIndex)
    200199            , hotPathBegin(hotPathBegin)
    201             , getStructureToCompare(structureToCompare)
    202             , getStructureCheck(structureCheck)
     200            , structureToCompare(structureToCompare)
     201            , structureCheck(structureCheck)
    203202            , propertyStorageLoad(propertyStorageLoad)
    204203#if USE(JSVALUE64)
     
    208207            , getDisplacementLabel2(displacementLabel2)
    209208#endif
    210             , getPutResult(putResult)
     209            , done(done)
    211210        {
    212211        }
    213212
    214213        PropertyStubCompilationInfo(
    215             PropertyStubPutById_T, unsigned bytecodeIndex, MacroAssembler::Label hotPathBegin,
     214            PropertyStubPutById_T, unsigned bytecodeIndex,
    216215            MacroAssembler::DataLabelPtr structureToCompare,
     216            MacroAssembler::PatchableJump structureCheck,
    217217            MacroAssembler::ConvertibleLoadLabel propertyStorageLoad,
    218218#if USE(JSVALUE64)
    219             MacroAssembler::DataLabel32 displacementLabel
     219            MacroAssembler::DataLabel32 displacementLabel,
    220220#else
    221221            MacroAssembler::DataLabel32 displacementLabel1,
    222             MacroAssembler::DataLabel32 displacementLabel2
    223 #endif
    224             )
     222            MacroAssembler::DataLabel32 displacementLabel2,
     223#endif
     224            MacroAssembler::Label done)
    225225            : m_type(PutById)
    226226            , bytecodeIndex(bytecodeIndex)
    227             , hotPathBegin(hotPathBegin)
     227            , structureToCompare(structureToCompare)
     228            , structureCheck(structureCheck)
    228229            , propertyStorageLoad(propertyStorageLoad)
    229             , putStructureToCompare(structureToCompare)
     230            , done(done)
    230231#if USE(JSVALUE64)
    231232            , putDisplacementLabel(displacementLabel)
     
    237238        }
    238239
    239         void slowCaseInfo(PropertyStubGetById_T, MacroAssembler::Label coldPathBegin, MacroAssembler::Call call)
    240         {
    241             ASSERT(m_type == GetById);
     240        void slowCaseInfo(MacroAssembler::Label coldPathBegin, MacroAssembler::Call call)
     241        {
    242242            callReturnLocation = call;
    243             getColdPathBegin = coldPathBegin;
    244         }
    245 
    246         void slowCaseInfo(PropertyStubPutById_T, MacroAssembler::Call call)
    247         {
    248             ASSERT(m_type == PutById);
     243            this->coldPathBegin = coldPathBegin;
     244        }
     245
     246        void slowCaseInfo(MacroAssembler::Call call)
     247        {
    249248            callReturnLocation = call;
    250249        }
     
    346345        }
    347346       
    348         static void compilePutByIdTransition(VM* vm, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, PropertyOffset cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
    349         {
    350             JIT jit(vm, codeBlock);
    351             jit.m_bytecodeOffset = stubInfo->codeOrigin.bytecodeIndex;
    352             jit.privateCompilePutByIdTransition(stubInfo, oldStructure, newStructure, cachedOffset, chain, returnAddress, direct);
    353         }
    354        
    355347        static void compileGetByVal(VM* vm, CodeBlock* codeBlock, ByValInfo* byValInfo, ReturnAddressPtr returnAddress, JITArrayMode arrayMode)
    356348        {
     
    381373
    382374        static void resetPatchGetById(RepatchBuffer&, StructureStubInfo*);
    383         static void resetPatchPutById(RepatchBuffer&, StructureStubInfo*);
    384375        static void patchGetByIdSelf(CodeBlock*, StructureStubInfo*, Structure*, PropertyOffset cachedOffset, ReturnAddressPtr);
    385         static void patchPutByIdReplace(CodeBlock*, StructureStubInfo*, Structure*, PropertyOffset cachedOffset, ReturnAddressPtr, bool direct);
    386376
    387377        static void compilePatchGetArrayLength(VM* vm, CodeBlock* codeBlock, ReturnAddressPtr returnAddress)
     
    415405        void privateCompileGetByIdChainList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, StructureChain*, size_t count, const Identifier&, const PropertySlot&, PropertyOffset cachedOffset, CallFrame*);
    416406        void privateCompileGetByIdChain(StructureStubInfo*, Structure*, StructureChain*, size_t count, const Identifier&, const PropertySlot&, PropertyOffset cachedOffset, ReturnAddressPtr, CallFrame*);
    417         void privateCompilePutByIdTransition(StructureStubInfo*, Structure*, Structure*, PropertyOffset cachedOffset, StructureChain*, ReturnAddressPtr, bool direct);
    418407       
    419408        void privateCompileGetByVal(ByValInfo*, ReturnAddressPtr, JITArrayMode);
     
    448437
    449438        void privateCompileExceptionHandlers();
    450 
    451         static bool isDirectPutById(StructureStubInfo*);
    452439
    453440        void addSlowCase(Jump);
     
    588575        static const int sequenceGetByIdSlowCaseInstructionSpace = 80;
    589576        static const int sequenceGetByIdSlowCaseConstantSpace = 4;
    590         // sequencePutById
    591         static const int sequencePutByIdInstructionSpace = 36;
    592         static const int sequencePutByIdConstantSpace = 4;
    593577#elif CPU(SH4)
    594578        // sequenceOpCall
     
    601585        static const int sequenceGetByIdSlowCaseInstructionSpace = 38;
    602586        static const int sequenceGetByIdSlowCaseConstantSpace = 4;
    603         // sequencePutById
    604         static const int sequencePutByIdInstructionSpace = 36;
    605         static const int sequencePutByIdConstantSpace = 5;
    606587#endif
    607588
     
    891872        MacroAssembler::Call callOperation(S_JITOperation_EJJ, RegisterID, RegisterID);
    892873        MacroAssembler::Call callOperation(S_JITOperation_EOJss, RegisterID, RegisterID);
     874#if USE(JSVALUE64)
     875        MacroAssembler::Call callOperation(V_JITOperation_EJJI, RegisterID, RegisterID, StringImpl*);
     876#else
     877        MacroAssembler::Call callOperation(V_JITOperation_EJJI, RegisterID, RegisterID, RegisterID, RegisterID, StringImpl*);
     878#endif
    893879        MacroAssembler::Call callOperationWithCallFrameRollbackOnException(J_JITOperation_E);
    894880        MacroAssembler::Call callOperationWithCallFrameRollbackOnException(V_JITOperation_ECb, CodeBlock*);
  • trunk/Source/JavaScriptCore/jit/JITInlines.h

    r157404 r157411  
    263263    return appendCallWithExceptionCheck(operation);
    264264}
     265
     266ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJJI operation, RegisterID regOp1, RegisterID regOp2, StringImpl* uid)
     267{
     268    setupArgumentsWithExecState(regOp1, regOp2, TrustedImmPtr(uid));
     269    return appendCallWithExceptionCheck(operation);
     270}
    265271#endif
    266272
     
    418424{
    419425    setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, SH4_32BIT_DUMMY_ARG arg2Payload, arg2Tag);
     426    return appendCallWithExceptionCheck(operation);
     427}
     428
     429ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJJI operation, RegisterID regOp1Tag, RegisterID regOp1Payload, RegisterID regOp2Tag, RegisterID regOp2Payload, StringImpl* uid)
     430{
     431    setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG regOp1Payload, regOp1Tag, regOp2Payload, regOp2Tag, TrustedImmPtr(uid));
    420432    return appendCallWithExceptionCheck(operation);
    421433}
  • trunk/Source/JavaScriptCore/jit/JITOperationWrappers.h

    r156654 r157411  
    6363#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function)  FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx)
    6464#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function)  FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx)
    65 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, r8)
     65#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, r8)
    6666
    6767#elif COMPILER(GCC) && CPU(X86)
     
    8181#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function)  FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 16)
    8282#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function)  FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 20)
    83 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 24)
     83#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 28)
    8484
    8585#elif COMPILER(GCC) && CPU(ARM_THUMB2)
     
    118118#if COMPILER_SUPPORTS(EABI) && CPU(ARM)
    119119#define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #4]"
    120 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #8]"
     120#define INSTRUCTION_STORE_RETURN_ADDRESS_EJJI "str lr, [sp, #12]"
    121121#else
    122122#define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #0]"
    123 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #4]"
     123#define INSTRUCTION_STORE_RETURN_ADDRESS_EJJI "str lr, [sp, #8]"
    124124#endif
    125125
     
    137137    );
    138138
    139 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
     139#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) \
    140140    asm ( \
    141141    ".text" "\n" \
     
    146146    ".thumb_func " THUMB_FUNC_PARAM(function) "\n" \
    147147    SYMBOL_STRING(function) ":" "\n" \
    148         INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "\n" \
     148        INSTRUCTION_STORE_RETURN_ADDRESS_EJJI "\n" \
    149149        "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \
    150150    );
     
    181181#if COMPILER_SUPPORTS(EABI) && CPU(ARM)
    182182#define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #4]"
    183 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #8]"
     183#define INSTRUCTION_STORE_RETURN_ADDRESS_EJJI "str lr, [sp, #12]"
    184184#else
    185185#define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #0]"
    186 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #4]"
     186#define INSTRUCTION_STORE_RETURN_ADDRESS_EJJI "str lr, [sp, #8]"
    187187#endif
    188188
     
    198198    );
    199199
    200 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
     200#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) \
    201201    asm ( \
    202202    ".text" "\n" \
     
    205205    INLINE_ARM_FUNCTION(function) \
    206206    SYMBOL_STRING(function) ":" "\n" \
    207         INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "\n" \
     207        INSTRUCTION_STORE_RETURN_ADDRESS_EJJI "\n" \
    208208        "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \
    209209    );
     
    247247    );
    248248
    249 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
     249#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) \
    250250    asm( \
    251251    ".text" "\n" \
     
    254254    SYMBOL_STRING(function) ":" "\n" \
    255255    LOAD_FUNCTION_TO_T9(function##WithReturnAddress) \
    256         "sw $ra, 24($sp)" "\n" \
     256        "sw $ra, 28($sp)" "\n" \
    257257        "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \
    258258    );
     
    306306
    307307#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function)  FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 0, SH4_SCRATCH_REGISTER)
    308 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 4, SH4_SCRATCH_REGISTER)
     308#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 8, SH4_SCRATCH_REGISTER)
    309309
    310310#elif COMPILER(MSVC)
     
    322322    EncodedJSValue JIT_OPERATION function(ExecState* exec, EncodedJSValue value, StringImpl* string) { return function##WithReturnAddress(exec, value, string, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); }
    323323
    324 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
    325     void JIT_OPERATION function(ExecState* exec, EncodedJSValue value, JSCell* cell, StringImpl* string) { return function##WithReturnAddress(exec, value, cell, string, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); }
     324#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) \
     325    void JIT_OPERATION function(ExecState* exec, EncodedJSValue value, EncodedJSValue baseValue, StringImpl* string) { return function##WithReturnAddress(exec, value, baseValue, string, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); }
    326326
    327327#endif
     
    343343_J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function)
    344344
    345 #define V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
    346 void JIT_OPERATION function##WithReturnAddress(ExecState*, EncodedJSValue, JSCell*, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \
    347 _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function)
     345#define V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function) \
     346void JIT_OPERATION function##WithReturnAddress(ExecState*, EncodedJSValue, EncodedJSValue, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \
     347_V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(function)
    348348
    349349} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r157404 r157411  
    226226}
    227227
    228 void JIT_OPERATION operationPutByIdStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid)
     228void JIT_OPERATION operationPutByIdStrict(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid)
    229229{
    230230    VM* vm = &exec->vm();
     
    233233    Identifier ident(vm, uid);
    234234    PutPropertySlot slot(true, exec->codeBlock()->putByIdContext());
    235     base->methodTable()->put(base, exec, ident, JSValue::decode(encodedValue), slot);
    236 }
    237 
    238 void JIT_OPERATION operationPutByIdNonStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid)
     235    JSValue::decode(encodedBase).put(exec, ident, JSValue::decode(encodedValue), slot);
     236}
     237
     238void JIT_OPERATION operationPutByIdNonStrict(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid)
    239239{
    240240    VM* vm = &exec->vm();
     
    243243    Identifier ident(vm, uid);
    244244    PutPropertySlot slot(false, exec->codeBlock()->putByIdContext());
    245     base->methodTable()->put(base, exec, ident, JSValue::decode(encodedValue), slot);
    246 }
    247 
    248 void JIT_OPERATION operationPutByIdDirectStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid)
     245    JSValue::decode(encodedBase).put(exec, ident, JSValue::decode(encodedValue), slot);
     246}
     247
     248void JIT_OPERATION operationPutByIdDirectStrict(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid)
    249249{
    250250    VM* vm = &exec->vm();
     
    253253    Identifier ident(vm, uid);
    254254    PutPropertySlot slot(true, exec->codeBlock()->putByIdContext());
    255     ASSERT(base->isObject());
    256     asObject(base)->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot);
    257 }
    258 
    259 void JIT_OPERATION operationPutByIdDirectNonStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid)
     255    asObject(JSValue::decode(encodedBase))->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot);
     256}
     257
     258void JIT_OPERATION operationPutByIdDirectNonStrict(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid)
    260259{
    261260    VM* vm = &exec->vm();
     
    264263    Identifier ident(vm, uid);
    265264    PutPropertySlot slot(false, exec->codeBlock()->putByIdContext());
    266     ASSERT(base->isObject());
    267     asObject(base)->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot);
    268 }
    269 
    270 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdStrictOptimize);
    271 void JIT_OPERATION operationPutByIdStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     265    asObject(JSValue::decode(encodedBase))->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot);
     266}
     267
     268V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdStrictOptimize);
     269void JIT_OPERATION operationPutByIdStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    272270{
    273271    VM* vm = &exec->vm();
     
    279277
    280278    JSValue value = JSValue::decode(encodedValue);
    281     JSValue baseValue(base);
     279    JSValue baseValue = JSValue::decode(encodedBase);
    282280    PutPropertySlot slot(true, exec->codeBlock()->putByIdContext());
    283281   
     
    293291}
    294292
    295 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdNonStrictOptimize);
    296 void JIT_OPERATION operationPutByIdNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     293V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdNonStrictOptimize);
     294void JIT_OPERATION operationPutByIdNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    297295{
    298296    VM* vm = &exec->vm();
     
    304302
    305303    JSValue value = JSValue::decode(encodedValue);
    306     JSValue baseValue(base);
     304    JSValue baseValue = JSValue::decode(encodedBase);
    307305    PutPropertySlot slot(false, exec->codeBlock()->putByIdContext());
    308306   
     
    318316}
    319317
    320 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectStrictOptimize);
    321 void JIT_OPERATION operationPutByIdDirectStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     318V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdDirectStrictOptimize);
     319void JIT_OPERATION operationPutByIdDirectStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    322320{
    323321    VM* vm = &exec->vm();
     
    329327
    330328    JSValue value = JSValue::decode(encodedValue);
     329    JSObject* baseObject = asObject(JSValue::decode(encodedBase));
    331330    PutPropertySlot slot(true, exec->codeBlock()->putByIdContext());
    332331   
    333     ASSERT(base->isObject());
    334     asObject(base)->putDirect(exec->vm(), ident, value, slot);
     332    baseObject->putDirect(exec->vm(), ident, value, slot);
    335333   
    336334    if (accessType != static_cast<AccessType>(stubInfo.accessType))
     
    338336   
    339337    if (stubInfo.seen)
    340         repatchPutByID(exec, base, ident, slot, stubInfo, Direct);
     338        repatchPutByID(exec, baseObject, ident, slot, stubInfo, Direct);
    341339    else
    342340        stubInfo.seen = true;
    343341}
    344342
    345 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectNonStrictOptimize);
    346 void JIT_OPERATION operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     343V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdDirectNonStrictOptimize);
     344void JIT_OPERATION operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    347345{
    348346    VM* vm = &exec->vm();
     
    354352
    355353    JSValue value = JSValue::decode(encodedValue);
     354    JSObject* baseObject = asObject(JSValue::decode(encodedBase));
    356355    PutPropertySlot slot(false, exec->codeBlock()->putByIdContext());
    357356   
    358     ASSERT(base->isObject());
    359     asObject(base)->putDirect(exec->vm(), ident, value, slot);
     357    baseObject->putDirect(exec->vm(), ident, value, slot);
    360358   
    361359    if (accessType != static_cast<AccessType>(stubInfo.accessType))
     
    363361   
    364362    if (stubInfo.seen)
    365         repatchPutByID(exec, base, ident, slot, stubInfo, Direct);
     363        repatchPutByID(exec, baseObject, ident, slot, stubInfo, Direct);
    366364    else
    367365        stubInfo.seen = true;
    368366}
    369367
    370 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdStrictBuildList);
    371 void JIT_OPERATION operationPutByIdStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     368V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdStrictBuildList);
     369void JIT_OPERATION operationPutByIdStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    372370{
    373371    VM* vm = &exec->vm();
     
    379377
    380378    JSValue value = JSValue::decode(encodedValue);
    381     JSValue baseValue(base);
     379    JSValue baseValue = JSValue::decode(encodedBase);
    382380    PutPropertySlot slot(true, exec->codeBlock()->putByIdContext());
    383381   
     
    390388}
    391389
    392 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdNonStrictBuildList);
    393 void JIT_OPERATION operationPutByIdNonStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     390V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdNonStrictBuildList);
     391void JIT_OPERATION operationPutByIdNonStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    394392{
    395393    VM* vm = &exec->vm();
     
    401399
    402400    JSValue value = JSValue::decode(encodedValue);
    403     JSValue baseValue(base);
     401    JSValue baseValue = JSValue::decode(encodedBase);
    404402    PutPropertySlot slot(false, exec->codeBlock()->putByIdContext());
    405403   
     
    412410}
    413411
    414 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectStrictBuildList);
    415 void JIT_OPERATION operationPutByIdDirectStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     412V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdDirectStrictBuildList);
     413void JIT_OPERATION operationPutByIdDirectStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    416414{
    417415    VM* vm = &exec->vm();
     
    423421   
    424422    JSValue value = JSValue::decode(encodedValue);
     423    JSObject* baseObject = asObject(JSValue::decode(encodedBase));
    425424    PutPropertySlot slot(true, exec->codeBlock()->putByIdContext());
    426425   
    427     ASSERT(base->isObject());
    428     asObject(base)->putDirect(exec->vm(), ident, value, slot);
     426    baseObject->putDirect(exec->vm(), ident, value, slot);
    429427   
    430428    if (accessType != static_cast<AccessType>(stubInfo.accessType))
    431429        return;
    432430   
    433     buildPutByIdList(exec, base, ident, slot, stubInfo, Direct);
    434 }
    435 
    436 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectNonStrictBuildList);
    437 void JIT_OPERATION operationPutByIdDirectNonStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress)
     431    buildPutByIdList(exec, baseObject, ident, slot, stubInfo, Direct);
     432}
     433
     434V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJJI(operationPutByIdDirectNonStrictBuildList);
     435void JIT_OPERATION operationPutByIdDirectNonStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl* uid, ReturnAddressPtr returnAddress)
    438436{
    439437    VM* vm = &exec->vm();
     
    445443
    446444    JSValue value = JSValue::decode(encodedValue);
     445    JSObject* baseObject = asObject(JSValue::decode(encodedBase));
    447446    PutPropertySlot slot(false, exec->codeBlock()->putByIdContext());
    448447   
    449     ASSERT(base->isObject());
    450     asObject(base)->putDirect(exec->vm(), ident, value, slot);
     448    baseObject ->putDirect(exec->vm(), ident, value, slot);
    451449   
    452450    if (accessType != static_cast<AccessType>(stubInfo.accessType))
    453451        return;
    454452   
    455     buildPutByIdList(exec, base, ident, slot, stubInfo, Direct);
     453    buildPutByIdList(exec, baseObject, ident, slot, stubInfo, Direct);
    456454}
    457455
  • trunk/Source/JavaScriptCore/jit/JITOperations.h

    r157404 r157411  
    128128typedef void JIT_OPERATION (*V_JITOperation_ECZ)(ExecState*, JSCell*, int32_t);
    129129typedef void JIT_OPERATION (*V_JITOperation_ECC)(ExecState*, JSCell*, JSCell*);
    130 typedef void JIT_OPERATION (*V_JITOperation_EJCI)(ExecState*, EncodedJSValue, JSCell*, StringImpl*);
     130typedef void JIT_OPERATION (*V_JITOperation_EJJI)(ExecState*, EncodedJSValue, EncodedJSValue, StringImpl*);
    131131typedef void JIT_OPERATION (*V_JITOperation_EJJJ)(ExecState*, EncodedJSValue, EncodedJSValue, EncodedJSValue);
    132132typedef void JIT_OPERATION (*V_JITOperation_EJPP)(ExecState*, EncodedJSValue, void*, void*);
     
    204204EncodedJSValue JIT_OPERATION operationCallCustomGetter(ExecState*, JSCell*, PropertySlot::GetValueFunc, StringImpl*) WTF_INTERNAL;
    205205EncodedJSValue JIT_OPERATION operationCallGetter(ExecState*, JSCell*, JSCell*) WTF_INTERNAL;
    206 void JIT_OPERATION operationPutByIdStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    207 void JIT_OPERATION operationPutByIdNonStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    208 void JIT_OPERATION operationPutByIdDirectStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    209 void JIT_OPERATION operationPutByIdDirectNonStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    210 void JIT_OPERATION operationPutByIdStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    211 void JIT_OPERATION operationPutByIdNonStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    212 void JIT_OPERATION operationPutByIdDirectStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    213 void JIT_OPERATION operationPutByIdDirectNonStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    214 void JIT_OPERATION operationPutByIdStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    215 void JIT_OPERATION operationPutByIdNonStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    216 void JIT_OPERATION operationPutByIdDirectStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
    217 void JIT_OPERATION operationPutByIdDirectNonStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL;
     206void JIT_OPERATION operationPutByIdStrict(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     207void JIT_OPERATION operationPutByIdNonStrict(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     208void JIT_OPERATION operationPutByIdDirectStrict(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     209void JIT_OPERATION operationPutByIdDirectNonStrict(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     210void JIT_OPERATION operationPutByIdStrictOptimize(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     211void JIT_OPERATION operationPutByIdNonStrictOptimize(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     212void JIT_OPERATION operationPutByIdDirectStrictOptimize(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     213void JIT_OPERATION operationPutByIdDirectNonStrictOptimize(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     214void JIT_OPERATION operationPutByIdStrictBuildList(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     215void JIT_OPERATION operationPutByIdNonStrictBuildList(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     216void JIT_OPERATION operationPutByIdDirectStrictBuildList(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
     217void JIT_OPERATION operationPutByIdDirectNonStrictBuildList(ExecState*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, StringImpl*) WTF_INTERNAL;
    218218void JIT_OPERATION operationReallocateStorageAndFinishPut(ExecState*, JSObject*, Structure*, PropertyOffset, EncodedJSValue) WTF_INTERNAL;
    219219EncodedJSValue JIT_OPERATION operationCallEval(ExecState*) WTF_INTERNAL;
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r157404 r157411  
    553553    DataLabelCompact displacementLabel = load64WithCompactAddressOffsetPatch(Address(regT0, patchGetByIdDefaultOffset), regT0);
    554554
    555     Label putResult(this);
     555    Label done(this);
    556556
    557557    END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath);
    558558
    559     m_propertyAccessCompilationInfo.append(PropertyStubCompilationInfo(PropertyStubGetById, m_bytecodeOffset, hotPathBegin, structureToCompare, structureCheck, propertyStorageLoad, displacementLabel, putResult));
     559    m_propertyAccessCompilationInfo.append(PropertyStubCompilationInfo(PropertyStubGetById, m_bytecodeOffset, hotPathBegin, structureToCompare, structureCheck, propertyStorageLoad, displacementLabel, done));
    560560}
    561561
     
    592592
    593593    // Track the location of the call; this will be used to recover patch information.
    594     m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(PropertyStubGetById, coldPathBegin, call);
     594    m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(coldPathBegin, call);
    595595}
    596596
     
    609609    emitJumpSlowCaseIfNotJSCell(regT0, baseVReg);
    610610
    611     BEGIN_UNINTERRUPTED_SEQUENCE(sequencePutById);
    612 
    613     Label hotPathBegin(this);
    614 
    615     // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over.
    616611    DataLabelPtr structureToCompare;
    617     addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, TrustedImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));
    618 
    619     ConvertibleLoadLabel propertyStorageLoad = convertibleLoadPtr(Address(regT0, JSObject::butterflyOffset()), regT2);
    620     DataLabel32 displacementLabel = store64WithAddressOffsetPatch(regT1, Address(regT2, patchPutByIdDefaultOffset));
    621 
    622     END_UNINTERRUPTED_SEQUENCE(sequencePutById);
    623 
     612    PatchableJump structureCheck = patchableBranchPtrWithPatch(
     613        NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare,
     614        TrustedImmPtr(reinterpret_cast<void*>(unusedPointer)));
     615   
     616    addSlowCase(structureCheck);
     617   
    624618    emitWriteBarrier(regT0, regT1, regT2, regT3, ShouldFilterImmediates, WriteBarrierForPropertyAccess);
    625619
    626     m_propertyAccessCompilationInfo.append(PropertyStubCompilationInfo(PropertyStubPutById, m_bytecodeOffset, hotPathBegin, structureToCompare, propertyStorageLoad, displacementLabel));
     620    ConvertibleLoadLabel propertyStorageLoad =
     621        convertibleLoadPtr(Address(regT0, JSObject::butterflyOffset()), regT2);
     622   
     623    DataLabel32 storeWithPatch =
     624        store64WithAddressOffsetPatch(regT1, Address(regT2, patchPutByIdDefaultOffset));
     625   
     626    Label done = label();
     627   
     628    m_propertyAccessCompilationInfo.append(
     629        PropertyStubCompilationInfo(
     630            PropertyStubPutById, m_bytecodeOffset, structureToCompare, structureCheck,
     631            propertyStorageLoad, storeWithPatch, done));
    627632}
    628633
     
    636641    linkSlowCase(iter);
    637642
    638     JITStubCall stubCall(this, direct ? cti_op_put_by_id_direct : cti_op_put_by_id);
    639     stubCall.addArgument(regT0);
    640     stubCall.addArgument(TrustedImmPtr(ident));
    641     stubCall.addArgument(regT1);
    642     move(regT0, nonArgGPR1);
    643     Call call = stubCall.call();
     643    Label coldPathBegin(this);
     644   
     645    V_JITOperation_EJJI optimizedCall;
     646    if (m_codeBlock->isStrictMode()) {
     647        if (direct)
     648            optimizedCall = operationPutByIdDirectStrictOptimize;
     649        else
     650            optimizedCall = operationPutByIdStrictOptimize;
     651    } else {
     652        if (direct)
     653            optimizedCall = operationPutByIdDirectNonStrictOptimize;
     654        else
     655            optimizedCall = operationPutByIdNonStrictOptimize;
     656    }
     657   
     658    Call call = callOperation(optimizedCall, regT1, regT0, ident->impl());
    644659
    645660    // Track the location of the call; this will be used to recover patch information.
    646     m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(PropertyStubPutById, call);
     661    m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(coldPathBegin, call);
    647662}
    648663
     
    681696    loadPtr(base->butterflyAddress(), result);
    682697    load64(Address(result, offsetInButterfly(cachedOffset) * sizeof(WriteBarrier<Unknown>)), result);
    683 }
    684 
    685 void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, PropertyOffset cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
    686 {
    687     move(nonArgGPR1, regT0);
    688 
    689     JumpList failureCases;
    690     // Check eax is an object of the right Structure.
    691     failureCases.append(emitJumpIfNotJSCell(regT0));
    692     failureCases.append(branchPtr(NotEqual, Address(regT0, JSCell::structureOffset()), TrustedImmPtr(oldStructure)));
    693    
    694     testPrototype(oldStructure->storedPrototype(), failureCases, stubInfo);
    695    
    696     ASSERT(oldStructure->storedPrototype().isNull() || oldStructure->storedPrototype().asCell()->structure() == chain->head()->get());
    697 
    698     // ecx = baseObject->m_structure
    699     if (!direct) {
    700         for (WriteBarrier<Structure>* it = chain->head(); *it; ++it) {
    701             ASSERT((*it)->storedPrototype().isNull() || (*it)->storedPrototype().asCell()->structure() == it[1].get());
    702             testPrototype((*it)->storedPrototype(), failureCases, stubInfo);
    703         }
    704     }
    705 
    706     // If we succeed in all of our checks, and the code was optimizable, then make sure we
    707     // decrement the rare case counter.
    708 #if ENABLE(VALUE_PROFILER)
    709     if (m_codeBlock->capabilityLevelState() != DFG::CannotCompile) {
    710         sub32(
    711             TrustedImm32(1),
    712             AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->codeOrigin.bytecodeIndex)->m_counter));
    713     }
    714 #endif
    715    
    716     // emit a call only if storage realloc is needed
    717     bool willNeedStorageRealloc = oldStructure->outOfLineCapacity() != newStructure->outOfLineCapacity();
    718     if (willNeedStorageRealloc) {
    719         // This trampoline was called to like a JIT stub; before we can can call again we need to
    720         // remove the return address from the stack, to prevent the stack from becoming misaligned.
    721         preserveReturnAddressAfterCall(regT3);
    722  
    723         JITStubCall stubCall(this, cti_op_put_by_id_transition_realloc);
    724         stubCall.skipArgument(); // base
    725         stubCall.skipArgument(); // ident
    726         stubCall.skipArgument(); // value
    727         stubCall.addArgument(TrustedImm32(oldStructure->outOfLineCapacity()));
    728         stubCall.addArgument(TrustedImmPtr(newStructure));
    729         stubCall.call(regT0);
    730         emitGetJITStubArg(2, regT1);
    731 
    732         restoreReturnAddressBeforeReturn(regT3);
    733     }
    734 
    735     // Planting the new structure triggers the write barrier so we need
    736     // an unconditional barrier here.
    737     emitWriteBarrier(regT0, regT1, regT2, regT3, UnconditionalWriteBarrier, WriteBarrierForPropertyAccess);
    738 
    739     ASSERT(newStructure->classInfo() == oldStructure->classInfo());
    740     storePtr(TrustedImmPtr(newStructure), Address(regT0, JSCell::structureOffset()));
    741     compilePutDirectOffset(regT0, regT1, cachedOffset);
    742 
    743     ret();
    744    
    745     ASSERT(!failureCases.empty());
    746     failureCases.link(this);
    747     restoreArgumentReferenceForTrampoline();
    748     Call failureCall = tailRecursiveCall();
    749 
    750     LinkBuffer patchBuffer(*m_vm, this, m_codeBlock);
    751 
    752     patchBuffer.link(failureCall, FunctionPtr(direct ? cti_op_put_by_id_direct_fail : cti_op_put_by_id_fail));
    753 
    754     if (willNeedStorageRealloc) {
    755         ASSERT(m_calls.size() == 1);
    756         patchBuffer.link(m_calls[0].from, FunctionPtr(cti_op_put_by_id_transition_realloc));
    757     }
    758    
    759     stubInfo->stubRoutine = createJITStubRoutine(
    760         FINALIZE_CODE(
    761             patchBuffer,
    762             ("Baseline put_by_id transition for %s, return point %p",
    763                 toCString(*m_codeBlock).data(), returnAddress.value())),
    764         *m_vm,
    765         m_codeBlock->ownerExecutable(),
    766         willNeedStorageRealloc,
    767         newStructure);
    768     RepatchBuffer repatchBuffer(m_codeBlock);
    769     repatchBuffer.relinkCallerToTrampoline(returnAddress, CodeLocationLabel(stubInfo->stubRoutine->code().code()));
    770698}
    771699
     
    782710    repatchBuffer.setLoadInstructionIsActive(stubInfo->hotPathBegin.convertibleLoadAtOffset(stubInfo->patch.baseline.u.get.propertyStorageLoad), isOutOfLineOffset(cachedOffset));
    783711    repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelCompactAtOffset(stubInfo->patch.baseline.u.get.displacementLabel), offsetRelativeToPatchedStorage(cachedOffset));
    784 }
    785 
    786 void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, PropertyOffset cachedOffset, ReturnAddressPtr returnAddress, bool direct)
    787 {
    788     RepatchBuffer repatchBuffer(codeBlock);
    789 
    790     // We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
    791     // Should probably go to cti_op_put_by_id_fail, but that doesn't do anything interesting right now.
    792     repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
    793 
    794     // Patch the offset into the propoerty map to load from, then patch the Structure to look for.
    795     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(stubInfo->patch.baseline.u.put.structureToCompare), structure);
    796     repatchBuffer.setLoadInstructionIsActive(stubInfo->hotPathBegin.convertibleLoadAtOffset(stubInfo->patch.baseline.u.put.propertyStorageLoad), isOutOfLineOffset(cachedOffset));
    797     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel), offsetRelativeToPatchedStorage(cachedOffset));
    798712}
    799713
     
    14291343}
    14301344
    1431 void JIT::resetPatchPutById(RepatchBuffer& repatchBuffer, StructureStubInfo* stubInfo)
    1432 {
    1433     if (isDirectPutById(stubInfo))
    1434         repatchBuffer.relink(stubInfo->callReturnLocation, cti_op_put_by_id_direct);
    1435     else
    1436         repatchBuffer.relink(stubInfo->callReturnLocation, cti_op_put_by_id);
    1437     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(stubInfo->patch.baseline.u.put.structureToCompare), reinterpret_cast<void*>(unusedPointer));
    1438     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel), 0);
    1439 }
    1440 
    14411345#endif // USE(JSVALUE64)
    14421346
     
    15041408    ASSERT(prototype.isCell());
    15051409    addStructureTransitionCheck(prototype.asCell(), prototype.asCell()->structure(), stubInfo, failureCases, regT3);
    1506 }
    1507 
    1508 bool JIT::isDirectPutById(StructureStubInfo* stubInfo)
    1509 {
    1510     switch (stubInfo->accessType) {
    1511     case access_put_by_id_transition_normal:
    1512         return false;
    1513     case access_put_by_id_transition_direct:
    1514         return true;
    1515     case access_put_by_id_replace:
    1516     case access_put_by_id_generic: {
    1517         void* oldCall = MacroAssembler::readCallTarget(stubInfo->callReturnLocation).executableAddress();
    1518         if (oldCall == bitwise_cast<void*>(cti_op_put_by_id_direct)
    1519             || oldCall == bitwise_cast<void*>(cti_op_put_by_id_direct_generic)
    1520             || oldCall == bitwise_cast<void*>(cti_op_put_by_id_direct_fail))
    1521             return true;
    1522         ASSERT(oldCall == bitwise_cast<void*>(cti_op_put_by_id)
    1523                || oldCall == bitwise_cast<void*>(cti_op_put_by_id_generic)
    1524                || oldCall == bitwise_cast<void*>(cti_op_put_by_id_fail));
    1525         return false;
    1526     }
    1527     default:
    1528         RELEASE_ASSERT_NOT_REACHED();
    1529         return false;
    1530     }
    15311410}
    15321411
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp

    r157404 r157411  
    530530   
    531531    // Track the location of the call; this will be used to recover patch information.
    532     m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(PropertyStubGetById, coldPathBegin, call);
     532    m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(coldPathBegin, call);
    533533}
    534534
     
    546546    emitJumpSlowCaseIfNotJSCell(base, regT1);
    547547   
     548    DataLabelPtr structureToCompare;
     549    PatchableJump structureCheck = patchableBranchPtrWithPatch(
     550        NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare,
     551        TrustedImmPtr(reinterpret_cast<void*>(unusedPointer)));
     552   
     553    addSlowCase(structureCheck);
     554   
     555    emitWriteBarrier(regT0, regT2, regT1, regT2, ShouldFilterImmediates, WriteBarrierForPropertyAccess);
     556
     557    ConvertibleLoadLabel propertyStorageLoad =
     558        convertibleLoadPtr(Address(regT0, JSObject::butterflyOffset()), regT1);
     559   
     560    // Payload.
     561    DataLabel32 storeWithPatch1 =
     562        store32WithAddressOffsetPatch(regT2, Address(regT1, patchPutByIdDefaultOffset));
     563    // Tag.
     564    DataLabel32 storeWithPatch2 =
     565        store32WithAddressOffsetPatch(regT3, Address(regT1, patchPutByIdDefaultOffset));
     566   
     567    Label done = label();
     568   
     569    m_propertyAccessCompilationInfo.append(
     570        PropertyStubCompilationInfo(
     571            PropertyStubPutById, m_bytecodeOffset, structureToCompare, structureCheck,
     572            propertyStorageLoad, storeWithPatch1, storeWithPatch2, done));
    548573    BEGIN_UNINTERRUPTED_SEQUENCE(sequencePutById);
    549    
    550     Label hotPathBegin(this);
    551    
    552     // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over.
    553     DataLabelPtr structureToCompare;
    554     addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, TrustedImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));
    555    
    556     ConvertibleLoadLabel propertyStorageLoad = convertibleLoadPtr(Address(regT0, JSObject::butterflyOffset()), regT1);
    557     DataLabel32 displacementLabel1 = storePtrWithAddressOffsetPatch(regT2, Address(regT1, patchPutByIdDefaultOffset)); // payload
    558     DataLabel32 displacementLabel2 = storePtrWithAddressOffsetPatch(regT3, Address(regT1, patchPutByIdDefaultOffset)); // tag
    559    
    560     END_UNINTERRUPTED_SEQUENCE(sequencePutById);
    561 
    562     emitWriteBarrier(regT0, regT2, regT1, regT2, ShouldFilterImmediates, WriteBarrierForPropertyAccess);
    563 
    564     m_propertyAccessCompilationInfo.append(PropertyStubCompilationInfo(PropertyStubPutById, m_bytecodeOffset, hotPathBegin, structureToCompare, propertyStorageLoad, displacementLabel1, displacementLabel2));
    565574}
    566575
     
    568577{
    569578    int base = currentInstruction[1].u.operand;
    570     int ident = currentInstruction[2].u.operand;
     579    const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[2].u.operand));
    571580    int direct = currentInstruction[8].u.operand;
    572581
     
    574583    linkSlowCase(iter);
    575584   
    576     JITStubCall stubCall(this, direct ? cti_op_put_by_id_direct : cti_op_put_by_id);
    577     stubCall.addArgument(base);
    578     stubCall.addArgument(TrustedImmPtr(&(m_codeBlock->identifier(ident))));
    579     stubCall.addArgument(regT3, regT2);
    580     Call call = stubCall.call();
    581    
     585    Label coldPathBegin(this);
     586   
     587    V_JITOperation_EJJI optimizedCall;
     588    if (m_codeBlock->isStrictMode()) {
     589        if (direct)
     590            optimizedCall = operationPutByIdDirectStrictOptimize;
     591        else
     592            optimizedCall = operationPutByIdStrictOptimize;
     593    } else {
     594        if (direct)
     595            optimizedCall = operationPutByIdDirectNonStrictOptimize;
     596        else
     597            optimizedCall = operationPutByIdNonStrictOptimize;
     598    }
     599   
     600    Call call = callOperation(optimizedCall, regT3, regT2, regT1, regT0, ident->impl());
     601
    582602    // Track the location of the call; this will be used to recover patch information.
    583     m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(PropertyStubPutById, call);
     603    m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex++].slowCaseInfo(coldPathBegin, call);
    584604}
    585605
     
    619639}
    620640
    621 void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, PropertyOffset cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
    622 {
    623     // The code below assumes that regT0 contains the basePayload and regT1 contains the baseTag. Restore them from the stack.
    624 #if CPU(MIPS) || CPU(SH4) || CPU(ARM)
    625     // For MIPS, we don't add sizeof(void*) to the stack offset.
    626     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT0);
    627     // For MIPS, we don't add sizeof(void*) to the stack offset.
    628     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT1);
    629 #else
    630     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + sizeof(void*) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT0);
    631     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + sizeof(void*) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT1);
    632 #endif
    633 
    634     JumpList failureCases;
    635     failureCases.append(branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)));
    636     failureCases.append(branchPtr(NotEqual, Address(regT0, JSCell::structureOffset()), TrustedImmPtr(oldStructure)));
    637     testPrototype(oldStructure->storedPrototype(), failureCases, stubInfo);
    638    
    639     if (!direct) {
    640         // Verify that nothing in the prototype chain has a setter for this property.
    641         for (WriteBarrier<Structure>* it = chain->head(); *it; ++it)
    642             testPrototype((*it)->storedPrototype(), failureCases, stubInfo);
    643     }
    644 
    645     // If we succeed in all of our checks, and the code was optimizable, then make sure we
    646     // decrement the rare case counter.
    647 #if ENABLE(VALUE_PROFILER)
    648     if (m_codeBlock->capabilityLevelState() != DFG::CannotCompile) {
    649         sub32(
    650             TrustedImm32(1),
    651             AbsoluteAddress(&m_codeBlock->rareCaseProfileForBytecodeOffset(stubInfo->codeOrigin.bytecodeIndex)->m_counter));
    652     }
    653 #endif
    654    
    655     // Reallocate property storage if needed.
    656     Call callTarget;
    657     bool willNeedStorageRealloc = oldStructure->outOfLineCapacity() != newStructure->outOfLineCapacity();
    658     if (willNeedStorageRealloc) {
    659         // This trampoline was called to like a JIT stub; before we can can call again we need to
    660         // remove the return address from the stack, to prevent the stack from becoming misaligned.
    661         preserveReturnAddressAfterCall(regT3);
    662        
    663         JITStubCall stubCall(this, cti_op_put_by_id_transition_realloc);
    664         stubCall.skipArgument(); // base
    665         stubCall.skipArgument(); // ident
    666         stubCall.skipArgument(); // value
    667         stubCall.addArgument(TrustedImm32(oldStructure->outOfLineCapacity()));
    668         stubCall.addArgument(TrustedImmPtr(newStructure));
    669         stubCall.call(regT0);
    670 
    671         restoreReturnAddressBeforeReturn(regT3);
    672 
    673 #if CPU(MIPS) || CPU(SH4) || CPU(ARM)
    674         // For MIPS, we don't add sizeof(void*) to the stack offset.
    675         load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT0);
    676         // For MIPS, we don't add sizeof(void*) to the stack offset.
    677         load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT1);
    678 #else
    679         load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + sizeof(void*) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT0);
    680         load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[0]) + sizeof(void*) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT1);
    681 #endif
    682     }
    683 
    684     emitWriteBarrier(regT0, regT1, regT1, regT3, UnconditionalWriteBarrier, WriteBarrierForPropertyAccess);
    685 
    686     storePtr(TrustedImmPtr(newStructure), Address(regT0, JSCell::structureOffset()));
    687 #if CPU(MIPS) || CPU(SH4) || CPU(ARM)
    688     // For MIPS, we don't add sizeof(void*) to the stack offset.
    689     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[2]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT3);
    690     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[2]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT2);
    691 #else
    692     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[2]) + sizeof(void*) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT3);
    693     load32(Address(stackPointerRegister, OBJECT_OFFSETOF(JITStackFrame, args[2]) + sizeof(void*) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT2);
    694 #endif
    695     compilePutDirectOffset(regT0, regT2, regT3, cachedOffset);
    696    
    697     ret();
    698    
    699     ASSERT(!failureCases.empty());
    700     failureCases.link(this);
    701     restoreArgumentReferenceForTrampoline();
    702     Call failureCall = tailRecursiveCall();
    703    
    704     LinkBuffer patchBuffer(*m_vm, this, m_codeBlock);
    705    
    706     patchBuffer.link(failureCall, FunctionPtr(direct ? cti_op_put_by_id_direct_fail : cti_op_put_by_id_fail));
    707    
    708     if (willNeedStorageRealloc) {
    709         ASSERT(m_calls.size() == 1);
    710         patchBuffer.link(m_calls[0].from, FunctionPtr(cti_op_put_by_id_transition_realloc));
    711     }
    712    
    713     stubInfo->stubRoutine = createJITStubRoutine(
    714         FINALIZE_CODE(
    715             patchBuffer,
    716             ("Baseline put_by_id transition stub for %s, return point %p",
    717                 toCString(*m_codeBlock).data(), returnAddress.value())),
    718         *m_vm,
    719         m_codeBlock->ownerExecutable(),
    720         willNeedStorageRealloc,
    721         newStructure);
    722     RepatchBuffer repatchBuffer(m_codeBlock);
    723     repatchBuffer.relinkCallerToTrampoline(returnAddress, CodeLocationLabel(stubInfo->stubRoutine->code().code()));
    724 }
    725 
    726641void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, PropertyOffset cachedOffset, ReturnAddressPtr returnAddress)
    727642{
     
    737652    repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelCompactAtOffset(stubInfo->patch.baseline.u.get.displacementLabel1), offsetRelativeToPatchedStorage(cachedOffset) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)); // payload
    738653    repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelCompactAtOffset(stubInfo->patch.baseline.u.get.displacementLabel2), offsetRelativeToPatchedStorage(cachedOffset) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)); // tag
    739 }
    740 
    741 void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, PropertyOffset cachedOffset, ReturnAddressPtr returnAddress, bool direct)
    742 {
    743     RepatchBuffer repatchBuffer(codeBlock);
    744    
    745     // We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
    746     // Should probably go to cti_op_put_by_id_fail, but that doesn't do anything interesting right now.
    747     repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
    748    
    749     // Patch the offset into the propoerty map to load from, then patch the Structure to look for.
    750     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(stubInfo->patch.baseline.u.put.structureToCompare), structure);
    751     repatchBuffer.setLoadInstructionIsActive(stubInfo->hotPathBegin.convertibleLoadAtOffset(stubInfo->patch.baseline.u.put.propertyStorageLoad), isOutOfLineOffset(cachedOffset));
    752     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel1), offsetRelativeToPatchedStorage(cachedOffset) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)); // payload
    753     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel2), offsetRelativeToPatchedStorage(cachedOffset) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)); // tag
    754654}
    755655
     
    14841384}
    14851385
    1486 void JIT::resetPatchPutById(RepatchBuffer& repatchBuffer, StructureStubInfo* stubInfo)
    1487 {
    1488     if (isDirectPutById(stubInfo))
    1489         repatchBuffer.relink(stubInfo->callReturnLocation, cti_op_put_by_id_direct);
    1490     else
    1491         repatchBuffer.relink(stubInfo->callReturnLocation, cti_op_put_by_id);
    1492     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(stubInfo->patch.baseline.u.put.structureToCompare), reinterpret_cast<void*>(unusedPointer));
    1493     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel1), 0);
    1494     repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel2), 0);
    1495 }
    1496 
    14971386} // namespace JSC
    14981387
  • trunk/Source/JavaScriptCore/jit/JITStubs.cpp

    r157404 r157411  
    124124}
    125125
    126 NEVER_INLINE static void tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot& slot, StructureStubInfo* stubInfo, bool direct)
    127 {
    128     ConcurrentJITLocker locker(codeBlock->m_lock);
    129    
    130     // The interpreter checks for recursion here; I do not believe this can occur in CTI.
    131 
    132     if (!baseValue.isCell())
    133         return;
    134 
    135     // Uncacheable: give up.
    136     if (!slot.isCacheable()) {
    137         ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
    138         return;
    139     }
    140    
    141     JSCell* baseCell = baseValue.asCell();
    142     Structure* structure = baseCell->structure();
    143 
    144     if (structure->isUncacheableDictionary() || structure->typeInfo().prohibitsPropertyCaching()) {
    145         ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
    146         return;
    147     }
    148 
    149     // If baseCell != base, then baseCell must be a proxy for another object.
    150     if (baseCell != slot.base()) {
    151         ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
    152         return;
    153     }
    154 
    155     // Cache hit: Specialize instruction and ref Structures.
    156 
    157     // Structure transition, cache transition info
    158     if (slot.type() == PutPropertySlot::NewProperty) {
    159         if (structure->isDictionary()) {
    160             ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
    161             return;
    162         }
    163 
    164         // put_by_id_transition checks the prototype chain for setters.
    165         if (normalizePrototypeChain(callFrame, baseCell) == InvalidPrototypeChain) {
    166             ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
    167             return;
    168         }
    169 
    170         StructureChain* prototypeChain = structure->prototypeChain(callFrame);
    171         ASSERT(structure->previousID()->transitionWatchpointSetHasBeenInvalidated());
    172         stubInfo->initPutByIdTransition(callFrame->vm(), codeBlock->ownerExecutable(), structure->previousID(), structure, prototypeChain, direct);
    173         JIT::compilePutByIdTransition(callFrame->scope()->vm(), codeBlock, stubInfo, structure->previousID(), structure, slot.cachedOffset(), prototypeChain, returnAddress, direct);
    174         return;
    175     }
    176    
    177     stubInfo->initPutByIdReplace(callFrame->vm(), codeBlock->ownerExecutable(), structure);
    178 
    179     JIT::patchPutByIdReplace(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress, direct);
    180 }
    181 
    182126NEVER_INLINE static void tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo* stubInfo)
    183127{
     
    437381}
    438382
    439 DEFINE_STUB_FUNCTION(void, op_put_by_id_generic)
    440 {
    441     STUB_INIT_STACK_FRAME(stackFrame);
    442 
    443     PutPropertySlot slot(
    444         stackFrame.callFrame->codeBlock()->isStrictMode(),
    445         stackFrame.callFrame->codeBlock()->putByIdContext());
    446     stackFrame.args[0].jsValue().put(stackFrame.callFrame, stackFrame.args[1].identifier(), stackFrame.args[2].jsValue(), slot);
    447     CHECK_FOR_EXCEPTION_AT_END();
    448 }
    449 
    450 DEFINE_STUB_FUNCTION(void, op_put_by_id_direct_generic)
    451 {
    452     STUB_INIT_STACK_FRAME(stackFrame);
    453    
    454     PutPropertySlot slot(
    455         stackFrame.callFrame->codeBlock()->isStrictMode(),
    456         stackFrame.callFrame->codeBlock()->putByIdContext());
    457     JSValue baseValue = stackFrame.args[0].jsValue();
    458     ASSERT(baseValue.isObject());
    459     asObject(baseValue)->putDirect(stackFrame.callFrame->vm(), stackFrame.args[1].identifier(), stackFrame.args[2].jsValue(), slot);
    460     CHECK_FOR_EXCEPTION_AT_END();
    461 }
    462 
    463383DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_generic)
    464384{
     
    474394    CHECK_FOR_EXCEPTION_AT_END();
    475395    return JSValue::encode(result);
    476 }
    477 
    478 DEFINE_STUB_FUNCTION(void, op_put_by_id)
    479 {
    480     STUB_INIT_STACK_FRAME(stackFrame);
    481     CallFrame* callFrame = stackFrame.callFrame;
    482     Identifier& ident = stackFrame.args[1].identifier();
    483    
    484     CodeBlock* codeBlock = stackFrame.callFrame->codeBlock();
    485     StructureStubInfo* stubInfo = &codeBlock->getStubInfo(STUB_RETURN_ADDRESS);
    486     AccessType accessType = static_cast<AccessType>(stubInfo->accessType);
    487 
    488     PutPropertySlot slot(
    489         callFrame->codeBlock()->isStrictMode(),
    490         callFrame->codeBlock()->putByIdContext());
    491     stackFrame.args[0].jsValue().put(callFrame, ident, stackFrame.args[2].jsValue(), slot);
    492    
    493     if (accessType == static_cast<AccessType>(stubInfo->accessType)) {
    494         stubInfo->setSeen();
    495         tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot, stubInfo, false);
    496     }
    497    
    498     CHECK_FOR_EXCEPTION_AT_END();
    499 }
    500 
    501 DEFINE_STUB_FUNCTION(void, op_put_by_id_direct)
    502 {
    503     STUB_INIT_STACK_FRAME(stackFrame);
    504     CallFrame* callFrame = stackFrame.callFrame;
    505     Identifier& ident = stackFrame.args[1].identifier();
    506    
    507     CodeBlock* codeBlock = stackFrame.callFrame->codeBlock();
    508     StructureStubInfo* stubInfo = &codeBlock->getStubInfo(STUB_RETURN_ADDRESS);
    509     AccessType accessType = static_cast<AccessType>(stubInfo->accessType);
    510 
    511     PutPropertySlot slot(
    512         callFrame->codeBlock()->isStrictMode(),
    513         callFrame->codeBlock()->putByIdContext());
    514     JSValue baseValue = stackFrame.args[0].jsValue();
    515     ASSERT(baseValue.isObject());
    516    
    517     asObject(baseValue)->putDirect(callFrame->vm(), ident, stackFrame.args[2].jsValue(), slot);
    518    
    519     if (accessType == static_cast<AccessType>(stubInfo->accessType)) {
    520         stubInfo->setSeen();
    521         tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot, stubInfo, true);
    522     }
    523    
    524     CHECK_FOR_EXCEPTION_AT_END();
    525 }
    526 
    527 DEFINE_STUB_FUNCTION(void, op_put_by_id_fail)
    528 {
    529     STUB_INIT_STACK_FRAME(stackFrame);
    530 
    531     CallFrame* callFrame = stackFrame.callFrame;
    532     Identifier& ident = stackFrame.args[1].identifier();
    533    
    534     PutPropertySlot slot(
    535         callFrame->codeBlock()->isStrictMode(),
    536         callFrame->codeBlock()->putByIdContext());
    537     stackFrame.args[0].jsValue().put(callFrame, ident, stackFrame.args[2].jsValue(), slot);
    538 
    539     CHECK_FOR_EXCEPTION_AT_END();
    540 }
    541 
    542 DEFINE_STUB_FUNCTION(void, op_put_by_id_direct_fail)
    543 {
    544     STUB_INIT_STACK_FRAME(stackFrame);
    545    
    546     CallFrame* callFrame = stackFrame.callFrame;
    547     Identifier& ident = stackFrame.args[1].identifier();
    548    
    549     PutPropertySlot slot(
    550         callFrame->codeBlock()->isStrictMode(),
    551         callFrame->codeBlock()->putByIdContext());
    552     JSValue baseValue = stackFrame.args[0].jsValue();
    553     ASSERT(baseValue.isObject());
    554     asObject(baseValue)->putDirect(callFrame->vm(), ident, stackFrame.args[2].jsValue(), slot);
    555    
    556     CHECK_FOR_EXCEPTION_AT_END();
    557 }
    558 
    559 DEFINE_STUB_FUNCTION(JSObject*, op_put_by_id_transition_realloc)
    560 {
    561     STUB_INIT_STACK_FRAME(stackFrame);
    562 
    563     JSValue baseValue = stackFrame.args[0].jsValue();
    564     int32_t oldSize = stackFrame.args[3].int32();
    565     Structure* newStructure = stackFrame.args[4].structure();
    566     int32_t newSize = newStructure->outOfLineCapacity();
    567    
    568     ASSERT(oldSize >= 0);
    569     ASSERT(newSize > oldSize);
    570 
    571     ASSERT(baseValue.isObject());
    572     JSObject* base = asObject(baseValue);
    573     VM& vm = *stackFrame.vm;
    574     Butterfly* butterfly = base->growOutOfLineStorage(vm, oldSize, newSize);
    575     base->setStructureAndButterfly(vm, newStructure, butterfly);
    576 
    577     return base;
    578396}
    579397
  • trunk/Source/JavaScriptCore/jit/JITStubs.h

    r157404 r157411  
    346346void JIT_STUB cti_op_push_name_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    347347void JIT_STUB cti_op_push_with_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    348 JSObject* JIT_STUB cti_op_put_by_id_transition_realloc(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    349348void JIT_STUB cti_handle_watchdog_timer(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    350349void JIT_STUB cti_op_debug(STUB_ARGS_DECLARATION) WTF_INTERNAL;
     
    352351void JIT_STUB cti_op_profile_did_call(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    353352void JIT_STUB cti_op_profile_will_call(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    354 void JIT_STUB cti_op_put_by_id(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    355 void JIT_STUB cti_op_put_by_id_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    356 void JIT_STUB cti_op_put_by_id_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    357 void JIT_STUB cti_op_put_by_id_direct(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    358 void JIT_STUB cti_op_put_by_id_direct_fail(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    359 void JIT_STUB cti_op_put_by_id_direct_generic(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    360353void JIT_STUB cti_op_put_by_index(STUB_ARGS_DECLARATION) WTF_INTERNAL;
    361354void JIT_STUB cti_op_put_by_val(STUB_ARGS_DECLARATION) WTF_INTERNAL;
  • trunk/Source/JavaScriptCore/jit/Repatch.cpp

    r156490 r157411  
    605605}
    606606
    607 static V_JITOperation_EJCI appropriateGenericPutByIdFunction(const PutPropertySlot &slot, PutKind putKind)
     607static V_JITOperation_EJJI appropriateGenericPutByIdFunction(const PutPropertySlot &slot, PutKind putKind)
    608608{
    609609    if (slot.isStrictMode()) {
     
    617617}
    618618
    619 static V_JITOperation_EJCI appropriateListBuildingPutByIdFunction(const PutPropertySlot &slot, PutKind putKind)
     619static V_JITOperation_EJJI appropriateListBuildingPutByIdFunction(const PutPropertySlot &slot, PutKind putKind)
    620620{
    621621    if (slot.isStrictMode()) {
     
    13761376void resetPutByID(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo)
    13771377{
    1378     V_JITOperation_EJCI unoptimizedFunction = bitwise_cast<V_JITOperation_EJCI>(MacroAssembler::readCallTarget(stubInfo.callReturnLocation).executableAddress());
    1379     V_JITOperation_EJCI optimizedFunction;
     1378    V_JITOperation_EJJI unoptimizedFunction = bitwise_cast<V_JITOperation_EJJI>(MacroAssembler::readCallTarget(stubInfo.callReturnLocation).executableAddress());
     1379    V_JITOperation_EJJI optimizedFunction;
    13801380    if (unoptimizedFunction == operationPutByIdStrict || unoptimizedFunction == operationPutByIdStrictBuildList)
    13811381        optimizedFunction = operationPutByIdStrictOptimize;
Note: See TracChangeset for help on using the changeset viewer.