[JS IR BE] New name generator

This commit is contained in:
Svyatoslav Kuzmich
2019-04-04 15:07:00 +03:00
parent a16ca5e66c
commit 977d3ef840
34 changed files with 836 additions and 529 deletions
@@ -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
}
}