[JS IR] Minor: eliminate unused vals
This commit is contained in:
committed by
Space
parent
57fdfbe860
commit
ff2f16190d
+1
-3
@@ -78,7 +78,6 @@ private fun JsNode.computeScopes(): Scope {
|
|||||||
x.name?.let { currentScope.declaredNames += it }
|
x.name?.let { currentScope.declaredNames += it }
|
||||||
val oldScope = currentScope
|
val oldScope = currentScope
|
||||||
currentScope = Scope().apply {
|
currentScope = Scope().apply {
|
||||||
parent = currentScope
|
|
||||||
currentScope.children += this
|
currentScope.children += this
|
||||||
}
|
}
|
||||||
currentScope.declaredNames += x.parameters.map { it.name }
|
currentScope.declaredNames += x.parameters.map { it.name }
|
||||||
@@ -114,8 +113,7 @@ private fun JsNode.computeScopes(): Scope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class Scope {
|
private class Scope {
|
||||||
var parent: Scope? = null
|
|
||||||
val declaredNames = mutableSetOf<JsName>()
|
val declaredNames = mutableSetOf<JsName>()
|
||||||
val usedNames = mutableSetOf<JsName>()
|
val usedNames = mutableSetOf<JsName>()
|
||||||
val children = mutableSetOf<Scope>()
|
val children = mutableSetOf<Scope>()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class NewNamerImpl(
|
|||||||
val context: JsIrBackendContext,
|
val context: JsIrBackendContext,
|
||||||
val unit: IrToJs.CodegenUnit,
|
val unit: IrToJs.CodegenUnit,
|
||||||
val exportId: (IrDeclarationWithName) -> String,
|
val exportId: (IrDeclarationWithName) -> String,
|
||||||
val stableNames: Set<String>,
|
stableNames: Set<String>,
|
||||||
) : IrNamerBase() {
|
) : IrNamerBase() {
|
||||||
val staticNames = NameTable<IrDeclaration>(
|
val staticNames = NameTable<IrDeclaration>(
|
||||||
reserved = stableNames.toMutableSet()
|
reserved = stableNames.toMutableSet()
|
||||||
|
|||||||
Reference in New Issue
Block a user