[JS IR BE] New name generator
This commit is contained in:
@@ -19,11 +19,11 @@ internal interface InternalMap<K, V> : MutableIterable<MutableMap.MutableEntry<K
|
||||
fun clear(): Unit
|
||||
|
||||
fun createJsMap(): dynamic {
|
||||
val result = js("Object.create(null)")
|
||||
val newJsMap = js("Object.create(null)")
|
||||
// force to switch object representation to dictionary mode
|
||||
// Using js-function due to JS_IR limitations
|
||||
js("result[\"foo\"] = 1")
|
||||
js("delete result[\"foo\"]")
|
||||
return result
|
||||
js("newJsMap[\"foo\"] = 1")
|
||||
js("delete newJsMap[\"foo\"]")
|
||||
return newJsMap
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user