GenerationState refactored to be (almost) immutable and methodless (modulo little protection from reuse)

GenerationStrategy introduced to handle separately cases of regular compilation and building of JetLightClasses (this was only real overridable behavior of GenerationState in old code)
state subpackage introduced
This commit is contained in:
Alex Tkachman
2012-08-30 09:33:10 +03:00
parent 65c3b7dab0
commit b45f19c0e2
72 changed files with 613 additions and 413 deletions
@@ -27,6 +27,7 @@ import org.jetbrains.jet.JetTestUtils;
import org.jetbrains.jet.TestJdkKind;
import org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentUtil;
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
import org.jetbrains.jet.codegen.state.GenerationState;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.parsing.JetParsingTest;
import org.jetbrains.jet.test.TestCaseWithTmpdir;
@@ -91,7 +92,7 @@ public class LineNumberTest extends TestCaseWithTmpdir {
actualLineNumbers.addAll(readLineNumbers(cr));
}
catch (Throwable e) {
System.out.println(state.createText());
System.out.println(state.getFactory().createText());
throw ExceptionUtils.rethrow(e);
}
}