Moved everything but environment and messageCollector from K2JVMCompileEnvironmentConfiguration to CompilerConfiguration.

This commit is contained in:
Evgeny Gerashchenko
2012-07-23 18:01:27 +04:00
parent 957a494c53
commit 8dfa3d8ce9
8 changed files with 50 additions and 80 deletions
@@ -32,12 +32,10 @@ import org.jetbrains.jet.cli.jvm.compiler.KotlinToJVMBytecodeCompiler;
import org.jetbrains.jet.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.jet.config.CommonConfigurationKeys;
import org.jetbrains.jet.config.CompilerConfiguration;
import org.jetbrains.jet.lang.BuiltinsScopeExtensionMode;
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
import org.jetbrains.jet.lang.psi.JetClass;
import org.jetbrains.jet.lang.psi.JetDeclaration;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.types.JetType;
@@ -49,7 +47,6 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Collections;
import java.util.Set;
/**
@@ -81,10 +78,8 @@ public class TestlibTest extends CodegenTestCase {
private TestSuite doBuildSuite() {
try {
GenerationState generationState = KotlinToJVMBytecodeCompiler
.analyzeAndGenerate(new K2JVMCompileEnvironmentConfiguration(myEnvironment, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR,
Collections.<AnalyzerScriptParameter>emptyList(), BuiltinsScopeExtensionMode.ALL, false,
BuiltinToJavaTypesMapping.ENABLED), false);
GenerationState generationState = KotlinToJVMBytecodeCompiler.analyzeAndGenerate(
new K2JVMCompileEnvironmentConfiguration(myEnvironment, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR), false);
if (generationState == null) {
throw new RuntimeException("There were compilation errors");