[JS IR] make old Ir2Js pass all tests

This commit is contained in:
Anton Bannykh
2021-10-29 12:31:53 +03:00
committed by TeamCityServer
parent d565cc4262
commit 1ae042edc3
8 changed files with 41 additions and 29 deletions
@@ -72,6 +72,7 @@ class JsIrBackendFacade(
val splitPerModule = JsEnvironmentConfigurationDirectives.SPLIT_PER_MODULE in module.directives
val splitPerFile = JsEnvironmentConfigurationDirectives.SPLIT_PER_FILE in module.directives
val perModule = JsEnvironmentConfigurationDirectives.PER_MODULE in module.directives
val runNewIr2Js = JsEnvironmentConfigurationDirectives.RUN_NEW_IR_2_JS in module.directives
val granularity = when {
!firstTimeCompilation -> JsGenerationGranularity.WHOLE_PROGRAM
@@ -117,7 +118,8 @@ class JsIrBackendFacade(
lowerPerModule = lowerPerModule,
safeExternalBoolean = JsEnvironmentConfigurationDirectives.SAFE_EXTERNAL_BOOLEAN in module.directives,
safeExternalBooleanDiagnostic = module.directives[JsEnvironmentConfigurationDirectives.SAFE_EXTERNAL_BOOLEAN_DIAGNOSTIC].singleOrNull(),
granularity = granularity
granularity = granularity,
icCompatibleIr2Js = runNewIr2Js,
)
return loweredIr2JsArtifact(module, loweredIr, granularity)
@@ -1,4 +1,5 @@
// EXPECTED_REACHABLE_NODES: 1285
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
package foo
@@ -6,6 +6,10 @@ declare namespace JS_TESTS {
interface ExportedInternalInterface {
}
}
namespace foo {
interface FileLevelExportedExternalInterface {
}
}
namespace foo {
const exportedVal: number;
function exportedFun(): number;
@@ -14,10 +18,6 @@ declare namespace JS_TESTS {
readonly value: number;
}
}
namespace foo {
interface FileLevelExportedExternalInterface {
}
}
namespace foo {
const fileLevelExportedVal: number;
function fileLevelExportedFun(): number;