Skip to content

Commit

Permalink
Code review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
adkian-sifive committed Dec 19, 2024
1 parent dfd3245 commit d754f9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions core/src/main/scala-3/chisel3/Module.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/chisel3/ModuleImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/chisel3/internal/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d754f9f

Please sign in to comment.