[JS IR] Extract adding of function call to another function

[JS IR] Add option for dce mode

[JS IR] Add logging to non useful declarations if appropriate dce mode

[JS IR] Add mode with throwing exception

[JS IR] unreachableDeclaration method is in rootDeclarations

[JS IR] Add js extra help arg with dce mode and include debug.kt to compile unreachableMethod

[JS IR] unreachableDeclaration as internal to not reproduce stdlib api

[JS IR] Fix description of dce mode argument

- Use console.error instead of console.log
- Use JsError instead Kotlin exception for lightweight

[JS IR] Remove body for throwing exception

[JS IR] Remove default parameter in unreachableDeclaration

[JS IR] Process without removing fields and declaration containers

[JS IR] Rename dce mode on dce runtime diagnostic

[JS IR] Use console.trace instead of console.error

[JS IR] Extract JsError

- Fix naming in prependFunctionCall
- Fix description on runtime diagnostic argument
- Using message collector instead of throwing exception

[JS IR] Distinguish unreachableMethods for log and exception

[JS IR] Extract checking of Kotlin packages of IrField

^KT-45059 fixed
This commit is contained in:
Ilya Goncharov
2021-02-01 16:22:07 +03:00
parent 5568ceef68
commit bd2601f289
14 changed files with 189 additions and 34 deletions
+2
View File
@@ -11,6 +11,8 @@ where advanced options include:
-Xir-dce-driven Perform a more experimental faster dead code elimination
-Xir-dce-print-reachability-info
Print declarations' reachability info to stdout during performing DCE
-Xir-dce-runtime-diagnostic={log|exception}
Enable runtime diagnostics when performing DCE instead of removing declarations
-Xir-module-name=<name> Specify a compilation module name for IR backend
-Xir-only Disables pre-IR backend
-Xir-per-module Splits generated .js per-module