From c52c3539f02fed10cf49d70f67f7dfd8dfa8fa97 Mon Sep 17 00:00:00 2001 From: Mads Ager Date: Wed, 14 Jun 2017 11:54:02 +0200 Subject: Catch more cases of invalid input and give CompilationErrors. Previously these cases would lead to null pointer exceptions or assertion errors. R=sgjesse@google.com, vnukov@google.com Change-Id: I9684379ffbc98106bd9c4a8753861f682cb13b83 --- .../com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/android/tools/r8/ir/regalloc') diff --git a/src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java b/src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java index 4bf5dc655..52b8ab0d2 100644 --- a/src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java +++ b/src/main/java/com/android/tools/r8/ir/regalloc/LinearScanRegisterAllocator.java @@ -1520,7 +1520,7 @@ public class LinearScanRegisterAllocator implements RegisterAllocator { // If we are processing an exception edge, we need to use the throwing instruction // as the instruction we are coming from. int fromInstruction = block.exit().getNumber(); - boolean isCatch = block.isCatchSuccessor(successor); + boolean isCatch = block.hasCatchSuccessor(successor); if (isCatch) { for (Instruction instruction : block.getInstructions()) { if (instruction.instructionTypeCanThrow()) { -- cgit v1.2.3