diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-10 15:38:28 -0700 | 
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-10 17:08:36 -0700 | 
| commit | cb7a5395ddfaa7b8fc40db57b32c22f69780ccd6 (patch) | |
| tree | 4c79be0560610f8ae49a16670ff9dede47bcaaf1 /src/rustc | |
| parent | 29003c799f41cce948bc043cdd1350ca4bee949e (diff) | |
| download | rust-cb7a5395ddfaa7b8fc40db57b32c22f69780ccd6.tar.gz rust-cb7a5395ddfaa7b8fc40db57b32c22f69780ccd6.zip | |
Convert std::map to camel case
Diffstat (limited to 'src/rustc')
49 files changed, 185 insertions, 185 deletions
| diff --git a/src/rustc/back/link.rs b/src/rustc/back/link.rs index 5708cf2f785..18c63c1934b 100644 --- a/src/rustc/back/link.rs +++ b/src/rustc/back/link.rs @@ -7,7 +7,7 @@ use middle::ty; use metadata::{encoder, cstore}; use middle::trans::common::crate_ctxt; use metadata::common::link_meta; -use std::map::hashmap; +use std::map::HashMap; use std::sha1::sha1; use syntax::ast; use syntax::print::pprust; diff --git a/src/rustc/back/rpath.rs b/src/rustc/back/rpath.rs index b77a667f7d3..df3e9e88185 100644 --- a/src/rustc/back/rpath.rs +++ b/src/rustc/back/rpath.rs @@ -1,5 +1,5 @@ use std::map; -use std::map::hashmap; +use std::map::HashMap; use metadata::cstore; use driver::session; use metadata::filesearch; diff --git a/src/rustc/driver/driver.rs b/src/rustc/driver/driver.rs index 04c71bdbe72..a82fc7ac69a 100644 --- a/src/rustc/driver/driver.rs +++ b/src/rustc/driver/driver.rs @@ -13,7 +13,7 @@ use std::getopts; use io::WriterUtil; use getopts::{optopt, optmulti, optflag, optflagopt, opt_present}; use back::{x86, x86_64}; -use std::map::hashmap; +use std::map::HashMap; use lib::llvm::llvm; enum pp_mode {ppm_normal, ppm_expanded, ppm_typed, ppm_identified, diff --git a/src/rustc/driver/rustc.rs b/src/rustc/driver/rustc.rs index 148a735221e..c4714ecf9e5 100644 --- a/src/rustc/driver/rustc.rs +++ b/src/rustc/driver/rustc.rs @@ -11,7 +11,7 @@ use core::*; // -*- rust -*- use result::{Ok, Err}; use std::getopts; -use std::map::hashmap; +use std::map::HashMap; use getopts::{opt_present}; use rustc::driver::driver::*; use syntax::codemap; diff --git a/src/rustc/lib/llvm.rs b/src/rustc/lib/llvm.rs index 4e529239401..64258fcd43a 100644 --- a/src/rustc/lib/llvm.rs +++ b/src/rustc/lib/llvm.rs @@ -1,4 +1,4 @@ -use std::map::hashmap; +use std::map::HashMap; use libc::{c_char, c_int, c_uint, c_longlong, c_ulonglong}; @@ -1038,8 +1038,8 @@ fn SetLinkage(Global: ValueRef, Link: Linkage) { /* Memory-managed object interface to type handles. */ -type type_names = @{type_names: std::map::hashmap<TypeRef, ~str>, - named_types: std::map::hashmap<~str, TypeRef>}; +type type_names = @{type_names: std::map::HashMap<TypeRef, ~str>, + named_types: std::map::HashMap<~str, TypeRef>}; fn associate_type(tn: type_names, s: ~str, t: TypeRef) { assert tn.type_names.insert(t, s); @@ -1057,7 +1057,7 @@ fn name_has_type(tn: type_names, s: ~str) -> Option<TypeRef> { fn mk_type_names() -> type_names { pure fn hash(t: &TypeRef) -> uint { *t as uint } pure fn eq(a: &TypeRef, b: &TypeRef) -> bool { *a == *b } - @{type_names: std::map::hashmap(), + @{type_names: std::map::HashMap(), named_types: std::map::str_hash()} } diff --git a/src/rustc/metadata/creader.rs b/src/rustc/metadata/creader.rs index 444662ae0e2..ab7ee46dc64 100644 --- a/src/rustc/metadata/creader.rs +++ b/src/rustc/metadata/creader.rs @@ -5,7 +5,7 @@ use syntax::{ast, ast_util}; use syntax::attr; use syntax::visit; use syntax::codemap::span; -use std::map::{hashmap, int_hash}; +use std::map::{HashMap, int_hash}; use syntax::print::pprust; use filesearch::filesearch; use common::*; diff --git a/src/rustc/metadata/csearch.rs b/src/rustc/metadata/csearch.rs index 69fc8b81b23..e29a4fd436b 100644 --- a/src/rustc/metadata/csearch.rs +++ b/src/rustc/metadata/csearch.rs @@ -10,7 +10,7 @@ use syntax::diagnostic::span_handler; use syntax::diagnostic::expect; use ast_util::dummy_sp; use common::*; -use std::map::hashmap; +use std::map::HashMap; use dvec::DVec; export class_dtor; diff --git a/src/rustc/metadata/cstore.rs b/src/rustc/metadata/cstore.rs index ce20569116d..be974cb75b5 100644 --- a/src/rustc/metadata/cstore.rs +++ b/src/rustc/metadata/cstore.rs @@ -2,7 +2,7 @@ // crates and libraries use std::map; -use std::map::hashmap; +use std::map::HashMap; use syntax::{ast, attr}; use syntax::ast_util::new_def_hash; use syntax::parse::token::ident_interner; @@ -33,12 +33,12 @@ export get_path; // local crate numbers (as generated during this session). Each external // crate may refer to types in other external crates, and each has their // own crate numbers. -type cnum_map = map::hashmap<ast::crate_num, ast::crate_num>; +type cnum_map = map::HashMap<ast::crate_num, ast::crate_num>; // Multiple items may have the same def_id in crate metadata. They may be // renamed imports or reexports. This map keeps the "real" module path // and def_id. -type mod_path_map = map::hashmap<ast::def_id, @~str>; +type mod_path_map = map::HashMap<ast::def_id, @~str>; type crate_metadata = @{name: ~str, data: @~[u8], @@ -53,7 +53,7 @@ type crate_metadata = @{name: ~str, enum cstore { private(cstore_private), } type cstore_private = - @{metas: map::hashmap<ast::crate_num, crate_metadata>, + @{metas: map::HashMap<ast::crate_num, crate_metadata>, use_crate_map: use_crate_map, mod_path_map: mod_path_map, mut used_crate_files: ~[Path], @@ -62,7 +62,7 @@ type cstore_private = intr: ident_interner}; // Map from node_id's of local use statements to crate numbers -type use_crate_map = map::hashmap<ast::node_id, ast::crate_num>; +type use_crate_map = map::HashMap<ast::node_id, ast::crate_num>; // Internal method to retrieve the data from the cstore pure fn p(cstore: cstore) -> cstore_private { diff --git a/src/rustc/metadata/decoder.rs b/src/rustc/metadata/decoder.rs index fc158feffad..3f21caafb66 100644 --- a/src/rustc/metadata/decoder.rs +++ b/src/rustc/metadata/decoder.rs @@ -1,7 +1,7 @@ // Decoding metadata from a single crate's metadata use std::{ebml, map}; -use std::map::{hashmap, str_hash}; +use std::map::{HashMap, str_hash}; use io::WriterUtil; use dvec::DVec; use syntax::{ast, ast_util}; diff --git a/src/rustc/metadata/encoder.rs b/src/rustc/metadata/encoder.rs index 560dc384299..313723fc158 100644 --- a/src/rustc/metadata/encoder.rs +++ b/src/rustc/metadata/encoder.rs @@ -3,7 +3,7 @@ use util::ppaux::ty_to_str; use std::{ebml, map}; -use std::map::hashmap; +use std::map::HashMap; use io::WriterUtil; use ebml::Writer; use syntax::ast::*; @@ -35,7 +35,7 @@ export encode_ctxt; export write_type; export encode_def_id; -type abbrev_map = map::hashmap<ty::t, tyencode::ty_abbrev>; +type abbrev_map = map::HashMap<ty::t, tyencode::ty_abbrev>; type encode_inlined_item = fn@(ecx: @encode_ctxt, ebml_w: ebml::Writer, @@ -45,11 +45,11 @@ type encode_inlined_item = fn@(ecx: @encode_ctxt, type encode_parms = { diag: span_handler, tcx: ty::ctxt, - reachable: hashmap<ast::node_id, ()>, + reachable: HashMap<ast::node_id, ()>, reexports: ~[(~str, def_id)], reexports2: middle::resolve::ExportMap2, - item_symbols: hashmap<ast::node_id, ~str>, - discrim_symbols: hashmap<ast::node_id, ~str>, + item_symbols: HashMap<ast::node_id, ~str>, + discrim_symbols: HashMap<ast::node_id, ~str>, link_meta: link_meta, cstore: cstore::cstore, encode_inlined_item: encode_inlined_item @@ -72,11 +72,11 @@ enum encode_ctxt = { tcx: ty::ctxt, buf: io::MemBuffer, stats: stats, - reachable: hashmap<ast::node_id, ()>, + reachable: HashMap<ast::node_id, ()>, reexports: ~[(~str, def_id)], reexports2: middle::resolve::ExportMap2, - item_symbols: hashmap<ast::node_id, ~str>, - discrim_symbols: hashmap<ast::node_id, ~str>, + item_symbols: HashMap<ast::node_id, ~str>, + discrim_symbols: HashMap<ast::node_id, ~str>, link_meta: link_meta, cstore: cstore::cstore, encode_inlined_item: encode_inlined_item, diff --git a/src/rustc/metadata/tydecode.rs b/src/rustc/metadata/tydecode.rs index 8fe58a93824..0c94213c08c 100644 --- a/src/rustc/metadata/tydecode.rs +++ b/src/rustc/metadata/tydecode.rs @@ -8,7 +8,7 @@ use syntax::ast::*; use syntax::ast_util; use syntax::ast_util::respan; use middle::ty; -use std::map::hashmap; +use std::map::HashMap; use ty::{FnTyBase, FnMeta, FnSig}; export parse_ty_data, parse_def_id, parse_ident; diff --git a/src/rustc/metadata/tyencode.rs b/src/rustc/metadata/tyencode.rs index 622ba1a5cce..3d256367023 100644 --- a/src/rustc/metadata/tyencode.rs +++ b/src/rustc/metadata/tyencode.rs @@ -1,7 +1,7 @@ // Type encoding use io::WriterUtil; -use std::map::hashmap; +use std::map::HashMap; use syntax::ast::*; use syntax::diagnostic::span_handler; use middle::ty; @@ -31,7 +31,7 @@ type ctxt = { // Whatever format you choose should not contain pipe characters. type ty_abbrev = {pos: uint, len: uint, s: @~str}; -enum abbrev_ctxt { ac_no_abbrevs, ac_use_abbrevs(hashmap<ty::t, ty_abbrev>), } +enum abbrev_ctxt { ac_no_abbrevs, ac_use_abbrevs(HashMap<ty::t, ty_abbrev>), } fn cx_uses_abbrevs(cx: @ctxt) -> bool { match cx.abbrevs { diff --git a/src/rustc/middle/astencode.rs b/src/rustc/middle/astencode.rs index bf29efaaa64..d4891dc677e 100644 --- a/src/rustc/middle/astencode.rs +++ b/src/rustc/middle/astencode.rs @@ -10,7 +10,7 @@ use syntax::codemap::span; use std::ebml; use std::ebml::Writer; use std::ebml::get_doc; -use std::map::hashmap; +use std::map::HashMap; use std::serialization::serializer; use std::serialization::deserializer; use std::serialization::serializer_helpers; diff --git a/src/rustc/middle/borrowck.rs b/src/rustc/middle/borrowck.rs index 1286a95aa02..99e3005fd0c 100644 --- a/src/rustc/middle/borrowck.rs +++ b/src/rustc/middle/borrowck.rs @@ -222,7 +222,7 @@ use syntax::ast_map; use syntax::codemap::span; use util::ppaux::{ty_to_str, region_to_str, explain_region, note_and_explain_region}; -use std::map::{int_hash, hashmap, set}; +use std::map::{int_hash, HashMap, Set}; use std::list; use std::list::{List, Cons, Nil}; use result::{Result, Ok, Err}; @@ -300,7 +300,7 @@ enum borrowck_ctxt { // a map mapping id's of expressions of gc'd type (@T, @[], etc) where // the box needs to be kept live to the id of the scope for which they // must stay live. -type root_map = hashmap<root_map_key, ast::node_id>; +type root_map = HashMap<root_map_key, ast::node_id>; // the keys to the root map combine the `id` of the expression with // the number of types that it is autodereferenced. So, for example, @@ -311,7 +311,7 @@ type root_map_key = {id: ast::node_id, derefs: uint}; // set of ids of local vars / formal arguments that are modified / moved. // this is used in trans for optimization purposes. -type mutbl_map = std::map::hashmap<ast::node_id, ()>; +type mutbl_map = std::map::HashMap<ast::node_id, ()>; // Errors that can occur"] enum bckerr_code { @@ -392,8 +392,8 @@ type loan = {lp: @loan_path, cmt: cmt, mutbl: ast::mutability}; /// - `pure_map`: map from block/expr that must be pure to the error message /// that should be reported if they are not pure type req_maps = { - req_loan_map: hashmap<ast::node_id, @DVec<@DVec<loan>>>, - pure_map: hashmap<ast::node_id, bckerr> + req_loan_map: HashMap<ast::node_id, @DVec<@DVec<loan>>>, + pure_map: HashMap<ast::node_id, bckerr> }; fn save_and_restore<T:Copy,U>(&save_and_restore_t: T, f: fn() -> U) -> U { @@ -421,7 +421,7 @@ impl root_map_key : to_bytes::IterBytes { } fn root_map() -> root_map { - return hashmap(); + return HashMap(); pure fn root_map_key_eq(k1: &root_map_key, k2: &root_map_key) -> bool { k1.id == k2.id && k1.derefs == k2.derefs diff --git a/src/rustc/middle/borrowck/check_loans.rs b/src/rustc/middle/borrowck/check_loans.rs index 2d4f988c007..974c9b632ca 100644 --- a/src/rustc/middle/borrowck/check_loans.rs +++ b/src/rustc/middle/borrowck/check_loans.rs @@ -15,7 +15,7 @@ enum check_loan_ctxt = @{ bccx: borrowck_ctxt, req_maps: req_maps, - reported: hashmap<ast::node_id, ()>, + reported: HashMap<ast::node_id, ()>, // Keep track of whether we're inside a ctor, so as to // allow mutating immutable fields in the same class if diff --git a/src/rustc/middle/capture.rs b/src/rustc/middle/capture.rs index 3a0f67c66b8..28b86f66528 100644 --- a/src/rustc/middle/capture.rs +++ b/src/rustc/middle/capture.rs @@ -2,7 +2,7 @@ use syntax::{ast, ast_util}; use driver::session::session; use syntax::codemap::span; use std::map; -use std::map::hashmap; +use std::map::HashMap; export capture_mode; export capture_var; @@ -28,7 +28,7 @@ type capture_var = { mode: capture_mode // How variable is being accessed }; -type capture_map = map::hashmap<ast::def_id, capture_var>; +type capture_map = map::HashMap<ast::def_id, capture_var>; // checks the capture clause for a fn_expr() and issues warnings or // errors for any irregularities which we identify. diff --git a/src/rustc/middle/check_alt.rs b/src/rustc/middle/check_alt.rs index b4a5db2baa4..1033f2c81c5 100644 --- a/src/rustc/middle/check_alt.rs +++ b/src/rustc/middle/check_alt.rs @@ -10,7 +10,7 @@ use syntax::visit; use driver::session::session; use middle::ty; use middle::ty::*; -use std::map::hashmap; +use std::map::HashMap; fn check_crate(tcx: ty::ctxt, crate: @crate) { visit::visit_crate(*crate, (), visit::mk_vt(@{ diff --git a/src/rustc/middle/check_const.rs b/src/rustc/middle/check_const.rs index c01eab9574b..d7cbd2969a3 100644 --- a/src/rustc/middle/check_const.rs +++ b/src/rustc/middle/check_const.rs @@ -1,7 +1,7 @@ use syntax::ast::*; use syntax::{visit, ast_util, ast_map}; use driver::session::session; -use std::map::hashmap; +use std::map::HashMap; use dvec::DVec; fn check_crate(sess: session, crate: @crate, ast_map: ast_map::map, diff --git a/src/rustc/middle/freevars.rs b/src/rustc/middle/freevars.rs index 549a1124264..f59be3e02ec 100644 --- a/src/rustc/middle/freevars.rs +++ b/src/rustc/middle/freevars.rs @@ -23,7 +23,7 @@ type freevar_entry = { span: span //< First span where it is accessed (there can be multiple) }; type freevar_info = @~[@freevar_entry]; -type freevar_map = hashmap<ast::node_id, freevar_info>; +type freevar_map = HashMap<ast::node_id, freevar_info>; // Searches through part of the AST for all references to locals or // upvars in this frame and returns the list of definition IDs thus found. diff --git a/src/rustc/middle/kind.rs b/src/rustc/middle/kind.rs index 6251b321b8e..4c363a5faf8 100644 --- a/src/rustc/middle/kind.rs +++ b/src/rustc/middle/kind.rs @@ -3,7 +3,7 @@ use syntax::ast::*; use syntax::codemap::span; use ty::{kind, kind_copyable, kind_noncopyable, kind_const}; use driver::session::session; -use std::map::hashmap; +use std::map::HashMap; use util::ppaux::{ty_to_str, tys_to_str}; use syntax::print::pprust::expr_to_str; use freevars::freevar_entry; @@ -58,7 +58,7 @@ fn kind_to_str(k: kind) -> ~str { str::connect(kinds, ~" ") } -type rval_map = std::map::hashmap<node_id, ()>; +type rval_map = std::map::HashMap<node_id, ()>; type ctx = {tcx: ty::ctxt, method_map: typeck::method_map, diff --git a/src/rustc/middle/lang_items.rs b/src/rustc/middle/lang_items.rs index fa47f7a2169..b63a29d770e 100644 --- a/src/rustc/middle/lang_items.rs +++ b/src/rustc/middle/lang_items.rs @@ -19,7 +19,7 @@ use syntax::ast_util::{local_def}; use syntax::visit::{default_simple_visitor, mk_simple_visitor}; use syntax::visit::{visit_crate, visit_item}; -use std::map::{hashmap, str_hash}; +use std::map::{HashMap, str_hash}; use str_eq = str::eq; struct LanguageItems { @@ -119,7 +119,7 @@ struct LanguageItemCollector { crate: @crate, session: session, - item_refs: hashmap<~str,&mut Option<def_id>>, + item_refs: HashMap<~str,&mut Option<def_id>>, } impl LanguageItemCollector { diff --git a/src/rustc/middle/lint.rs b/src/rustc/middle/lint.rs index 51210870b41..b41fb004653 100644 --- a/src/rustc/middle/lint.rs +++ b/src/rustc/middle/lint.rs @@ -4,8 +4,8 @@ use middle::ty; use syntax::{ast, ast_util, visit}; use syntax::attr; use syntax::codemap::span; -use std::map::{map,hashmap,int_hash,hash_from_strs}; -use std::smallintmap::{map,SmallIntMap}; +use std::map::{Map,HashMap,int_hash,hash_from_strs}; +use std::smallintmap::{Map,SmallIntMap}; use io::WriterUtil; use util::ppaux::{ty_to_str}; use middle::pat_util::{pat_bindings}; @@ -95,7 +95,7 @@ type lint_spec = @{lint: lint, desc: ~str, default: level}; -type lint_dict = hashmap<~str,lint_spec>; +type lint_dict = HashMap<~str,lint_spec>; /* Pass names should not contain a '-', as the compiler normalizes @@ -196,7 +196,7 @@ fn get_lint_dict() -> lint_dict { // This is a highly not-optimal set of data structure decisions. type lint_modes = SmallIntMap<level>; -type lint_mode_map = hashmap<ast::node_id, lint_modes>; +type lint_mode_map = HashMap<ast::node_id, lint_modes>; // settings_map maps node ids of items with non-default lint settings // to their settings; default_settings contains the settings for everything diff --git a/src/rustc/middle/liveness.rs b/src/rustc/middle/liveness.rs index 9aca98f61e5..0500803b0d5 100644 --- a/src/rustc/middle/liveness.rs +++ b/src/rustc/middle/liveness.rs @@ -101,7 +101,7 @@ */ use dvec::DVec; -use std::map::{hashmap, int_hash, str_hash, uint_hash}; +use std::map::{HashMap, int_hash, str_hash, uint_hash}; use syntax::{visit, ast_util}; use syntax::print::pprust::{expr_to_str}; use visit::vt; @@ -122,7 +122,7 @@ export last_use_map; // // Very subtle (#2633): borrowck will remove entries from this table // if it detects an outstanding loan (that is, the addr is taken). -type last_use_map = hashmap<node_id, @DVec<node_id>>; +type last_use_map = HashMap<node_id, @DVec<node_id>>; enum Variable = uint; enum LiveNode = uint; @@ -274,10 +274,10 @@ struct IrMaps { mut num_live_nodes: uint, mut num_vars: uint, - live_node_map: hashmap<node_id, LiveNode>, - variable_map: hashmap<node_id, Variable>, - field_map: hashmap<ident, Variable>, - capture_map: hashmap<node_id, @~[CaptureInfo]>, + live_node_map: HashMap<node_id, LiveNode>, + variable_map: HashMap<node_id, Variable>, + field_map: HashMap<ident, Variable>, + capture_map: HashMap<node_id, @~[CaptureInfo]>, mut var_kinds: ~[VarKind], mut lnks: ~[LiveNodeKind], } diff --git a/src/rustc/middle/pat_util.rs b/src/rustc/middle/pat_util.rs index 6c52204f12d..179467cd3a1 100644 --- a/src/rustc/middle/pat_util.rs +++ b/src/rustc/middle/pat_util.rs @@ -4,12 +4,12 @@ use syntax::ast_util::{path_to_ident, respan, walk_pat}; use syntax::fold; use syntax::fold::*; use syntax::codemap::span; -use std::map::hashmap; +use std::map::HashMap; export pat_binding_ids, pat_bindings, pat_id_map; export pat_is_variant; -type pat_id_map = std::map::hashmap<ident, node_id>; +type pat_id_map = std::map::HashMap<ident, node_id>; // This is used because same-named variables in alternative patterns need to // use the node_id of their namesake in the first pattern. diff --git a/src/rustc/middle/region.rs b/src/rustc/middle/region.rs index 9b1065cf863..5fb17eb15b9 100644 --- a/src/rustc/middle/region.rs +++ b/src/rustc/middle/region.rs @@ -20,7 +20,7 @@ use ty::{region_variance, rv_covariant, rv_invariant, rv_contravariant}; use std::list; use std::list::list; -use std::map::{hashmap, int_hash}; +use std::map::{HashMap, int_hash}; type parent = Option<ast::node_id>; @@ -39,7 +39,7 @@ Encodes the bounding lifetime for a given AST node: - Variables and bindings are mapped to the block in which they are declared. */ -type region_map = hashmap<ast::node_id, ast::node_id>; +type region_map = HashMap<ast::node_id, ast::node_id>; struct ctxt { sess: session, @@ -55,7 +55,7 @@ struct ctxt { // the condition in a while loop is always a parent. In those // cases, we add the node id of such an expression to this set so // that when we visit it we can view it as a parent. - root_exprs: hashmap<ast::node_id, ()>, + root_exprs: HashMap<ast::node_id, ()>, // The parent scope is the innermost block, statement, call, or alt // expression during the execution of which the current expression @@ -370,9 +370,9 @@ fn resolve_crate(sess: session, def_map: resolve::DefMap, // a worklist. We can then process the worklist, propagating indirect // dependencies until a fixed point is reached. -type region_paramd_items = hashmap<ast::node_id, region_variance>; +type region_paramd_items = HashMap<ast::node_id, region_variance>; type region_dep = {ambient_variance: region_variance, id: ast::node_id}; -type dep_map = hashmap<ast::node_id, @DVec<region_dep>>; +type dep_map = HashMap<ast::node_id, @DVec<region_dep>>; impl region_dep: cmp::Eq { pure fn eq(&&other: region_dep) -> bool { diff --git a/src/rustc/middle/resolve.rs b/src/rustc/middle/resolve.rs index c99afbd6992..02788d53ba7 100644 --- a/src/rustc/middle/resolve.rs +++ b/src/rustc/middle/resolve.rs @@ -60,11 +60,11 @@ use vec::pop; use syntax::parse::token::ident_interner; use std::list::{Cons, List, Nil}; -use std::map::{hashmap, int_hash, uint_hash}; +use std::map::{HashMap, int_hash, uint_hash}; use str_eq = str::eq; // Definition mapping -type DefMap = hashmap<node_id,def>; +type DefMap = HashMap<node_id,def>; struct binding_info { span: span, @@ -72,7 +72,7 @@ struct binding_info { } // Map from the name in a pattern to its binding mode. -type BindingMap = hashmap<ident,binding_info>; +type BindingMap = HashMap<ident,binding_info>; // Implementation resolution // @@ -89,15 +89,15 @@ type MethodInfo = { type Impl = { did: def_id, ident: ident, methods: ~[@MethodInfo] }; // Trait method resolution -type TraitMap = @hashmap<node_id,@DVec<def_id>>; +type TraitMap = @HashMap<node_id,@DVec<def_id>>; // Export mapping type Export = { reexp: bool, id: def_id }; -type ExportMap = hashmap<node_id, ~[Export]>; +type ExportMap = HashMap<node_id, ~[Export]>; // This is the replacement export map. It maps a module to all of the exports // within. -type ExportMap2 = hashmap<node_id, ~[Export2]>; +type ExportMap2 = HashMap<node_id, ~[Export2]>; struct Export2 { name: ~str, // The name of the target. @@ -317,13 +317,13 @@ fn Atom(n: uint) -> Atom { } /// Creates a hash table of atoms. -fn atom_hashmap<V:Copy>() -> hashmap<Atom,V> { - hashmap::<Atom,V>() +fn atom_hashmap<V:Copy>() -> HashMap<Atom,V> { + HashMap::<Atom,V>() } /// One local scope. struct Rib { - bindings: hashmap<Atom,def_like>, + bindings: HashMap<Atom,def_like>, kind: RibKind, } @@ -414,7 +414,7 @@ struct Module { parent_link: ParentLink, mut def_id: Option<def_id>, - children: hashmap<Atom,@NameBindings>, + children: HashMap<Atom,@NameBindings>, imports: DVec<@ImportDirective>, // The anonymous children of this node. Anonymous children are pseudo- @@ -432,7 +432,7 @@ struct Module { // There will be an anonymous module created around `g` with the ID of the // entry block for `f`. - anonymous_children: hashmap<node_id,@Module>, + anonymous_children: HashMap<node_id,@Module>, // XXX: This is about to be reworked so that exports are on individual // items, not names. @@ -440,10 +440,10 @@ struct Module { // The atom is the name of the exported item, while the node ID is the // ID of the export path. - exported_names: hashmap<Atom,node_id>, + exported_names: HashMap<Atom,node_id>, // The status of resolving each import in this module. - import_resolutions: hashmap<Atom,@ImportResolution>, + import_resolutions: HashMap<Atom,@ImportResolution>, // The number of unresolved globs that this module exports. mut glob_count: uint, @@ -633,7 +633,7 @@ fn NameBindings() -> NameBindings { /// Interns the names of the primitive types. struct PrimitiveTypeTable { - primitive_types: hashmap<Atom,prim_ty>, + primitive_types: HashMap<Atom,prim_ty>, } impl PrimitiveTypeTable { @@ -743,8 +743,8 @@ struct Resolver { unused_import_lint_level: level, - trait_info: hashmap<def_id,@hashmap<Atom,()>>, - structs: hashmap<def_id,bool>, + trait_info: HashMap<def_id,@HashMap<Atom,()>>, + structs: HashMap<def_id,bool>, // The number of imports that are currently unresolved. mut unresolved_imports: uint, @@ -1386,7 +1386,7 @@ impl Resolver { visit_block(block, new_parent, visitor); } - fn handle_external_def(def: def, modules: hashmap<def_id, @Module>, + fn handle_external_def(def: def, modules: HashMap<def_id, @Module>, child_name_bindings: @NameBindings, final_ident: ~str, atom: Atom, new_parent: ReducedGraphParent) { @@ -3835,7 +3835,7 @@ impl Resolver { mutability: Mutability, // Maps idents to the node ID for the (outermost) // pattern that binds them - bindings_list: Option<hashmap<Atom,node_id>>, + bindings_list: Option<HashMap<Atom,node_id>>, visitor: ResolveVisitor) { let pat_id = pattern.id; diff --git a/src/rustc/middle/trans/alt.rs b/src/rustc/middle/trans/alt.rs index 1a663ec260a..a11dcdd7d75 100644 --- a/src/rustc/middle/trans/alt.rs +++ b/src/rustc/middle/trans/alt.rs @@ -12,7 +12,7 @@ use syntax::codemap::span; use syntax::print::pprust::pat_to_str; use middle::resolve::DefMap; use back::abi; -use std::map::hashmap; +use std::map::HashMap; use dvec::DVec; use datum::*; use common::*; diff --git a/src/rustc/middle/trans/base.rs b/src/rustc/middle/trans/base.rs index ab91fc8278d..3b07f375051 100644 --- a/src/rustc/middle/trans/base.rs +++ b/src/rustc/middle/trans/base.rs @@ -15,7 +15,7 @@ use libc::{c_uint, c_ulonglong}; use std::{map, time, list}; -use std::map::hashmap; +use std::map::HashMap; use std::map::{int_hash, str_hash}; use driver::session; use session::session; @@ -124,7 +124,7 @@ fn decl_internal_cdecl_fn(llmod: ModuleRef, name: ~str, llty: TypeRef) -> return llfn; } -fn get_extern_fn(externs: hashmap<~str, ValueRef>, +fn get_extern_fn(externs: HashMap<~str, ValueRef>, llmod: ModuleRef, name: ~str, cc: lib::llvm::CallConv, ty: TypeRef) -> ValueRef { if externs.contains_key(name) { return externs.get(name); } @@ -133,7 +133,7 @@ fn get_extern_fn(externs: hashmap<~str, ValueRef>, return f; } -fn get_extern_const(externs: hashmap<~str, ValueRef>, llmod: ModuleRef, +fn get_extern_const(externs: HashMap<~str, ValueRef>, llmod: ModuleRef, name: ~str, ty: TypeRef) -> ValueRef { if externs.contains_key(name) { return externs.get(name); } let c = str::as_c_str(name, |buf| llvm::LLVMAddGlobal(llmod, ty, buf)); @@ -142,7 +142,7 @@ fn get_extern_const(externs: hashmap<~str, ValueRef>, llmod: ModuleRef, } fn get_simple_extern_fn(cx: block, - externs: hashmap<~str, ValueRef>, + externs: HashMap<~str, ValueRef>, llmod: ModuleRef, name: ~str, n_args: int) -> ValueRef { let _icx = cx.insn_ctxt("get_simple_extern_fn"); @@ -153,7 +153,7 @@ fn get_simple_extern_fn(cx: block, return get_extern_fn(externs, llmod, name, lib::llvm::CCallConv, t); } -fn trans_foreign_call(cx: block, externs: hashmap<~str, ValueRef>, +fn trans_foreign_call(cx: block, externs: HashMap<~str, ValueRef>, llmod: ModuleRef, name: ~str, args: ~[ValueRef]) -> ValueRef { let _icx = cx.insn_ctxt("trans_foreign_call"); @@ -2265,7 +2265,7 @@ fn p2i(ccx: @crate_ctxt, v: ValueRef) -> ValueRef { return llvm::LLVMConstPtrToInt(v, ccx.int_type); } -fn declare_intrinsics(llmod: ModuleRef) -> hashmap<~str, ValueRef> { +fn declare_intrinsics(llmod: ModuleRef) -> HashMap<~str, ValueRef> { let T_memmove32_args: ~[TypeRef] = ~[T_ptr(T_i8()), T_ptr(T_i8()), T_i32(), T_i32(), T_i1()]; let T_memmove64_args: ~[TypeRef] = @@ -2314,7 +2314,7 @@ fn declare_intrinsics(llmod: ModuleRef) -> hashmap<~str, ValueRef> { } fn declare_dbg_intrinsics(llmod: ModuleRef, - intrinsics: hashmap<~str, ValueRef>) { + intrinsics: HashMap<~str, ValueRef>) { let declare = decl_cdecl_fn(llmod, ~"llvm.dbg.declare", T_fn(~[T_metadata(), T_metadata()], T_void())); @@ -2630,10 +2630,10 @@ fn trans_crate(sess: session::session, tydescs: ty::new_ty_hash(), mut finished_tydescs: false, external: ast_util::new_def_hash(), - monomorphized: map::hashmap(), + monomorphized: map::HashMap(), monomorphizing: ast_util::new_def_hash(), type_use_cache: ast_util::new_def_hash(), - vtables: map::hashmap(), + vtables: map::HashMap(), const_cstr_cache: map::str_hash(), const_globals: int_hash::<ValueRef>(), module_data: str_hash::<ValueRef>(), diff --git a/src/rustc/middle/trans/build.rs b/src/rustc/middle/trans/build.rs index 21ced9f5813..23b1d964ba3 100644 --- a/src/rustc/middle/trans/build.rs +++ b/src/rustc/middle/trans/build.rs @@ -1,4 +1,4 @@ -use std::map::{hashmap, str_hash}; +use std::map::{HashMap, str_hash}; use libc::{c_uint, c_int}; use lib::llvm::llvm; use syntax::codemap; diff --git a/src/rustc/middle/trans/closure.rs b/src/rustc/middle/trans/closure.rs index 056f432fcd5..1ba8e22607a 100644 --- a/src/rustc/middle/trans/closure.rs +++ b/src/rustc/middle/trans/closure.rs @@ -16,7 +16,7 @@ use back::link::{ use util::ppaux::ty_to_str; use syntax::ast_map::{path, path_mod, path_name}; use driver::session::session; -use std::map::hashmap; +use std::map::HashMap; use datum::{Datum, INIT, ByRef, ByValue, FromLvalue}; // ___Good to know (tm)__________________________________________________ diff --git a/src/rustc/middle/trans/common.rs b/src/rustc/middle/trans/common.rs index 064b3006431..13c1b139f0a 100644 --- a/src/rustc/middle/trans/common.rs +++ b/src/rustc/middle/trans/common.rs @@ -5,7 +5,7 @@ use libc::c_uint; use vec::unsafe::to_ptr; -use std::map::{hashmap,set}; +use std::map::{HashMap,Set}; use syntax::{ast, ast_map}; use driver::session; use session::session; @@ -90,7 +90,7 @@ type stats = mut n_null_glues: uint, mut n_real_glues: uint, llvm_insn_ctxt: @mut ~[~str], - llvm_insns: hashmap<~str, uint>, + llvm_insns: HashMap<~str, uint>, fn_times: @mut ~[{ident: ~str, time: int}]}; struct BuilderRef_res { @@ -110,50 +110,50 @@ type crate_ctxt = { llmod: ModuleRef, td: target_data, tn: type_names, - externs: hashmap<~str, ValueRef>, - intrinsics: hashmap<~str, ValueRef>, - item_vals: hashmap<ast::node_id, ValueRef>, + externs: HashMap<~str, ValueRef>, + intrinsics: HashMap<~str, ValueRef>, + item_vals: HashMap<ast::node_id, ValueRef>, exp_map: resolve::ExportMap, exp_map2: resolve::ExportMap2, reachable: reachable::map, - item_symbols: hashmap<ast::node_id, ~str>, + item_symbols: HashMap<ast::node_id, ~str>, mut main_fn: Option<ValueRef>, link_meta: link_meta, - enum_sizes: hashmap<ty::t, uint>, - discrims: hashmap<ast::def_id, ValueRef>, - discrim_symbols: hashmap<ast::node_id, ~str>, - tydescs: hashmap<ty::t, @tydesc_info>, + enum_sizes: HashMap<ty::t, uint>, + discrims: HashMap<ast::def_id, ValueRef>, + discrim_symbols: HashMap<ast::node_id, ~str>, + tydescs: HashMap<ty::t, @tydesc_info>, // Set when running emit_tydescs to enforce that no more tydescs are // created. mut finished_tydescs: bool, // Track mapping of external ids to local items imported for inlining - external: hashmap<ast::def_id, Option<ast::node_id>>, + external: HashMap<ast::def_id, Option<ast::node_id>>, // Cache instances of monomorphized functions - monomorphized: hashmap<mono_id, ValueRef>, - monomorphizing: hashmap<ast::def_id, uint>, + monomorphized: HashMap<mono_id, ValueRef>, + monomorphizing: HashMap<ast::def_id, uint>, // Cache computed type parameter uses (see type_use.rs) - type_use_cache: hashmap<ast::def_id, ~[type_use::type_uses]>, + type_use_cache: HashMap<ast::def_id, ~[type_use::type_uses]>, // Cache generated vtables - vtables: hashmap<mono_id, ValueRef>, + vtables: HashMap<mono_id, ValueRef>, // Cache of constant strings, - const_cstr_cache: hashmap<~str, ValueRef>, + const_cstr_cache: HashMap<~str, ValueRef>, // Reverse-direction for const ptrs cast from globals, // since the ptr -> init association is lost any // time a GlobalValue is cast. - const_globals: hashmap<int, ValueRef>, - module_data: hashmap<~str, ValueRef>, - lltypes: hashmap<ty::t, TypeRef>, + const_globals: HashMap<int, ValueRef>, + module_data: HashMap<~str, ValueRef>, + lltypes: HashMap<ty::t, TypeRef>, names: namegen, next_addrspace: addrspace_gen, symbol_hasher: @hash::State, - type_hashcodes: hashmap<ty::t, ~str>, - type_short_names: hashmap<ty::t, ~str>, - all_llvm_symbols: set<~str>, + type_hashcodes: HashMap<ty::t, ~str>, + type_short_names: HashMap<ty::t, ~str>, + all_llvm_symbols: Set<~str>, tcx: ty::ctxt, maps: astencode::maps, stats: stats, upcalls: @upcall::upcalls, - rtcalls: hashmap<~str, ast::def_id>, + rtcalls: HashMap<~str, ast::def_id>, tydesc_type: TypeRef, int_type: TypeRef, float_type: TypeRef, @@ -171,7 +171,7 @@ type crate_ctxt = { // used in base::trans_closure // parent_class must be a def_id because ctors can be // inlined, so the parent may be in a different crate - class_ctors: hashmap<ast::node_id, ast::def_id>, + class_ctors: HashMap<ast::node_id, ast::def_id>, mut do_not_commit_warning_issued: bool}; // Types used for llself. @@ -231,12 +231,12 @@ type fn_ctxt = @{ mut loop_ret: Option<{flagptr: ValueRef, retptr: ValueRef}>, // Maps arguments to allocas created for them in llallocas. - llargs: hashmap<ast::node_id, local_val>, + llargs: HashMap<ast::node_id, local_val>, // Maps the def_ids for local variables to the allocas created for // them in llallocas. - lllocals: hashmap<ast::node_id, local_val>, + lllocals: HashMap<ast::node_id, local_val>, // Same as above, but for closure upvars - llupvars: hashmap<ast::node_id, ValueRef>, + llupvars: HashMap<ast::node_id, ValueRef>, // The node_id of the function, or -1 if it doesn't correspond to // a user-defined function. diff --git a/src/rustc/middle/trans/debuginfo.rs b/src/rustc/middle/trans/debuginfo.rs index 056d3598a32..fe01a202e60 100644 --- a/src/rustc/middle/trans/debuginfo.rs +++ b/src/rustc/middle/trans/debuginfo.rs @@ -1,5 +1,5 @@ use std::map; -use std::map::hashmap; +use std::map::HashMap; use lib::llvm::llvm; use lib::llvm::ValueRef; use trans::common::*; @@ -116,7 +116,7 @@ type block_md = {start: codemap::loc, end: codemap::loc}; type argument_md = {id: ast::node_id}; type retval_md = {id: ast::node_id}; -type metadata_cache = hashmap<int, ~[debug_metadata]>; +type metadata_cache = HashMap<int, ~[debug_metadata]>; enum debug_metadata { file_metadata(@metadata<file_md>), diff --git a/src/rustc/middle/trans/expr.rs b/src/rustc/middle/trans/expr.rs index 0fe4f3cd917..ddc2017e16a 100644 --- a/src/rustc/middle/trans/expr.rs +++ b/src/rustc/middle/trans/expr.rs @@ -716,7 +716,7 @@ fn trans_local_var(bcx: block, ref_id: ast::node_id, def: ast::def) -> Datum { fn take_local(bcx: block, ref_id: ast::node_id, - table: hashmap<ast::node_id, local_val>, + table: HashMap<ast::node_id, local_val>, nid: ast::node_id) -> Datum { let is_last_use = match bcx.ccx().maps.last_use_map.find(ref_id) { None => false, diff --git a/src/rustc/middle/trans/foreign.rs b/src/rustc/middle/trans/foreign.rs index 24207d66245..cb00cff9db5 100644 --- a/src/rustc/middle/trans/foreign.rs +++ b/src/rustc/middle/trans/foreign.rs @@ -15,7 +15,7 @@ use common::*; use build::*; use base::*; use type_of::*; -use std::map::hashmap; +use std::map::HashMap; use util::ppaux::ty_to_str; use datum::*; use callee::*; diff --git a/src/rustc/middle/trans/impl.rs b/src/rustc/middle/trans/impl.rs index 1e77fc43d09..b923e35765a 100644 --- a/src/rustc/middle/trans/impl.rs +++ b/src/rustc/middle/trans/impl.rs @@ -12,7 +12,7 @@ use back::{link, abi}; use lib::llvm::llvm; use lib::llvm::{ValueRef, TypeRef}; use lib::llvm::llvm::LLVMGetParam; -use std::map::hashmap; +use std::map::HashMap; use util::ppaux::{ty_to_str, tys_to_str}; use callee::*; use syntax::print::pprust::expr_to_str; diff --git a/src/rustc/middle/trans/reachable.rs b/src/rustc/middle/trans/reachable.rs index a9a7f4e4e9f..061b260bfbb 100644 --- a/src/rustc/middle/trans/reachable.rs +++ b/src/rustc/middle/trans/reachable.rs @@ -10,12 +10,12 @@ use syntax::{visit, ast_util, ast_map}; use syntax::ast_util::def_id_of_def; use syntax::attr; use syntax::print::pprust::expr_to_str; -use std::map::hashmap; +use std::map::HashMap; use driver::session::*; export map, find_reachable; -type map = std::map::hashmap<node_id, ()>; +type map = std::map::HashMap<node_id, ()>; type ctx = {exp_map: resolve::ExportMap, tcx: ty::ctxt, diff --git a/src/rustc/middle/trans/reflect.rs b/src/rustc/middle/trans/reflect.rs index c78e264a86f..680d2be7a50 100644 --- a/src/rustc/middle/trans/reflect.rs +++ b/src/rustc/middle/trans/reflect.rs @@ -1,4 +1,4 @@ -use std::map::{hashmap,str_hash}; +use std::map::{HashMap,str_hash}; use driver::session::session; use lib::llvm::{TypeRef, ValueRef}; use syntax::ast; diff --git a/src/rustc/middle/trans/shape.rs b/src/rustc/middle/trans/shape.rs index cdbaf6e5ee2..f60005f072e 100644 --- a/src/rustc/middle/trans/shape.rs +++ b/src/rustc/middle/trans/shape.rs @@ -17,7 +17,7 @@ use util::ppaux::ty_to_str; use syntax::codemap::span; use dvec::DVec; -use std::map::hashmap; +use std::map::HashMap; use option::is_some; use ty_ctxt = middle::ty::ctxt; @@ -58,8 +58,8 @@ fn mk_nominal_id(tcx: ty::ctxt, did: ast::def_id, @{did: did, parent_id: parent_id, tps: tps_norm} } -fn new_nominal_id_hash<T: Copy>() -> hashmap<nominal_id, T> { - return hashmap(); +fn new_nominal_id_hash<T: Copy>() -> HashMap<nominal_id, T> { + return HashMap(); } type enum_data = {did: ast::def_id, substs: ty::substs}; @@ -67,7 +67,7 @@ type enum_data = {did: ast::def_id, substs: ty::substs}; type ctxt = {mut next_tag_id: u16, pad: u16, - tag_id_to_index: hashmap<nominal_id, u16>, + tag_id_to_index: HashMap<nominal_id, u16>, tag_order: DVec<enum_data>, resources: interner::interner<nominal_id>, llshapetablesty: TypeRef, diff --git a/src/rustc/middle/trans/type_of.rs b/src/rustc/middle/trans/type_of.rs index 3cdb132f26c..1a743ce31d5 100644 --- a/src/rustc/middle/trans/type_of.rs +++ b/src/rustc/middle/trans/type_of.rs @@ -3,7 +3,7 @@ use lib::llvm::{TypeRef}; use syntax::ast; use lib::llvm::llvm; use driver::session::session; -use std::map::hashmap; +use std::map::HashMap; export type_of; export type_of_dtor; diff --git a/src/rustc/middle/trans/type_use.rs b/src/rustc/middle/trans/type_use.rs index 09b53d2fccf..853bb71e84c 100644 --- a/src/rustc/middle/trans/type_use.rs +++ b/src/rustc/middle/trans/type_use.rs @@ -17,7 +17,7 @@ // much information, but have the disadvantage of being very // invasive.) -use std::map::hashmap; +use std::map::HashMap; use std::list; use std::list::{List, Cons, Nil}; use driver::session::session; diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs index 4a322a74cec..f5d25feccb2 100644 --- a/src/rustc/middle/ty.rs +++ b/src/rustc/middle/ty.rs @@ -3,7 +3,7 @@ use std::{map, smallintmap}; use result::Result; -use std::map::hashmap; +use std::map::HashMap; use driver::session; use session::session; use syntax::{ast, ast_map}; @@ -228,7 +228,7 @@ type field_ty = { // Contains information needed to resolve types and (in the future) look up // the types of AST nodes. type creader_cache_key = {cnum: int, pos: uint, len: uint}; -type creader_cache = hashmap<creader_cache_key, t>; +type creader_cache = HashMap<creader_cache_key, t>; impl creader_cache_key : cmp::Eq { pure fn eq(&&other: creader_cache_key) -> bool { @@ -304,7 +304,7 @@ impl borrow : cmp::Eq { type ctxt = @{diag: syntax::diagnostic::span_handler, - interner: hashmap<intern_key, t_box>, + interner: HashMap<intern_key, t_box>, mut next_id: uint, vecs_implicitly_copyable: bool, cstore: metadata::cstore::cstore, @@ -323,26 +323,26 @@ type ctxt = // of this node. This only applies to nodes that refer to entities // parameterized by type parameters, such as generic fns, types, or // other items. - node_type_substs: hashmap<node_id, ~[t]>, + node_type_substs: HashMap<node_id, ~[t]>, items: ast_map::map, - intrinsic_defs: hashmap<ast::ident, (ast::def_id, t)>, + intrinsic_defs: HashMap<ast::ident, (ast::def_id, t)>, freevars: freevars::freevar_map, tcache: type_cache, rcache: creader_cache, ccache: constness_cache, - short_names_cache: hashmap<t, @~str>, - needs_drop_cache: hashmap<t, bool>, - needs_unwind_cleanup_cache: hashmap<t, bool>, - kind_cache: hashmap<t, kind>, - ast_ty_to_ty_cache: hashmap<@ast::ty, ast_ty_to_ty_cache_entry>, - enum_var_cache: hashmap<def_id, @~[variant_info]>, - trait_method_cache: hashmap<def_id, @~[method]>, - ty_param_bounds: hashmap<ast::node_id, param_bounds>, - inferred_modes: hashmap<ast::node_id, ast::mode>, + short_names_cache: HashMap<t, @~str>, + needs_drop_cache: HashMap<t, bool>, + needs_unwind_cleanup_cache: HashMap<t, bool>, + kind_cache: HashMap<t, kind>, + ast_ty_to_ty_cache: HashMap<@ast::ty, ast_ty_to_ty_cache_entry>, + enum_var_cache: HashMap<def_id, @~[variant_info]>, + trait_method_cache: HashMap<def_id, @~[method]>, + ty_param_bounds: HashMap<ast::node_id, param_bounds>, + inferred_modes: HashMap<ast::node_id, ast::mode>, // maps the id of borrowed expr to scope of borrowed ptr - borrowings: hashmap<ast::node_id, borrow>, - normalized_cache: hashmap<t, t>}; + borrowings: HashMap<ast::node_id, borrow>, + normalized_cache: HashMap<t, t>}; enum tbox_flag { has_params = 1, @@ -789,19 +789,19 @@ type ty_param_bounds_and_ty = {bounds: @~[param_bounds], region_param: Option<region_variance>, ty: t}; -type type_cache = hashmap<ast::def_id, ty_param_bounds_and_ty>; +type type_cache = HashMap<ast::def_id, ty_param_bounds_and_ty>; -type constness_cache = hashmap<ast::def_id, const_eval::constness>; +type constness_cache = HashMap<ast::def_id, const_eval::constness>; type node_type_table = @smallintmap::SmallIntMap<t>; fn mk_rcache() -> creader_cache { type val = {cnum: int, pos: uint, len: uint}; - return map::hashmap(); + return map::HashMap(); } -fn new_ty_hash<V: Copy>() -> map::hashmap<t, V> { - map::hashmap() +fn new_ty_hash<V: Copy>() -> map::HashMap<t, V> { + map::HashMap() } fn mk_ctxt(s: session::session, @@ -810,7 +810,7 @@ fn mk_ctxt(s: session::session, freevars: freevars::freevar_map, region_map: middle::region::region_map, region_paramd_items: middle::region::region_paramd_items) -> ctxt { - let interner = map::hashmap(); + let interner = map::HashMap(); let vecs_implicitly_copyable = get_lint_level(s.lint_settings.default_settings, lint::vecs_implicitly_copyable) == allow; @@ -835,7 +835,7 @@ fn mk_ctxt(s: session::session, needs_drop_cache: new_ty_hash(), needs_unwind_cleanup_cache: new_ty_hash(), kind_cache: new_ty_hash(), - ast_ty_to_ty_cache: map::hashmap(), + ast_ty_to_ty_cache: map::HashMap(), enum_var_cache: new_def_hash(), trait_method_cache: new_def_hash(), ty_param_bounds: map::int_hash(), @@ -1604,7 +1604,7 @@ fn type_needs_unwind_cleanup(cx: ctxt, ty: t) -> bool { } fn type_needs_unwind_cleanup_(cx: ctxt, ty: t, - tycache: map::hashmap<t, ()>, + tycache: map::HashMap<t, ()>, encountered_box: bool) -> bool { // Prevent infinite recursion @@ -2583,8 +2583,8 @@ pure fn hash_bound_region(br: &bound_region) -> uint { } } -fn br_hashmap<V:Copy>() -> hashmap<bound_region, V> { - map::hashmap() +fn br_hashmap<V:Copy>() -> HashMap<bound_region, V> { + map::HashMap() } pure fn hash_region(r: ®ion) -> uint { @@ -3096,7 +3096,7 @@ fn occurs_check(tcx: ctxt, sp: span, vid: TyVid, rt: t) { // Maintains a little union-set tree for inferred modes. `canon()` returns // the current head value for `m0`. -fn canon<T:Copy cmp::Eq>(tbl: hashmap<ast::node_id, ast::inferable<T>>, +fn canon<T:Copy cmp::Eq>(tbl: HashMap<ast::node_id, ast::inferable<T>>, +m0: ast::inferable<T>) -> ast::inferable<T> { match m0 { ast::infer(id) => match tbl.find(id) { diff --git a/src/rustc/middle/typeck.rs b/src/rustc/middle/typeck.rs index 4dfa17a9034..fe479bdb2a6 100644 --- a/src/rustc/middle/typeck.rs +++ b/src/rustc/middle/typeck.rs @@ -55,7 +55,7 @@ use middle::ty::{arg, field, node_type_table, mk_nil, ty_param_bounds_and_ty}; use middle::ty::{vstore_uniq}; use std::smallintmap; use std::map; -use std::map::{hashmap, int_hash}; +use std::map::{HashMap, int_hash}; use std::serialization::{serialize_uint, deserialize_uint}; use vec::each; use syntax::print::pprust::*; @@ -122,7 +122,7 @@ type method_map_entry = { // maps from an expression id that corresponds to a method call to the details // of the method to be invoked -type method_map = hashmap<ast::node_id, method_map_entry>; +type method_map = HashMap<ast::node_id, method_map_entry>; // Resolutions for bounds of all parameters, left to right, for a given path. type vtable_res = @~[vtable_origin]; @@ -173,12 +173,12 @@ impl vtable_origin { } } -type vtable_map = hashmap<ast::node_id, vtable_res>; +type vtable_map = HashMap<ast::node_id, vtable_res>; // Stores information about provided methods, aka "default methods" in traits. // Maps from a trait's def_id to a MethodInfo about // that method in that trait. -type provided_methods_map = hashmap<ast::node_id, +type provided_methods_map = HashMap<ast::node_id, ~[@resolve::MethodInfo]>; type ty_param_substs_and_ty = {substs: ty::substs, ty: ty::t}; diff --git a/src/rustc/middle/typeck/check.rs b/src/rustc/middle/typeck/check.rs index 4d4409e499c..49ed4b81d13 100644 --- a/src/rustc/middle/typeck/check.rs +++ b/src/rustc/middle/typeck/check.rs @@ -99,10 +99,10 @@ type self_info = { /// share the inherited fields. struct inherited { infcx: infer::infer_ctxt, - locals: hashmap<ast::node_id, TyVid>, - node_types: hashmap<ast::node_id, ty::t>, - node_type_substs: hashmap<ast::node_id, ty::substs>, - borrowings: hashmap<ast::node_id, ty::borrow>, + locals: HashMap<ast::node_id, TyVid>, + node_types: HashMap<ast::node_id, ty::t>, + node_type_substs: HashMap<ast::node_id, ty::substs>, + borrowings: HashMap<ast::node_id, ty::borrow>, } struct fn_ctxt { diff --git a/src/rustc/middle/typeck/check/method.rs b/src/rustc/middle/typeck/check/method.rs index 6694160e98e..6a61f7ae15e 100644 --- a/src/rustc/middle/typeck/check/method.rs +++ b/src/rustc/middle/typeck/check/method.rs @@ -102,7 +102,7 @@ struct lookup { mut self_ty: ty::t, mut derefs: uint, candidates: DVec<candidate>, - candidate_impls: hashmap<def_id, ()>, + candidate_impls: HashMap<def_id, ()>, supplied_tps: ~[ty::t], include_private: bool, } diff --git a/src/rustc/middle/typeck/coherence.rs b/src/rustc/middle/typeck/coherence.rs index a75ec2c83dc..79ca4572e50 100644 --- a/src/rustc/middle/typeck/coherence.rs +++ b/src/rustc/middle/typeck/coherence.rs @@ -32,7 +32,7 @@ use util::ppaux::ty_to_str; use dvec::DVec; use result::Ok; -use std::map::{hashmap, int_hash}; +use std::map::{HashMap, int_hash}; use uint::range; use vec::{len, push}; @@ -121,11 +121,11 @@ fn method_to_MethodInfo(ast_method: @method) -> @MethodInfo { struct CoherenceInfo { // Contains implementations of methods that are inherent to a type. // Methods in these implementations don't need to be exported. - inherent_methods: hashmap<def_id,@DVec<@Impl>>, + inherent_methods: HashMap<def_id,@DVec<@Impl>>, // Contains implementations of methods associated with a trait. For these, // the associated trait must be imported at the call site. - extension_methods: hashmap<def_id,@DVec<@Impl>>, + extension_methods: HashMap<def_id,@DVec<@Impl>>, } fn CoherenceInfo() -> CoherenceInfo { @@ -152,12 +152,12 @@ struct CoherenceChecker { // A mapping from implementations to the corresponding base type // definition ID. - base_type_def_ids: hashmap<def_id,def_id>, + base_type_def_ids: HashMap<def_id,def_id>, // A set of implementations in privileged scopes; i.e. those // implementations that are defined in the same scope as their base types. - privileged_implementations: hashmap<node_id,()>, + privileged_implementations: HashMap<node_id,()>, } impl CoherenceChecker { @@ -645,7 +645,7 @@ impl CoherenceChecker { // External crate handling - fn add_impls_for_module(impls_seen: hashmap<def_id,()>, + fn add_impls_for_module(impls_seen: HashMap<def_id,()>, crate_store: cstore, module_def_id: def_id) { diff --git a/src/rustc/middle/typeck/infer.rs b/src/rustc/middle/typeck/infer.rs index 2aef5ff6b5b..af1df5d74ff 100644 --- a/src/rustc/middle/typeck/infer.rs +++ b/src/rustc/middle/typeck/infer.rs @@ -248,7 +248,7 @@ section on "Type Combining" below for details. use std::smallintmap; use std::smallintmap::smallintmap; -use std::map::hashmap; +use std::map::HashMap; use middle::ty; use middle::ty::{TyVid, IntVid, RegionVid, vid, ty_int, ty_uint, get, terr_fn, TyVar, IntVar}; diff --git a/src/rustc/middle/typeck/infer/region_var_bindings.rs b/src/rustc/middle/typeck/infer/region_var_bindings.rs index 3c51c22bf05..34291e82d64 100644 --- a/src/rustc/middle/typeck/infer/region_var_bindings.rs +++ b/src/rustc/middle/typeck/infer/region_var_bindings.rs @@ -308,7 +308,7 @@ because `&x` was created alone, but is relatable to `&A`. use dvec::DVec; use result::Result; use result::{Ok, Err}; -use std::map::{hashmap, uint_hash}; +use std::map::{HashMap, uint_hash}; use std::cell::{Cell, empty_cell}; use std::list::{List, Nil, Cons}; @@ -389,13 +389,13 @@ enum UndoLogEntry { AddCombination(CombineMap, TwoRegions) } -type CombineMap = hashmap<TwoRegions, RegionVid>; +type CombineMap = HashMap<TwoRegions, RegionVid>; struct RegionVarBindings { tcx: ty::ctxt, var_spans: DVec<span>, values: Cell<~[ty::region]>, - constraints: hashmap<Constraint, span>, + constraints: HashMap<Constraint, span>, lubs: CombineMap, glbs: CombineMap, @@ -415,7 +415,7 @@ fn RegionVarBindings(tcx: ty::ctxt) -> RegionVarBindings { tcx: tcx, var_spans: DVec(), values: empty_cell(), - constraints: hashmap(), + constraints: HashMap(), lubs: CombineMap(), glbs: CombineMap(), undo_log: DVec() @@ -426,7 +426,7 @@ fn RegionVarBindings(tcx: ty::ctxt) -> RegionVarBindings { // `b`! Not obvious that this is the most efficient way to go about // it. fn CombineMap() -> CombineMap { - return hashmap(); + return HashMap(); } pure fn hash_constraint(rc: &Constraint) -> uint { @@ -804,10 +804,10 @@ struct SpannedRegion { span: span, } -type TwoRegionsMap = hashmap<TwoRegions, ()>; +type TwoRegionsMap = HashMap<TwoRegions, ()>; fn TwoRegionsMap() -> TwoRegionsMap { - return hashmap(); + return HashMap(); } impl RegionVarBindings { diff --git a/src/rustc/util/common.rs b/src/rustc/util/common.rs index 9c157610777..fc19ce2a215 100644 --- a/src/rustc/util/common.rs +++ b/src/rustc/util/common.rs @@ -1,4 +1,4 @@ -use std::map::hashmap; +use std::map::HashMap; use syntax::ast; use ast::{ty, pat}; use syntax::codemap::{span}; @@ -30,7 +30,7 @@ fn indenter() -> _indenter { _indenter(()) } -type flag = hashmap<~str, ()>; +type flag = HashMap<~str, ()>; fn field_expr(f: ast::field) -> @ast::expr { return f.node.expr; } diff --git a/src/rustc/util/ppaux.rs b/src/rustc/util/ppaux.rs index 3a27a521985..f58ed10a408 100644 --- a/src/rustc/util/ppaux.rs +++ b/src/rustc/util/ppaux.rs @@ -1,4 +1,4 @@ -use std::map::hashmap; +use std::map::HashMap; use middle::ty; use middle::ty::{arg, canon_mode}; use middle::ty::{bound_copy, bound_const, bound_owned, bound_send, | 
