[K/JS] Add support of compilation with ES-classes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1288
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// CHECK_CONTAINS_NO_CALLS: box except=equals;Baz_getInstance;callLocal;callLocalExtension TARGET_BACKENDS=JS
|
||||
// CHECK_CONTAINS_NO_CALLS: box except=Foo_getInstance;Bar;Baz_getInstance;callLocal;callLocalExtension IGNORED_BACKENDS=JS
|
||||
// CHECK_CONTAINS_NO_CALLS: callLocal
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1285
|
||||
package foo
|
||||
|
||||
// CHECK_CONTAINS_NO_CALLS: myMultiply except=A;imul
|
||||
// CHECK_CONTAINS_NO_CALLS: myMultiply except=A;imul;new_foo_A_16tm4z_k$
|
||||
|
||||
internal class A(val a: Int)
|
||||
|
||||
internal inline fun <T, R> with2(receiver: T, arg1: R, arg2: R, f: T.(R, R) -> R): R = receiver.f(arg1, arg2)
|
||||
|
||||
// CHECK_BREAKS_COUNT: function=myMultiply count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_LABELS_COUNT: function=myMultiply name=$l$block count=0 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_BREAKS_COUNT: function=myMultiply count=0 TARGET_BACKENDS=JS_IR,JS_IR_ES6
|
||||
// CHECK_LABELS_COUNT: function=myMultiply name=$l$block count=0 TARGET_BACKENDS=JS_IR,JS_IR_ES6
|
||||
internal fun myMultiply(a: Int, b: Int, c: Int): Int = with2(A(a), b, c) { x, y -> a*x*y }
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -209,7 +209,7 @@ fun testNullableUnderlyingType() {
|
||||
caseJsEq()
|
||||
}
|
||||
|
||||
// CHECK_NEW_COUNT: function=testUnderlyingWithEqualsOverride count=4
|
||||
// CHECK_NEW_COUNT: function=testUnderlyingWithEqualsOverride count=4 TARGET_BACKENDS=JS_IR
|
||||
// CHECK_CALLED_IN_SCOPE: scope=testUnderlyingWithEqualsOverride function=equals
|
||||
fun testUnderlyingWithEqualsOverride() {
|
||||
val x0 = ClassUnderlayingWithEquals(MyClass(0))
|
||||
|
||||
Reference in New Issue
Block a user