Skip to content

Remove old init checker #12561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions compiler/src/dotty/tools/dotc/transform/init/Cache.scala

This file was deleted.

15 changes: 0 additions & 15 deletions compiler/src/dotty/tools/dotc/transform/init/Checker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class Checker extends MiniPhase {

val phaseName = "initChecker"

// cache of class summary
private val cache = new Cache

private val semantic = new Semantic

override val runsAfter = Set(Pickler.name)
Expand All @@ -49,18 +46,6 @@ class Checker extends MiniPhase {

// A concrete class may not be instantiated if the self type is not satisfied
if (instantiable && cls.enclosingPackageClass != defn.StdLibPatchesPackage.moduleClass) {
implicit val state: Checking.State = Checking.State(
visited = Set.empty,
path = Vector.empty,
thisClass = cls,
fieldsInited = mutable.Set.empty,
parentsInited = mutable.Set.empty,
safePromoted = mutable.Set.empty,
env = Env(ctx.withOwner(cls), cache)
)

// Checking.checkClassBody(tree)

import semantic._
val tpl = tree.rhs.asInstanceOf[Template]
val thisRef = ThisRef(cls)
Expand Down
Loading