Release generated bytecode after each processed part
Part here means separate '.kt' file or multi-file facade Now this memory optimization doesn't work with jar's, because there is no simple way to write them incrementally.
This commit is contained in:
@@ -29,6 +29,7 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler;
|
||||
import org.jetbrains.kotlin.cli.jvm.config.JvmContentRootsKt;
|
||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
|
||||
import org.jetbrains.kotlin.codegen.state.GenerationState;
|
||||
import org.jetbrains.kotlin.codegen.state.GenerationStateEventCallback;
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration;
|
||||
import org.jetbrains.kotlin.config.ContentRootsKt;
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
@@ -61,7 +62,8 @@ public class StdlibTest extends KotlinTestWithEnvironment {
|
||||
}
|
||||
|
||||
public void testStdlib() throws ClassNotFoundException {
|
||||
GenerationState state = KotlinToJVMBytecodeCompiler.INSTANCE.analyzeAndGenerate(getEnvironment());
|
||||
GenerationState state = KotlinToJVMBytecodeCompiler.INSTANCE.analyzeAndGenerate(
|
||||
getEnvironment(), GenerationStateEventCallback.Companion.getDO_NOTHING());
|
||||
if (state == null) {
|
||||
fail("There were compilation errors");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user