syntax: Remove deprecated expr_vstore_fixed
This commit is contained in:
parent
7a199d41a9
commit
83e831bc22
10 changed files with 4 additions and 36 deletions
|
@ -156,7 +156,6 @@ pub fn check_expr(sess: Session,
|
||||||
expr_paren(e) => { check_expr(sess, def_map, method_map,
|
expr_paren(e) => { check_expr(sess, def_map, method_map,
|
||||||
tcx, e, is_const, v); }
|
tcx, e, is_const, v); }
|
||||||
expr_vstore(_, expr_vstore_slice) |
|
expr_vstore(_, expr_vstore_slice) |
|
||||||
expr_vstore(_, expr_vstore_fixed(_)) |
|
|
||||||
expr_vec(_, m_imm) |
|
expr_vec(_, m_imm) |
|
||||||
expr_addr_of(m_imm, _) |
|
expr_addr_of(m_imm, _) |
|
||||||
expr_field(*) |
|
expr_field(*) |
|
||||||
|
|
|
@ -110,7 +110,6 @@ pub fn classify(e: @expr,
|
||||||
|
|
||||||
ast::expr_vstore(e, vstore) => {
|
ast::expr_vstore(e, vstore) => {
|
||||||
match vstore {
|
match vstore {
|
||||||
ast::expr_vstore_fixed(_) |
|
|
||||||
ast::expr_vstore_slice => classify(e, tcx),
|
ast::expr_vstore_slice => classify(e, tcx),
|
||||||
ast::expr_vstore_uniq |
|
ast::expr_vstore_uniq |
|
||||||
ast::expr_vstore_box |
|
ast::expr_vstore_box |
|
||||||
|
|
|
@ -466,9 +466,6 @@ fn const_expr_unadjusted(cx: @CrateContext, e: @ast::expr) -> ValueRef {
|
||||||
let (v, _, _) = const_vec(cx, e, *es);
|
let (v, _, _) = const_vec(cx, e, *es);
|
||||||
v
|
v
|
||||||
}
|
}
|
||||||
ast::expr_vstore(e, ast::expr_vstore_fixed(_)) => {
|
|
||||||
const_expr(cx, e)
|
|
||||||
}
|
|
||||||
ast::expr_vstore(sub, ast::expr_vstore_slice) => {
|
ast::expr_vstore(sub, ast::expr_vstore_slice) => {
|
||||||
match sub.node {
|
match sub.node {
|
||||||
ast::expr_lit(ref lit) => {
|
ast::expr_lit(ref lit) => {
|
||||||
|
|
|
@ -714,9 +714,6 @@ fn trans_rvalue_dps_unadjusted(bcx: block, expr: @ast::expr,
|
||||||
ast::expr_vstore(contents, ast::expr_vstore_mut_slice) => {
|
ast::expr_vstore(contents, ast::expr_vstore_mut_slice) => {
|
||||||
return tvec::trans_slice_vstore(bcx, expr, contents, dest);
|
return tvec::trans_slice_vstore(bcx, expr, contents, dest);
|
||||||
}
|
}
|
||||||
ast::expr_vstore(contents, ast::expr_vstore_fixed(_)) => {
|
|
||||||
return tvec::trans_fixed_vstore(bcx, expr, contents, dest);
|
|
||||||
}
|
|
||||||
ast::expr_vec(*) | ast::expr_repeat(*) => {
|
ast::expr_vec(*) | ast::expr_repeat(*) => {
|
||||||
return tvec::trans_fixed_vstore(bcx, expr, expr, dest);
|
return tvec::trans_fixed_vstore(bcx, expr, expr, dest);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3117,7 +3117,6 @@ pub fn expr_kind(tcx: ctxt,
|
||||||
ast::expr_lit(@codemap::spanned {node: lit_str(_), _}) |
|
ast::expr_lit(@codemap::spanned {node: lit_str(_), _}) |
|
||||||
ast::expr_vstore(_, ast::expr_vstore_slice) |
|
ast::expr_vstore(_, ast::expr_vstore_slice) |
|
||||||
ast::expr_vstore(_, ast::expr_vstore_mut_slice) |
|
ast::expr_vstore(_, ast::expr_vstore_mut_slice) |
|
||||||
ast::expr_vstore(_, ast::expr_vstore_fixed(_)) |
|
|
||||||
ast::expr_vec(*) => {
|
ast::expr_vec(*) => {
|
||||||
RvalueDpsExpr
|
RvalueDpsExpr
|
||||||
}
|
}
|
||||||
|
|
|
@ -3337,14 +3337,6 @@ pub fn ast_expr_vstore_to_vstore(fcx: @mut FnCtxt,
|
||||||
v: ast::expr_vstore)
|
v: ast::expr_vstore)
|
||||||
-> ty::vstore {
|
-> ty::vstore {
|
||||||
match v {
|
match v {
|
||||||
ast::expr_vstore_fixed(None) => ty::vstore_fixed(n),
|
|
||||||
ast::expr_vstore_fixed(Some(u)) => {
|
|
||||||
if n != u {
|
|
||||||
let s = fmt!("fixed-size sequence mismatch: %u vs. %u",u, n);
|
|
||||||
fcx.ccx.tcx.sess.span_err(e.span,s);
|
|
||||||
}
|
|
||||||
ty::vstore_fixed(u)
|
|
||||||
}
|
|
||||||
ast::expr_vstore_uniq => ty::vstore_uniq,
|
ast::expr_vstore_uniq => ty::vstore_uniq,
|
||||||
ast::expr_vstore_box | ast::expr_vstore_mut_box => ty::vstore_box,
|
ast::expr_vstore_box | ast::expr_vstore_mut_box => ty::vstore_box,
|
||||||
ast::expr_vstore_slice | ast::expr_vstore_mut_slice => {
|
ast::expr_vstore_slice | ast::expr_vstore_mut_slice => {
|
||||||
|
|
|
@ -386,7 +386,6 @@ pub enum vstore {
|
||||||
#[auto_decode]
|
#[auto_decode]
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub enum expr_vstore {
|
pub enum expr_vstore {
|
||||||
expr_vstore_fixed(Option<uint>), // [1,2,3,4]
|
|
||||||
expr_vstore_uniq, // ~[1,2,3,4]
|
expr_vstore_uniq, // ~[1,2,3,4]
|
||||||
expr_vstore_box, // @[1,2,3,4]
|
expr_vstore_box, // @[1,2,3,4]
|
||||||
expr_vstore_mut_box, // @mut [1,2,3,4]
|
expr_vstore_mut_box, // @mut [1,2,3,4]
|
||||||
|
|
|
@ -152,11 +152,6 @@ pub fn mk_slice_vec_e(cx: @ext_ctxt, sp: span, +exprs: ~[@ast::expr])
|
||||||
mk_vstore_e(cx, sp, mk_base_vec_e(cx, sp, exprs),
|
mk_vstore_e(cx, sp, mk_base_vec_e(cx, sp, exprs),
|
||||||
ast::expr_vstore_slice)
|
ast::expr_vstore_slice)
|
||||||
}
|
}
|
||||||
pub fn mk_fixed_vec_e(cx: @ext_ctxt, sp: span, +exprs: ~[@ast::expr])
|
|
||||||
-> @ast::expr {
|
|
||||||
mk_vstore_e(cx, sp, mk_base_vec_e(cx, sp, exprs),
|
|
||||||
ast::expr_vstore_fixed(None))
|
|
||||||
}
|
|
||||||
pub fn mk_base_str(cx: @ext_ctxt, sp: span, +s: ~str) -> @ast::expr {
|
pub fn mk_base_str(cx: @ext_ctxt, sp: span, +s: ~str) -> @ast::expr {
|
||||||
let lit = ast::lit_str(@s);
|
let lit = ast::lit_str(@s);
|
||||||
return mk_lit(cx, sp, lit);
|
return mk_lit(cx, sp, lit);
|
||||||
|
|
|
@ -28,7 +28,7 @@ use ast::{expr_lit, expr_log, expr_loop, expr_loop_body, expr_mac};
|
||||||
use ast::{expr_method_call, expr_paren, expr_path, expr_repeat};
|
use ast::{expr_method_call, expr_paren, expr_path, expr_repeat};
|
||||||
use ast::{expr_ret, expr_swap, expr_struct, expr_tup, expr_unary};
|
use ast::{expr_ret, expr_swap, expr_struct, expr_tup, expr_unary};
|
||||||
use ast::{expr_vec, expr_vstore, expr_vstore_mut_box, expr_inline_asm};
|
use ast::{expr_vec, expr_vstore, expr_vstore_mut_box, expr_inline_asm};
|
||||||
use ast::{expr_vstore_fixed, expr_vstore_slice, expr_vstore_box};
|
use ast::{expr_vstore_slice, expr_vstore_box};
|
||||||
use ast::{expr_vstore_mut_slice, expr_while, extern_fn, field, fn_decl};
|
use ast::{expr_vstore_mut_slice, expr_while, extern_fn, field, fn_decl};
|
||||||
use ast::{expr_vstore_uniq, TyClosure, TyBareFn, Onceness, Once, Many};
|
use ast::{expr_vstore_uniq, TyClosure, TyBareFn, Onceness, Once, Many};
|
||||||
use ast::{foreign_item, foreign_item_const, foreign_item_fn, foreign_mod};
|
use ast::{foreign_item, foreign_item_const, foreign_item_fn, foreign_mod};
|
||||||
|
|
|
@ -1024,8 +1024,6 @@ pub fn print_vstore(s: @ps, t: ast::vstore) {
|
||||||
|
|
||||||
pub fn print_expr_vstore(s: @ps, t: ast::expr_vstore) {
|
pub fn print_expr_vstore(s: @ps, t: ast::expr_vstore) {
|
||||||
match t {
|
match t {
|
||||||
ast::expr_vstore_fixed(Some(i)) => word(s.s, fmt!("%u", i)),
|
|
||||||
ast::expr_vstore_fixed(None) => word(s.s, ~"_"),
|
|
||||||
ast::expr_vstore_uniq => word(s.s, ~"~"),
|
ast::expr_vstore_uniq => word(s.s, ~"~"),
|
||||||
ast::expr_vstore_box => word(s.s, ~"@"),
|
ast::expr_vstore_box => word(s.s, ~"@"),
|
||||||
ast::expr_vstore_mut_box => {
|
ast::expr_vstore_mut_box => {
|
||||||
|
@ -1100,16 +1098,9 @@ pub fn print_expr(s: @ps, &&expr: @ast::expr) {
|
||||||
let ann_node = node_expr(s, expr);
|
let ann_node = node_expr(s, expr);
|
||||||
(s.ann.pre)(ann_node);
|
(s.ann.pre)(ann_node);
|
||||||
match expr.node {
|
match expr.node {
|
||||||
ast::expr_vstore(e, v) => match v {
|
ast::expr_vstore(e, v) => {
|
||||||
ast::expr_vstore_fixed(_) => {
|
print_expr_vstore(s, v);
|
||||||
print_expr(s, e);
|
print_expr(s, e);
|
||||||
word(s.s, ~"/");
|
|
||||||
print_expr_vstore(s, v);
|
|
||||||
}
|
|
||||||
_ => {
|
|
||||||
print_expr_vstore(s, v);
|
|
||||||
print_expr(s, e);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ast::expr_vec(ref exprs, mutbl) => {
|
ast::expr_vec(ref exprs, mutbl) => {
|
||||||
ibox(s, indent_unit);
|
ibox(s, indent_unit);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue