Ignore:
Timestamp:
Nov 20, 2012, 4:22:08 PM (13 years ago)
Author:
[email protected]
Message:

DFG should be able to cache closure calls (part 1/2)
https://bugs.webkit.org/show_bug.cgi?id=102662

Reviewed by Gavin Barraclough.

Add ability to revert a jump replacement back to
branchPtrWithPatch(Condition, RegisterID, TrustedImmPtr). This is meant to be
a mandatory piece of functionality for all assemblers. I also renamed some of
the functions for reverting jump replacements back to
patchableBranchPtrWithPatch(Condition, Address, TrustedImmPtr), so as to avoid
confusion.

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::BadReg):
(ARMv7Assembler):
(JSC::ARMv7Assembler::revertJumpTo_movT3):

  • assembler/LinkBuffer.h:

(JSC):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::startOfBranchPtrWithPatchOnRegister):
(MacroAssemblerARMv7):
(JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch):
(JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatchOnAddress):

  • assembler/MacroAssemblerX86.h:

(JSC::MacroAssemblerX86::startOfBranchPtrWithPatchOnRegister):
(MacroAssemblerX86):
(JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatchOnAddress):
(JSC::MacroAssemblerX86::revertJumpReplacementToBranchPtrWithPatch):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::startOfBranchPtrWithPatchOnRegister):
(JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatchOnAddress):
(MacroAssemblerX86_64):
(JSC::MacroAssemblerX86_64::revertJumpReplacementToBranchPtrWithPatch):

  • assembler/RepatchBuffer.h:

(JSC::RepatchBuffer::startOfBranchPtrWithPatchOnRegister):
(RepatchBuffer):
(JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatchOnAddress):
(JSC::RepatchBuffer::revertJumpReplacementToBranchPtrWithPatch):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::revertJumpTo_cmpl_ir_force32):
(X86Assembler):

  • dfg/DFGRepatch.cpp:

(JSC::DFG::replaceWithJump):
(JSC::DFG::dfgResetGetByID):
(JSC::DFG::dfgResetPutByID):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/RepatchBuffer.h

    r134332 r135330  
    142142    }
    143143
    144     static CodeLocationLabel startOfPatchableBranchPtrWithPatch(CodeLocationDataLabelPtr label)
     144    static CodeLocationLabel startOfBranchPtrWithPatchOnRegister(CodeLocationDataLabelPtr label)
    145145    {
    146         return MacroAssembler::startOfPatchableBranchPtrWithPatch(label);
     146        return MacroAssembler::startOfBranchPtrWithPatchOnRegister(label);
     147    }
     148   
     149    static CodeLocationLabel startOfPatchableBranchPtrWithPatchOnAddress(CodeLocationDataLabelPtr label)
     150    {
     151        return MacroAssembler::startOfPatchableBranchPtrWithPatchOnAddress(label);
    147152    }
    148153   
     
    155160    // immediate after calling this. But I'm fine with that, since this just feels
    156161    // less yucky.
     162    void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, MacroAssembler::RegisterID reg, void* value)
     163    {
     164        MacroAssembler::revertJumpReplacementToBranchPtrWithPatch(instructionStart, reg, value);
     165    }
     166
    157167    void revertJumpReplacementToPatchableBranchPtrWithPatch(CodeLocationLabel instructionStart, MacroAssembler::Address address, void* value)
    158168    {
Note: See TracChangeset for help on using the changeset viewer.