[Wasm] Add an option to dump declaration IR sizes to file

This commit is contained in:
Zalim Bashorov
2023-04-21 18:07:49 +02:00
parent 3c343e3074
commit bd852e87ab
5 changed files with 93 additions and 4 deletions
@@ -308,6 +308,20 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
field = value
}
@Argument(
value = "-Xir-dump-declaration-ir-sizes-to-file",
valueDescription = "<path>",
description = "Dump the IR size of each declaration to a file. " +
"The format will be chosen automatically depending on the file extension. " +
"Supported output formats include JSON for .json, JS const initialized with a plain object containing information for .js, " +
"and plain text for all other file types."
)
var irDceDumpDeclarationIrSizesToFile: String? = null
set(value) {
checkFrozen()
field = value
}
@Argument(value = "-Xir-property-lazy-initialization", description = "Perform lazy initialization for properties")
var irPropertyLazyInitialization = true
set(value) {