Address HPackedSwitch issues raised after merge
There were some stylistic comments about the merged files. Fix those.
Add a test that PackedSwitch can be removed by DCE.
Change-Id: Idf45833956e9b58051f942a52b06a1e416606e2e
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 6b0ccf8..26df241 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -2409,7 +2409,9 @@
// will be the block containing the next Dex opcode.
class HPackedSwitch : public HTemplateInstruction<1> {
public:
- HPackedSwitch(int32_t start_value, uint32_t num_entries, HInstruction* input,
+ HPackedSwitch(int32_t start_value,
+ uint32_t num_entries,
+ HInstruction* input,
uint32_t dex_pc = kNoDexPc)
: HTemplateInstruction(SideEffects::None(), dex_pc),
start_value_(start_value),
@@ -2430,8 +2432,8 @@
DECLARE_INSTRUCTION(PackedSwitch);
private:
- int32_t start_value_;
- uint32_t num_entries_;
+ const int32_t start_value_;
+ const uint32_t num_entries_;
DISALLOW_COPY_AND_ASSIGN(HPackedSwitch);
};