diff options
| author | Jim Lawson | 2017-04-25 08:44:35 -0700 |
|---|---|---|
| committer | GitHub | 2017-04-25 08:44:35 -0700 |
| commit | 4a6396ca5ff9dfba9019552012bce459ef3c3b1e (patch) | |
| tree | 940018ca04febec6f3e18b1f03700fa3f203708e /coreMacros/src | |
| parent | d439ac0144826bb170c43ae71df9782cdd0d5749 (diff) | |
Remove explicit import of NotStrict - fixes #492 (#494)
* Remove explicit import of NotStrict - fixes #492
* Provide macro for MemBase.apply().
* Provide macro for MemBase.apply().
Since a macro cannot override an abstract method, provide a concrete
apply method n VecLike() that we can override with a macro.
* Remove concrete apply() in VecLike.
Since MemBase no longer extends the trait VecLike, we do not require a concrete method to which we can apply a macro to extract the appropriate CompileOptions.
Diffstat (limited to 'coreMacros/src')
| -rw-r--r-- | coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala index a72dc340..01d133de 100644 --- a/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala +++ b/coreMacros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala @@ -30,7 +30,7 @@ trait SourceInfoTransformMacro { class UIntTransform(val c: Context) extends SourceInfoTransformMacro { import c.universe._ def bitset(off: c.Tree, dat: c.Tree): c.Tree = { - q"$thisObj.do_bitSet($off, $dat)($implicitSourceInfo)" + q"$thisObj.do_bitSet($off, $dat)($implicitSourceInfo, $implicitCompileOptions)" } } @@ -45,7 +45,7 @@ class InstTransform(val c: Context) extends SourceInfoTransformMacro { class MemTransform(val c: Context) extends SourceInfoTransformMacro { import c.universe._ def apply[T: c.WeakTypeTag](size: c.Tree, t: c.Tree): c.Tree = { - q"$thisObj.do_apply($size, $t)($implicitSourceInfo)" + q"$thisObj.do_apply($size, $t)($implicitSourceInfo, $implicitCompileOptions)" } } @@ -72,7 +72,7 @@ class VecTransform(val c: Context) extends SourceInfoTransformMacro { q"$thisObj.do_fill($n)($gen)($implicitSourceInfo, $implicitCompileOptions)" } def contains(x: c.Tree)(ev: c.Tree): c.Tree = { - q"$thisObj.do_contains($x)($implicitSourceInfo, $ev)" + q"$thisObj.do_contains($x)($implicitSourceInfo, $ev, $implicitCompileOptions)" } } @@ -97,31 +97,31 @@ class SourceInfoTransform(val c: Context) extends AutoSourceTransform { import c.universe._ def noArg(): c.Tree = { - q"$thisObj.$doFuncTerm($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)" } def thatArg(that: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($that)($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($that)($implicitSourceInfo, $implicitCompileOptions)" } def nArg(n: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($n)($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($n)($implicitSourceInfo, $implicitCompileOptions)" } def pArg(p: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($p)($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($p)($implicitSourceInfo, $implicitCompileOptions)" } def inArg(in: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($in)($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($in)($implicitSourceInfo, $implicitCompileOptions)" } def xArg(x: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($x)($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($x)($implicitSourceInfo, $implicitCompileOptions)" } def xyArg(x: c.Tree, y: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($x, $y)($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($x, $y)($implicitSourceInfo, $implicitCompileOptions)" } } @@ -148,10 +148,10 @@ class SourceInfoWhiteboxTransform(val c: whitebox.Context) extends AutoSourceTra import c.universe._ def noArg(): c.Tree = { - q"$thisObj.$doFuncTerm($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)" } def thatArg(that: c.Tree): c.Tree = { - q"$thisObj.$doFuncTerm($that)($implicitSourceInfo)" + q"$thisObj.$doFuncTerm($that)($implicitSourceInfo, $implicitCompileOptions)" } } |
