about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/metadata/tyencode.rs9
-rw-r--r--src/comp/middle/trans.rs15
-rw-r--r--src/comp/middle/trans_common.rs3
-rw-r--r--src/comp/middle/tstate/annotate.rs3
-rw-r--r--src/comp/middle/tstate/auxiliary.rs3
-rw-r--r--src/comp/middle/tstate/collect_locals.rs9
-rw-r--r--src/comp/middle/ty.rs25
-rw-r--r--src/comp/syntax/parse/token.rs3
-rw-r--r--src/comp/syntax/print/pprust.rs5
-rw-r--r--src/comp/util/common.rs5
10 files changed, 48 insertions, 32 deletions
diff --git a/src/comp/metadata/tyencode.rs b/src/comp/metadata/tyencode.rs
index 7b0915ba7b7..0a15b9e7346 100644
--- a/src/comp/metadata/tyencode.rs
+++ b/src/comp/metadata/tyencode.rs
@@ -1,5 +1,6 @@
 // Type encoding
 
+import std::istr;
 import std::io;
 import std::map::hashmap;
 import std::option::some;
@@ -70,9 +71,9 @@ fn enc_ty(w: &io::writer, cx: &@ctxt, t: ty::t) {
                 // I.e. it's actually an abbreviation.
 
                 let s =
-                    "#" + uint::to_str(pos, 16u) + ":" +
-                        uint::to_str(len, 16u) + "#";
-                let a = {pos: pos, len: len, s: s};
+                    ~"#" + uint::to_str(pos, 16u) + ~":" +
+                    uint::to_str(len, 16u) + ~"#";
+                let a = {pos: pos, len: len, s: istr::to_estr(s)};
                 abbrevs.insert(t, a);
             }
             ret;
@@ -183,7 +184,7 @@ fn enc_sty(w: &io::writer, cx: &@ctxt, st: &ty::sty) {
           kind_shared. { w.write_str("ps"); }
           kind_pinned. { w.write_str("pp"); }
         }
-        w.write_str(uint::str(id));
+        w.write_str(istr::to_estr(uint::str(id)));
       }
       ty::ty_type. { w.write_char('Y'); }
       ty::ty_constr(ty, cs) {
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 0adfbe2d03a..13cd2c76e09 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -14,6 +14,7 @@
 //     int) and rec(x=int, y=int, z=int) will have the same TypeRef.
 import std::int;
 import std::str;
+import std::istr;
 import std::uint;
 import std::str::rustrt::sbuf;
 import std::map;
@@ -1048,10 +1049,10 @@ fn get_tydesc(cx: &@block_ctxt, orig_t: ty::t, escapes: bool,
         } else {
             bcx_tcx(cx).sess.span_bug(cx.sp,
                                       "Unbound typaram in get_tydesc: " +
-                                          "orig_t = " +
-                                          ty_to_str(bcx_tcx(cx), orig_t) +
-                                          " ty_param = " +
-                                          std::uint::str(id));
+                                      "orig_t = " +
+                                      ty_to_str(bcx_tcx(cx), orig_t) +
+                                      " ty_param = " +
+                                      istr::to_estr(std::uint::str(id)));
         }
       }
       none. {/* fall through */ }
