KotlinToJVMBytecodeCompiler: J2K

This commit is contained in:
Dmitry Jemerov
2016-01-13 17:48:30 +01:00
parent 0d88595baf
commit bccd64de19
3 changed files with 250 additions and 329 deletions
@@ -61,7 +61,7 @@ public class StdlibTest extends KotlinTestWithEnvironment {
}
public void testStdlib() throws ClassNotFoundException {
GenerationState state = KotlinToJVMBytecodeCompiler.analyzeAndGenerate(getEnvironment());
GenerationState state = KotlinToJVMBytecodeCompiler.INSTANCE.analyzeAndGenerate(getEnvironment());
if (state == null) {
fail("There were compilation errors");
}
@@ -32,7 +32,6 @@ import org.jetbrains.kotlin.config.ContentRootsKt;
import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform;
import org.jetbrains.kotlin.script.KotlinScriptDefinition;
import org.jetbrains.kotlin.script.KotlinScriptDefinitionProvider;
import org.jetbrains.kotlin.script.ScriptParameter;
import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.KotlinTestUtils;
@@ -87,7 +86,7 @@ public class ScriptTest {
KotlinCoreEnvironment.createForProduction(rootDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
try {
return KotlinToJVMBytecodeCompiler.compileScript(configuration, paths, environment);
return KotlinToJVMBytecodeCompiler.INSTANCE.compileScript(configuration, paths, environment);
}
catch (CompilationException e) {
messageCollector.report(CompilerMessageSeverity.EXCEPTION, OutputMessageUtil.renderException(e),