Enable parameter assertions in BytecodeToolwindow

This commit is contained in:
Andrey Breslav
2013-02-04 14:36:08 +04:00
parent 4ca522bf0e
commit ae5aeef147
@@ -33,6 +33,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
import org.jetbrains.jet.codegen.*;
import org.jetbrains.jet.codegen.state.GenerationState;
import org.jetbrains.jet.codegen.state.Progress;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.plugin.internal.Location;
import org.jetbrains.jet.plugin.project.WholeProjectAnalyzerFacade;
@@ -90,7 +91,8 @@ public class BytecodeToolwindow extends JPanel implements Disposable {
if (exhaust.isError()) {
return printStackTraceToString(exhaust.getError());
}
state = new GenerationState(jetFile.getProject(), ClassBuilderFactories.TEXT, exhaust.getBindingContext(), Collections.singletonList(jetFile));
state = new GenerationState(jetFile.getProject(), ClassBuilderFactories.TEXT, Progress.DEAF, exhaust.getBindingContext(),
Collections.singletonList(jetFile), BuiltinToJavaTypesMapping.ENABLED, true, true, true);
KotlinCodegenFacade.compileCorrectFiles(state, CompilationErrorHandler.THROW_EXCEPTION);
}
catch (ProcessCanceledException e) {
@@ -104,7 +106,7 @@ public class BytecodeToolwindow extends JPanel implements Disposable {
final ClassFileFactory factory = state.getFactory();
for (String filename : factory.files()) {
answer.append("// ================ ");
answer.append("// ================");
answer.append(filename);
answer.append(" =================\n");
answer.append(factory.asText(filename)).append("\n\n");