Revert "[Wasm][Temporary] Stubs for typeOf and ::class constructs"
This reverts commit 8dc81b6c57.
This commit is contained in:
committed by
TeamCityServer
parent
7d56ef1925
commit
d9f2bd7963
@@ -45,11 +45,6 @@ class WasmSymbols(
|
||||
private val kotlinTestPackage: PackageViewDescriptor =
|
||||
context.module.getPackage(FqName("kotlin.test"))
|
||||
|
||||
private val kotlinReflectPackage: PackageViewDescriptor =
|
||||
context.module.getPackage(FqName("kotlin.reflect"))
|
||||
|
||||
val typeOf = getFunction("typeOf", kotlinReflectPackage)
|
||||
|
||||
override val throwNullPointerException = getInternalFunction("THROW_NPE")
|
||||
override val throwISE = getInternalFunction("THROW_ISE")
|
||||
override val throwTypeCastException = getInternalFunction("THROW_CCE")
|
||||
|
||||
-16
@@ -64,17 +64,6 @@ class BodyGenerator(val context: WasmFunctionCodegenContext) : IrElementVisitorV
|
||||
error("Unexpected element of type ${element::class}")
|
||||
}
|
||||
|
||||
override fun visitClassReference(expression: IrClassReference) {
|
||||
body.buildCall(context.referenceFunction(wasmSymbols.throwISE))
|
||||
body.buildUnreachable()
|
||||
}
|
||||
|
||||
override fun visitGetClass(expression: IrGetClass) {
|
||||
body.buildCall(context.referenceFunction(wasmSymbols.throwISE))
|
||||
body.buildUnreachable()
|
||||
}
|
||||
|
||||
|
||||
override fun visitThrow(expression: IrThrow) {
|
||||
generateExpression(expression.value)
|
||||
body.buildThrow(context.tagIdx)
|
||||
@@ -345,11 +334,6 @@ class BodyGenerator(val context: WasmFunctionCodegenContext) : IrElementVisitorV
|
||||
}
|
||||
|
||||
when (function.symbol) {
|
||||
wasmSymbols.typeOf -> {
|
||||
body.buildCall(context.referenceFunction(wasmSymbols.throwISE))
|
||||
body.buildGetUnit()
|
||||
}
|
||||
|
||||
wasmSymbols.wasmClassId -> {
|
||||
val klass = call.getTypeArgument(0)!!.getClass()
|
||||
?: error("No class given for wasmClassId intrinsic")
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: CLASS_REFERENCES
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
import kotlin.coroutines.*
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun nonGenericId(x: Any?) = x
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
fun box(): String {
|
||||
lateinit var str: String
|
||||
try {
|
||||
|
||||
Vendored
+3
@@ -1,5 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
import kotlin.UninitializedPropertyAccessException
|
||||
|
||||
fun runNoInline(f: () -> Unit) = f()
|
||||
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
import kotlin.UninitializedPropertyAccessException
|
||||
|
||||
fun runNoInline(f: () -> Unit) = f()
|
||||
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
import kotlin.UninitializedPropertyAccessException
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
import kotlin.UninitializedPropertyAccessException
|
||||
|
||||
fun box(): String {
|
||||
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
// FILE: lateinit.kt
|
||||
|
||||
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
import kotlin.UninitializedPropertyAccessException
|
||||
|
||||
lateinit var str: String
|
||||
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: REFLECTION
|
||||
|
||||
import kotlin.UninitializedPropertyAccessException
|
||||
|
||||
lateinit var str: String
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
|
||||
Reference in New Issue
Block a user