@@ -1871,8 +1872,8 @@ fn iter_structural_ty_full(cx: &@block_ctxt, av: ValueRef, t: ty::t,
         for variant: ty::variant_info in variants {
             let variant_cx =
                 new_sub_block_ctxt(bcx,
-                                   "tag-iter-variant-" +
-                                       uint::to_str(i, 10u));
+                                   istr::to_estr(~"tag-iter-variant-" +
+                                                 uint::to_str(i, 10u)));
             llvm::LLVMAddCase(llswitch, C_int(i as int), variant_cx.llbb);
             variant_cx =
                 iter_variant(variant_cx, llunion_a_ptr, variant, tps, tid,
@@ -5517,7 +5518,7 @@ fn trans_tag_variant(cx: @local_ctxt, tag_id: ast::node_id,
         fn_args +=
             [{mode: ast::alias(false),
               ty: varg.ty,
-              ident: "arg" + uint::to_str(i, 10u),
+              ident: istr::to_estr(~"arg" + uint::to_str(i, 10u)),
               id: varg.id}];
     }
     assert (cx.ccx.item_ids.contains_key(variant.node.id));
diff --git a/src/comp/middle/trans_common.rs b/src/comp/middle/trans_common.rs
index 2eb4c503a5b..7cc7edd9dcd 100644
--- a/src/comp/middle/trans_common.rs
+++ b/src/comp/middle/trans_common.rs
@@ -6,6 +6,7 @@
 import std::int;
 import std::vec;
 import std::str;
+import std::istr;
 import std::uint;
 import std::str::rustrt::sbuf;
 import std::map;
@@ -758,7 +759,7 @@ fn T_opaque_closure_ptr(cx: &crate_ctxt) -> TypeRef {
 }
 
 fn T_tag(tn: &type_names, size: uint) -> TypeRef {
-    let s = "tag_" + uint::to_str(size, 10u);
+    let s = "tag_" + istr::to_estr(uint::to_str(size, 10u));
     if tn.name_has_type(s) { ret tn.get_type(s); }
     let t = T_struct([T_int(), T_array(T_i8(), size)]);
     tn.associate(s, t);
diff --git a/src/comp/middle/tstate/annotate.rs b/src/comp/middle/tstate/annotate.rs
index bb288cb18c7..946366cd78c 100644
--- a/src/comp/middle/tstate/annotate.rs
+++ b/src/comp/middle/tstate/annotate.rs
@@ -4,6 +4,7 @@ import std::option::some;
 import std::option::none;
 import std::int;
 import std::uint;
+import std::istr;
 import syntax::ast::*;
 import syntax::ast_util::pat_binding_ids;
 import syntax::visit;
@@ -61,7 +62,7 @@ fn node_ids_in_fn(f: &_fn, tps: &[ty_param], sp: &span, i: &fn_ident,
 
 fn init_vecs(ccx: &crate_ctxt, node_ids: &[node_id], len: uint) {
     for i: node_id in node_ids {
-        log int::str(i) + " |-> " + uint::str(len);
+        log int::str(i) + " |-> " + istr::to_estr(uint::str(len));
         add_node(ccx, i, empty_ann(len));
     }
 }
diff --git a/src/comp/middle/tstate/auxiliary.rs b/src/comp/middle/tstate/auxiliary.rs
index 03d31c67369..b8d125e59a9 100644
--- a/src/comp/middle/tstate/auxiliary.rs
+++ b/src/comp/middle/tstate/auxiliary.rs
@@ -1,6 +1,7 @@
 import std::vec;
 import std::int::str;
 import std::str;
+import std::istr;
 import std::option;
 import std::option::*;
 import std::int;
@@ -678,7 +679,7 @@ fn expr_to_constr(tcx: ty::ctxt, e: &@expr) -> sp_constr {
 }
 
 fn pred_args_to_str(p: &pred_args) -> str {
-    "<" + uint::str(p.node.bit_num) + ", " +
+    "<" + istr::to_estr(uint::str(p.node.bit_num)) + ", " +
         constr_args_to_str(fn (i: &inst) -> str { ret i.ident; }, p.node.args)
         + ">"
 }
diff --git a/src/comp/middle/tstate/collect_locals.rs b/src/comp/middle/tstate/collect_locals.rs
index 0065fcaf41d..f4729c3182e 100644
--- a/src/comp/middle/tstate/collect_locals.rs
+++ b/src/comp/middle/tstate/collect_locals.rs
@@ -1,3 +1,4 @@
+import std::istr;
 import std::uint;
 import std::int;
 import std::vec;
@@ -60,7 +61,8 @@ fn find_locals(tcx: &ty::ctxt, f: &_fn, tps: &[ty_param], sp: &span,
 
 fn add_constraint(tcx: &ty::ctxt, c: sp_constr, next: uint, tbl: constr_map)
    -> uint {
-    log constraint_to_str(tcx, c) + " |-> " + std::uint::str(next);
+    log constraint_to_str(tcx, c) + " |-> "
+        + istr::to_estr(std::uint::str(next));
     alt c.node {
       ninit(id, i) { tbl.insert(local_def(id), cinit(next, c.span, i)); }
       npred(p, d_id, args) {
@@ -145,8 +147,9 @@ fn mk_fn_info(ccx: &crate_ctxt, f: &_fn, tp: &[ty_param], f_sp: &span,
          i_diverge: ninit(diverges_id, diverges_name),
          used_vars: v};
     ccx.fm.insert(id, rslt);
-    log name + " has " + std::uint::str(num_constraints(rslt)) +
-            " constraints";
+    log name + istr::to_estr(~" has "
+                             + std::uint::str(num_constraints(rslt))
+                             + ~" constraints");
 }
 
 
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index e65265e640f..3a446c4dc6a 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -1,6 +1,7 @@
 import std::int;
 import std::vec;
 import std::str;
+import std::istr;
 import std::uint;
 import std::box;
 import std::ufind;
@@ -2605,14 +2606,18 @@ fn type_err_to_str(err: &ty::type_err) -> str {
       terr_box_mutability. { ret "boxed values differ in mutability"; }
       terr_vec_mutability. { ret "vectors differ in mutability"; }
       terr_tuple_size(e_sz, a_sz) {
-        ret "expected a tuple with " + uint::to_str(e_sz, 10u) +
-                " elements but found one with " + uint::to_str(a_sz, 10u) +
-                " elements";
+        ret istr::to_estr(~"expected a tuple with " +
+                          uint::to_str(e_sz, 10u) +
+                          ~" elements but found one with " +
+                          uint::to_str(a_sz, 10u) +
+                          ~" elements");
       }
       terr_record_size(e_sz, a_sz) {
-        ret "expected a record with " + uint::to_str(e_sz, 10u) +
-                " fields but found one with " + uint::to_str(a_sz, 10u) +
-                " fields";
+        ret istr::to_estr(~"expected a record with " +
+                          uint::to_str(e_sz, 10u) +
+                          ~" fields but found one with " +
+                          uint::to_str(a_sz, 10u) +
+                          ~" fields");
       }
       terr_record_mutability. { ret "record elements differ in mutability"; }
       terr_record_fields(e_fld, a_fld) {
@@ -2630,10 +2635,10 @@ fn type_err_to_str(err: &ty::type_err) -> str {
                 mode_str_1(a_mode);
       }
       terr_constr_len(e_len, a_len) {
-        ret "Expected a type with " + uint::str(e_len) +
-                " constraints, \
-              but found one with " +
-                uint::str(a_len) + " constraints";
+        ret istr::to_estr(~"Expected a type with " +
+                          uint::str(e_len) +
+                          ~" constraints, but found one with " +
+                          uint::str(a_len) + ~" constraints");
       }
       terr_constr_mismatch(e_constr, a_constr) {
         ret "Expected a type with constraint " + ty_constr_to_str(e_constr) +
diff --git a/src/comp/syntax/parse/token.rs b/src/comp/syntax/parse/token.rs
index 7e93444e09b..994c4e03b34 100644
--- a/src/comp/syntax/parse/token.rs
+++ b/src/comp/syntax/parse/token.rs
@@ -6,6 +6,7 @@ import util::interner;
 import std::int;
 import std::uint;
 import std::str;
+import std::istr;
 
 type str_num = uint;
 
@@ -146,7 +147,7 @@ fn to_str(r: lexer::reader, t: token) -> str {
       LIT_INT(i) {
         ret int::to_str(i, 10u);
       }
-      LIT_UINT(u) { ret uint::to_str(u, 10u); }
+      LIT_UINT(u) { ret istr::to_estr(uint::to_str(u, 10u)); }
       LIT_MACH_INT(tm, i) {
         ret int::to_str(i, 10u) + "_" + ty_mach_to_str(tm);
       }
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index 52ee1eaeacc..81220647288 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -3,6 +3,7 @@ import std::vec;
 import std::int;
 import std::io;
 import std::str;
+import std::istr;
 import std::uint;
 import std::option;
 import parse::lexer;
@@ -1498,7 +1499,7 @@ fn print_literal(s: &ps, lit: &@ast::lit) {
                  "'");
       }
       ast::lit_int(val) { word(s.s, int::str(val)); }
-      ast::lit_uint(val) { word(s.s, uint::str(val) + "u"); }
+      ast::lit_uint(val) { word(s.s, istr::to_estr(uint::str(val)) + "u"); }
       ast::lit_float(fstr) { word(s.s, fstr); }
       ast::lit_mach_int(mach, val) {
         word(s.s, int::str(val as int));
@@ -1660,7 +1661,7 @@ fn constr_arg_to_str<T>(f: &fn(&T) -> str, c: &ast::constr_arg_general_<T>) ->
 // needed b/c constr_args_to_str needs
 // something that takes an alias
 // (argh)
-fn uint_to_str(i: &uint) -> str { ret uint::str(i); }
+fn uint_to_str(i: &uint) -> str { ret istr::to_estr(uint::str(i)); }
 
 fn ast_ty_fn_constr_to_str(c: &@ast::constr) -> str {
     ret path_to_str(c.node.path) +
diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs
index ddd12d77229..f531f4c1e0c 100644
--- a/src/comp/util/common.rs
+++ b/src/comp/util/common.rs
@@ -1,4 +1,5 @@
 import std::str;
+import std::istr;
 import std::map;
 import std::map::hashmap;
 import std::uint;
@@ -163,13 +164,13 @@ fn float_to_str(num: float, digits: uint) -> str {
     let accum = if num < 0.0 { num = -num; "-" } else { "" };
     let trunc = num as uint;
     let frac = num - (trunc as float);
-    accum += uint::str(trunc);
+    accum += istr::to_estr(uint::str(trunc));
     if frac == 0.0 || digits == 0u { ret accum; }
     accum += ".";
     while digits > 0u && frac > 0.0 {
         frac *= 10.0;
         let digit = frac as uint;
-        accum += uint::str(digit);
+        accum += istr::to_estr(uint::str(digit));
         frac -= digit as float;
         digits -= 1u;
     }