gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
mjc2wsl - enter processing the local variables
[mjc2wsl.git] / src / mjc2wsl.java
index 917978c..f05d271 100644 (file)
@@ -32,6 +32,9 @@ public class mjc2wsl{
                        out.println("total errors:"+messageCounters[M_ERR]+" warnings:"+messageCounters[M_WAR]);
        }
        
+       private boolean addPauseAfterEachAddress=false, 
+               addPrintForEachAddress = false;
+       
        /** Constant used for marking a regular comment from the original file */
        public static final char C_REG = ' ';
        /**
@@ -286,6 +289,11 @@ public class mjc2wsl{
                        if (originalInComments)
                                prl(createComment(describeOpCode(op), C_OC));
                        prl("a" + counter + " == ");
+                       if (addPrintForEachAddress) {
+                                       prl("PRINT(\"a"+counter+"\");");
+                                       if (addPauseAfterEachAddress)
+                                                       prl("debug_disposable_string := @Read_Line(Standard_Input_Port);");
+                       }
                        switch (op) {
                        case load: {
                                prl(cmdToEStack(loc(get())));
@@ -402,8 +410,11 @@ public class mjc2wsl{
                        case enter: {
                                prl(createComment("enter not fully procesed yet"));
                                message("enter not fully procesed yet", M_WAR);
+                               int parameters = get();
+                               
                                get();
-                               get();
+                               for (int i = parameters-1; i >= 0; i--)
+                                               prl(cmdFromEStack("mjvm_loc" + i));
                                break;
                        }
                        case exit: {
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner