Ignore:
Timestamp:
Dec 22, 2014, 6:48:00 PM (11 years ago)
Author:
[email protected]
Message:

Use ctiPatchCallByReturnAddress() in JITOperations.cpp.
<https://webkit.org/b/139892>

Reviewed by Michael Saboff.

The code in JITOperations.cpp sometimes calls RepatchBuffer::relinkCallerToFunction()
directly, and sometimes uses a helper function, ctiPatchCallByReturnAddress().
This patch changes it to use the helper function consistently.

  • jit/JITOperations.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r177401 r177675  
    528528                || object->structure(vm)->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero()) {
    529529                // Don't ever try to optimize.
    530                 RepatchBuffer repatchBuffer(exec->codeBlock());
    531                 repatchBuffer.relinkCallerToFunction(ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationPutByValGeneric));
     530                ctiPatchCallByReturnAddress(exec->codeBlock(), ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationPutByValGeneric));
    532531            }
    533532        }
     
    574573                || object->structure(vm)->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero()) {
    575574                // Don't ever try to optimize.
    576                 RepatchBuffer repatchBuffer(callFrame->codeBlock());
    577                 repatchBuffer.relinkCallerToFunction(ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationDirectPutByValGeneric));
     575                ctiPatchCallByReturnAddress(callFrame->codeBlock(), ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationDirectPutByValGeneric));
    578576            }
    579577        }
     
    15131511                || object->structure(vm)->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero()) {
    15141512                // Don't ever try to optimize.
    1515                 RepatchBuffer repatchBuffer(exec->codeBlock());
    1516                 repatchBuffer.relinkCallerToFunction(ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationGetByValGeneric));
     1513                ctiPatchCallByReturnAddress(exec->codeBlock(), ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationGetByValGeneric));
    15171514            }
    15181515        }
     
    15591556            || object->structure(vm)->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero()) {
    15601557            // Don't ever try to optimize.
    1561             RepatchBuffer repatchBuffer(exec->codeBlock());
    1562             repatchBuffer.relinkCallerToFunction(ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationHasIndexedPropertyGeneric));
     1558            ctiPatchCallByReturnAddress(exec->codeBlock(), ReturnAddressPtr(OUR_RETURN_ADDRESS), FunctionPtr(operationHasIndexedPropertyGeneric));
    15631559        }
    15641560    }
Note: See TracChangeset for help on using the changeset viewer.