KotlinCompiler -stubs option

* do not fail on errors
* do not analyze function bodies
* generate "throw new RuntimeException()" in bytecode
This commit is contained in:
Stepan Koltsov
2012-02-28 15:52:59 +04:00
parent 64dc73fef2
commit 4ea99fc6ca
25 changed files with 293 additions and 143 deletions
@@ -116,7 +116,7 @@ public abstract class CodegenTestCase extends JetLiteFixture {
}
protected String generateToText() {
GenerationState state = new GenerationState(getProject(), ClassBuilderFactory.TEXT);
GenerationState state = new GenerationState(getProject(), ClassBuilderFactories.TEXT);
AnalyzingUtils.checkForSyntacticErrors(myFile);
state.compile(myFile);
@@ -159,7 +159,7 @@ public abstract class CodegenTestCase extends JetLiteFixture {
@NotNull
protected ClassFileFactory generateClassesInFile() {
try {
GenerationState state = new GenerationState(getProject(), ClassBuilderFactory.BINARIES);
GenerationState state = new GenerationState(getProject(), ClassBuilderFactories.binaries(false));
AnalyzingUtils.checkForSyntacticErrors(myFile);
state.compile(myFile);