Put lines history into all data structures returned by repl, refactor storage and passing of the history for that

This commit is contained in:
Ilya Chernikov
2016-11-21 19:16:55 +01:00
parent 125cc6ebfb
commit 7a79fff9d6
12 changed files with 156 additions and 84 deletions
@@ -71,8 +71,8 @@ open class KotlinRemoteReplClientBase(
})
}
override fun check(codeLine: ReplCodeLine, history: Iterable<ReplCodeLine>): ReplCheckResult {
return compileService.remoteReplLineCheck(sessionId, codeLine, history.toList()).get()
override fun check(codeLine: ReplCodeLine, history: List<ReplCodeLine>): ReplCheckResult {
return compileService.remoteReplLineCheck(sessionId, codeLine, history).get()
}
}
@@ -101,8 +101,8 @@ class KotlinRemoteReplCompiler(
operationsTracer = operationsTracer
), ReplCompiler {
override fun compile(codeLine: ReplCodeLine, history: Iterable<ReplCodeLine>): ReplCompileResult {
return compileService.remoteReplLineCompile(sessionId, codeLine, history.toList()).get()
override fun compile(codeLine: ReplCodeLine, history: List<ReplCodeLine>): ReplCompileResult {
return compileService.remoteReplLineCompile(sessionId, codeLine, history).get()
}
}
@@ -138,7 +138,7 @@ class KotlinRemoteReplEvaluator(
operationsTracer = operationsTracer
), ReplEvaluator {
override fun eval(codeLine: ReplCodeLine, history: Iterable<ReplCodeLine>): ReplEvalResult {
return compileService.remoteReplLineEval(sessionId, codeLine, history.toList()).get()
override fun eval(codeLine: ReplCodeLine, history: List<ReplCodeLine>): ReplEvalResult {
return compileService.remoteReplLineEval(sessionId, codeLine, history).get()
}
}