Rename istr-stuff to str in rustc. Issue #855
This commit is contained in:
parent
f1555e2ca8
commit
a1d71995ec
5 changed files with 11 additions and 11 deletions
|
@ -193,7 +193,7 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
|
|||
}
|
||||
}
|
||||
'c' { ret ty::mk_char(st.tcx); }
|
||||
'S' { ret ty::mk_istr(st.tcx); }
|
||||
'S' { ret ty::mk_str(st.tcx); }
|
||||
't' {
|
||||
assert (next(st) as char == '[');
|
||||
let def = parse_def(st, sd);
|
||||
|
|
|
@ -2244,7 +2244,7 @@ fn trans_crate_lit(cx: &@crate_ctxt, lit: &ast::lit) -> ValueRef {
|
|||
|
||||
fn trans_lit(cx: &@block_ctxt, lit: &ast::lit) -> result {
|
||||
alt lit.node {
|
||||
ast::lit_str(s) { ret tvec::trans_istr(cx, s); }
|
||||
ast::lit_str(s) { ret tvec::trans_str(cx, s); }
|
||||
_ { ret rslt(cx, trans_crate_lit(bcx_ccx(cx), lit)); }
|
||||
}
|
||||
}
|
||||
|
@ -5465,7 +5465,7 @@ fn create_main_wrapper(ccx: &@crate_ctxt, sp: &span, main_llfn: ValueRef,
|
|||
|
||||
fn create_main(ccx: &@crate_ctxt, sp: &span, main_llfn: ValueRef,
|
||||
takes_argv: bool) -> ValueRef {
|
||||
let unit_ty = ty::mk_istr(ccx.tcx);
|
||||
let unit_ty = ty::mk_str(ccx.tcx);
|
||||
let vecarg_ty: ty::arg =
|
||||
{mode: ty::mo_val,
|
||||
ty: ty::mk_vec(ccx.tcx, {ty: unit_ty, mut: ast::imm})};
|
||||
|
|
|
@ -121,10 +121,10 @@ fn trans_vec(bcx: &@block_ctxt, args: &[@ast::expr], id: ast::node_id) ->
|
|||
}
|
||||
ret rslt(bcx, vptr);
|
||||
}
|
||||
fn trans_istr(bcx: &@block_ctxt, s: str) -> result {
|
||||
fn trans_str(bcx: &@block_ctxt, s: str) -> result {
|
||||
let veclen = std::str::byte_len(s) + 1u; // +1 for \0
|
||||
let {bcx: bcx, val: sptr, _} =
|
||||
alloc(bcx, ty::mk_istr(bcx_tcx(bcx)), veclen);
|
||||
alloc(bcx, ty::mk_str(bcx_tcx(bcx)), veclen);
|
||||
|
||||
let llcstr = C_cstr(bcx_ccx(bcx), s);
|
||||
let bcx =
|
||||
|
|
|
@ -67,7 +67,7 @@ export mk_fn;
|
|||
export mk_imm_box;
|
||||
export mk_mut_ptr;
|
||||
export mk_int;
|
||||
export mk_istr;
|
||||
export mk_str;
|
||||
export mk_vec;
|
||||
export mk_mach;
|
||||
export mk_native;
|
||||
|
@ -331,7 +331,7 @@ const idx_f64: uint = 14u;
|
|||
|
||||
const idx_char: uint = 15u;
|
||||
|
||||
const idx_istr: uint = 16u;
|
||||
const idx_str: uint = 16u;
|
||||
|
||||
const idx_type: uint = 17u;
|
||||
|
||||
|
@ -529,7 +529,7 @@ fn mk_mach(_cx: &ctxt, tm: &ast::ty_mach) -> t {
|
|||
|
||||
fn mk_char(_cx: &ctxt) -> t { ret idx_char; }
|
||||
|
||||
fn mk_istr(_cx: &ctxt) -> t { ret idx_istr; }
|
||||
fn mk_str(_cx: &ctxt) -> t { ret idx_str; }
|
||||
|
||||
fn mk_tag(cx: &ctxt, did: &ast::def_id, tys: &[t]) -> t {
|
||||
ret gen_ty(cx, ty_tag(did, tys));
|
||||
|
|
|
@ -326,7 +326,7 @@ fn ast_ty_to_ty(tcx: &ty::ctxt, getter: &ty_getter, ast_ty: &@ast::ty) ->
|
|||
ast::ty_float. { typ = ty::mk_float(tcx); }
|
||||
ast::ty_machine(tm) { typ = ty::mk_mach(tcx, tm); }
|
||||
ast::ty_char. { typ = ty::mk_char(tcx); }
|
||||
ast::ty_str. { typ = ty::mk_istr(tcx); }
|
||||
ast::ty_str. { typ = ty::mk_str(tcx); }
|
||||
ast::ty_box(mt) {
|
||||
typ = ty::mk_box(tcx, ast_mt_to_mt(tcx, getter, mt));
|
||||
}
|
||||
|
@ -1298,7 +1298,7 @@ fn gather_locals(ccx: &@crate_ctxt, f: &ast::_fn, id: &ast::node_id,
|
|||
// AST fragment checking
|
||||
fn check_lit(ccx: @crate_ctxt, lit: &@ast::lit) -> ty::t {
|
||||
alt lit.node {
|
||||
ast::lit_str(_) { ret ty::mk_istr(ccx.tcx); }
|
||||
ast::lit_str(_) { ret ty::mk_str(ccx.tcx); }
|
||||
ast::lit_char(_) { ret ty::mk_char(ccx.tcx); }
|
||||
ast::lit_int(_) { ret ty::mk_int(ccx.tcx); }
|
||||
ast::lit_float(_) { ret ty::mk_float(ccx.tcx); }
|
||||
|
@ -1853,7 +1853,7 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr, unify: &unifier,
|
|||
bot = true;
|
||||
alt expr_opt {
|
||||
none. {/* do nothing */ }
|
||||
some(e) { check_expr_with(fcx, e, ty::mk_istr(tcx)); }
|
||||
some(e) { check_expr_with(fcx, e, ty::mk_str(tcx)); }
|
||||
}
|
||||
write::bot_ty(tcx, id);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue