Skip to content

Commit 89801f9

Browse files
committed
Cleanup the CollectEntryPoints mess
We had two slightly different copies of the files: - the object in jvm/CEP is used in the backend, the class is unused - the class in transform/CEP is used as a compiler phase, however it doesn't do anything useful: it collects entry points but they're never used anywhere. This commit removes transform/CEP and add a comment about the dead code in jvm/CEP which we need to enable and test.
1 parent 7a4568f commit 89801f9

File tree

3 files changed

+3
-110
lines changed

3 files changed

+3
-110
lines changed

compiler/src/dotty/tools/backend/jvm/CollectEntryPoints.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ import dotty.tools.dotc.util.SourcePosition
1616
import Decorators._
1717
import StdNames.nme
1818

19-
/**
20-
* Created by dark on 26/11/14.
21-
*/
19+
// FIXME: This is dead code, enable the phase and add tests for it.
2220
class CollectEntryPoints extends MiniPhase {
2321
def phaseName: String = "Collect entry points"
2422

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ class Compiler {
118118
new RestoreScopes, // Repair scopes rendered invalid by moving definitions in prior phases of the group
119119
new SelectStatic, // get rid of selects that would be compiled into GetStatic
120120
new sjs.JUnitBootstrappers, // Generate JUnit-specific bootstrapper classes for Scala.js (not enabled by default)
121-
new CollectEntryPoints, // Find classes with main methods
121+
// FIXME: See comment in CollectEntryPoints
122+
// new CollectEntryPoints, // Find classes with main methods
122123
new CollectSuperCalls) :: // Find classes that are called with super
123124
Nil
124125

compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)