OSDN Git Service

ART: Allow PackedSwitch instructions with zero targets
authorDavid Brazdil <dbrazdil@google.com>
Wed, 17 Jun 2015 17:20:52 +0000 (18:20 +0100)
committerDavid Brazdil <dbrazdil@google.com>
Thu, 18 Jun 2015 16:08:13 +0000 (17:08 +0100)
commitdf75bca6bd100ca9c2c395b1b8d2f8a871ab2c62
treeb83e5d90f517e3d70cff4c35a38c4c84608084f5
parenta8b41003a717ecf399b890c18e9b0df49f55472f
ART: Allow PackedSwitch instructions with zero targets

Optimizing and the interpreter wrongly assumed that a PackedSwitch
always has at least one target. This patch removes the corresponding
DCHECKs and adds a regression test case.

This is a resubmission of CL I32b7033ed38de6f1d1a6ee5d5bf12f3a47c9b37e

Bug: 21863783
Change-Id: I04e6e124bdd16591ba27c79490e6ce183c36b691
(cherry picked from commit 2ef645ba50544b879a82ea30e606f18c9af98917)
compiler/optimizing/builder.cc
runtime/interpreter/interpreter_common.h
test/501-regression-packed-switch/expected.txt [new file with mode: 0644]
test/501-regression-packed-switch/info.txt [new file with mode: 0644]
test/501-regression-packed-switch/smali/Test.smali [new file with mode: 0644]
test/501-regression-packed-switch/src/Main.java [new file with mode: 0644]