Calling Kotlin from C++ runtime (#107)

* backend: support exporting Kotlin functions for C++ runtime

* runtime: implement several functions in Kotlin

* Throw{NullPointer,ArrayIndexOutOfBounds,ClassCast}Exception

* runtime: add literal declared in Kotlin as empty string

Also
* add corresponding test
* use empty string literal in strdedup2
  (however keep it disabled)

* fixup! runtime: add literal declared in Kotlin as empty string

* Review feedback: add more TheEmptyString() usages

Also improve string index checks in runtime
This commit is contained in:
SvyatoslavScherbina
2016-12-01 20:10:03 +07:00
committed by Nikolay Igotti
parent f9167ea91e
commit e38ac775ad
10 changed files with 90 additions and 48 deletions
@@ -0,0 +1,4 @@
fun main(args : Array<String>) {
val hello = "Hello world"
println(hello.subSequence(1, 1).toString())
}