gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34fbcd7)
raw | patch | inline | side by side (parent: 34fbcd7)
author | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 10 Dec 2013 22:38:18 +0000 (23:38 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 10 Dec 2013 23:12:06 +0000 (00:12 +0100) |
src/mjc2wsl.java | patch | blob | history |
diff --git a/src/mjc2wsl.java b/src/mjc2wsl.java
index f84fc3a29ae758a6575b950d061f6ed936d42487..86743cf4ce550065181487564ebba4ce00415dec 100644 (file)
--- a/src/mjc2wsl.java
+++ b/src/mjc2wsl.java
"C:\" This file automatically converted from microjava bytecode\";\n"
+"C:\" with mjc2wsl v "+versionN+"\";\n");
- ret.append("VAR < tempa := 0, tempb := 0, tempres :=0,\n");
+ ret.append("VAR < tempa := 0, tempb := 0, tempres :=0,\n\t");
for (int i = 0; i <= 3; i++)
- ret.append("loc" + i + " := 0, ");
- ret.append("\n estack := < >, mstack := < >, t_e_m_p := 0 > :");
+ ret.append("mjvm_loc" + i + " := 0, ");
+ ret.append("\n mjvm_estack := < >, mjvm_mstack := < >, ");
+ ret.append("\n mjvm_fp := 0, mjvm_sp := 0,");
+ ret.append("\n t_e_m_p := 0 > :");
return ret.toString();
}
}
private String loc(int i){
- return "loc" + i;
+ return "mjvm_loc" + i;
}
/**
//Expression stack
private String cmdToEStack(int i) {
- return "estack := <" + i + " > ++ estack;";
+ return "mjvm_estack := <" + i + " > ++ mjvm_estack;";
}
private String cmdToEStack(String i) {
- return "estack := <" + i + " > ++ estack;";
+ return "mjvm_estack := <" + i + " > ++ mjvm_estack;";
}
private String cmdFromEStack(String st) {
- return st + " := HEAD(estack); estack := TAIL(estack);";
+ return st + " := HEAD(mjvm_estack); mjvm_estack := TAIL(mjvm_estack);";
}
private String getTopTwo(){
//Method stack
private String cmdToMStack(int i) {
- return "mstack := <" + i + " > ++ mstack;";
+ return "mjvm_mstack := <" + i + " > ++ mjvm_mstack;";
}
private String cmdToMStack(String i) {
- return "mstack := <" + i + " > ++ mstack;";
+ return "mjvm_mstack := <" + i + " > ++ mjvm_mstack;";
}
private String cmdFromMStack(String st) {
- return st + " := HEAD(mstack); mstack := TAIL(mstack);";
+ return st + " := HEAD(mjvm_mstack); mjvm_mstack := TAIL(mjvm_mstack);";
}
private String getRelationFor(int opcode) throws Exception {