diff options
| author | jackkoenig | 2016-09-06 13:51:37 -0700 |
|---|---|---|
| committer | Donggyu Kim | 2016-09-12 12:48:46 -0700 |
| commit | 4702bf9f257f954e19d1441b21e737f951ccfbcc (patch) | |
| tree | c9bc87f605d0352d5cca58b56e7eda501e200759 /src/main/scala/firrtl/passes/SplitExpressions.scala | |
| parent | 00bef01b6df158939406f3e744cbdda544823ae5 (diff) | |
Rework map functions as class methods
Changed code from match statements in Mappers.scala to methods on the various
IR classes. This allows custom IR nodes to implement the mapper functions and
thus work (ie. not match error) when map is called on them.
This also should have a marginal performance increase because of use of virtual
function calls rather than match statements.
Diffstat (limited to 'src/main/scala/firrtl/passes/SplitExpressions.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/SplitExpressions.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/scala/firrtl/passes/SplitExpressions.scala b/src/main/scala/firrtl/passes/SplitExpressions.scala index 90b92a35..31306046 100644 --- a/src/main/scala/firrtl/passes/SplitExpressions.scala +++ b/src/main/scala/firrtl/passes/SplitExpressions.scala @@ -1,11 +1,12 @@ package firrtl package passes -import firrtl.Mappers.{ExpMap, StmtMap} -import firrtl.Utils.{kind, gender, get_info} import firrtl.ir._ -import scala.collection.mutable +import firrtl.Mappers._ +import firrtl.Utils.{kind, gender, get_info} +// Datastructures +import scala.collection.mutable // Splits compound expressions into simple expressions // and named intermediate nodes |
