Implement "legacy" REPL wrappers on top of the "new" scripting infrastructure

This commit is contained in:
Ilya Chernikov
2019-04-30 15:43:33 +02:00
parent 010ae5326d
commit 46915df56f
18 changed files with 631 additions and 127 deletions
@@ -96,5 +96,11 @@ open class AggregatedReplStageState<T1, T2>(val state1: IReplStageState<T1>, val
override fun getNextLineNo() = state1.getNextLineNo()
override val currentGeneration: Int get() = state1.currentGeneration
override fun dispose() {
state2.dispose()
state1.dispose()
super.dispose()
}
}
@@ -90,7 +90,8 @@ sealed class ReplCompileResult : Serializable {
val classes: List<CompiledClassData>,
val hasResult: Boolean,
val classpathAddendum: List<File>,
val type: String?
val type: String?,
val data: Any? // TODO: temporary; migration to new scripting infrastructure
) : ReplCompileResult() {
companion object { private val serialVersionUID: Long = 2L }
}
@@ -63,7 +63,6 @@ interface IReplStageState<T> {
else throw IllegalArgumentException("$this is not an expected instance of IReplStageState")
fun dispose() {
history.reset()
}
}