TiarkRompf/virtualization-lms-core — pull request #16 by julienrf (2012-08-05 19:21:38+00:00)
Title: EmitSourceN

Hi all, I merged some work from [js-scala](https://github.com/js-scala/js-scala/blob/master/src/main/scala/scala/js/JSCompile.scala). It allows to use `emitSource` with functions having other arity than 2.

Some notes:
* The method `emitSource[A : Manifest, B : Manifest](f: Exp[A] => Exp[B], className: String, stream: PrintWriter)` is not abstract anymore so existing code should not override it anymore (or we could declare it as final to enforce this…) ;
* In a second commit I used `Sym#tp` directly to retrieve the `Manifest` associated with a symbol instead of asking the compiler to provide it implicitly. Not sure it’s a good idea but it simplified the signature of the `emitSource` method.