[JS IR] Add runtime API to throw ISE in case of compiled code with errors

This commit is contained in:
Roman Artemev
2020-07-08 20:41:20 +03:00
parent b3199d14b8
commit 8a810e2a5e
@@ -117,5 +117,10 @@ internal external class JsObject {
} }
} }
// Note: once some error-compilation design happened consider to distinguish a special exception for error-code.
internal fun errorCode(description: String): Nothing {
throw IllegalStateException(description)
}
internal fun <T, R> boxIntrinsic(@Suppress("UNUSED_PARAMETER") x: T): R = error("Should be lowered") internal fun <T, R> boxIntrinsic(@Suppress("UNUSED_PARAMETER") x: T): R = error("Should be lowered")
internal fun <T, R> unboxIntrinsic(@Suppress("UNUSED_PARAMETER") x: T): R = error("Should be lowered") internal fun <T, R> unboxIntrinsic(@Suppress("UNUSED_PARAMETER") x: T): R = error("Should be lowered")