From ba3a9e05a6276fec976f4e53923e70b58b9f647b Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 14 Sep 2012 16:40:46 +0200 Subject: SI-6342 cleans up toolbox API 1) parseExpr => parse 2) runExpr => eval 3) Introduces compile(Tree): () => Any, since it has frequent uses --- test/pending/run/macro-reify-tagless-b/Test_2.scala | 2 +- test/pending/run/reify_closure2b.scala | 2 +- test/pending/run/reify_closure3b.scala | 2 +- test/pending/run/reify_closure4b.scala | 2 +- test/pending/run/reify_closure5b.scala | 2 +- test/pending/run/reify_closure9a.scala | 2 +- test/pending/run/reify_closure9b.scala | 2 +- test/pending/run/reify_closures11.scala | 2 +- test/pending/run/reify_newimpl_09c.scala | 2 +- test/pending/run/reify_newimpl_46.scala | 2 +- test/pending/run/reify_newimpl_53.scala | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'test/pending/run') diff --git a/test/pending/run/macro-reify-tagless-b/Test_2.scala b/test/pending/run/macro-reify-tagless-b/Test_2.scala index 4649963d05..ebd35ffe47 100644 --- a/test/pending/run/macro-reify-tagless-b/Test_2.scala +++ b/test/pending/run/macro-reify-tagless-b/Test_2.scala @@ -9,5 +9,5 @@ object Test extends App { val rhs = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant("hello world")))) val list = ValDef(NoMods, newTermName("list"), tpt, rhs) val tree = Block(list, Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Ident(list.name)))) - println(cm.mkToolBox().runExpr(tree)) + println(cm.mkToolBox().eval(tree)) } diff --git a/test/pending/run/reify_closure2b.scala b/test/pending/run/reify_closure2b.scala index 565bb03b2f..0f126c8c91 100644 --- a/test/pending/run/reify_closure2b.scala +++ b/test/pending/run/reify_closure2b.scala @@ -12,7 +12,7 @@ object Test extends App { } val toolbox = cm.mkToolBox() - val dyn = toolbox.runExpr(new Foo(y).fun.tree) + val dyn = toolbox.eval(new Foo(y).fun.tree) dyn.asInstanceOf[Int => Int] } diff --git a/test/pending/run/reify_closure3b.scala b/test/pending/run/reify_closure3b.scala index 0d806b148b..54ac52ba0b 100644 --- a/test/pending/run/reify_closure3b.scala +++ b/test/pending/run/reify_closure3b.scala @@ -14,7 +14,7 @@ object Test extends App { } val toolbox = cm.mkToolBox() - val dyn = toolbox.runExpr(new Foo(y).fun.tree) + val dyn = toolbox.eval(new Foo(y).fun.tree) dyn.asInstanceOf[Int => Int] } diff --git a/test/pending/run/reify_closure4b.scala b/test/pending/run/reify_closure4b.scala index 1a349de072..34f707e092 100644 --- a/test/pending/run/reify_closure4b.scala +++ b/test/pending/run/reify_closure4b.scala @@ -14,7 +14,7 @@ object Test extends App { } val toolbox = cm.mkToolBox() - val dyn = toolbox.runExpr(new Foo(y).fun.tree) + val dyn = toolbox.eval(new Foo(y).fun.tree) dyn.asInstanceOf[Int => Int] } diff --git a/test/pending/run/reify_closure5b.scala b/test/pending/run/reify_closure5b.scala index 3e5e1bd328..0e506bf7b5 100644 --- a/test/pending/run/reify_closure5b.scala +++ b/test/pending/run/reify_closure5b.scala @@ -12,7 +12,7 @@ object Test extends App { } val toolbox = cm.mkToolBox() - val dyn = toolbox.runExpr(new Foo(ys).fun.tree) + val dyn = toolbox.eval(new Foo(ys).fun.tree) dyn.asInstanceOf[Int => Int] } diff --git a/test/pending/run/reify_closure9a.scala b/test/pending/run/reify_closure9a.scala index dddfa3f6c2..f39ff1e2f3 100644 --- a/test/pending/run/reify_closure9a.scala +++ b/test/pending/run/reify_closure9a.scala @@ -10,7 +10,7 @@ object Test extends App { } val toolbox = cm.mkToolBox() - val dyn = toolbox.runExpr(new Foo(y).fun.tree) + val dyn = toolbox.eval(new Foo(y).fun.tree) dyn.asInstanceOf[Int] } diff --git a/test/pending/run/reify_closure9b.scala b/test/pending/run/reify_closure9b.scala index df9db9b806..a6920b4e02 100644 --- a/test/pending/run/reify_closure9b.scala +++ b/test/pending/run/reify_closure9b.scala @@ -10,7 +10,7 @@ object Test extends App { } val toolbox = cm.mkToolBox() - val dyn = toolbox.runExpr(new Foo(y).fun.tree) + val dyn = toolbox.eval(new Foo(y).fun.tree) dyn.asInstanceOf[Int] } diff --git a/test/pending/run/reify_closures11.scala b/test/pending/run/reify_closures11.scala index 4c21033cbc..9156208b40 100644 --- a/test/pending/run/reify_closures11.scala +++ b/test/pending/run/reify_closures11.scala @@ -10,7 +10,7 @@ object Test extends App { } val toolbox = cm.mkToolBox() - val dyn = toolbox.runExpr(fun().tree) + val dyn = toolbox.eval(fun().tree) val foo = dyn.asInstanceOf[Int] println(foo) } \ No newline at end of file diff --git a/test/pending/run/reify_newimpl_09c.scala b/test/pending/run/reify_newimpl_09c.scala index e2f4a4923a..6bde36328e 100644 --- a/test/pending/run/reify_newimpl_09c.scala +++ b/test/pending/run/reify_newimpl_09c.scala @@ -14,7 +14,7 @@ object Test extends App { val code = foo[Int] println(code.tree.freeTypes) val W = code.tree.freeTypes(2) - cm.mkToolBox().runExpr(code.tree, Map(W -> definitions.IntTpe)) + cm.mkToolBox().eval(code.tree, Map(W -> definitions.IntTpe)) println(code.eval) } } \ No newline at end of file diff --git a/test/pending/run/reify_newimpl_46.scala b/test/pending/run/reify_newimpl_46.scala index 239c53953b..d063be0486 100644 --- a/test/pending/run/reify_newimpl_46.scala +++ b/test/pending/run/reify_newimpl_46.scala @@ -8,7 +8,7 @@ object Test extends App { val code = reify{val x: T[String] = null; println("ima worx"); x}.tree println(code.freeTypes) val T = code.freeTypes(0) - cm.mkToolBox().runExpr(code, Map(T -> definitions.ListClass.asType)) + cm.mkToolBox().eval(code, Map(T -> definitions.ListClass.asType)) } new C[List] diff --git a/test/pending/run/reify_newimpl_53.scala b/test/pending/run/reify_newimpl_53.scala index a73a0b94cb..54fa4bec1d 100644 --- a/test/pending/run/reify_newimpl_53.scala +++ b/test/pending/run/reify_newimpl_53.scala @@ -11,7 +11,7 @@ object Test extends App { }.tree println(code.freeTypes) val T = code.freeTypes(0) - cm.mkToolBox().runExpr(code, Map(T -> definitions.StringClass.asType)) + cm.mkToolBox().eval(code, Map(T -> definitions.StringClass.asType)) } new C[String] -- cgit v1.2.3