JVM IR: add -Xir-check-local-names to check names for consistency
Since KotlinTypeMapper is no longer used in the JVM IR backend, we need
not run CodegenBinding.initTrace and check that names of local entities
are exactly equal to local names computed by that algorithm.
However, it's still useful as an opt-in flag, to discover issues where
unwanted elements take part in the naming (such as temporary IR
variables, see for example cb2e68fece). So we introduce a new command
line argument -Xir-check-local-names which, when the IR backend is used
(via -Xuse-ir), launches the name computation algorithm from the old
backend and then compares that the names are exactly equal to the names
computed by the IR backend in InventNamesForLocalClasses.
This commit is contained in:
+1
@@ -22,6 +22,7 @@ where advanced options include:
|
||||
-Xdisable-standard-script Disable standard kotlin script support
|
||||
-Xfriend-paths=<path> Paths to output directories for friend modules (whose internals should be visible)
|
||||
-Xmultifile-parts-inherit Compile multifile classes as a hierarchy of parts and facade
|
||||
-Xir-check-local-names Check that names of local classes and anonymous objects are the same in the IR backend as in the old backend
|
||||
-Xmodule-path=<path> Paths where to find Java 9+ modules
|
||||
-Xjava-package-prefix Package prefix for Java files
|
||||
-Xjava-source-roots=<path> Paths to directories with Java source files
|
||||
|
||||
Reference in New Issue
Block a user