|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--OptiAsmBackEnd
Field Summary | |
(package private) java.util.Hashtable |
allNatives
Hashtable of natives found on the path. |
(package private) java.io.PrintWriter |
asmout
the output stream for the asm file. |
(package private) java.lang.String |
asmoutFilename
the filename of the asm file. |
(package private) static int |
depCounter
counter for producing unique hash keys. |
(package private) java.lang.String |
projectname
the project name |
Constructor Summary | |
(package private) |
OptiAsmBackEnd(java.lang.String projectname,
java.lang.String baseDirectory)
construct an OptiAsmBackEnd from project name and directory. |
Method Summary | |
(package private) java.lang.String |
commentFilter(java.lang.String s)
get an abbreviated, one-line version of a string without any dangerous characters, suitable for comments. |
(package private) void |
copyStream(java.io.InputStream stream,
java.lang.String name)
copy the contents of an open stream to the assembly output stream. |
void |
generate()
generate the code. |
(package private) void |
generateClassTable()
write the class table to the asm file. |
(package private) void |
generateClassTableEntry(Klass cl)
write one class table entry to the asm file. |
(package private) void |
generateClinitCode()
write the code that calls the <clinit> methods. |
(package private) void |
generateConstantStrings()
write the constant strings. |
(package private) void |
generateHeader()
write the (more or less constant) header part of the asm file. |
(package private) void |
generateLeadout()
write the leadout code. |
(package private) void |
generateMethod(MethodInfo method)
write a single method. |
(package private) void |
generateMultianewarray(Klass cls,
int dimensions,
int offsetToLength,
java.lang.String labelPrefix)
generate code for a 'multianewarray' instruction. |
(package private) void |
generatePilotMain()
write PalmOS PilotMain code. |
(package private) void |
generateResources()
write the resources section. |
(package private) void |
generateStackAdjust(int delta)
generate a stack-adjust instruction as a replacement for unneeded bytecodes. |
(package private) void |
generateStatic()
write the section for the static fields. |
(package private) void |
generateSubroutines()
write the needed subroutines. |
(package private) void |
generateVtable(Klass cl)
write the vtable and the classname for this class |
(package private) void |
generateVtableAll()
write classname and (if needed) vtable for all classes. |
void |
insertNatives(Klass cls)
insert native methods into a class. |
(package private) void |
loadAllNatives()
load all native methods. |
(package private) int |
localToOffset(int local,
int argLimit)
translate a JVM local-var index to a frame-pointer (a6) offset. |
(package private) void |
report()
|
java.lang.String |
toString()
the full name of this class. |
void |
updateAll()
update the 'needed' state of all elements that the back-end's implementation depends upon. |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.io.PrintWriter asmout
java.lang.String asmoutFilename
java.lang.String projectname
static int depCounter
java.util.Hashtable allNatives
Constructor Detail |
OptiAsmBackEnd(java.lang.String projectname, java.lang.String baseDirectory)
Method Detail |
public void insertNatives(Klass cls)
public void updateAll()
void loadAllNatives()
void copyStream(java.io.InputStream stream, java.lang.String name)
public void generate()
void generateHeader()
void generateClassTableEntry(Klass cl)
void generateClassTable()
void generateVtable(Klass cl)
void generateVtableAll()
void generateStatic()
void generateConstantStrings()
void generatePilotMain()
void generateMethod(MethodInfo method)
void generateMultianewarray(Klass cls, int dimensions, int offsetToLength, java.lang.String labelPrefix)
cls
- the array class to be instantiateddimensions
- the number of dimensionsoffsetToLength
- the stack-relative offset where we find
the length for this dimensionlabelPrefix
- prefix to be used for branch labels within
this 'multianewarray' code blockvoid generateStackAdjust(int delta)
delta
- the stack growth to be simulated (in 4-byte int-units)void generateClinitCode()
void generateSubroutines()
void generateLeadout()
void generateResources()
java.lang.String commentFilter(java.lang.String s)
int localToOffset(int local, int argLimit)
local
- the index of the local var (from the bytecode).argLimit
- the first local-index not belonging to an argument.public java.lang.String toString()
void report()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |