Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Apr 21, 2024
1 parent 30ee35d commit 5faf39a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ object Definition extends SourceInfoDoc {
context.warningFilters,
context.sourceRoots,
Some(context.globalNamespace),
Builder.allDefinitions,
context.loggerOptions,
context.definitions,
context.contextCache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ object Instance extends SourceInfoDoc {
implicit sourceInfo: SourceInfo
): Instance[T] = {
// Check to see if the module is already defined internally or externally
val existingMod = Builder.allDefinitions.view.flatten.map(_.proto).exists {
val existingMod = Builder.definitions.view.map(_.proto).exists {
case c: Class => c == definition.proto
case c: RawModule => c == definition.proto
case c: BaseBlackBox => c.name == definition.proto.name
Expand Down
10 changes: 3 additions & 7 deletions core/src/main/scala/chisel3/internal/Builder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,9 @@ private[chisel3] class DynamicContext(
val sourceRoots: Seq[File],
val defaultNamespace: Option[Namespace],
// Definitions from other scopes in the same elaboration, use allDefinitions below
val outerScopeDefinitions: List[Iterable[Definition[_]]],
val loggerOptions: LoggerOptions,
val definitions: ArrayBuffer[Definition[_]],
val contextCache: BuilderContextCache) {
val loggerOptions: LoggerOptions,
val definitions: ArrayBuffer[Definition[_]],
val contextCache: BuilderContextCache) {
val importedDefinitionAnnos = annotationSeq.collect { case a: ImportDefinitionAnnotation[_] => a }

// Map from proto module name to ext-module name
Expand Down Expand Up @@ -595,9 +594,6 @@ private[chisel3] object Builder extends LazyLogging {
def components: ArrayBuffer[Component] = dynamicContext.components
def definitions: ArrayBuffer[Definition[_]] = dynamicContext.definitions

/** All definitions from current elaboration, including Definitions passed as an argument to this one */
def allDefinitions: List[Iterable[Definition[_]]] = definitions :: dynamicContext.outerScopeDefinitions

def annotations: ArrayBuffer[ChiselAnnotation] = dynamicContext.annotations

def layers: mutable.LinkedHashSet[layer.Layer] = dynamicContext.layers
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ abstract class InjectorAspect[T <: RawModule, M <: RawModule](
chiselOptions.warningFilters,
chiselOptions.sourceRoots,
None,
Nil, // FIXME this maybe should somehow grab definitions from earlier elaboration
loggerOptions,
ArrayBuffer[Definition[_]](),
BuilderContextCache.empty
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/chisel3/stage/phases/Elaborate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class Elaborate extends Phase {
chiselOptions.warningFilters,
chiselOptions.sourceRoots,
None,
Nil,
loggerOptions,
ArrayBuffer[Definition[_]](),
BuilderContextCache.empty
Expand Down

0 comments on commit 5faf39a

Please sign in to comment.