[JS IR BE]: make deleteProperty non-inline due to new inliner limitations

This commit is contained in:
Anton Bannykh
2018-10-12 15:33:21 +03:00
committed by Anton Bannykh
parent e2bf43c54f
commit 995ac7aac2
7 changed files with 15 additions and 6 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: NATIVE
class A : HashSet<Long>()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: JVM_IR
class A : HashMap<String, Double>()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: NATIVE
class A : HashSet<Long>()
@@ -1,6 +1,5 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
class MySet : HashSet<Int>() {
override fun remove(element: Int): Boolean {
return super.remove(element)
@@ -73,7 +73,8 @@ private val runtimeSourcesCommon = listOfKtFilesFrom(
"libraries/stdlib/js/src/kotlin/builtins.kt",
// Inlining of js fun doesn't update the variables inside
"libraries/stdlib/js/src/kotlin/jsTypeOf.kt"
"libraries/stdlib/js/src/kotlin/jsTypeOf.kt",
"libraries/stdlib/js/src/kotlin/collections/utils.kt"
)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1287
package foo
@@ -0,0 +1,13 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package kotlin.collections
// Copied from libraries/stdlib/js/src/kotlin/collections/utils.kt
// Current inliner doesn't rename symbols inside `js` fun
@Suppress("UNUSED_PARAMETER")
internal fun deleteProperty(obj: Any, property: Any) {
js("delete obj[property]")
}