SSA - Basic block optimizations

This commit is contained in:
Ginger Bill
2016-10-09 11:46:14 +01:00
parent e299c3693e
commit 2e0b260d3a
5 changed files with 164 additions and 72 deletions

View File

@@ -8,16 +8,12 @@ struct Array {
isize capacity;
T &operator[](isize index) {
if (count > 0) {
GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
}
GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
return data[index];
}
T const &operator[](isize index) const {
if (count > 0) {
GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
}
GB_ASSERT_MSG(0 <= index && index < count, "Index out of bounds");
return data[index];
}
};