Store the key value with switch and catch blocks.

For switch blocks, the key is the enum value with the case.
For catch blocks, the key is the type id of the exception.

Change-Id: I66a7e31c917aba63a0b455ce1796e3d5e277ca5a
diff --git a/vm/compiler/CompilerIR.h b/vm/compiler/CompilerIR.h
index 95a75b8..caf6fa6 100644
--- a/vm/compiler/CompilerIR.h
+++ b/vm/compiler/CompilerIR.h
@@ -134,12 +134,6 @@
 
 struct BasicBlockDataFlow;
 
-/* FIXME - debugging prupose only */
-typedef enum BlockAttributes {
-    kEndsWithThrow = 0,
-    kCatchBlock,
-} BlockAttributes;
-
 /* For successorBlockList */
 typedef enum BlockListType {
     kNotUsed = 0,
@@ -148,9 +142,6 @@
     kSparseSwitch,
 } BlockListType;
 
-#define BA_ENDS_WITH_THROW              (1 << kEndsWithThrow)
-#define BA_CATCH_BLOCK                  (1 << kCatchBlock)
-
 typedef struct BasicBlock {
     int id;
     bool visited;
@@ -159,8 +150,6 @@
     BBType blockType;
     bool needFallThroughBranch;         // For blocks ended due to length limit
     bool isFallThroughFromInvoke;       // True means the block needs alignment
-    u4 blockAttributes;                 // FIXME - debugging purpose only
-    u4 exceptionTypeIdx;                // FIXME - will be put elsewhere
     MIR *firstMIRInsn;
     MIR *lastMIRInsn;
     struct BasicBlock *fallThrough;
@@ -177,6 +166,17 @@
     } successorBlockList;
 } BasicBlock;
 
+/*
+ * The "blocks" field in "successorBlockList" points to an array of
+ * elements with the type "SuccessorBlockInfo".
+ * For catch blocks, key is type index for the exception.
+ * For swtich blocks, key is the case value.
+ */
+typedef struct SuccessorBlockInfo {
+    BasicBlock *block;
+    int key;
+} SuccessorBlockInfo;
+
 struct LoopAnalysis;
 struct RegisterPool;