about summary refs log tree commit diff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-01-19 01:03:57 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-01-19 01:04:59 -0800
commit5b028f527f2c487a5f4196fdf3cfc7a2acef74ff (patch)
tree5888a216866e8d94d3211dbf39bb943d64d47017 /src/comp/middle
parent9df03068897602d4377a35c0ae3cf2467666a039 (diff)
Remove support for the '.' after a nullary tag in a pattern
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/debuginfo.rs2
-rw-r--r--src/comp/middle/gc.rs3
-rw-r--r--src/comp/middle/mut.rs6
-rw-r--r--src/comp/middle/shape.rs18
-rw-r--r--src/comp/middle/trans.rs30
-rw-r--r--src/comp/middle/trans_closure.rs10
-rw-r--r--src/comp/middle/trans_common.rs12
-rw-r--r--src/comp/middle/ty.rs2
-rw-r--r--src/comp/middle/typeck.rs12
9 files changed, 47 insertions, 48 deletions
diff --git a/src/comp/middle/debuginfo.rs b/src/comp/middle/debuginfo.rs
index 0a0259ec584..096fc2fb99d 100644
--- a/src/comp/middle/debuginfo.rs
+++ b/src/comp/middle/debuginfo.rs
@@ -583,7 +583,7 @@ fn create_ty(cx: @crate_ctxt, t: ty::t, ty: @ast::ty)
         ret create_pointer_type(cx, t, ty.span, md);
       }
 
