[JS IR] Use mappedNames in NameTable only for REPL

And throw exception for unsupported types in mapToKey
This commit is contained in:
Zalim Bashorov
2020-12-07 19:58:02 +03:00
parent faa24e3230
commit 7c5ea414b7
6 changed files with 29 additions and 24 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -23,7 +23,7 @@ class JsReplTestAgainstBinaries : AbstractJsReplTest() {
private val dependencies = readLibrariesFromConfiguration(environment.configuration)
init {
val nameTable = NameTables(emptyList())
val nameTable = NameTables(emptyList(), mappedNames = mutableMapOf())
val compiler = JsScriptDependencyCompiler(environment.configuration, nameTable, createSymbolTable())
val runtimeBinary = compiler.compile(dependencies)
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -21,7 +21,7 @@ class JsReplTestAgainstKlib : AbstractJsReplTest() {
private var dependencyCode: String? = null
override fun createCompilationState(): JsReplCompilationState {
val nameTables = NameTables(emptyList())
val nameTables = NameTables(emptyList(), mappedNames = mutableMapOf())
val symbolTable = SymbolTable(IdSignatureDescriptor(JsManglerDesc), IrFactoryImpl)
val dependencyCompiler = JsScriptDependencyCompiler(environment.configuration, nameTables, symbolTable)
val dependencies = readLibrariesFromConfiguration(environment.configuration)