diff options
| author | Graydon Hoare <[email protected]> | 2010-06-30 22:45:54 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-30 22:45:54 -0700 |
| commit | 6a0b06e56287f1de7ff096ed79fbf86e1e527290 (patch) | |
| tree | 5596e1e36c3f59dc7f25c84730705aaf28128a0b /src/boot/fe | |
| parent | No more "transplant" behavior in "let @x = y", gotta box explicitly. (diff) | |
| download | rust-6a0b06e56287f1de7ff096ed79fbf86e1e527290.tar.xz rust-6a0b06e56287f1de7ff096ed79fbf86e1e527290.zip | |
Rename 'exterior' to 'box' and 'interior' to 'local' (at least wrt. slots; keep MEM_interior for describing interior-parts-of-allocations)
Diffstat (limited to 'src/boot/fe')
| -rw-r--r-- | src/boot/fe/ast.ml | 12 | ||||
| -rw-r--r-- | src/boot/fe/item.ml | 2 | ||||
| -rw-r--r-- | src/boot/fe/parser.ml | 4 | ||||
| -rw-r--r-- | src/boot/fe/pexp.ml | 14 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/boot/fe/ast.ml b/src/boot/fe/ast.ml index 21726234..e3360f31 100644 --- a/src/boot/fe/ast.ml +++ b/src/boot/fe/ast.ml @@ -88,7 +88,7 @@ and ty = | TY_named of name | TY_type - | TY_exterior of ty + | TY_box of ty | TY_mutable of ty | TY_constrained of (ty * constrs) @@ -100,7 +100,7 @@ and ty = *) and mode = - | MODE_interior + | MODE_local | MODE_alias and slot = { slot_mode: mode; @@ -201,7 +201,7 @@ and stmt' = | STMT_init_str of (lval * string) | STMT_init_port of lval | STMT_init_chan of (lval * (lval option)) - | STMT_init_exterior of (lval * atom) + | STMT_init_box of (lval * atom) | STMT_copy of (lval * expr) | STMT_copy_binop of (lval * binop * atom) | STMT_call of (lval * lval * (atom array)) @@ -523,7 +523,7 @@ and fmt_name (ff:Format.formatter) (n:name) : unit = and fmt_mode (ff:Format.formatter) (m:mode) : unit = match m with | MODE_alias -> fmt ff "&" - | MODE_interior -> () + | MODE_local -> () and fmt_slot (ff:Format.formatter) (s:slot) : unit = match s.slot_ty with @@ -656,7 +656,7 @@ and fmt_ty (ff:Format.formatter) (t:ty) : unit = | TY_named n -> fmt_name ff n | TY_type -> fmt ff "type" - | TY_exterior t -> + | TY_box t -> fmt ff "@@"; fmt_ty ff t @@ -1167,7 +1167,7 @@ and fmt_stmt_body (ff:Format.formatter) (s:stmt) : unit = fmt_lval ff t; fmt ff ";" - | STMT_init_exterior (lv, at) -> + | STMT_init_box (lv, at) -> fmt_lval ff lv; fmt ff " = @@"; fmt_atom ff at; diff --git a/src/boot/fe/item.ml b/src/boot/fe/item.ml index 5c0a7c65..658fb8c4 100644 --- a/src/boot/fe/item.ml +++ b/src/boot/fe/item.ml @@ -242,7 +242,7 @@ and parse_stmts (ps:pstate) : Ast.stmt array = match name with Ast.NAME_base (Ast.BASE_ident ident) -> let slot = - { Ast.slot_mode = Ast.MODE_interior; + { Ast.slot_mode = Ast.MODE_local; Ast.slot_ty = None } in Ast.PAT_slot diff --git a/src/boot/fe/parser.ml b/src/boot/fe/parser.ml index 97cf8985..ab7ff56c 100644 --- a/src/boot/fe/parser.ml +++ b/src/boot/fe/parser.ml @@ -180,12 +180,12 @@ let err (str:string) (ps:pstate) = let (slot_nil:Ast.slot) = - { Ast.slot_mode = Ast.MODE_interior; + { Ast.slot_mode = Ast.MODE_local; Ast.slot_ty = Some Ast.TY_nil } ;; let (slot_auto:Ast.slot) = - { Ast.slot_mode = Ast.MODE_interior; + { Ast.slot_mode = Ast.MODE_local; Ast.slot_ty = None } ;; diff --git a/src/boot/fe/pexp.ml b/src/boot/fe/pexp.ml index d02a5f6d..1869a7d3 100644 --- a/src/boot/fe/pexp.ml +++ b/src/boot/fe/pexp.ml @@ -33,7 +33,7 @@ type pexp' = | PEXP_lit of Ast.lit | PEXP_str of string | PEXP_mutable of pexp - | PEXP_exterior of pexp + | PEXP_box of pexp | PEXP_custom of Ast.name * (pexp array) * (string option) and plval = @@ -334,7 +334,7 @@ and parse_atomic_ty (ps:pstate) : Ast.ty = | AT -> bump ps; - Ast.TY_exterior (parse_ty ps) + Ast.TY_box (parse_ty ps) | MUTABLE -> bump ps; @@ -368,7 +368,7 @@ and parse_slot (aliases_ok:bool) (ps:pstate) : Ast.slot = match (peek ps, aliases_ok) with (AND, true) -> bump ps; Ast.MODE_alias | (AND, false) -> raise (err "alias slot in prohibited context" ps) - | _ -> Ast.MODE_interior + | _ -> Ast.MODE_local in let ty = parse_ty ps in { Ast.slot_mode = mode; @@ -485,7 +485,7 @@ and parse_bottom_pexp (ps:pstate) : pexp = bump ps; let inner = parse_pexp ps in let bpos = lexpos ps in - span ps apos bpos (PEXP_exterior inner) + span ps apos bpos (PEXP_box inner) | TUP -> bump ps; @@ -1102,7 +1102,7 @@ and desugar_expr_atom | PEXP_bind _ | PEXP_spawn _ | PEXP_custom _ - | PEXP_exterior _ + | PEXP_box _ | PEXP_mutable _ -> let (_, tmp, decl_stmt) = build_tmp ps slot_auto apos bpos in let stmts = desugar_expr_init ps tmp pexp in @@ -1299,11 +1299,11 @@ and desugar_expr_init in aa port_stmts [| chan_stmt |] - | PEXP_exterior arg -> + | PEXP_box arg -> let (arg_stmts, arg_mode_atom) = desugar_expr_atom ps arg in - let stmt = ss (Ast.STMT_init_exterior (dst_lval, arg_mode_atom)) in + let stmt = ss (Ast.STMT_init_box (dst_lval, arg_mode_atom)) in aa arg_stmts [| stmt |] | PEXP_mutable arg -> |