tuned
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Thu, 14 Mar 2013 20:43:43 +0000
changeset 228 e9ef4ada308b
parent 227 10d4d20c4e4b
child 229 d8e6f0798e23
tuned
scala/ex_jvm.scala
--- 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) {