Compiler inline on/off flag

This commit is contained in:
Mikhael Bogdanov
2013-11-22 17:12:17 +04:00
parent 4079735bf2
commit 8533fd64ff
21 changed files with 167 additions and 12 deletions
@@ -25,6 +25,7 @@ import org.jetbrains.jet.codegen.state.GenerationState;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM;
import org.jetbrains.jet.lang.types.lang.InlineUtil;
import java.util.Collections;
import java.util.List;
@@ -57,7 +58,8 @@ public class GenerationUtils {
@NotNull
public static GenerationState compileFilesGetGenerationState(@NotNull Project project, @NotNull AnalyzeExhaust analyzeExhaust, @NotNull List<JetFile> files) {
analyzeExhaust.throwIfError();
GenerationState state = new GenerationState(project, ClassBuilderFactories.TEST, analyzeExhaust.getBindingContext(), files);
GenerationState state = new GenerationState(project, ClassBuilderFactories.TEST, analyzeExhaust.getBindingContext(), files,
InlineUtil.DEFAULT_INLINE_FLAG_FOR_TEST);
KotlinCodegenFacade.compileCorrectFiles(state, CompilationErrorHandler.THROW_EXCEPTION);
return state;
}