Lazy stacktrace (#2036)

* stringify stacktrace lazily

* Introduce NativePtrArray

* Added Throwable::getStackTrace
This commit is contained in:
Sergey Bogolepov
2018-09-12 20:27:01 +07:00
committed by GitHub
parent da2736337e
commit 20d3520717
10 changed files with 146 additions and 116 deletions
@@ -97,7 +97,8 @@ internal val arrayTypes = setOf(
"kotlin.FloatArray",
"kotlin.DoubleArray",
"kotlin.BooleanArray",
"kotlin.native.ImmutableBlob"
"kotlin.native.ImmutableBlob",
"kotlin.native.internal.NativePtrArray"
)
@@ -109,7 +109,8 @@ internal class RTTIGenerator(override val context: Context) : ContextUtils {
"kotlin.DoubleArray" to LLVMDoubleType()!!,
"kotlin.BooleanArray" to LLVMInt8Type()!!,
"kotlin.String" to LLVMInt16Type()!!,
"kotlin.native.ImmutableBlob" to LLVMInt8Type()!!
"kotlin.native.ImmutableBlob" to LLVMInt8Type()!!,
"kotlin.native.internal.NativePtrArray" to kInt8Ptr
)
// Keep in sync with Konan_RuntimeType.