|
|||||||||
Home >> All >> [ Allocator overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
Allocator
Class RuntimeCodeAllocator.Runtimex86CodeBuffer

java.lang.ObjectAllocator.CodeAllocator.x86CodeBuffer
Allocator.RuntimeCodeAllocator.Runtimex86CodeBuffer
- Enclosing class:
- RuntimeCodeAllocator
- public class RuntimeCodeAllocator.Runtimex86CodeBuffer
- extends CodeAllocator.x86CodeBuffer
Field Summary | |
private Memory.CodeAddress |
currentAddress
|
private Memory.CodeAddress |
endAddress
|
private Memory.CodeAddress |
entrypointAddress
|
private Memory.CodeAddress |
startAddress
|
Constructor Summary | |
(package private) |
RuntimeCodeAllocator.Runtimex86CodeBuffer(Memory.CodeAddress startAddress,
Memory.CodeAddress endAddress)
|
Method Summary | |
void |
add1(byte i)
Adds one byte to the end of this code buffer. |
void |
add2_endian(int i)
Adds two bytes (little-endian) to the end of this code buffer. |
void |
add2(int i)
Adds two bytes (big-endian) to the end of this code buffer. |
void |
add3(int i)
Adds three bytes (big-endian) to the end of this code buffer. |
void |
add4_endian(int i)
Adds four bytes (little-endian) to the end of this code buffer. |
Clazz.jq_CompiledCode |
allocateCodeBlock(Clazz.jq_Method m,
Clazz.jq_TryCatch[] ex,
Clazz.jq_BytecodeMap bcm,
Run_Time.ExceptionDeliverer exd,
int stackframesize,
java.util.List code_relocs,
java.util.List data_relocs)
Uses the code in this buffer, along with the arguments, to create a jq_CompiledCode object. |
void |
checkSize(int size)
|
byte |
get1(int k)
Gets the byte at the given offset in this code buffer. |
int |
get4_endian(int k)
Gets the (little-endian) 4 bytes at the given offset in this code buffer. |
Memory.CodeAddress |
getCurrent()
|
Memory.CodeAddress |
getCurrentAddress()
Returns the current address in this code buffer. |
int |
getCurrentOffset()
Returns the current offset in this code buffer. |
Memory.CodeAddress |
getEnd()
|
Memory.CodeAddress |
getEntry()
|
Memory.CodeAddress |
getStart()
|
Memory.CodeAddress |
getStartAddress()
Returns the current address in this code buffer. |
void |
put1(int k,
byte instr)
Sets the byte at the given offset to the given value. |
void |
put4_endian(int k,
int instr)
Sets the 4 bytes at the given offset to the given (little-endian) value. |
void |
setEntrypoint()
Sets the current address as the entrypoint to this code buffer. |
void |
skip(int nbytes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
startAddress
private Memory.CodeAddress startAddress
entrypointAddress
private Memory.CodeAddress entrypointAddress
currentAddress
private Memory.CodeAddress currentAddress
endAddress
private Memory.CodeAddress endAddress
Constructor Detail |
RuntimeCodeAllocator.Runtimex86CodeBuffer
RuntimeCodeAllocator.Runtimex86CodeBuffer(Memory.CodeAddress startAddress, Memory.CodeAddress endAddress)
Method Detail |
getCurrentOffset
public int getCurrentOffset()
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Returns the current offset in this code buffer.
- Specified by:
getCurrentOffset
in classCodeAllocator.x86CodeBuffer
getStartAddress
public Memory.CodeAddress getStartAddress()
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Returns the current address in this code buffer.
- Specified by:
getStartAddress
in classCodeAllocator.x86CodeBuffer
getCurrentAddress
public Memory.CodeAddress getCurrentAddress()
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Returns the current address in this code buffer.
- Specified by:
getCurrentAddress
in classCodeAllocator.x86CodeBuffer
getStart
public Memory.CodeAddress getStart()
getCurrent
public Memory.CodeAddress getCurrent()
getEntry
public Memory.CodeAddress getEntry()
getEnd
public Memory.CodeAddress getEnd()
setEntrypoint
public void setEntrypoint()
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Sets the current address as the entrypoint to this code buffer.
- Specified by:
setEntrypoint
in classCodeAllocator.x86CodeBuffer
checkSize
public void checkSize(int size)
add1
public void add1(byte i)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Adds one byte to the end of this code buffer. Offset/address
increase by 1.
- Specified by:
add1
in classCodeAllocator.x86CodeBuffer
add2_endian
public void add2_endian(int i)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Adds two bytes (little-endian) to the end of this code buffer.
Offset/address increase by 2.
- Specified by:
add2_endian
in classCodeAllocator.x86CodeBuffer
add2
public void add2(int i)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Adds two bytes (big-endian) to the end of this code buffer.
Offset/address increase by 2.
- Specified by:
add2
in classCodeAllocator.x86CodeBuffer
add3
public void add3(int i)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Adds three bytes (big-endian) to the end of this code buffer.
Offset/address increase by 3.
- Specified by:
add3
in classCodeAllocator.x86CodeBuffer
add4_endian
public void add4_endian(int i)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Adds four bytes (little-endian) to the end of this code buffer.
Offset/address increase by 4.
- Specified by:
add4_endian
in classCodeAllocator.x86CodeBuffer
get1
public byte get1(int k)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Gets the byte at the given offset in this code buffer.
- Specified by:
get1
in classCodeAllocator.x86CodeBuffer
get4_endian
public int get4_endian(int k)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Gets the (little-endian) 4 bytes at the given offset in this
code buffer.
- Specified by:
get4_endian
in classCodeAllocator.x86CodeBuffer
put1
public void put1(int k, byte instr)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Sets the byte at the given offset to the given value.
- Specified by:
put1
in classCodeAllocator.x86CodeBuffer
put4_endian
public void put4_endian(int k, int instr)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Sets the 4 bytes at the given offset to the given (little-endian)
value.
- Specified by:
put4_endian
in classCodeAllocator.x86CodeBuffer
skip
public void skip(int nbytes)
- Specified by:
skip
in classCodeAllocator.x86CodeBuffer
allocateCodeBlock
public Clazz.jq_CompiledCode allocateCodeBlock(Clazz.jq_Method m, Clazz.jq_TryCatch[] ex, Clazz.jq_BytecodeMap bcm, Run_Time.ExceptionDeliverer exd, int stackframesize, java.util.List code_relocs, java.util.List data_relocs)
- Description copied from class:
CodeAllocator.x86CodeBuffer
- Uses the code in this buffer, along with the arguments, to create
a jq_CompiledCode object. Call this method after you are done
generating code, and actually want to use it.
- Specified by:
allocateCodeBlock
in classCodeAllocator.x86CodeBuffer
|
|||||||||
Home >> All >> [ Allocator overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |