Add an index_type field to Table.

This parallels the `index_type` field in `Heap`.
This commit is contained in:
Dan Gohman
2018-08-28 13:57:34 -07:00
parent 0d24641f21
commit 8e2d01a675
9 changed files with 192 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ fn dynamic_addr(
pos.use_srcloc(inst);
// Start with the bounds check. Trap if `index + 1 > bound`.
let bound = pos.ins().global_value(addr_ty, bound_gv);
let bound = pos.ins().global_value(index_ty, bound_gv);
// `index > bound - 1` is the same as `index >= bound`.
let oob = pos