Skip to content

Commit

Permalink
added check if method has only a return statement for ShadowFramePlug…
Browse files Browse the repository at this point in the history
…in, otherwise java.lang.System.java fails to compile. (MobiVM#26)
  • Loading branch information
florianf authored and Tom-Ski committed Jul 11, 2016
1 parent 4770f7e commit f4f7fb1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import org.robovm.compiler.Functions;
import org.robovm.compiler.ModuleBuilder;
import org.robovm.compiler.Types;
import org.robovm.compiler.clazz.Clazz;
import org.robovm.compiler.config.Config;
import org.robovm.compiler.llvm.BasicBlock;
Expand All @@ -17,7 +16,6 @@
import org.robovm.compiler.llvm.Ret;
import org.robovm.compiler.llvm.Type;
import org.robovm.compiler.llvm.Value;
import org.robovm.compiler.llvm.Variable;
import org.robovm.compiler.llvm.VariableRef;
import org.robovm.compiler.plugin.AbstractCompilerPlugin;

Expand All @@ -42,6 +40,11 @@ public void afterMethod(Config config, Clazz clazz, SootMethod method, ModuleBui
}

BasicBlock entryBlock = function.getBasicBlocks().get(0);

//Method has only a return null statement
if (entryBlock.getInstructions().size() == 1) {
return;
}

// get functionsAddress for shadowframe
String functionSignature = function.getSignature();
Expand Down

0 comments on commit f4f7fb1

Please sign in to comment.