From a5a8c7a8f5d1dd38ac3452d7c98ac7773f692304 Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Tue, 13 Oct 2020 16:33:27 -0400 Subject: Make {Stage, FirrtlStage}.run protected (#1926) * Make Stage.run protected Change the access modifier of Stage.run from no modifier to protected. This method is really an internal API that the user implements with the main entry point for a Stage being "execute" or "transform". By allowing users to access "run" they can bypass checks, mandatory file reads/writes, and wrappers. Signed-off-by: Schuyler Eldridge * Make FirrtlStage.run protected Signed-off-by: Schuyler Eldridge --- src/main/scala/firrtl/options/Stage.scala | 2 +- src/main/scala/firrtl/stage/FirrtlStage.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/scala') diff --git a/src/main/scala/firrtl/options/Stage.scala b/src/main/scala/firrtl/options/Stage.scala index 8e2c11d1..0783bfb5 100644 --- a/src/main/scala/firrtl/options/Stage.scala +++ b/src/main/scala/firrtl/options/Stage.scala @@ -23,7 +23,7 @@ abstract class Stage extends Phase { * @param annotations input annotations * @return output annotations */ - def run(annotations: AnnotationSeq): AnnotationSeq + protected def run(annotations: AnnotationSeq): AnnotationSeq /** Execute this stage on some input annotations. Annotations will be read from any input annotation files. * @param annotations input annotations diff --git a/src/main/scala/firrtl/stage/FirrtlStage.scala b/src/main/scala/firrtl/stage/FirrtlStage.scala index 0b1e6578..cfdd21e6 100644 --- a/src/main/scala/firrtl/stage/FirrtlStage.scala +++ b/src/main/scala/firrtl/stage/FirrtlStage.scala @@ -35,7 +35,7 @@ class FirrtlStage extends Stage { val shell: Shell = new Shell("firrtl") with FirrtlCli - def run(annotations: AnnotationSeq): AnnotationSeq = phase.transform(annotations) + override protected def run(annotations: AnnotationSeq): AnnotationSeq = phase.transform(annotations) } -- cgit v1.2.3