Restructure LinkBuffer to allow for alternate allocation strategies
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Oct 2013 02:07:39 +0000 (02:07 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Oct 2013 02:07:39 +0000 (02:07 +0000)
commit1845e767443d98f545f72e4853102ce0b17af075
tree789942bf20990fe11d1898cc4b8fcba5fd314ba6
parent5ecd2656383cf0b64502c6b748a8acd2b54d449d
Restructure LinkBuffer to allow for alternate allocation strategies
https://bugs.webkit.org/show_bug.cgi?id=123071

Reviewed by Oliver Hunt.

The idea is to eventually allow a LinkBuffer to place the code into an already
allocated region of memory.  That region of memory could be the nop-slide left behind
by a llvm.webkit.patchpoint.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::buffer):
* assembler/AssemblerBuffer.h:
* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::allocate):
(JSC::LinkBuffer::shrink):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::didFailToAllocate):
* assembler/X86Assembler.h:
(JSC::X86Assembler::buffer):
(JSC::X86Assembler::X86InstructionFormatter::memoryModRM):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/ARM64Assembler.h
Source/JavaScriptCore/assembler/AssemblerBuffer.h
Source/JavaScriptCore/assembler/LinkBuffer.cpp
Source/JavaScriptCore/assembler/LinkBuffer.h
Source/JavaScriptCore/assembler/X86Assembler.h