aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-27 19:21:51 -0700
committerGraydon Hoare <[email protected]>2010-07-27 19:21:51 -0700
commit80307576245aabf00285db020bbfbc4c3a891766 (patch)
tree7e408956ca3e895844dd30a1afddf64d83157da0 /src/boot/me
parentCalm some LLVM indigestion of last change. (diff)
downloadrust-80307576245aabf00285db020bbfbc4c3a891766.tar.xz
rust-80307576245aabf00285db020bbfbc4c3a891766.zip
Switch machine-type lexemes to use suffixes. Remove support for foo(bar) as a cast notation. Closes #129.
Diffstat (limited to 'src/boot/me')
-rw-r--r--src/boot/me/semant.ml2
-rw-r--r--src/boot/me/trans.ml6
-rw-r--r--src/boot/me/type.ml2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml
index 7a9aa922..16331e36 100644
--- a/src/boot/me/semant.ml
+++ b/src/boot/me/semant.ml
@@ -1204,7 +1204,7 @@ let rec atom_type (cx:ctxt) (at:Ast.atom) : Ast.ty =
| Ast.ATOM_literal {node=(Ast.LIT_bool _); id=_} -> Ast.TY_bool
| Ast.ATOM_literal {node=(Ast.LIT_char _); id=_} -> Ast.TY_char
| Ast.ATOM_literal {node=(Ast.LIT_nil); id=_} -> Ast.TY_nil
- | Ast.ATOM_literal {node=(Ast.LIT_mach (m,_,_)); id=_} -> Ast.TY_mach m
+ | Ast.ATOM_literal {node=(Ast.LIT_mach_int (m,_)); id=_} -> Ast.TY_mach m
| Ast.ATOM_lval lv -> lval_ty cx lv
;;
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index 5584b485..55ccadf7 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -1268,9 +1268,9 @@ let trans_visitor
| Ast.LIT_bool false -> imm_false
| Ast.LIT_bool true -> imm_true
| Ast.LIT_char c -> imm_of_ty (Int64.of_int c) TY_u32
- | Ast.LIT_int (i, _) -> simm i
- | Ast.LIT_uint (i, _) -> imm i
- | Ast.LIT_mach (m, n, _) -> imm_of_ty n m
+ | Ast.LIT_int i -> simm i
+ | Ast.LIT_uint i -> imm i
+ | Ast.LIT_mach_int (m, n) -> imm_of_ty n m
and trans_atom (atom:Ast.atom) : Il.operand =
iflog
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index ce5cf9f4..57fdc457 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -223,7 +223,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
match lit with
Ast.LIT_nil -> Ast.TY_nil
| Ast.LIT_bool _ -> Ast.TY_bool
- | Ast.LIT_mach (mty, _, _) -> Ast.TY_mach mty
+ | Ast.LIT_mach_int (mty, _) -> Ast.TY_mach mty
| Ast.LIT_int _ -> Ast.TY_int
| Ast.LIT_uint _ -> Ast.TY_uint
| Ast.LIT_char _ -> Ast.TY_char