aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/trans.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-05 10:04:11 -0700
committerGraydon Hoare <[email protected]>2010-08-05 10:04:11 -0700
commit29987b56e1dafff4a850eef4e668a364340fc59b (patch)
tree6b760dd4406b6bb0087f040626f1b0e37a542f82 /src/boot/me/trans.ml
parentAdd to std._io some formatter/type-specific-writer mechanism. Make a few typ... (diff)
downloadrust-29987b56e1dafff4a850eef4e668a364340fc59b.tar.xz
rust-29987b56e1dafff4a850eef4e668a364340fc59b.zip
Move 'as' precedence up to just above relational; support indexing str and vec by all integral types. Closes #94.
Diffstat (limited to 'src/boot/me/trans.ml')
-rw-r--r--src/boot/me/trans.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index f2bb2287..f54a5d65 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -914,7 +914,8 @@ let trans_visitor
let atop = trans_atom at in
let unit_sz = ty_sz_in_current_frame ty in
let idx = next_vreg_cell word_sty in
- emit (Il.binary Il.UMUL idx atop unit_sz);
+ mov idx atop;
+ emit (Il.binary Il.UMUL idx (Il.Cell idx) unit_sz);
let elt_mem = trans_bounds_check (deref cell) (Il.Cell idx) in
(Il.Mem (elt_mem, referent_type abi ty), ty)
in