Skip to content

Commit bdd3bc8

Browse files
committed
---
yaml --- r: 22551 b: refs/heads/master c: d884085 h: refs/heads/master i: 22549: 2c22633 22547: 87a94a3 22543: ecd86d0 v: v3
1 parent 3eda140 commit bdd3bc8

27 files changed

+78
-203
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0442fd32eec275eb3dfabfb210c80b7911a7dc7a
2+
refs/heads/master: d884085f43f87213e3045e474c39908d6555153a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libstd/rope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ mod tests {
12421242
node::empty { ret ~"" }
12431243
node::content(x) {
12441244
let str = @mut ~"";
1245-
fn aux(str: @mut str, node: @node::node) unsafe {
1245+
fn aux(str: @mut ~str, node: @node::node) unsafe {
12461246
alt(*node) {
12471247
node::leaf(x) {
12481248
*str += str::slice(

trunk/src/rustc/front/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fn mk_test_desc_vec_ty(cx: test_ctxt) -> @ast::ty {
272272
node: ast::ty_vec(vec_mt),
273273
span: dummy_sp()};
274274
ret @{id: cx.sess.next_node_id(),
275-
node: ast::ty_vstore(inner_ty, ast::vstore_uniq),
275+
node: ast::ty_uniq({ty: inner_ty, mutbl: ast::m_imm}),
276276
span: dummy_sp()};
277277
}
278278

@@ -411,14 +411,14 @@ fn mk_main(cx: test_ctxt) -> @ast::item {
411411
node: ast::ty_path(str_pt, cx.sess.next_node_id()),
412412
span: dummy_sp()};
413413
let str_ty = @{id: cx.sess.next_node_id(),
414-
node: ast::ty_vstore(str_ty_inner, ast::vstore_uniq),
414+
node: ast::ty_uniq({ty: str_ty_inner, mutbl: ast::m_imm}),
415415
span: dummy_sp()};
416416
let args_mt = {ty: str_ty, mutbl: ast::m_imm};
417417
let args_ty_inner = @{id: cx.sess.next_node_id(),
418418
node: ast::ty_vec(args_mt),
419419
span: dummy_sp()};
420420
let args_ty = {id: cx.sess.next_node_id(),
421-
node: ast::ty_vstore(args_ty_inner, ast::vstore_uniq),
421+
node: ast::ty_uniq({ty: args_ty_inner, mutbl: ast::m_imm}),
422422
span: dummy_sp()};
423423

424424

trunk/src/rustc/metadata/tydecode.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ fn parse_ty(st: @pstate, conv: conv_did) -> ty::t {
277277
}
278278
}
279279
'c' { ret ty::mk_char(st.tcx); }
280-
'S' { ret ty::mk_str(st.tcx); }
281280
't' {
282281
assert (next(st) == '[');
283282
let def = parse_def(st, conv);
@@ -307,7 +306,6 @@ fn parse_ty(st: @pstate, conv: conv_did) -> ty::t {
307306
let mt = parse_mt(st, conv);
308307
ret ty::mk_rptr(st.tcx, r, mt);
309308
}
310-
'I' { ret ty::mk_vec(st.tcx, parse_mt(st, conv)); }
311309
'U' { ret ty::mk_unboxed_vec(st.tcx, parse_mt(st, conv)); }
312310
'V' {
313311
let mt = parse_mt(st, conv);

trunk/src/rustc/metadata/tyencode.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
214214
ty_f64 { w.write_str(&"MF"); }
215215
}
216216
}
217-
ty::ty_str { w.write_char('S'); }
218217
ty::ty_enum(def, substs) {
219218
w.write_str(&"t[");
220219
w.write_str(cx.ds(def));
@@ -251,7 +250,6 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
251250
w.write_char('v');
252251
enc_vstore(w, cx, v);
253252
}
254-
ty::ty_vec(mt) { w.write_char('I'); enc_mt(w, cx, mt); }
255253
ty::ty_unboxed_vec(mt) { w.write_char('U'); enc_mt(w, cx, mt); }
256254
ty::ty_rec(fields) {
257255
w.write_str(&"R[");

trunk/src/rustc/middle/borrowck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,11 @@ impl to_str_methods for borrowck_ctxt {
516516
cat_comp(_, comp_variant(_)) { ~"enum content" }
517517
cat_comp(_, comp_index(t, _)) {
518518
alt ty::get(t).struct {
519-
ty::ty_vec(*) | ty::ty_evec(*) {
519+
ty::ty_evec(*) {
520520
mut_str + ~" vec content"
521521
}
522522

523-
ty::ty_str | ty::ty_estr(*) {
523+
ty::ty_estr(*) {
524524
mut_str + ~" str content"
525525
}
526526

trunk/src/rustc/middle/borrowck/categorization.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export opt_deref_kind;
4444
// pointer adjustment).
4545
fn opt_deref_kind(t: ty::t) -> option<deref_kind> {
4646
alt ty::get(t).struct {
47-
ty::ty_uniq(*) | ty::ty_vec(*) | ty::ty_str |
47+
ty::ty_uniq(*) |
4848
ty::ty_evec(_, ty::vstore_uniq) |
4949
ty::ty_estr(ty::vstore_uniq) {
5050
some(deref_ptr(uniq_ptr))
@@ -100,8 +100,7 @@ impl public_methods for borrowck_ctxt {
100100
// a borrowed expression must be either an @, ~, or a vec/@, vec/~
101101
let expr_ty = ty::expr_ty(self.tcx, expr);
102102
alt ty::get(expr_ty).struct {
103-
ty::ty_vec(*) | ty::ty_evec(*) |
104-
ty::ty_str | ty::ty_estr(*) {
103+
ty::ty_evec(*) | ty::ty_estr(*) {
105104
self.cat_index(expr, expr)
106105
}
107106

trunk/src/rustc/middle/trans/alt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn trans_opt(bcx: block, o: opt) -> opt_result {
5151
ast::expr_vstore(@{node: ast::expr_lit(
5252
@{node: ast::lit_str(s), _}), _},
5353
ast::vstore_uniq) {
54-
let strty = ty::mk_str(bcx.tcx());
54+
let strty = ty::mk_estr(bcx.tcx(), ty::vstore_uniq);
5555
let cell = empty_dest_cell();
5656
bcx = tvec::trans_estr(bcx, s, ast::vstore_uniq, by_val(cell));
5757
add_clean_temp(bcx, *cell, strty);

trunk/src/rustc/middle/trans/base.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ fn make_take_glue(bcx: block, v: ValueRef, t: ty::t) {
626626
Store(bcx, val, v);
627627
bcx
628628
}
629-
ty::ty_vec(_) | ty::ty_str |
630629
ty::ty_evec(_, ty::vstore_uniq) | ty::ty_estr(ty::vstore_uniq) {
631630
let {bcx, val} = tvec::duplicate_uniq(bcx, Load(bcx, v), t);
632631
Store(bcx, val, v);
@@ -704,8 +703,7 @@ fn make_free_glue(bcx: block, v: ValueRef, t: ty::t) {
704703
uniq::make_free_glue(bcx, v, t)
705704
}
706705
ty::ty_evec(_, ty::vstore_uniq) | ty::ty_estr(ty::vstore_uniq) |
707-
ty::ty_evec(_, ty::vstore_box) | ty::ty_estr(ty::vstore_box) |
708-
ty::ty_vec(_) | ty::ty_str {
706+
ty::ty_evec(_, ty::vstore_box) | ty::ty_estr(ty::vstore_box) {
709707
make_free_glue(bcx, v,
710708
tvec::expand_boxed_vec_ty(bcx.tcx(), t));
711709
ret;
@@ -769,7 +767,7 @@ fn make_drop_glue(bcx: block, v0: ValueRef, t: ty::t) {
769767
ty::ty_estr(ty::vstore_box) | ty::ty_evec(_, ty::vstore_box) {
770768
decr_refcnt_maybe_free(bcx, Load(bcx, v0), t)
771769
}
772-
ty::ty_uniq(_) | ty::ty_vec(_) | ty::ty_str |
770+
ty::ty_uniq(_) |
773771
ty::ty_evec(_, ty::vstore_uniq) | ty::ty_estr(ty::vstore_uniq) {
774772
free_ty(bcx, Load(bcx, v0), t)
775773
}
@@ -1235,7 +1233,7 @@ fn drop_ty(cx: block, v: ValueRef, t: ty::t) -> block {
12351233
fn drop_ty_immediate(bcx: block, v: ValueRef, t: ty::t) -> block {
12361234
let _icx = bcx.insn_ctxt(~"drop_ty_immediate");
12371235
alt ty::get(t).struct {
1238-
ty::ty_uniq(_) | ty::ty_vec(_) | ty::ty_str |
1236+
ty::ty_uniq(_) |
12391237
ty::ty_evec(_, ty::vstore_uniq) |
12401238
ty::ty_estr(ty::vstore_uniq) {
12411239
free_ty(bcx, v, t)
@@ -1261,7 +1259,6 @@ fn take_ty_immediate(bcx: block, v: ValueRef, t: ty::t) -> result {
12611259
ty::ty_uniq(_) {
12621260
uniq::duplicate(bcx, v, t)
12631261
}
1264-
ty::ty_str | ty::ty_vec(_) |
12651262
ty::ty_evec(_, ty::vstore_uniq) |
12661263
ty::ty_estr(ty::vstore_uniq) {
12671264
tvec::duplicate_uniq(bcx, v, t)
@@ -2972,9 +2969,7 @@ fn adapt_borrowed_value(lv: lval_result,
29722969
ret {lv: lval_temp(bcx, body_ptr), ty: rptr_ty};
29732970
}
29742971

2975-
ty::ty_str | ty::ty_vec(_) |
2976-
ty::ty_estr(_) |
2977-
ty::ty_evec(_, _) {
2972+
ty::ty_estr(_) | ty::ty_evec(_, _) {
29782973
let ccx = bcx.ccx();
29792974
let val = alt lv.kind {
29802975
temporary { lv.val }
@@ -4997,10 +4992,11 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
49974992

49984993
fn create_main(ccx: @crate_ctxt, main_llfn: ValueRef,
49994994
takes_argv: bool) -> ValueRef {
5000-
let unit_ty = ty::mk_str(ccx.tcx);
4995+
let unit_ty = ty::mk_estr(ccx.tcx, ty::vstore_uniq);
50014996
let vecarg_ty: ty::arg =
50024997
{mode: ast::expl(ast::by_val),
5003-
ty: ty::mk_vec(ccx.tcx, {ty: unit_ty, mutbl: ast::m_imm})};
4998+
ty: ty::mk_evec(ccx.tcx, {ty: unit_ty, mutbl: ast::m_imm},
4999+
ty::vstore_uniq)};
50045000
let nt = ty::mk_nil(ccx.tcx);
50055001
let llfty = type_of_fn(ccx, ~[vecarg_ty], nt);
50065002
let llfdecl = decl_fn(ccx.llmod, ~"_rust_main",

trunk/src/rustc/middle/trans/reflect.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ impl methods for reflector {
132132
ty::ty_float(ast::ty_f) { self.leaf(~"float") }
133133
ty::ty_float(ast::ty_f32) { self.leaf(~"f32") }
134134
ty::ty_float(ast::ty_f64) { self.leaf(~"f64") }
135-
ty::ty_str { self.leaf(~"str") }
136135

137-
ty::ty_vec(mt) { self.visit(~"vec", self.c_mt(mt)) }
138136
ty::ty_unboxed_vec(mt) { self.visit(~"vec", self.c_mt(mt)) }
139137
ty::ty_estr(vst) {
140138
do self.vstore_name_and_extra(t, vst) |name, extra| {

trunk/src/rustc/middle/trans/shape.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> ~[u8] {
228228
ty::ty_int(ast::ty_i64) { ~[shape_i64] }
229229
ty::ty_float(ast::ty_f32) { ~[shape_f32] }
230230
ty::ty_float(ast::ty_f64) { ~[shape_f64] }
231-
ty::ty_estr(ty::vstore_uniq) |
232-
ty::ty_str {
231+
ty::ty_estr(ty::vstore_uniq) {
233232
shape_of(ccx, tvec::expand_boxed_vec_ty(ccx.tcx, t))
234233
}
235234
ty::ty_enum(did, substs) {
@@ -268,8 +267,7 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> ~[u8] {
268267
add_substr(s, shape_of(ccx, mt.ty));
269268
s
270269
}
271-
ty::ty_evec(mt, ty::vstore_uniq) |
272-
ty::ty_vec(mt) {
270+
ty::ty_evec(mt, ty::vstore_uniq) {
273271
shape_of(ccx, tvec::expand_boxed_vec_ty(ccx.tcx, t))
274272
}
275273

@@ -716,7 +714,7 @@ fn simplify_type(tcx: ty::ctxt, typ: ty::t) -> ty::t {
716714
}
717715
fn simplifier(tcx: ty::ctxt, typ: ty::t) -> ty::t {
718716
alt ty::get(typ).struct {
719-
ty::ty_box(_) | ty::ty_opaque_box | ty::ty_uniq(_) | ty::ty_vec(_) |
717+
ty::ty_box(_) | ty::ty_opaque_box | ty::ty_uniq(_) |
720718
ty::ty_evec(_, ty::vstore_uniq) | ty::ty_evec(_, ty::vstore_box) |
721719
ty::ty_estr(ty::vstore_uniq) | ty::ty_estr(ty::vstore_box) |
722720
ty::ty_ptr(_) | ty::ty_rptr(_,_) { nilptr(tcx) }

trunk/src/rustc/middle/trans/tvec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ fn expand_boxed_vec_ty(tcx: ty::ctxt, t: ty::t) -> ty::t {
2020
let unit_ty = ty::sequence_element_type(tcx, t);
2121
let unboxed_vec_ty = ty::mk_mut_unboxed_vec(tcx, unit_ty);
2222
alt ty::get(t).struct {
23-
ty::ty_vec(_) | ty::ty_str |
2423
ty::ty_estr(ty::vstore_uniq) | ty::ty_evec(_, ty::vstore_uniq) {
2524
ty::mk_imm_uniq(tcx, unboxed_vec_ty)
2625
}

trunk/src/rustc/middle/trans/type_of.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ fn type_of(cx: @crate_ctxt, t: ty::t) -> TypeRef {
8989
ty::ty_int(t) { T_int_ty(cx, t) }
9090
ty::ty_uint(t) { T_uint_ty(cx, t) }
9191
ty::ty_float(t) { T_float_ty(cx, t) }
92-
ty::ty_estr(ty::vstore_uniq) |
93-
ty::ty_str {
92+
ty::ty_estr(ty::vstore_uniq) {
9493
T_unique_ptr(T_unique(cx, T_vec(cx, T_i8())))
9594
}
9695
ty::ty_enum(did, _) { type_of_enum(cx, did, t) }
@@ -103,8 +102,7 @@ fn type_of(cx: @crate_ctxt, t: ty::t) -> TypeRef {
103102
ty::ty_box(mt) { T_box_ptr(T_box(cx, type_of(cx, mt.ty))) }
104103
ty::ty_opaque_box { T_box_ptr(T_box(cx, T_i8())) }
105104
ty::ty_uniq(mt) { T_unique_ptr(T_unique(cx, type_of(cx, mt.ty))) }
106-
ty::ty_evec(mt, ty::vstore_uniq) |
107-
ty::ty_vec(mt) {
105+
ty::ty_evec(mt, ty::vstore_uniq) {
108106
T_unique_ptr(T_unique(cx, T_vec(cx, type_of(cx, mt.ty))))
109107
}
110108
ty::ty_unboxed_vec(mt) {

0 commit comments

Comments
 (0)