[JS IR] explicitly mark JsName's temporary or not
This commit is contained in:
committed by
teamcityserver
parent
7e7c84fcfb
commit
936383254a
@@ -14,7 +14,7 @@ class JsImport(
|
||||
val name: JsName,
|
||||
val alias: JsName?
|
||||
) {
|
||||
constructor(name: String, alias: String?) : this(JsName(name), alias?.let { JsName(it) })
|
||||
constructor(name: String, alias: String?) : this(JsName(name, false), alias?.let { JsName(it, false) })
|
||||
}
|
||||
|
||||
override fun accept(visitor: JsVisitor) {
|
||||
|
||||
@@ -25,10 +25,6 @@ public class JsName extends HasMetadata implements Symbol {
|
||||
this.temporary = temporary;
|
||||
}
|
||||
|
||||
public JsName(@NotNull String ident) {
|
||||
this(ident, false);
|
||||
}
|
||||
|
||||
public boolean isTemporary() {
|
||||
return temporary;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ private fun String.toAst(): JsNode {
|
||||
val (name, index) = parts
|
||||
if (ident != "${name}_$index") error("Unable to parse: $ident")
|
||||
|
||||
JsName(name).also {
|
||||
JsName(name, false).also {
|
||||
nameMapping[ident] = this to it
|
||||
}
|
||||
}
|
||||
@@ -259,7 +259,7 @@ private fun JsNode.makeNamesUnique(): JsNode {
|
||||
nameCounter[ident] = it + 1
|
||||
}
|
||||
|
||||
JsName("${ident}_$index").also {
|
||||
JsName("${ident}_$index", false).also {
|
||||
nameMap[this] = it
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user