diff options
| author | Aditya Naik | 2024-05-29 17:28:22 -0700 |
|---|---|---|
| committer | Aditya Naik | 2024-05-29 17:28:22 -0700 |
| commit | bc92bb62f9f6a090e74392993e4fcfdd1f6b0676 (patch) | |
| tree | 160eb4cc2770eaf0c189fab9442d04b2b00b7919 /core/src/main/scala/chisel3/internal | |
| parent | 878d488a7c8e0d6973de58b3164022c6a102e449 (diff) | |
i got 99 errors but "firrtl not found" aint one
Diffstat (limited to 'core/src/main/scala/chisel3/internal')
| -rw-r--r-- | core/src/main/scala/chisel3/internal/MonoConnect.scala | 1 | ||||
| -rw-r--r-- | core/src/main/scala/chisel3/internal/Namer.scala | 4 | ||||
| -rw-r--r-- | core/src/main/scala/chisel3/internal/SourceInfo.scala | 17 |
3 files changed, 2 insertions, 20 deletions
diff --git a/core/src/main/scala/chisel3/internal/MonoConnect.scala b/core/src/main/scala/chisel3/internal/MonoConnect.scala index 257c543f..1389d508 100644 --- a/core/src/main/scala/chisel3/internal/MonoConnect.scala +++ b/core/src/main/scala/chisel3/internal/MonoConnect.scala @@ -7,7 +7,6 @@ import chisel3.experimental.{Analog, BaseModule, UnsafeEnum} import chisel3.internal.Builder.pushCommand import chisel3.internal.firrtl.{Connect, Converter, DefInvalid} -import scala.language.experimental.macros import chisel3.internal.sourceinfo.SourceInfo import _root_.firrtl.passes.CheckTypes import scala.annotation.tailrec diff --git a/core/src/main/scala/chisel3/internal/Namer.scala b/core/src/main/scala/chisel3/internal/Namer.scala index c36aafef..23b5b7ba 100644 --- a/core/src/main/scala/chisel3/internal/Namer.scala +++ b/core/src/main/scala/chisel3/internal/Namer.scala @@ -54,7 +54,7 @@ sealed trait NamingContextInterface { * so that actual naming calls (HasId.suggestName) can happen. * Recursively names descendants, for those whose return value have an associated name. */ - def namePrefix(prefix: String) + def namePrefix(prefix: String): String } /** Dummy implementation to allow for naming annotations in a non-Builder context. @@ -77,7 +77,7 @@ class NamingContext extends NamingContextInterface { * prefixed with the name given to the reference object, if the reference object is named in the * scope of this context. */ - def addDescendant(ref: Any, descendant: NamingContext) { + def addDescendant(ref: Any, descendant: NamingContext) = { ref match { case ref: AnyRef => // getOrElseUpdate diff --git a/core/src/main/scala/chisel3/internal/SourceInfo.scala b/core/src/main/scala/chisel3/internal/SourceInfo.scala index dc7f7fab..b4697e88 100644 --- a/core/src/main/scala/chisel3/internal/SourceInfo.scala +++ b/core/src/main/scala/chisel3/internal/SourceInfo.scala @@ -14,9 +14,6 @@ package chisel3.internal.sourceinfo -import scala.language.experimental.macros -import scala.reflect.macros.blackbox.Context - /** Abstract base class for generalized source information. */ sealed trait SourceInfo { @@ -46,17 +43,3 @@ case object DeprecatedSourceInfo extends NoSourceInfo case class SourceLine(filename: String, line: Int, col: Int) extends SourceInfo { def makeMessage(f: String => String): String = f(s"@[$filename $line:$col]") } - -/** Provides a macro that returns the source information at the invocation point. - */ -object SourceInfoMacro { - def generate_source_info(c: Context): c.Tree = { - import c.universe._ - val p = c.enclosingPosition - q"_root_.chisel3.internal.sourceinfo.SourceLine(${p.source.file.name}, ${p.line}, ${p.column})" - } -} - -object SourceInfo { - implicit def materialize: SourceInfo = macro SourceInfoMacro.generate_source_info -} |
