aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/passes/Inline.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/Inline.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/Inline.scala')
-rw-r--r--src/main/scala/firrtl/passes/Inline.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/firrtl/passes/Inline.scala b/src/main/scala/firrtl/passes/Inline.scala
index f1b71149..d120426b 100644
--- a/src/main/scala/firrtl/passes/Inline.scala
+++ b/src/main/scala/firrtl/passes/Inline.scala
@@ -52,7 +52,7 @@ object InlineInstances extends Transform {
}
def checkInstance(cn: ComponentName): Unit = {
var containsCN = false
- def onStmt(name: String)(s: Stmt): Stmt = {
+ def onStmt(name: String)(s: Statement): Statement = {
s match {
case WDefInstance(_, inst_name, module_name, tpe) =>
if (name == inst_name) {
@@ -106,7 +106,7 @@ object InlineInstances extends Transform {
case e => e map onExp
}
// Recursive. Inlines tagged instances
- def onStmt(s: Stmt): Stmt = s match {
+ def onStmt(s: Statement): Statement = s match {
case WDefInstance(info, instName, moduleName, instTpe) => {
def rename(name:String): String = {
val newName = instName + inlineDelim + name
@@ -114,7 +114,7 @@ object InlineInstances extends Transform {
newName
}
// Rewrites references in inlined statements from ref to inst$ref
- def renameStmt(s: Stmt): Stmt = {
+ def renameStmt(s: Statement): Statement = {
def renameExp(e: Expression): Expression = {
e map renameExp match {
case WRef(name, tpe, kind, gen) => WRef(rename(name), tpe, kind, gen)
@@ -139,7 +139,7 @@ object InlineInstances extends Transform {
case m: ExtModule => throw new PassException("Cannot inline external module")
case m: Module => m
}
- val stmts = mutable.ArrayBuffer[Stmt]()
+ val stmts = mutable.ArrayBuffer[Statement]()
for (p <- instInModule.ports) {
stmts += DefWire(p.info, rename(p.name), p.tpe)
}