|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.lir2c.LirToC
LirToC: convert LIR into C code. It is called from coins.driver.Driver.
| Field Summary | |
Module |
compileUnit
Module to convert |
java.io.OutputStreamWriter |
out
Output Stream Writer |
java.io.PrintWriter |
stdout
print writer to output C code |
| Constructor Summary | |
LirToC(Module cU,
java.io.OutputStreamWriter fout)
Constructor (with args) |
|
LirToC(Module cU,
java.lang.String dstName)
Constructor (with args) |
|
| Method Summary | |
(package private) java.util.HashMap |
getArgMap(Function func)
getArgMap: this method gets the declaration arguments in the Function. |
java.lang.String |
getEpilogue(Function func)
getEpilogue: this method gets the epilogue of the function. |
static java.lang.String |
getInitializer(Data data)
|
(package private) java.util.HashMap |
getIsFuncOrDataMap(Module cU)
getIsFuncOrDataMap: this method gets the Function-or-Data Map in the Module object. |
(package private) java.util.HashMap |
getIsStaticMap(SymTab gmap)
getIsStaticMap: this method gets the IsStatic Map in the global symbol table. |
java.lang.String |
getPrologue(Function func)
getPrologue: this method gets the prologue of the function. |
void |
invoke()
the main routine of convertion. |
void |
invoke2(Function func)
invoke2: invoke2 method converts the Function object to the C code. |
void |
recurLirNode(LirNode root,
java.io.PrintWriter stdout)
revurLirNode: the experimental method that traverse LirNodes recursively. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.io.PrintWriter stdout
public java.io.OutputStreamWriter out
public Module compileUnit
| Constructor Detail |
public LirToC(Module cU,
java.lang.String dstName)
throws java.io.IOException
cU - The module to convert.dstName - The filename for the output(C code).
public LirToC(Module cU,
java.io.OutputStreamWriter fout)
throws java.io.IOException
cU - The module to convert.fout - The OutputStreamWriter for the output(C code).| Method Detail |
public void invoke()
public void invoke2(Function func)
func - the function to convert.
public void recurLirNode(LirNode root,
java.io.PrintWriter stdout)
root - the root node of the LirNodes.stdout - the print writer to output(C code).public java.lang.String getEpilogue(Function func)
func - The function to get the epilogue.
public java.lang.String getPrologue(Function func)
func - The function to get the prologue.
java.util.HashMap getArgMap(Function func)
func - The function to get argument map.
java.util.HashMap getIsStaticMap(SymTab gmap)
gmap - the global symbol table.
java.util.HashMap getIsFuncOrDataMap(Module cU)
cU - the Module to get HashMap entry.
public static java.lang.String getInitializer(Data data)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||