Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Bootstrap
Class BootstrapCodeAllocator.Bootstrapx86CodeBuffer  view BootstrapCodeAllocator.Bootstrapx86CodeBuffer download BootstrapCodeAllocator.Bootstrapx86CodeBuffer.java

java.lang.Object
  extended byAllocator.CodeAllocator.x86CodeBuffer
      extended byBootstrap.BootstrapCodeAllocator.Bootstrapx86CodeBuffer
Enclosing class:
BootstrapCodeAllocator

public class BootstrapCodeAllocator.Bootstrapx86CodeBuffer
extends Allocator.CodeAllocator.x86CodeBuffer


Field Summary
private  int entryIndex
           
private  int startIndex
           
 
Constructor Summary
(package private) BootstrapCodeAllocator.Bootstrapx86CodeBuffer(int startIndex, int estSize)
           
 
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()
           
 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 getCurrentAddress()
          Returns the current address in this code buffer.
 int getCurrentOffset()
          Returns the current offset in this code buffer.
 int getEntryIndex()
           
 Memory.CodeAddress getStartAddress()
          Returns the current address in this code buffer.
 int getStartIndex()
           
 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

startIndex

private int startIndex

entryIndex

private int entryIndex
Constructor Detail

BootstrapCodeAllocator.Bootstrapx86CodeBuffer

BootstrapCodeAllocator.Bootstrapx86CodeBuffer(int startIndex,
                                              int estSize)
Method Detail

getStartIndex

public int getStartIndex()

getEntryIndex

public int getEntryIndex()

getCurrentOffset

public int getCurrentOffset()
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Returns the current offset in this code buffer.


getStartAddress

public Memory.CodeAddress getStartAddress()
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Returns the current address in this code buffer.


getCurrentAddress

public Memory.CodeAddress getCurrentAddress()
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Returns the current address in this code buffer.


setEntrypoint

public void setEntrypoint()
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Sets the current address as the entrypoint to this code buffer.


checkSize

public void checkSize()

add1

public void add1(byte i)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Adds one byte to the end of this code buffer. Offset/address increase by 1.


add2_endian

public void add2_endian(int i)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Adds two bytes (little-endian) to the end of this code buffer. Offset/address increase by 2.


add2

public void add2(int i)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Adds two bytes (big-endian) to the end of this code buffer. Offset/address increase by 2.


add3

public void add3(int i)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Adds three bytes (big-endian) to the end of this code buffer. Offset/address increase by 3.


add4_endian

public void add4_endian(int i)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Adds four bytes (little-endian) to the end of this code buffer. Offset/address increase by 4.


get1

public byte get1(int k)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Gets the byte at the given offset in this code buffer.


get4_endian

public int get4_endian(int k)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Gets the (little-endian) 4 bytes at the given offset in this code buffer.


put1

public void put1(int k,
                 byte instr)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Sets the byte at the given offset to the given value.


put4_endian

public void put4_endian(int k,
                        int instr)
Description copied from class: Allocator.CodeAllocator.x86CodeBuffer
Sets the 4 bytes at the given offset to the given (little-endian) value.


skip

public void skip(int nbytes)

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: Allocator.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.