-      ast::ty_infer. {
+      ast::ty_infer {
         let inferred = t_to_ty(cx, t, ty.span);
         ret create_ty(cx, t, inferred);
       }
diff --git a/src/comp/middle/gc.rs b/src/comp/middle/gc.rs
index f67ac128b5e..86093c5febb 100644
--- a/src/comp/middle/gc.rs
+++ b/src/comp/middle/gc.rs
@@ -105,8 +105,7 @@ fn type_is_gc_relevant(cx: ty::ctxt, ty: ty::t) -> bool {
     alt ty::struct(cx, ty) {
       ty::ty_nil | ty::ty_bot | ty::ty_bool | ty::ty_int(_) |
       ty::ty_float(_) | ty::ty_uint(_) | ty::ty_str |
-      ty::ty_type | ty::ty_native(_) | ty::ty_ptr(_) | ty::ty_type. |
-      ty::ty_native(_) {
+      ty::ty_type | ty::ty_ptr(_) | ty::ty_native(_) {
         ret false;
       }
 
diff --git a/src/comp/middle/mut.rs b/src/comp/middle/mut.rs
index d67a03d4a53..0eebf4e1ef9 100644
--- a/src/comp/middle/mut.rs
+++ b/src/comp/middle/mut.rs
@@ -187,9 +187,9 @@ fn check_lval(cx: @ctx, dest: @expr, msg: msg) {
         } else if !root.ds[0].mut {
             let name =
                 alt root.ds[0].kind {
-                  mut::unbox. { "immutable box" }
-                  mut::field. { "immutable field" }
-                  mut::index. { "immutable vec content" }
+                  mut::unbox { "immutable box" }
+                  mut::field { "immutable field" }
+                  mut::index { "immutable vec content" }
                 };
             mk_err(cx, dest.span, msg, name);
         }
diff --git a/src/comp/middle/shape.rs b/src/comp/middle/shape.rs
index 39835854fea..9986400dfa3 100644
--- a/src/comp/middle/shape.rs
+++ b/src/comp/middle/shape.rs
@@ -246,25 +246,25 @@ fn tag_kind(ccx: @crate_ctxt, did: ast::def_id) -> tag_kind {
 // Returns the code corresponding to the pointer size on this architecture.
 fn s_int(tcx: ty_ctxt) -> u8 {
     ret alt tcx.sess.targ_cfg.arch {
-        session::arch_x86. { shape_i32 }
-        session::arch_x86_64. { shape_i64 }
-        session::arch_arm. { shape_i32 }
+        session::arch_x86 { shape_i32 }
+        session::arch_x86_64 { shape_i64 }
+        session::arch_arm { shape_i32 }
     };
 }
 
 fn s_uint(tcx: ty_ctxt) -> u8 {
     ret alt tcx.sess.targ_cfg.arch {
-        session::arch_x86. { shape_u32 }
-        session::arch_x86_64. { shape_u64 }
-        session::arch_arm. { shape_u32 }
+        session::arch_x86 { shape_u32 }
+        session::arch_x86_64 { shape_u64 }
+        session::arch_arm { shape_u32 }
     };
 }
 
 fn s_float(tcx: ty_ctxt) -> u8 {
     ret alt tcx.sess.targ_cfg.arch {
-        session::arch_x86. { shape_f64 }
-        session::arch_x86_64. { shape_f64 }
-        session::arch_arm. { shape_f64 }
+        session::arch_x86 { shape_f64 }
+        session::arch_x86_64 { shape_f64 }
+        session::arch_arm { shape_f64 }
     };
 }
 
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 825a76f32b1..c519461887d 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1904,8 +1904,8 @@ fn call_memmove(cx: @block_ctxt, dst: ValueRef, src: ValueRef,
 
     let ccx = bcx_ccx(cx);
     let key = alt ccx.sess.targ_cfg.arch {
-      session::arch_x86. | session::arch_arm. { "llvm.memmove.p0i8.p0i8.i32" }
-      session::arch_x86_64. { "llvm.memmove.p0i8.p0i8.i64" }
+      session::arch_x86 | session::arch_arm { "llvm.memmove.p0i8.p0i8.i32" }
+      session::arch_x86_64 { "llvm.memmove.p0i8.p0i8.i64" }
     };
     let i = ccx.intrinsics;
     assert (i.contains_key(key));
@@ -2915,10 +2915,10 @@ fn trans_cast(cx: @block_ctxt, e: @ast::expr, id: ast::node_id,
 
     let newval =
         alt {in: k_in, out: k_out} {
-          {in: integral, out: integral.} {
+          {in: integral, out: integral} {
             int_cast(e_res.bcx, ll_t_out, ll_t_in, e_res.val, s_in)
           }
-          {in: float, out: float.} {
+          {in: float, out: float} {
             float_cast(e_res.bcx, ll_t_out, ll_t_in, e_res.val)
           }
           {in: integral, out: float} {
@@ -2937,10 +2937,10 @@ fn trans_cast(cx: @block_ctxt, e: @ast::expr, id: ast::node_id,
           {in: pointer, out: integral} {
             PtrToInt(e_res.bcx, e_res.val, ll_t_out)
           }
-          {in: pointer, out: pointer.} {
+          {in: pointer, out: pointer} {
             PointerCast(e_res.bcx, e_res.val, ll_t_out)
           }
-          {in: tag_, out: integral} | {in: tag_., out: float} {
+          {in: tag_, out: integral} | {in: tag_, out: float} {
             let cx = e_res.bcx;
             let lltagty = T_opaque_tag_ptr(ccx);
             let av_tag = PointerCast(cx, e_res.val, lltagty);
@@ -3559,11 +3559,11 @@ fn trans_expr(bcx: @block_ctxt, e: @ast::expr, dest: dest) -> @block_ctxt {
         assert dest == ignore;
         ret trans_check_expr(bcx, a, "Assertion");
       }
-      ast::expr_check(ast::checked_expr., a) {
+      ast::expr_check(ast::checked_expr, a) {
         assert dest == ignore;
         ret trans_check_expr(bcx, a, "Predicate");
       }
-      ast::expr_check(ast::claimed_expr., a) {
+      ast::expr_check(ast::claimed_expr, a) {
         assert dest == ignore;
         /* Claims are turned on and off by a global variable
            that the RTS sets. This case generates code to
@@ -3945,8 +3945,8 @@ fn zero_alloca(cx: @block_ctxt, llptr: ValueRef, t: ty::t)
         Store(bcx, C_null(llty), llptr);
     } else {
         let key = alt ccx.sess.targ_cfg.arch {
-          session::arch_x86. | session::arch_arm. { "llvm.memset.p0i8.i32" }
-          session::arch_x86_64. { "llvm.memset.p0i8.i64" }
+          session::arch_x86 | session::arch_arm { "llvm.memset.p0i8.i32" }
+          session::arch_x86_64 { "llvm.memset.p0i8.i64" }
         };
         let i = ccx.intrinsics;
         let memset = i.get(key);
@@ -4841,9 +4841,9 @@ fn trans_native_mod(lcx: @local_ctxt, native_mod: ast::native_mod,
     let ccx = lcx_ccx(lcx);
     let cc = lib::llvm::LLVMCCallConv;
     alt abi {
-      ast::native_abi_rust_intrinsic. { ret; }
-      ast::native_abi_cdecl. { cc = lib::llvm::LLVMCCallConv; }
-      ast::native_abi_stdcall. { cc = lib::llvm::LLVMX86StdcallCallConv; }
+      ast::native_abi_rust_intrinsic { ret; }
+      ast::native_abi_cdecl { cc = lib::llvm::LLVMCCallConv; }
+      ast::native_abi_stdcall { cc = lib::llvm::LLVMX86StdcallCallConv; }
     }
 
     for native_item in native_mod.items {
@@ -5143,7 +5143,7 @@ fn collect_native_item(ccx: @crate_ctxt,
                 }
             };
         alt fn_abi {
-          ast::native_abi_rust_intrinsic. {
+          ast::native_abi_rust_intrinsic {
             // For intrinsics: link the function directly to the intrinsic
             // function itself.
             let fn_type = type_of_fn_from_ty(
@@ -5157,7 +5157,7 @@ fn collect_native_item(ccx: @crate_ctxt,
             ccx.item_symbols.insert(id, ri_name);
           }
 
-          ast::native_abi_cdecl. | ast::native_abi_stdcall. {
+          ast::native_abi_cdecl | ast::native_abi_stdcall {
             // For true external functions: create a rust wrapper
             // and link to that.  The rust wrapper will handle
             // switching to the C stack.
diff --git a/src/comp/middle/trans_closure.rs b/src/comp/middle/trans_closure.rs
index 66002c89979..1e58ea53f9f 100644
--- a/src/comp/middle/trans_closure.rs
+++ b/src/comp/middle/trans_closure.rs
@@ -419,18 +419,18 @@ fn build_closure(bcx0: @block_ctxt,
         let nid = ast_util::def_id_of_def(cap_var.def).node;
         let ty = ty::node_id_to_monotype(tcx, nid);
         alt cap_var.mode {
-          capture::cap_ref. {
+          capture::cap_ref {
             assert ck == ty::ck_block;
             ty = ty::mk_mut_ptr(tcx, ty);
             env_vals += [env_ref(lv.val, ty, lv.kind)];
           }
-          capture::cap_copy. {
+          capture::cap_copy {
             env_vals += [env_copy(lv.val, ty, lv.kind)];
           }
-          capture::cap_move. {
+          capture::cap_move {
             env_vals += [env_move(lv.val, ty, lv.kind)];
           }
-          capture::cap_drop. {
+          capture::cap_drop {
             bcx = drop_ty(bcx, lv.val, ty);
           }
         }
@@ -481,7 +481,7 @@ fn load_environment(enclosing_cx: @block_ctxt,
     let i = 0u;
     vec::iter(cap_vars) { |cap_var|
         alt cap_var.mode {
-          capture::cap_drop. { /* ignore */ }
+          capture::cap_drop { /* ignore */ }
           _ {
             check type_is_tup_like(bcx, cbox_ty);
             let upvarptr = GEP_tup_like(
diff --git a/src/comp/middle/trans_common.rs b/src/comp/middle/trans_common.rs
index db1e615804f..0a2045dcb2b 100644
--- a/src/comp/middle/trans_common.rs
+++ b/src/comp/middle/trans_common.rs
@@ -483,9 +483,9 @@ fn T_bool() -> TypeRef { ret T_i1(); }
 
 fn T_int(targ_cfg: @session::config) -> TypeRef {
     ret alt targ_cfg.arch {
-      session::arch_x86. { T_i32() }
-      session::arch_x86_64. { T_i64() }
-      session::arch_arm. { T_i32() }
+      session::arch_x86 { T_i32() }
+      session::arch_x86_64 { T_i64() }
+      session::arch_arm { T_i32() }
     };
 }
 
@@ -520,9 +520,9 @@ fn T_float_ty(cx: @crate_ctxt, t: ast::float_ty) -> TypeRef {
 
 fn T_float(targ_cfg: @session::config) -> TypeRef {
     ret alt targ_cfg.arch {
-      session::arch_x86. { T_f64() }
-      session::arch_x86_64. { T_f64() }
-      session::arch_arm. { T_f64() }
+      session::arch_x86 { T_f64() }
+      session::arch_x86_64 { T_f64() }
+      session::arch_arm { T_f64() }
     };
 }
 
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index b376af652aa..03802e04d88 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -2534,7 +2534,7 @@ fn type_err_to_str(err: ty::type_err) -> str {
         fn to_str(s: ast::ret_style) -> str {
             alt s {
               ast::noreturn { "non-returning" }
-              ast::return_val. { "return-by-value" }
+              ast::return_val { "return-by-value" }
             }
         }
         ret to_str(actual) + " function found where " + to_str(expect) +
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index ea64d5f3f11..cb159a54c8c 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -358,7 +358,7 @@ fn ast_ty_to_ty(tcx: ty::ctxt, mode: mode, &&ast_ty: @ast::ty) -> ty::t {
         }
         typ = ty::mk_constr(tcx, ast_ty_to_ty(tcx, mode, t), out_cs);
       }
-      ast::ty_infer. {
+      ast::ty_infer {
         alt mode {
           m_check_tyvar(fcx) { ret next_ty_var(fcx); }
           _ { tcx.sess.span_bug(ast_ty.span,
@@ -539,7 +539,7 @@ fn ast_ty_to_ty_crate(ccx: @crate_ctxt, &&ast_ty: @ast::ty) -> ty::t {
 fn ast_ty_to_ty_crate_infer(ccx: @crate_ctxt, &&ast_ty: @ast::ty) ->
    option::t<ty::t> {
     alt ast_ty.node {
-      ast::ty_infer. { none }
+      ast::ty_infer { none }
       _ { some(ast_ty_to_ty_crate(ccx, ast_ty)) }
     }
 }
@@ -2406,9 +2406,9 @@ fn check_block_no_value(fcx: @fn_ctxt, blk: ast::blk) -> bool {
 
 fn check_block(fcx0: @fn_ctxt, blk: ast::blk) -> bool {
     let fcx = alt blk.node.rules {
-      ast::unchecked_blk. { @{purity: ast::impure_fn with *fcx0} }
-      ast::unsafe_blk. { @{purity: ast::unsafe_fn with *fcx0} }
-      ast::default_blk. { fcx0 }
+      ast::unchecked_blk { @{purity: ast::impure_fn with *fcx0} }
+      ast::unsafe_blk { @{purity: ast::unsafe_fn with *fcx0} }
+      ast::default_blk { fcx0 }
     };
     let bot = false;
     let warned = false;
@@ -2745,7 +2745,7 @@ fn check_main_fn_ty(tcx: ty::ctxt, main_id: ast::node_id) {
     let main_t = ty::node_id_to_monotype(tcx, main_id);
     alt ty::struct(tcx, main_t) {
       ty::ty_fn({proto: ast::proto_bare, inputs, output,
-                 ret_style: ast::return_val., constraints}) {
+                 ret_style: ast::return_val, constraints}) {
         let ok = vec::len(constraints) == 0u;
         ok &= ty::type_is_nil(tcx, output);
         let num_args = vec::len(inputs);