Skip to content

Commit 5ad2a78

Browse files
committed
Removed obsolete 'e' prefix on ty_evec and ty_estr.
1 parent e19b1b1 commit 5ad2a78

33 files changed

+234
-235
lines changed

src/librustc/metadata/tydecode.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,11 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
354354
'V' => {
355355
let mt = parse_mt(st, |x,y| conv(x,y));
356356
let v = parse_vstore(st, |x,y| conv(x,y));
357-
return ty::mk_evec(st.tcx, mt, v);
357+
return ty::mk_vec(st.tcx, mt, v);
358358
}
359359
'v' => {
360360
let v = parse_vstore(st, |x,y| conv(x,y));
361-
return ty::mk_estr(st.tcx, v);
361+
return ty::mk_str(st.tcx, v);
362362
}
363363
'T' => {
364364
assert_eq!(next(st), '[');

src/librustc/metadata/tyencode.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,12 @@ fn enc_sty(w: &mut MemWriter, cx: @ctxt, st: &ty::sty) {
299299
enc_region(w, cx, r);
300300
enc_mt(w, cx, mt);
301301
}
302-
ty::ty_evec(mt, v) => {
302+
ty::ty_vec(mt, v) => {
303303
mywrite!(w, "V");
304304
enc_mt(w, cx, mt);
305305
enc_vstore(w, cx, v);
306306
}
307-
ty::ty_estr(v) => {
307+
ty::ty_str(v) => {
308308
mywrite!(w, "v");
309309
enc_vstore(w, cx, v);
310310
}

src/librustc/middle/borrowck/gather_loans/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ impl<'a> GatherLoanCtxt<'a> {
808808
*/
809809

810810
match ty::get(slice_ty).sty {
811-
ty::ty_evec(slice_mt, ty::vstore_slice(slice_r)) => {
811+
ty::ty_vec(slice_mt, ty::vstore_slice(slice_r)) => {
812812
(slice_mt.mutbl, slice_r)
813813
}
814814

src/librustc/middle/check_match.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fn check_exhaustive(cx: &MatchCheckCtxt, sp: Span, pats: ~[@Pat]) {
195195
}
196196
}
197197
}
198-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
198+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
199199
match *ctor {
200200
vec(n) => Some(format!("vectors of length {}", n).to_managed()),
201201
_ => None
@@ -274,10 +274,10 @@ fn is_useful(cx: &MatchCheckCtxt, m: &matrix, v: &[@Pat]) -> useful {
274274
}
275275
not_useful
276276
}
277-
ty::ty_evec(_, ty::vstore_fixed(n)) => {
277+
ty::ty_vec(_, ty::vstore_fixed(n)) => {
278278
is_useful_specialized(cx, m, v, vec(n), n, left_ty)
279279
}
280-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
280+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
281281
let max_len = m.rev_iter().fold(0, |max_len, r| {
282282
match r[0].node {
283283
PatVec(ref before, _, ref after) => {
@@ -437,7 +437,7 @@ fn missing_ctor(cx: &MatchCheckCtxt,
437437
else if true_found { Some(val(const_bool(false))) }
438438
else { Some(val(const_bool(true))) }
439439
}
440-
ty::ty_evec(_, ty::vstore_fixed(n)) => {
440+
ty::ty_vec(_, ty::vstore_fixed(n)) => {
441441
let mut missing = true;
442442
let mut wrong = false;
443443
for r in m.iter() {
@@ -460,7 +460,7 @@ fn missing_ctor(cx: &MatchCheckCtxt,
460460
_ => None
461461
}
462462
}
463-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
463+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
464464

465465
// Find the lengths and slices of all vector patterns.
466466
let mut vec_pat_lens = m.iter().filter_map(|r| {
@@ -525,7 +525,7 @@ fn ctor_arity(cx: &MatchCheckCtxt, ctor: &ctor, ty: ty::t) -> uint {
525525
}
526526
}
527527
ty::ty_struct(cid, _) => ty::lookup_struct_fields(cx.tcx, cid).len(),
528-
ty::ty_unboxed_vec(..) | ty::ty_evec(..) => {
528+
ty::ty_unboxed_vec(..) | ty::ty_vec(..) => {
529529
match *ctor {
530530
vec(n) => n,
531531
_ => 0u

src/librustc/middle/effect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl EffectCheckVisitor {
7171
debug!("effect: checking index with base type {}",
7272
ppaux::ty_to_str(self.tcx, base_type));
7373
match ty::get(base_type).sty {
74-
ty::ty_estr(..) => {
74+
ty::ty_str(..) => {
7575
self.tcx.sess.span_err(e.span,
7676
"modification of string types is not allowed");
7777
}

src/librustc/middle/lint.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -819,13 +819,13 @@ fn check_heap_type(cx: &Context, span: Span, ty: ty::t) {
819819
let mut n_uniq = 0;
820820
ty::fold_ty(cx.tcx, ty, |t| {
821821
match ty::get(t).sty {
822-
ty::ty_box(_) | ty::ty_estr(ty::vstore_box) |
823-
ty::ty_evec(_, ty::vstore_box) |
822+
ty::ty_box(_) | ty::ty_str(ty::vstore_box) |
823+
ty::ty_vec(_, ty::vstore_box) |
824824
ty::ty_trait(_, _, ty::BoxTraitStore, _, _) => {
825825
n_box += 1;
826826
}
827-
ty::ty_uniq(_) | ty::ty_estr(ty::vstore_uniq) |
828-
ty::ty_evec(_, ty::vstore_uniq) |
827+
ty::ty_uniq(_) | ty::ty_str(ty::vstore_uniq) |
828+
ty::ty_vec(_, ty::vstore_uniq) |
829829
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) => {
830830
n_uniq += 1;
831831
}

src/librustc/middle/mem_categorization.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -157,31 +157,31 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
157157
match ty::get(t).sty {
158158
ty::ty_uniq(_) |
159159
ty::ty_trait(_, _, ty::UniqTraitStore, _, _) |
160-
ty::ty_evec(_, ty::vstore_uniq) |
161-
ty::ty_estr(ty::vstore_uniq) |
160+
ty::ty_vec(_, ty::vstore_uniq) |
161+
ty::ty_str(ty::vstore_uniq) |
162162
ty::ty_closure(ty::ClosureTy {sigil: ast::OwnedSigil, ..}) => {
163163
Some(deref_ptr(uniq_ptr))
164164
}
165165

166166
ty::ty_rptr(r, mt) |
167-
ty::ty_evec(mt, ty::vstore_slice(r)) => {
167+
ty::ty_vec(mt, ty::vstore_slice(r)) => {
168168
Some(deref_ptr(region_ptr(mt.mutbl, r)))
169169
}
170170

171171
ty::ty_trait(_, _, ty::RegionTraitStore(r), m, _) => {
172172
Some(deref_ptr(region_ptr(m, r)))
173173
}
174174

175-
ty::ty_estr(ty::vstore_slice(r)) |
175+
ty::ty_str(ty::vstore_slice(r)) |
176176
ty::ty_closure(ty::ClosureTy {sigil: ast::BorrowedSigil,
177177
region: r, ..}) => {
178178
Some(deref_ptr(region_ptr(ast::MutImmutable, r)))
179179
}
180180

181181
ty::ty_box(_) |
182-
ty::ty_evec(_, ty::vstore_box) |
182+
ty::ty_vec(_, ty::vstore_box) |
183183
ty::ty_trait(_, _, ty::BoxTraitStore, _, _) |
184-
ty::ty_estr(ty::vstore_box) => {
184+
ty::ty_str(ty::vstore_box) => {
185185
Some(deref_ptr(gc_ptr))
186186
}
187187

@@ -194,8 +194,8 @@ pub fn opt_deref_kind(t: ty::t) -> Option<deref_kind> {
194194
Some(deref_interior(InteriorField(PositionalField(0))))
195195
}
196196

197-
ty::ty_evec(_, ty::vstore_fixed(_)) |
198-
ty::ty_estr(ty::vstore_fixed(_)) => {
197+
ty::ty_vec(_, ty::vstore_fixed(_)) |
198+
ty::ty_str(ty::vstore_fixed(_)) => {
199199
Some(deref_interior(InteriorElement(element_kind(t))))
200200
}
201201

@@ -1247,8 +1247,8 @@ impl Repr for InteriorKind {
12471247

12481248
fn element_kind(t: ty::t) -> ElementKind {
12491249
match ty::get(t).sty {
1250-
ty::ty_evec(..) => VecElement,
1251-
ty::ty_estr(..) => StrElement,
1250+
ty::ty_vec(..) => VecElement,
1251+
ty::ty_str(..) => StrElement,
12521252
_ => OtherElement
12531253
}
12541254
}

src/librustc/middle/trans/_match.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ fn extract_vec_elems<'a>(
10781078
let slice_begin = tvec::pointer_add_byte(bcx, base, slice_byte_offset);
10791079
let slice_len_offset = C_uint(bcx.ccx(), elem_count - 1u);
10801080
let slice_len = Sub(bcx, len, slice_len_offset);
1081-
let slice_ty = ty::mk_evec(bcx.tcx(),
1081+
let slice_ty = ty::mk_vec(bcx.tcx(),
10821082
ty::mt {ty: vt.unit_ty, mutbl: ast::MutImmutable},
10831083
ty::vstore_slice(ty::ReStatic)
10841084
);
@@ -1312,7 +1312,7 @@ fn compare_values<'a>(
13121312
}
13131313

13141314
match ty::get(rhs_t).sty {
1315-
ty::ty_estr(ty::vstore_uniq) => {
1315+
ty::ty_str(ty::vstore_uniq) => {
13161316
let scratch_lhs = alloca(cx, val_ty(lhs), "__lhs");
13171317
Store(cx, lhs, scratch_lhs);
13181318
let scratch_rhs = alloca(cx, val_ty(rhs), "__rhs");
@@ -1326,7 +1326,7 @@ fn compare_values<'a>(
13261326
val: bool_to_i1(result.bcx, result.val)
13271327
}
13281328
}
1329-
ty::ty_estr(_) => {
1329+
ty::ty_str(_) => {
13301330
let did = langcall(cx, None,
13311331
format!("comparison of `{}`", cx.ty_to_str(rhs_t)),
13321332
StrEqFnLangItem);

src/librustc/middle/trans/base.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ fn decl_rust_fn(ccx: &CrateContext, inputs: &[ty::t], output: ty::t, name: &str)
241241
}
242242
// `~` pointer return values never alias because ownership is transferred
243243
ty::ty_uniq(..) |
244-
ty::ty_evec(_, ty::vstore_uniq) => {
244+
ty::ty_vec(_, ty::vstore_uniq) => {
245245
unsafe {
246246
llvm::LLVMAddReturnAttribute(llfn, lib::llvm::NoAliasAttribute as c_uint);
247247
}
@@ -257,7 +257,7 @@ fn decl_rust_fn(ccx: &CrateContext, inputs: &[ty::t], output: ty::t, name: &str)
257257
match ty::get(arg_ty).sty {
258258
// `~` pointer parameters never alias because ownership is transferred
259259
ty::ty_uniq(..) |
260-
ty::ty_evec(_, ty::vstore_uniq) |
260+
ty::ty_vec(_, ty::vstore_uniq) |
261261
ty::ty_closure(ty::ClosureTy {sigil: ast::OwnedSigil, ..}) => {
262262
unsafe {
263263
llvm::LLVMAddAttribute(llarg, lib::llvm::NoAliasAttribute as c_uint);
@@ -758,8 +758,8 @@ pub fn iter_structural_ty<'r,
758758
}
759759
})
760760
}
761-
ty::ty_estr(ty::vstore_fixed(_)) |
762-
ty::ty_evec(_, ty::vstore_fixed(_)) => {
761+
ty::ty_str(ty::vstore_fixed(_)) |
762+
ty::ty_vec(_, ty::vstore_fixed(_)) => {
763763
let (base, len) = tvec::get_base_and_byte_len(cx, av, t);
764764
cx = tvec::iter_vec_raw(cx, base, t, len, f);
765765
}
@@ -3120,12 +3120,12 @@ pub fn create_module_map(ccx: &CrateContext) -> (ValueRef, uint) {
31203120
};
31213121

31223122
for key in keys.iter() {
3123-
let llestrval = C_estr_slice(ccx, *key);
3123+
let llstrval = C_str_slice(ccx, *key);
31243124
let module_data = ccx.module_data.borrow();
31253125
let val = *module_data.get().find_equiv(key).unwrap();
31263126
let v_ptr = p2i(ccx, val);
31273127
let elt = C_struct([
3128-
llestrval,
3128+
llstrval,
31293129
v_ptr
31303130
], false);
31313131
elts.push(elt);

src/librustc/middle/trans/callee.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ pub fn trans_call_inner<'a>(
704704
match ty::get(ret_ty).sty {
705705
// `~` pointer return values never alias because ownership is transferred
706706
ty::ty_uniq(..) |
707-
ty::ty_evec(_, ty::vstore_uniq) => {
707+
ty::ty_vec(_, ty::vstore_uniq) => {
708708
attrs.push((0, NoAliasAttribute));
709709
}
710710
_ => ()

src/librustc/middle/trans/common.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ pub fn C_cstr(cx: &CrateContext, s: @str) -> ValueRef {
906906

907907
// NB: Do not use `do_spill_noroot` to make this into a constant string, or
908908
// you will be kicked off fast isel. See issue #4352 for an example of this.
909-
pub fn C_estr_slice(cx: &CrateContext, s: @str) -> ValueRef {
909+
pub fn C_str_slice(cx: &CrateContext, s: @str) -> ValueRef {
910910
unsafe {
911911
let len = s.len();
912912
let cs = llvm::LLVMConstPointerCast(C_cstr(cx, s), Type::i8p().to_ref());
@@ -1045,8 +1045,8 @@ pub fn mono_data_classify(t: ty::t) -> MonoDataClass {
10451045
ty::ty_float(_) => MonoFloat,
10461046
ty::ty_rptr(..) | ty::ty_uniq(..) |
10471047
ty::ty_box(..) | ty::ty_opaque_box(..) |
1048-
ty::ty_estr(ty::vstore_uniq) | ty::ty_evec(_, ty::vstore_uniq) |
1049-
ty::ty_estr(ty::vstore_box) | ty::ty_evec(_, ty::vstore_box) |
1048+
ty::ty_str(ty::vstore_uniq) | ty::ty_vec(_, ty::vstore_uniq) |
1049+
ty::ty_str(ty::vstore_box) | ty::ty_vec(_, ty::vstore_box) |
10501050
ty::ty_bare_fn(..) => MonoNonNull,
10511051
// Is that everything? Would closures or slices qualify?
10521052
_ => MonoBits

src/librustc/middle/trans/consts.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn const_lit(cx: &CrateContext, e: &ast::Expr, lit: ast::Lit)
7171
}
7272
ast::LitBool(b) => C_bool(b),
7373
ast::LitNil => C_nil(),
74-
ast::LitStr(s, _) => C_estr_slice(cx, s),
74+
ast::LitStr(s, _) => C_str_slice(cx, s),
7575
ast::LitBinary(data) => C_binary_slice(cx, data),
7676
}
7777
}
@@ -241,7 +241,7 @@ pub fn const_expr(cx: @CrateContext, e: &ast::Expr) -> (ValueRef, bool) {
241241
assert_eq!(abi::slice_elt_len, 1);
242242

243243
match ty::get(ty).sty {
244-
ty::ty_evec(_, ty::vstore_fixed(len)) => {
244+
ty::ty_vec(_, ty::vstore_fixed(len)) => {
245245
llconst = C_struct([llptr, C_uint(cx, len)], false);
246246
}
247247
_ => {}
@@ -419,7 +419,7 @@ fn const_expr_unadjusted(cx: @CrateContext,
419419
"index is not an integer-constant expression")
420420
};
421421
let (arr, len) = match ty::get(bt).sty {
422-
ty::ty_evec(_, vstore) | ty::ty_estr(vstore) =>
422+
ty::ty_vec(_, vstore) | ty::ty_str(vstore) =>
423423
match vstore {
424424
ty::vstore_fixed(u) =>
425425
(bv, C_uint(cx, u)),
@@ -437,7 +437,7 @@ fn const_expr_unadjusted(cx: @CrateContext,
437437

438438
let len = llvm::LLVMConstIntGetZExtValue(len) as u64;
439439
let len = match ty::get(bt).sty {
440-
ty::ty_estr(..) => {assert!(len > 0); len - 1},
440+
ty::ty_str(..) => {assert!(len > 0); len - 1},
441441
_ => len
442442
};
443443
if iv >= len {

src/librustc/middle/trans/datum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ impl Datum {
571571
let (content_ty, header) = match ty::get(self.ty).sty {
572572
ty::ty_box(typ) => (typ, true),
573573
ty::ty_uniq(mt) => (mt.ty, false),
574-
ty::ty_evec(_, ty::vstore_uniq) | ty::ty_estr(ty::vstore_uniq) => {
574+
ty::ty_vec(_, ty::vstore_uniq) | ty::ty_str(ty::vstore_uniq) => {
575575
let unit_ty = ty::sequence_element_type(bcx.tcx(), self.ty);
576576
let unboxed_vec_ty = ty::mk_mut_unboxed_vec(bcx.tcx(), unit_ty);
577577
(unboxed_vec_ty, true)

src/librustc/middle/trans/debuginfo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ fn type_metadata(cx: &CrateContext,
21152115
ty::ty_float(_) => {
21162116
basic_type_metadata(cx, t)
21172117
},
2118-
ty::ty_estr(ref vstore) => {
2118+
ty::ty_str(ref vstore) => {
21192119
let i8_t = ty::mk_i8();
21202120
match *vstore {
21212121
ty::vstore_fixed(len) => {
@@ -2140,7 +2140,7 @@ fn type_metadata(cx: &CrateContext,
21402140
ty::ty_box(typ) => {
21412141
create_pointer_to_box_metadata(cx, t, typ)
21422142
},
2143-
ty::ty_evec(ref mt, ref vstore) => {
2143+
ty::ty_vec(ref mt, ref vstore) => {
21442144
match *vstore {
21452145
ty::vstore_fixed(len) => {
21462146
fixed_vec_metadata(cx, mt.ty, len, usage_site_span)

src/librustc/middle/trans/expr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ pub fn trans_to_datum<'a>(bcx: &'a Block<'a>, expr: &ast::Expr)
287287

288288
// this type may have a different region/mutability than the
289289
// real one, but it will have the same runtime representation
290-
let slice_ty = ty::mk_evec(tcx,
291-
ty::mt { ty: unit_ty, mutbl: ast::MutImmutable },
292-
ty::vstore_slice(ty::ReStatic));
290+
let slice_ty = ty::mk_vec(tcx,
291+
ty::mt { ty: unit_ty, mutbl: ast::MutImmutable },
292+
ty::vstore_slice(ty::ReStatic));
293293

294294
let scratch = scratch_datum(bcx, slice_ty, "__adjust", false);
295295

0 commit comments

Comments
 (0)