JVM IR: clear BindingContext after psi2ir
This helps to reduce peak memory in lowerings/codegen by a lot. A more robust approach would be to have a separate BindingContext for each file, and clear each of them after running psi2ir on it. This would also lower peak memory usage in psi2ir. Provide a fallback workaround compiler argument -Xir-do-not-clear-binding-context just in case BindingContext is in fact used somewhere and it's not caught by tests.
This commit is contained in:
@@ -120,6 +120,9 @@ public class JVMConfigurationKeys {
|
||||
public static final CompilerConfigurationKey<Boolean> IS_IR_WITH_STABLE_ABI =
|
||||
CompilerConfigurationKey.create("Is IR with stable ABI");
|
||||
|
||||
public static final CompilerConfigurationKey<Boolean> DO_NOT_CLEAR_BINDING_CONTEXT =
|
||||
CompilerConfigurationKey.create("When using the IR backend, do not clear BindingContext between psi2ir and lowerings");
|
||||
|
||||
public static final CompilerConfigurationKey<Boolean> NO_OPTIMIZED_CALLABLE_REFERENCES =
|
||||
CompilerConfigurationKey.create("Do not use optimized callable reference superclasses available from 1.4");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user