aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/passes/CheckInitialization.scala
diff options
context:
space:
mode:
authorJack2016-05-09 23:33:36 -0700
committerJack Koenig2016-06-10 16:32:50 -0700
commit26e33c343332c2f65bb45bc17b40a9cb7d22e2fd (patch)
treea02cead24db710db2f1832d0e3389ad256085600 /src/main/scala/firrtl/passes/CheckInitialization.scala
parent1eb8be78938721dd0d609f684c159bc1d1ddcfd6 (diff)
API Cleanup - Statement
trait Stmt -> abstract class Statement (to match Expression) abbrev. exp -> expr BulkConnect -> PartialConnect camelCase things that were snake_case case class Empty() -> case object EmptyStmt Change >120 character Statements to multiline
Diffstat (limited to 'src/main/scala/firrtl/passes/CheckInitialization.scala')
-rw-r--r--src/main/scala/firrtl/passes/CheckInitialization.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/scala/firrtl/passes/CheckInitialization.scala b/src/main/scala/firrtl/passes/CheckInitialization.scala
index 493b7a3a..d364f0dc 100644
--- a/src/main/scala/firrtl/passes/CheckInitialization.scala
+++ b/src/main/scala/firrtl/passes/CheckInitialization.scala
@@ -41,16 +41,16 @@ import annotation.tailrec
object CheckInitialization extends Pass {
def name = "Check Initialization"
- private case class VoidExpr(stmt: Stmt, voidDeps: Seq[Expression])
+ private case class VoidExpr(stmt: Statement, voidDeps: Seq[Expression])
- class RefNotInitializedException(info: Info, mname: String, name: String, trace: Seq[Stmt]) extends PassException(
+ class RefNotInitializedException(info: Info, mname: String, name: String, trace: Seq[Statement]) extends PassException(
s"$info : [module $mname] Reference $name is not fully initialized.\n" +
trace.map(s => s" ${get_info(s)} : ${s.serialize}").mkString("\n")
)
- private def getTrace(expr: WrappedExpression, voidExprs: Map[WrappedExpression, VoidExpr]): Seq[Stmt] = {
+ private def getTrace(expr: WrappedExpression, voidExprs: Map[WrappedExpression, VoidExpr]): Seq[Statement] = {
@tailrec
- def rec(e: WrappedExpression, map: Map[WrappedExpression, VoidExpr], trace: Seq[Stmt]): Seq[Stmt] = {
+ def rec(e: WrappedExpression, map: Map[WrappedExpression, VoidExpr], trace: Seq[Statement]): Seq[Statement] = {
val voidExpr = map(e)
val newTrace = voidExpr.stmt +: trace
if (voidExpr.voidDeps.nonEmpty) rec(voidExpr.voidDeps.head, map, newTrace) else newTrace
@@ -85,10 +85,10 @@ object CheckInitialization extends Pass {
hasVoid(e)
(void, voidDeps)
}
- def checkInitS(s: Stmt): Stmt = {
+ def checkInitS(s: Statement): Statement = {
s match {
case con: Connect =>
- val (hasVoid, voidDeps) = hasVoidExpr(con.exp)
+ val (hasVoid, voidDeps) = hasVoidExpr(con.expr)
if (hasVoid) voidExprs(con.loc) = VoidExpr(con, voidDeps)
con
case node: DefNode =>