From d754f9f044b5b56a9af1357bb98a71836d2f15ed Mon Sep 17 00:00:00 2001 From: Aditya Naik Date: Thu, 19 Dec 2024 12:32:39 -0800 Subject: [PATCH] Code review updates --- core/src/main/scala-3/chisel3/Module.scala | 3 +-- core/src/main/scala/chisel3/ModuleImpl.scala | 2 +- core/src/main/scala/chisel3/internal/package.scala | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala-3/chisel3/Module.scala b/core/src/main/scala-3/chisel3/Module.scala index 2cb99c235f6..95559db5b21 100644 --- a/core/src/main/scala-3/chisel3/Module.scala +++ b/core/src/main/scala-3/chisel3/Module.scala @@ -15,8 +15,7 @@ object Module extends ObjectModuleImpl with SourceInfoDoc { */ // TODO(adkian-sifive) the callsite here explicitly passes // sourceInfo so it cannot be a contextual parameter - def apply[T <: BaseModule](bc: => T): T = _applyImpl(bc) - def do_apply[T <: BaseModule](bc: => T)(implicit sourceInfo: SourceInfo): T = apply(bc) + def apply[T <: BaseModule](bc: => T): T = _applyImpl(bc) } /** Abstract base class for Modules, which behave much like Verilog modules. diff --git a/core/src/main/scala/chisel3/ModuleImpl.scala b/core/src/main/scala/chisel3/ModuleImpl.scala index 95cd323b6c6..3127d43882c 100644 --- a/core/src/main/scala/chisel3/ModuleImpl.scala +++ b/core/src/main/scala/chisel3/ModuleImpl.scala @@ -31,7 +31,7 @@ import chisel3.experimental.hierarchy.Hierarchy private[chisel3] trait ObjectModuleImpl { - protected def _applyImpl[T <: BaseModule](bc: => T)(implicit sourceInfo: SourceInfo): T = { + protected[chisel3] def _applyImpl[T <: BaseModule](bc: => T)(implicit sourceInfo: SourceInfo): T = { // Instantiate the module definition. val module: T = evaluate[T](bc) diff --git a/core/src/main/scala/chisel3/internal/package.scala b/core/src/main/scala/chisel3/internal/package.scala index b022a38866b..e55156bb7a4 100644 --- a/core/src/main/scala/chisel3/internal/package.scala +++ b/core/src/main/scala/chisel3/internal/package.scala @@ -130,7 +130,7 @@ package object internal { * @note this is a lazy val so that calling functions in this package object doesn't create it */ private[chisel3] lazy val ViewParent = - Module.do_apply(new ViewParentAPI)(UnlocatableSourceInfo) + Module._applyImpl(new ViewParentAPI)(UnlocatableSourceInfo) private[chisel3] def requireHasProbeTypeModifier( probe: Data,