[JS BE] Drop JS scripting support

JS scripting uses the old IR to JS transformer.
 The new IR to JS transformer can not be used for
 JS scripting out of the box. Patching the new transformer for
 JS scripting is potentially dangerous and requires a lot of effort.
 Dropping JS scripting and the old IR to JS transformer allows to
 refactor and simplify JS BE codebase.
This commit is contained in:
Alexander Korepanov
2022-11-03 14:26:11 +01:00
committed by Space Team
parent d75bbc49e7
commit d5e9e87538
41 changed files with 14 additions and 1860 deletions
@@ -349,6 +349,15 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
var legacyDeprecatedNoWarn: Boolean by FreezableVar(false)
override fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
// TODO: 'enableJsScripting' is used in intellij tests
// Drop it after removing the usage from the intellij repository:
// https://github.com/JetBrains/intellij-community/blob/master/plugins/kotlin/gradle/gradle-java/tests/test/org/jetbrains/kotlin/gradle/CompilerArgumentsCachingTest.kt#L329
if (enableJsScripting) {
collector.report(
CompilerMessageSeverity.WARNING, "'-Xenable-js-scripting' is deprecated and will be removed in a future release"
)
}
return super.configureAnalysisFlags(collector, languageVersion).also {
it[allowFullyQualifiedNameInKClass] = wasm && wasmKClassFqn //Only enabled WASM BE supports this flag
}