File tree 2 files changed +4
-6
lines changed
src/dotty/tools/dotc/repl
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,13 @@ class InterpreterLoop(
73
73
val version = " .next (pre-alpha)"
74
74
75
75
/** The first interpreted command always takes a couple of seconds
76
- * due to classloading. To bridge the gap, wait until the welcome message
77
- * has been printed before calling bindSettings. That way,
78
- * the user can read the welcome message while this
79
- * command executes.
76
+ * due to classloading. To bridge the gap, we warm up the interpreter
77
+ * by letting it interpret a dummy line while waiting for the first
78
+ * line of input to be entered.
80
79
*/
81
80
def firstLine (): String = {
82
81
val futLine = Future (in.readLine(prompt))
83
- // bindSettings() // TODO adapt to dotty and re-enable (? )
82
+ interpreter.beQuietDuring(interpreter.interpret( " val __$__ = 1 + 1 " ) )
84
83
Await .result(futLine, Duration .Inf )
85
84
}
86
85
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ package repl
17
17
* - figure out why we can launch REPL only with `java`, not with `scala`.
18
18
* - make a doti command (urgent, easy)
19
19
* - create or port REPL tests (urgent, intermediate)
20
- * - make interpreter run a pseudo line on startup to pre-load compiler (somewhat urgent, easy)
21
20
* - copy improvements of current Scala REPL wrt to this version
22
21
* (somewhat urgent, intermediate)
23
22
* - re-enable bindSettings (not urgent, easy, see TODO in InterpreterLoop.scala)
You can’t perform that action at this time.
0 commit comments