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: 6a2ac6a)
raw | patch | inline | side by side (parent: 6a2ac6a)
author | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 10 Dec 2013 21:45:06 +0000 (22:45 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 10 Dec 2013 21:45:06 +0000 (22:45 +0100) |
src/mjc2wsl.java | patch | blob | history |
diff --git a/src/mjc2wsl.java b/src/mjc2wsl.java
index 53b2b6660a5a2b6a96c1cdba3bdd63f9af15cb6b..b7c572b609049776dfe8e73865b24ce3723d24a1 100644 (file)
--- a/src/mjc2wsl.java
+++ b/src/mjc2wsl.java
prl(cmdFromEStack(loc(op - store_0)));
break;
}
+
+ //TODO getstatic, putstatic
+ //TODO getfield, putfield
+
case const_: {
prl(cmdToEStack(get4()));
break;
break;
}
- case jmp: {
- prl("CALL a" + (counter + get2()) + ";");
- break;
- }
-
- case jeq:
- case jne:
- case jlt:
- case jle:
- case jgt:
- case jge: {
- prl(getTopTwo());
- prl("IF tempb "+ getRelationFor(op)
- +" tempa THEN CALL a" + (counter + get2())
- + " FI;");
- break;
- }
-
case add: {
prl(getTopTwo());
prl("tempres := tempb + tempa;");
break;
}
- case enter: {
- prl(createComment("enter not fully procesed yet"));
- message("enter not fully procesed yet", M_WAR);
- get();
- get();
+ //TODO neg, shl, shr, inc
+ //TODO new_ newarray
+ //TODO aload, asstore, baload, bastore
+ //TODO arraylength
+ //TODO pop, dup, dup2
+
+ case jmp: {
+ prl("CALL a" + (counter + get2()) + ";");
break;
}
+
+ case jeq:
+ case jne:
+ case jlt:
+ case jle:
+ case jgt:
+ case jge: {
+ prl(getTopTwo());
+ prl("IF tempb "+ getRelationFor(op)
+ +" tempa THEN CALL a" + (counter + get2())
+ + " FI;");
+ break;
+ }
+
+ //TODO call
+
case return_: {
prl(createComment("return not fully procesed yet"));
message("return not fully procesed yet", M_WAR);
break;
}
+ case enter: {
+ prl(createComment("enter not fully procesed yet"));
+ message("enter not fully procesed yet", M_WAR);
+ get();
+ get();
+ break;
+ }
case exit: {
prl(createComment("exit not fully procesed yet"));
message("exit not fully procesed yet", M_WAR);
break;
}
+ //TODO read, print
+
// the prints
case bprint: {
prl(getTopTwo());
break;
}
+ //TODO trap
+
+
op = get();
if (op >= 0)
prl("CALL a" + counter + " END");