--- a/scala/ex_jvm.scala Thu Mar 14 19:18:39 2013 +0000
+++ b/scala/ex_jvm.scala Thu Mar 14 20:43:43 2013 +0000
@@ -74,7 +74,7 @@
def compile(f: Rec, ns: List[Int]) : Unit = {
- val class_name = "Prog" // name of the class and program
+ val class_name = "Prog" + ns.mkString // name of the class and program
val (aprog, res, max) = compile_rec(f)
val init_code = init_regs(ns.padTo(max, 0)) // initialising registers with input data
@@ -100,11 +100,12 @@
println("FACTORIAL")
-for (i <- 7 to 14) {
+for (i <- 7 to 9) {
println("Input: " + i)
compile(Fact, List(i))
}
+
println("PRIME TEST")
for (i <- 10 to 20) {