Rename various things from ivec to vec

This commit is contained in:
Brian Anderson 2011-08-18 14:32:25 -07:00
parent 4fc3618233
commit 1aa1f8c4b7
11 changed files with 52 additions and 54 deletions

View file

@ -173,7 +173,7 @@ fn nospan<T>(t: &T) -> ast::spanned<T> {
}
fn mk_tests(cx: &test_ctxt) -> @ast::item {
let ret_ty = mk_test_desc_ivec_ty(cx);
let ret_ty = mk_test_desc_vec_ty(cx);
let decl: ast::fn_decl =
{inputs: ~[],
@ -213,7 +213,7 @@ fn empty_fn_ty() -> ast::ty {
}
// The ast::ty of [std::test::test_desc]
fn mk_test_desc_ivec_ty(cx: &test_ctxt) -> @ast::ty {
fn mk_test_desc_vec_ty(cx: &test_ctxt) -> @ast::ty {
let test_desc_ty_path: ast::path =
nospan({global: false,
idents: ~["std", "test", "test_desc"],
@ -222,9 +222,9 @@ fn mk_test_desc_ivec_ty(cx: &test_ctxt) -> @ast::ty {
let test_desc_ty: ast::ty =
nospan(ast::ty_path(test_desc_ty_path, cx.next_node_id()));
let ivec_mt: ast::mt = {ty: @test_desc_ty, mut: ast::imm};
let vec_mt: ast::mt = {ty: @test_desc_ty, mut: ast::imm};
ret @nospan(ast::ty_vec(ivec_mt));
ret @nospan(ast::ty_vec(vec_mt));
}
fn mk_test_desc_vec(cx: &test_ctxt) -> @ast::expr {

View file

@ -217,7 +217,7 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
'@' { ret ty::mk_box(st.tcx, parse_mt(st, sd)); }
'~' { ret ty::mk_uniq(st.tcx, parse_ty(st, sd)); }
'*' { ret ty::mk_ptr(st.tcx, parse_mt(st, sd)); }
'I' { ret ty::mk_ivec(st.tcx, parse_mt(st, sd)); }
'I' { ret ty::mk_vec(st.tcx, parse_mt(st, sd)); }
'R' {
assert (next(st) as char == '[');
let fields: [ty::field] = ~[];

View file

@ -6329,7 +6329,7 @@ fn create_main_wrapper(ccx: &@crate_ctxt, sp: &span,
takes_ivec: bool) -> ValueRef {
let ivecarg_ty: ty::arg = {
mode: ty::mo_val,
ty: ty::mk_ivec(ccx.tcx, {
ty: ty::mk_vec(ccx.tcx, {
ty: ty::mk_str(ccx.tcx),
mut: ast::imm
})

View file

@ -72,7 +72,7 @@ export mk_mut_ptr;
export mk_imm_vec;
export mk_int;
export mk_istr;
export mk_ivec;
export mk_vec;
export mk_mach;
export mk_native;
export mk_native_fn;
@ -563,7 +563,7 @@ fn mk_mut_ptr(cx: &ctxt, ty: &t) -> t {
ret mk_ptr(cx, {ty: ty, mut: ast::mut});
}
fn mk_ivec(cx: &ctxt, tm: &mt) -> t { ret gen_ty(cx, ty_vec(tm)); }
fn mk_vec(cx: &ctxt, tm: &mt) -> t { ret gen_ty(cx, ty_vec(tm)); }
fn mk_rec(cx: &ctxt, fs: &[field]) -> t { ret gen_ty(cx, ty_rec(fs)); }
@ -709,7 +709,7 @@ fn fold_ty(cx: &ctxt, fld: fold_mode, ty_0: t) -> t {
ty = mk_ptr(cx, {ty: fold_ty(cx, fld, tm.ty), mut: tm.mut});
}
ty_vec(tm) {
ty = mk_ivec(cx, {ty: fold_ty(cx, fld, tm.ty), mut: tm.mut});
ty = mk_vec(cx, {ty: fold_ty(cx, fld, tm.ty), mut: tm.mut});
}
ty_tag(tid, subtys) {
let new_subtys: [t] = ~[];
@ -2487,7 +2487,7 @@ mod unify {
alt result {
ures_ok(result_sub) {
let mt = {ty: result_sub, mut: mut};
ret ures_ok(mk_ivec(cx.tcx, mt));
ret ures_ok(mk_vec(cx.tcx, mt));
}
_ { ret result; }
}

View file

@ -325,7 +325,7 @@ fn ast_ty_to_ty(tcx: &ty::ctxt, getter: &ty_getter, ast_ty: &@ast::ty) ->
typ = ty::mk_box(tcx, ast_mt_to_mt(tcx, getter, mt));
}
ast::ty_vec(mt) {
typ = ty::mk_ivec(tcx, ast_mt_to_mt(tcx, getter, mt));
typ = ty::mk_vec(tcx, ast_mt_to_mt(tcx, getter, mt));
}
ast::ty_ptr(mt) {
typ = ty::mk_ptr(tcx, ast_mt_to_mt(tcx, getter, mt));
@ -2182,7 +2182,7 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
for e: @ast::expr in args {
bot |= check_expr_with(fcx, e, t);
}
let typ = ty::mk_ivec(tcx, {ty: t, mut: mut});
let typ = ty::mk_vec(tcx, {ty: t, mut: mut});
write::ty_only_fixup(fcx, id, typ);
}
ast::expr_tup(elts) {