diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-07-06 16:46:17 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-07-06 16:46:17 +0200 |
| commit | 7661c08496b0dc9ce55657246f8e5e42051c812e (patch) | |
| tree | 125d9f3fe0dbd0eb90d93a6de31e08452cb13ae8 /src/comp/middle | |
| parent | 4c315666dd7c2ac2d207b00ad2b5b5ca309a627f (diff) | |
| download | rust-7661c08496b0dc9ce55657246f8e5e42051c812e.tar.gz rust-7661c08496b0dc9ce55657246f8e5e42051c812e.zip | |
Remove temporary stdlib placeholders, use actual stdlib functions
(Possible now that a snapshot took place.)
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/alias.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/resolve.rs | 4 | ||||
| -rw-r--r-- | src/comp/middle/trans.rs | 10 | ||||
| -rw-r--r-- | src/comp/middle/tstate/annotate.rs | 12 | ||||
| -rw-r--r-- | src/comp/middle/tstate/auxiliary.rs | 21 | ||||
| -rw-r--r-- | src/comp/middle/tstate/collect_locals.rs | 8 | ||||
| -rw-r--r-- | src/comp/middle/tstate/pre_post_conditions.rs | 4 | ||||
| -rw-r--r-- | src/comp/middle/tstate/states.rs | 1 | ||||
| -rw-r--r-- | src/comp/middle/typeck.rs | 4 |
9 files changed, 33 insertions, 33 deletions
diff --git a/src/comp/middle/alias.rs b/src/comp/middle/alias.rs index e419426c969..0c2200d9771 100644 --- a/src/comp/middle/alias.rs +++ b/src/comp/middle/alias.rs @@ -45,7 +45,7 @@ fn check_crate(@ty::ctxt tcx, &@ast::crate crate) { // Stores information about object fields and function // arguments that's otherwise not easily available. - local_map=syntax::_std::new_int_hash()); + local_map=std::map::new_int_hash()); auto v = @rec(visit_fn=bind visit_fn(cx, _, _, _, _, _, _, _), visit_item=bind visit_item(cx, _, _, _), diff --git a/src/comp/middle/resolve.rs b/src/comp/middle/resolve.rs index 2e3ed812900..9bab6e6e067 100644 --- a/src/comp/middle/resolve.rs +++ b/src/comp/middle/resolve.rs @@ -11,8 +11,8 @@ import metadata::creader; import metadata::decoder; import driver::session::session; import util::common::new_def_hash; -import syntax::_std::new_int_hash; -import syntax::_std::new_str_hash; +import std::map::new_int_hash; +import std::map::new_str_hash; import syntax::codemap::span; import syntax::ast::respan; import middle::ty::constr_table; diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 7e3d1aa9d76..7647ccd23fe 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -36,10 +36,9 @@ import middle::ty::pat_ty; import syntax::visit; import visit::vt; import util::common; -import syntax::_std::istr; import util::common::new_def_hash; -import syntax::_std::new_int_hash; -import syntax::_std::new_str_hash; +import std::map::new_int_hash; +import std::map::new_str_hash; import util::common::local_rhs_span; import syntax::codemap::span; import lib::llvm::llvm; @@ -73,7 +72,7 @@ import syntax::print::pprust::expr_to_str; import syntax::print::pprust::path_to_str; obj namegen(mutable int i) { - fn next(str prefix) -> str { i += 1; ret prefix + istr(i); } + fn next(str prefix) -> str { i += 1; ret prefix + int::str(i); } } type derived_tydesc_info = rec(ValueRef lltydesc, bool escapes); @@ -4432,7 +4431,8 @@ fn build_environment(&@block_ctxt cx, &vec[ast::node_id] upvars) -> case (some(?x)) { llbinding = x; } case (_) { cx.fcx.lcx.ccx.sess.bug("unbound var \ - in build_environment " + istr(nid)); } + in build_environment " + int::str(nid)); + } } } case (some(?llval)) { llbinding = llval; } diff --git a/src/comp/middle/tstate/annotate.rs b/src/comp/middle/tstate/annotate.rs index abffc3a97e3..6f3b29716ec 100644 --- a/src/comp/middle/tstate/annotate.rs +++ b/src/comp/middle/tstate/annotate.rs @@ -3,12 +3,12 @@ import std::vec; import std::option; import std::option::some; import std::option::none; +import std::int; +import std::uint; import syntax::ast::*; import syntax::walk; import syntax::codemap::span; -import syntax::_std::istr; -import syntax::_std::uistr; -import syntax::_std::new_str_hash; +import std::map::new_str_hash; import util::common::log_expr_err; import util::common::log_block_err; import util::common::log_item_err; @@ -35,12 +35,12 @@ fn collect_ids_block(&block b, @mutable vec[node_id] rs) { fn collect_ids_stmt(&@stmt s, @mutable vec[node_id] rs) { alt (s.node) { case (stmt_decl(_, ?id)) { - log "node_id " + istr(id); + log "node_id " + int::str(id); log_stmt(*s); vec::push(*rs, id); } case (stmt_expr(_, ?id)) { - log "node_id " + istr(id); + log "node_id " + int::str(id); log_stmt(*s); vec::push(*rs, id); } @@ -65,7 +65,7 @@ fn node_ids_in_fn(&_fn f, &vec[ty_param] tps, &span sp, &fn_ident i, fn init_vecs(&crate_ctxt ccx, &vec[node_id] node_ids, uint len) { for (node_id i in node_ids) { - log istr(i) + " |-> " + uistr(len); + log int::str(i) + " |-> " + 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 123f51e7a70..0bc1ceb3951 100644 --- a/src/comp/middle/tstate/auxiliary.rs +++ b/src/comp/middle/tstate/auxiliary.rs @@ -7,15 +7,15 @@ import std::option; import std::option::none; import std::option::some; import std::option::maybe; +import std::int; +import std::uint; import syntax::ast::*; import syntax::codemap::span; import util::common; import util::common::log_block; -import syntax::_std::new_int_hash; -import syntax::_std::new_uint_hash; +import std::map::new_int_hash; +import std::map::new_uint_hash; import util::common::log_expr_err; -import syntax::_std::istr; -import syntax::_std::uistr; import util::common::lit_eq; import syntax::print::pprust::path_to_str; import tstate::ann::pre_and_post; @@ -44,7 +44,9 @@ import syntax::print::pprust::lit_to_str; /* logging funs */ -fn def_id_to_str(def_id d) -> str { ret istr(d._0) + "," + istr(d._1); } +fn def_id_to_str(def_id d) -> str { + ret int::str(d._0) + "," + int::str(d._1); +} fn comma_str(vec[@constr_arg_use] args) -> str { auto rslt = ""; @@ -259,7 +261,8 @@ fn get_ts_ann(&crate_ctxt ccx, node_id i) -> option::t[ts_ann] { fn node_id_to_ts_ann(&crate_ctxt ccx, node_id id) -> ts_ann { alt (get_ts_ann(ccx, id)) { case (none) { - log_err "node_id_to_ts_ann: no ts_ann for node_id " + istr(id); + log_err "node_id_to_ts_ann: no ts_ann for node_id " + + int::str(id); fail; } case (some(?t)) { ret t; } @@ -460,7 +463,7 @@ fn constraints_expr(&ty::ctxt cx, @expr e) -> vec[@ty::constr_def] { fn node_id_to_def_strict(&ty::ctxt cx, node_id id) -> def { alt (cx.def_map.find(id)) { case (none) { - log_err "node_id_to_def: node_id " + istr(id) + " has no def"; + log_err "node_id_to_def: node_id " + int::str(id) + " has no def"; fail; } case (some(?d)) { ret d; } @@ -518,7 +521,7 @@ fn match_args(&fn_ctxt fcx, vec[pred_desc] occs, vec[@constr_arg_use] occ) -> fn node_id_for_constr(ty::ctxt tcx, node_id t) -> node_id { alt (tcx.def_map.find(t)) { case (none) { - tcx.sess.bug("node_id_for_constr: bad node_id " + istr(t)); + tcx.sess.bug("node_id_for_constr: bad node_id " + int::str(t)); } case (some(def_fn(?i,_))) { ret i._1; } case (_) { @@ -590,7 +593,7 @@ fn expr_to_constr(ty::ctxt tcx, &@expr e) -> constr { } fn pred_desc_to_str(&pred_desc p) -> str { - ret "<" + uistr(p.node.bit_num) + ", " + + ret "<" + uint::str(p.node.bit_num) + ", " + constr_args_to_str(std::util::fst[ident, def_id], p.node.args) + ">"; } diff --git a/src/comp/middle/tstate/collect_locals.rs b/src/comp/middle/tstate/collect_locals.rs index e3b4f0421d4..764c66e52a0 100644 --- a/src/comp/middle/tstate/collect_locals.rs +++ b/src/comp/middle/tstate/collect_locals.rs @@ -21,9 +21,8 @@ import aux::constr_map; import aux::expr_to_constr; import aux::constraints_expr; import aux::node_id_to_def_strict; -import syntax::_std::new_int_hash; +import std::map::new_int_hash; import util::common::new_def_hash; -import syntax::_std::uistr; import syntax::codemap::span; import syntax::ast::respan; @@ -82,7 +81,7 @@ fn find_locals(&ty::ctxt tcx, &_fn f, &vec[ty_param] tps, fn add_constraint(&ty::ctxt tcx, aux::constr c, uint next, constr_map tbl) -> uint { - log aux::constraint_to_str(tcx, c) + " |-> " + uistr(next); + log aux::constraint_to_str(tcx, c) + " |-> " + std::uint::str(next); alt (c.node.c) { case (ninit(?i)) { tbl.insert(c.node.id, cinit(next, c.span, i)); } case (npred(?p, ?args)) { @@ -142,7 +141,8 @@ fn mk_fn_info(&crate_ctxt ccx, &_fn f, &vec[ty_param] tp, cf=f.decl.cf, used_vars=v); ccx.fm.insert(id, rslt); - log name + " has " + uistr(num_constraints(rslt)) + " constraints"; + log name + " has " + std::uint::str(num_constraints(rslt)) + + " constraints"; } diff --git a/src/comp/middle/tstate/pre_post_conditions.rs b/src/comp/middle/tstate/pre_post_conditions.rs index 9ce0d7ce5eb..d183ef28a73 100644 --- a/src/comp/middle/tstate/pre_post_conditions.rs +++ b/src/comp/middle/tstate/pre_post_conditions.rs @@ -66,10 +66,8 @@ import bitvectors::gen_poststate; import bitvectors::relax_precond_block; import bitvectors::gen; import syntax::ast::*; -import syntax::_std::new_int_hash; +import std::map::new_int_hash; import util::common::new_def_hash; -import syntax::_std::istr; -import syntax::_std::uistr; import util::common::log_expr; import util::common::log_fn; import util::common::elt_exprs; diff --git a/src/comp/middle/tstate/states.rs b/src/comp/middle/tstate/states.rs index ff999c1aa1c..d75c5a43f2e 100644 --- a/src/comp/middle/tstate/states.rs +++ b/src/comp/middle/tstate/states.rs @@ -80,7 +80,6 @@ import middle::ty::expr_ty; import middle::ty::type_is_nil; import middle::ty::type_is_bot; import util::common::new_def_hash; -import syntax::_std::uistr; import util::common::log_expr; import util::common::log_block; import util::common::log_block_err; diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 54ce0ffffc9..aa950769863 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -9,7 +9,7 @@ import metadata::decoder; import driver::session; import util::common; import syntax::codemap::span; -import syntax::_std::new_int_hash; +import std::map::new_int_hash; import util::common::new_def_hash; import util::common::log_expr_err; import middle::ty; @@ -537,7 +537,7 @@ mod collect { } case (_) { cx.tcx.sess.fatal("internal error " + - syntax::_std::istr(id._1)); + std::int::str(id._1)); } } ret tpt; |
