C++'ification of Quick compiler's casts
o Eliminate old useless LIR casts.
o Replace remaining C-style casts with new C++ versions.
o Unified instruction encoding enum
o Expand usage of the auto-generated ostream helpers for enum LOG messages.
o Replaced all usages of intptr_t with uintptr_t.
o Fixed bug in removeRedundantBranches, and moved to common code
Change-Id: I53211c0de1be913f958c8fde915296ac08345b7e
diff --git a/src/compiler/compiler_utility.h b/src/compiler/compiler_utility.h
index 2e30380..ab91549 100644
--- a/src/compiler/compiler_utility.h
+++ b/src/compiler/compiler_utility.h
@@ -106,7 +106,7 @@
size_t numAllocated;
size_t numUsed;
- intptr_t* elemList;
+ uintptr_t* elemList;
#ifdef WITH_MEMSTATS
oatListKind kind;
#endif
@@ -140,7 +140,7 @@
uint32_t bitSize;
};
-#define GET_ELEM_N(LIST, TYPE, N) (((TYPE*) LIST->elemList)[N])
+#define GET_ELEM_N(LIST, TYPE, N) ((reinterpret_cast<TYPE*>(LIST->elemList)[N]))
#define BLOCK_NAME_LEN 80
@@ -153,12 +153,12 @@
void oatInitGrowableList(CompilationUnit* cUnit,GrowableList* gList,
size_t initLength, oatListKind kind = kListMisc);
void oatInsertGrowableList(CompilationUnit* cUnit, GrowableList* gList,
- intptr_t elem);
-void oatDeleteGrowableList(GrowableList* gList, intptr_t elem);
+ uintptr_t elem);
+void oatDeleteGrowableList(GrowableList* gList, uintptr_t elem);
void oatGrowableListIteratorInit(GrowableList* gList,
GrowableListIterator* iterator);
-intptr_t oatGrowableListIteratorNext(GrowableListIterator* iterator);
-intptr_t oatGrowableListGetElement(const GrowableList* gList, size_t idx);
+uintptr_t oatGrowableListIteratorNext(GrowableListIterator* iterator);
+uintptr_t oatGrowableListGetElement(const GrowableList* gList, size_t idx);
ArenaBitVector* oatAllocBitVector(CompilationUnit* cUnit,
unsigned int startBits, bool expandable,