[JS IR] Add to IR keep possibility similar to legacy-dce one

It helps to:

- keep declarations even if they are not reachable and not exported
- not minify names of not exported declarations

Compiler argument: -Xir-keep=A,B

Can be used for top-level declarations or for member

^KT-54118 fixed
This commit is contained in:
Ilya Goncharov
2022-09-20 16:06:17 +00:00
committed by Space
parent 4863e5d47b
commit d203dc35bf
28 changed files with 460 additions and 13 deletions
+1
View File
@@ -19,6 +19,7 @@ where advanced options include:
Enable runtime diagnostics when performing DCE instead of removing declarations
-Xir-generate-inline-anonymous-functions
Lambda expressions that capture values are translated into in-line anonymous JavaScript functions
-Xir-keep Comma-separated list of fully-qualified names to not be eliminated by DCE (if it can be reached), and for which to keep non-minified names.
-Xir-minimized-member-names Perform minimization for names of members
-Xir-module-name=<name> Specify a compilation module name for IR backend
-Xir-new-ir2js New fragment-based ir2js