Changeset 44705 in webkit for trunk/JavaScriptCore/assembler


Ignore:
Timestamp:
Jun 15, 2009, 8:01:12 PM (16 years ago)
Author:
[email protected]
Message:

2009-06-15 Gavin Barraclough <[email protected]>

Reviewed by Sam Weinig.

Having introduced the RepatchBuffer, ProcessorReturnAddress is now a do-nothing
wrapper around ReturnAddressPtr. Remove it. In tugging on this piece of string
it made sense to roll out the use of ReturnAddressPtr a little further into
JITStubs (which had always been the intention).

No performance impact.

  • assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToTrampoline): (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToFunction): (JSC::AbstractMacroAssembler::RepatchBuffer::relinkNearCallerToTrampoline):
  • assembler/MacroAssemblerCodeRef.h: (JSC::ReturnAddressPtr::ReturnAddressPtr):
  • bytecode/CodeBlock.h: (JSC::CodeBlock::getStubInfo): (JSC::CodeBlock::getCallLinkInfo): (JSC::CodeBlock::getMethodCallLinkInfo): (JSC::CodeBlock::getBytecodeIndex):
  • interpreter/Interpreter.cpp: (JSC::bytecodeOffsetForPC):
  • jit/JIT.cpp: (JSC::ctiPatchNearCallByReturnAddress): (JSC::ctiPatchCallByReturnAddress):
  • jit/JIT.h: (JSC::JIT::compileGetByIdProto): (JSC::JIT::compileGetByIdChain): (JSC::JIT::compilePutByIdTransition): (JSC::JIT::compilePatchGetArrayLength):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::patchGetByIdSelf): (JSC::JIT::patchPutByIdReplace): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdChain):
  • jit/JITStubs.cpp: (JSC::JITThunks::tryCachePutByID): (JSC::JITThunks::tryCacheGetByID): (JSC::StackHack::StackHack): (JSC::returnToThrowTrampoline): (JSC::throwStackOverflowError): (JSC::JITStubs::DEFINE_STUB_FUNCTION):
  • jit/JITStubs.h: (JSC::): (JSC::JITStackFrame::returnAddressSlot):
  • runtime/JSGlobalData.h:
Location:
trunk/JavaScriptCore/assembler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h

    r44700 r44705  
    5858    class CodeLocationDataLabel32;
    5959    class CodeLocationDataLabelPtr;
    60     class ProcessorReturnAddress;
    6160
    6261    typedef typename AssemblerType::RegisterID RegisterID;
     
    493492        friend class PatchBuffer;
    494493        friend class RepatchBuffer;
    495         friend class ProcessorReturnAddress;
    496494
    497495    public:
     
    628626        {
    629627        }
    630     };
    631 
    632     // ProcessorReturnAddress:
    633     //
    634     // This class can be used to relink a call identified by its return address.
    635     class ProcessorReturnAddress {
    636     public:
    637         ProcessorReturnAddress(void* location)
    638             : m_location(location)
    639         {
    640         }
    641 
    642         void* addressForLookup()
    643         {
    644             return m_location.value();
    645         }
    646 
    647         ReturnAddressPtr m_location;
    648628    };
    649629
     
    863843        }
    864844
    865         void relinkCallerToTrampoline(ProcessorReturnAddress returnAddress, CodeLocationLabel label)
    866         {
    867             relink(CodeLocationCall(CodePtr(returnAddress.m_location)), label);
    868         }
    869        
    870         void relinkCallerToTrampoline(ProcessorReturnAddress returnAddress, CodePtr newCalleeFunction)
     845        void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label)
     846        {
     847            relink(CodeLocationCall(CodePtr(returnAddress)), label);
     848        }
     849       
     850        void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction)
    871851        {
    872852            relinkCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction));
    873853        }
    874854
    875         void relinkCallerToFunction(ProcessorReturnAddress returnAddress, FunctionPtr function)
    876         {
    877             relink(CodeLocationCall(CodePtr(returnAddress.m_location)), function);
    878         }
    879        
    880         void relinkNearCallerToTrampoline(ProcessorReturnAddress returnAddress, CodeLocationLabel label)
    881         {
    882             relink(CodeLocationNearCall(CodePtr(returnAddress.m_location)), label);
    883         }
    884        
    885         void relinkNearCallerToTrampoline(ProcessorReturnAddress returnAddress, CodePtr newCalleeFunction)
     855        void relinkCallerToFunction(ReturnAddressPtr returnAddress, FunctionPtr function)
     856        {
     857            relink(CodeLocationCall(CodePtr(returnAddress)), function);
     858        }
     859       
     860        void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label)
     861        {
     862            relink(CodeLocationNearCall(CodePtr(returnAddress)), label);
     863        }
     864       
     865        void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction)
    886866        {
    887867            relinkNearCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction));
  • trunk/JavaScriptCore/assembler/MacroAssemblerCodeRef.h

    r44514 r44705  
    9999    }
    100100
     101    explicit ReturnAddressPtr(FunctionPtr function)
     102        : m_value(function.value())
     103    {
     104        ASSERT_VALID_CODE_POINTER(m_value);
     105    }
     106
    101107    void* value() const { return m_value; }
    102108
Note: See TracChangeset for help on using the changeset viewer.