File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ trait Config {
55 val verbosity = System .getProperty(" lms.verbosity" ," 0" ).toInt
66 val sourceinfo = System .getProperty(" lms.sourceinfo" ," 0" ).toInt
77 val addControlDeps = System .getProperty(" lms.controldeps" ," true" ).toBoolean
8+
9+ val scalaExplicitTypes = System .getProperty(" lms.scala.explicitTypes" ," false" ).toBoolean
810
911 // memory management type for C++ target (refcnt or gc)
1012 val cppMemMgr = System .getProperty(" lms.cpp.memmgr" ," malloc" )
Original file line number Diff line number Diff line change @@ -95,7 +95,8 @@ trait ScalaCodegen extends GenericCodegen with Config {
9595 val context = sym.pos(0 )
9696 " // " + relativePath(context.fileName) + " :" + context.line
9797 }
98- stream.println(" val " + quote(sym) + " = " + rhs + extra)
98+ val typeSignature = if (scalaExplicitTypes) " : " + remap(sym.tp) else " "
99+ stream.println(" val " + quote(sym) + typeSignature + " = " + rhs + extra)
99100 }
100101
101102 def emitVarDef (sym : Sym [Variable [Any ]], rhs : String ): Unit = {
You can’t perform that action at this time.
0 commit comments