Changeset 44713 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jun 15, 2009, 11:52:49 PM (16 years ago)
Author:
[email protected]
Message:

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

Rubber Stamped by Sam Weinig.

Rename PatchBuffer to LinkBuffer. Previously our terminology has been a little
mixed up, but we have decided to fix on refering to the process that takes place
at the end of code generation as 'linking', and on any modifications that take
place later (and once the code has potentially already been executed) as 'patching'.

However, the term 'PatchBuffer' is already in use, and needs to be repurposed.

To try to minimize confusion, we're going to switch the terminology over in stages,
so for now we'll refer to later modifications as 'repatching'. This means that the
new 'PatchBuffer' has been introduced with the name 'RepatchBuffer' instead.

This patch renames the old 'PatchBuffer' to 'LinkBuffer'. We'll leave ToT in this
state for a week or so to try to avoid to much overlap of the meaning of the term
'PatchBuffer', then will come back and rename 'RepatchBuffer'.

  • assembler/ARMv7Assembler.h:
  • assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::LinkBuffer::LinkBuffer): (JSC::AbstractMacroAssembler::LinkBuffer::~LinkBuffer):
  • jit/JIT.cpp: (JSC::JIT::privateCompile):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain):
  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::compile):
Location:
trunk/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r44711 r44713  
     12009-06-15  Gavin Barraclough  <[email protected]>
     2
     3        Rubber Stamped by Sam Weinig.
     4
     5        Rename PatchBuffer to LinkBuffer.  Previously our terminology has been a little
     6        mixed up, but we have decided to fix on refering to the process that takes place
     7        at the end of code generation as 'linking', and on any modifications that take
     8        place later (and once the code has potentially already been executed) as 'patching'.
     9
     10        However, the term 'PatchBuffer' is already in use, and needs to be repurposed.
     11
     12        To try to minimize confusion, we're going to switch the terminology over in stages,
     13        so for now we'll refer to later modifications as 'repatching'.  This means that the
     14        new 'PatchBuffer' has been introduced with the name 'RepatchBuffer' instead.
     15
     16        This patch renames the old 'PatchBuffer' to 'LinkBuffer'.  We'll leave ToT in this
     17        state for a week or so to try to avoid to much overlap of the meaning of the term
     18        'PatchBuffer', then will come back and rename 'RepatchBuffer'.
     19
     20        * assembler/ARMv7Assembler.h:
     21        * assembler/AbstractMacroAssembler.h:
     22        (JSC::AbstractMacroAssembler::LinkBuffer::LinkBuffer):
     23        (JSC::AbstractMacroAssembler::LinkBuffer::~LinkBuffer):
     24        * jit/JIT.cpp:
     25        (JSC::JIT::privateCompile):
     26        * jit/JITPropertyAccess.cpp:
     27        (JSC::JIT::privateCompilePutByIdTransition):
     28        (JSC::JIT::privateCompilePatchGetArrayLength):
     29        (JSC::JIT::privateCompileGetByIdProto):
     30        (JSC::JIT::privateCompileGetByIdSelfList):
     31        (JSC::JIT::privateCompileGetByIdProtoList):
     32        (JSC::JIT::privateCompileGetByIdChainList):
     33        (JSC::JIT::privateCompileGetByIdChain):
     34        * yarr/RegexJIT.cpp:
     35        (JSC::Yarr::RegexGenerator::compile):
     36
    1372009-06-15  Gavin Barraclough  <[email protected]>
    238
  • trunk/JavaScriptCore/assembler/ARMv7Assembler.h

    r44554 r44713  
    15211521    }
    15221522
    1523     // bah, this mathod should really be static, since it is used by the PatchBuffer.
     1523    // bah, this mathod should really be static, since it is used by the LinkBuffer.
    15241524    // return a bool saying whether the link was successful?
    15251525    static void linkCall(void* code, JmpSrc from, void* to)
  • trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h

    r44711 r44713  
    5050
    5151    class Jump;
    52     class PatchBuffer;
     52    class LinkBuffer;
    5353    class RepatchBuffer;
    5454
     
    222222        friend class Jump;
    223223        friend class MacroAssemblerCodeRef;
    224         friend class PatchBuffer;
     224        friend class LinkBuffer;
    225225
    226226    public:
     
    247247        template<class TemplateAssemblerType>
    248248        friend class AbstractMacroAssembler;
    249         friend class PatchBuffer;
     249        friend class LinkBuffer;
    250250    public:
    251251        DataLabelPtr()
     
    269269        template<class TemplateAssemblerType>
    270270        friend class AbstractMacroAssembler;
    271         friend class PatchBuffer;
     271        friend class LinkBuffer;
    272272    public:
    273273        DataLabel32()
     
    293293        template<class TemplateAssemblerType>
    294294        friend class AbstractMacroAssembler;
    295         friend class PatchBuffer;
     295        friend class LinkBuffer;
    296296    public:
    297297        enum Flags {
     
    338338        friend class AbstractMacroAssembler;
    339339        friend class Call;
    340         friend class PatchBuffer;
     340        friend class LinkBuffer;
    341341    public:
    342342        Jump()
     
    368368    // All jumps in the set will be linked to the same destination.
    369369    class JumpList {
    370         friend class PatchBuffer;
     370        friend class LinkBuffer;
    371371
    372372    public:
     
    407407
    408408
    409     // Section 3: PatchBuffer - utility to finalize code generation.
     409    // Section 3: LinkBuffer - utility to finalize code generation.
    410410
    411411    static CodePtr trampolineAt(CodeRef ref, Label label)
     
    414414    }
    415415
    416     // PatchBuffer:
     416    // LinkBuffer:
    417417    //
    418418    // This class assists in linking code generated by the macro assembler, once code generation
     
    431431    // address of calls, as opposed to a point that can be used to later relink a Jump -
    432432    // possibly wrap the later up in an object that can do just that).
    433     class PatchBuffer : public Noncopyable {
     433    class LinkBuffer : public Noncopyable {
    434434    public:
    435435        // Note: Initialization sequence is significant, since executablePool is a PassRefPtr.
    436436        //       First, executablePool is copied into m_executablePool, then the initialization of
    437437        //       m_code uses m_executablePool, *not* executablePool, since this is no longer valid.
    438         PatchBuffer(AbstractMacroAssembler<AssemblerType>* masm, PassRefPtr<ExecutablePool> executablePool)
     438        LinkBuffer(AbstractMacroAssembler<AssemblerType>* masm, PassRefPtr<ExecutablePool> executablePool)
    439439            : m_executablePool(executablePool)
    440440            , m_code(masm->m_assembler.executableCopy(m_executablePool.get()))
     
    446446        }
    447447
    448         ~PatchBuffer()
     448        ~LinkBuffer()
    449449        {
    450450            ASSERT(m_completed);
  • trunk/JavaScriptCore/jit/JIT.cpp

    r44711 r44713  
    430430    ASSERT(m_jmpTable.isEmpty());
    431431
    432     PatchBuffer patchBuffer(this, m_globalData->executableAllocator.poolForSize(m_assembler.size()));
     432    LinkBuffer patchBuffer(this, m_globalData->executableAllocator.poolForSize(m_assembler.size()));
    433433
    434434    // Translate vPC offsets into addresses in JIT generated code, for switch tables.
     
    852852
    853853    // All trampolines constructed! copy the code, link up calls, and set the pointers on the Machine object.
    854     PatchBuffer patchBuffer(this, m_globalData->executableAllocator.poolForSize(m_assembler.size()));
     854    LinkBuffer patchBuffer(this, m_globalData->executableAllocator.poolForSize(m_assembler.size()));
    855855
    856856#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
  • trunk/JavaScriptCore/jit/JITPropertyAccess.cpp

    r44705 r44713  
    488488    Call failureCall = tailRecursiveCall();
    489489
    490     PatchBuffer patchBuffer(this, m_codeBlock->executablePool());
     490    LinkBuffer patchBuffer(this, m_codeBlock->executablePool());
    491491
    492492    patchBuffer.link(failureCall, FunctionPtr(JITStubs::cti_op_put_by_id_fail));
     
    573573    Jump success = jump();
    574574
    575     PatchBuffer patchBuffer(this, m_codeBlock->executablePool());
     575    LinkBuffer patchBuffer(this, m_codeBlock->executablePool());
    576576
    577577    // Use the patch information to link the failure cases back to the original slow case routine.
     
    619619    Jump success = jump();
    620620
    621     PatchBuffer patchBuffer(this, m_codeBlock->executablePool());
     621    LinkBuffer patchBuffer(this, m_codeBlock->executablePool());
    622622
    623623    // Use the patch information to link the failure cases back to the original slow case routine.
     
    648648    Jump success = jump();
    649649
    650     PatchBuffer patchBuffer(this, m_codeBlock->executablePool());
     650    LinkBuffer patchBuffer(this, m_codeBlock->executablePool());
    651651
    652652    // Use the patch information to link the failure cases back to the original slow case routine.
     
    694694    Jump success = jump();
    695695
    696     PatchBuffer patchBuffer(this, m_codeBlock->executablePool());
     696    LinkBuffer patchBuffer(this, m_codeBlock->executablePool());
    697697
    698698    // Use the patch information to link the failure cases back to the original slow case routine.
     
    747747    Jump success = jump();
    748748
    749     PatchBuffer patchBuffer(this, m_codeBlock->executablePool());
     749    LinkBuffer patchBuffer(this, m_codeBlock->executablePool());
    750750
    751751    // Use the patch information to link the failure cases back to the original slow case routine.
     
    800800    Jump success = jump();
    801801
    802     PatchBuffer patchBuffer(this, m_codeBlock->executablePool());
     802    LinkBuffer patchBuffer(this, m_codeBlock->executablePool());
    803803
    804804    // Use the patch information to link the failure cases back to the original slow case routine.
  • trunk/JavaScriptCore/yarr/RegexJIT.cpp

    r44514 r44713  
    13591359        generate();
    13601360
    1361         PatchBuffer patchBuffer(this, globalData->executableAllocator.poolForSize(size()));
     1361        LinkBuffer patchBuffer(this, globalData->executableAllocator.poolForSize(size()));
    13621362
    13631363        for (unsigned i = 0; i < m_backtrackRecords.size(); ++i)
Note: See TracChangeset for help on using the changeset viewer.