[JS IR] Remove redundant legacy property access property

This commit is contained in:
Ilya Goncharov
2021-09-23 18:55:03 +03:00
committed by Space
parent 440856f593
commit 064744fae7
10 changed files with 1 additions and 55 deletions
@@ -13,18 +13,6 @@ internal fun <T : Enum<T>> enumValuesIntrinsic(): Array<T> =
internal fun <T : Enum<T>> enumValueOfIntrinsic(@Suppress("UNUSED_PARAMETER") name: String): T =
throw IllegalStateException("Should be replaced by compiler")
@PublishedApi
internal fun safePropertyGet(self: dynamic, getterName: String, propName: String): dynamic {
val getter = self[getterName]
return if (getter != null) getter.call(self) else self[propName]
}
@PublishedApi
internal fun safePropertySet(self: dynamic, setterName: String, propName: String, value: dynamic) {
val setter = self[setterName]
if (setter != null) setter.call(self, value) else self[propName] = value
}
/**
* Implements annotated function in JavaScript.
* [code] string must contain JS expression that evaluates to JS function with signature that matches annotated kotlin function