--- a/progs/compile.scala Wed Nov 15 00:28:25 2017 +0000
+++ b/progs/compile.scala Wed Nov 15 08:12:03 2017 +0000
@@ -210,8 +210,6 @@
Assign("n",Aop("-",Var("n"),Num(1))))), // n := n - 1 };
Write("minus1")) // write minus1
-
-
// prints out the JVM-assembly program
println(compile(fib_test, "fib"))
@@ -235,14 +233,13 @@
fw.close()
}
-def compile_and_run(bl: Block, class_name: String) : Unit = {
+def compile_all(bl: Block, class_name: String) : Unit = {
compile_tofile(bl, class_name)
println("compiled ")
val test = ("java -jar jvm/jasmin-2.4/jasmin.jar " + class_name + ".j").!!
println("assembled ")
- ("java " + class_name + "/" + class_name).!!
}
-compile_and_run(fib_test, "fib")
+compile_all(fib_test, "fib")