Remove ast::identistr. Issue #855

This commit is contained in:
Brian Anderson 2011-08-25 18:26:29 -07:00
parent 03119fe269
commit 9c9c5c9054
4 changed files with 10 additions and 12 deletions

View File

@ -102,7 +102,7 @@ tag mod_index_entry {
mie_tag_variant(/* tag item */@ast::item, /* variant index */uint);
}
type mod_index = hashmap<identistr, list<mod_index_entry>>;
type mod_index = hashmap<ident, list<mod_index_entry>>;
// A tuple of an imported def and the import stmt that brung it
type glob_imp_def = {def: def, item: @ast::view_item};
@ -1078,7 +1078,7 @@ fn lookup_in_mie(e: &env, mie: &mod_index_entry, ns: namespace) ->
// Module indexing
fn add_to_index(index: &hashmap<identistr, list<mod_index_entry>>,
fn add_to_index(index: &hashmap<ident, list<mod_index_entry>>,
id: &ident, ent: &mod_index_entry) {
alt index.find(id) {
none. { index.insert(id,
@ -1195,7 +1195,7 @@ fn check_for_collisions(e: &@env, c: &ast::crate) {
// Module indices make checking those relatively simple -- just check each
// name for multiple entities in the same namespace.
for each m: @{key: ast::node_id, val: @indexed_mod} in e.mod_map.items() {
for each name: @{key: identistr, val: list<mod_index_entry>} in
for each name: @{key: ident, val: list<mod_index_entry>} in
m.val.index.items() {
check_mod_name(*e, name.key, name.val);
}

View File

@ -469,7 +469,7 @@ fn make_phi_bindings(bcx: &@block_ctxt, map: &[exit_node],
ids: &ast_util::pat_id_map) -> bool {
let our_block = bcx.llbb as uint;
let success = true;
for each item: @{key: ast::identistr, val: ast::node_id} in ids.items() {
for each item: @{key: ast::ident, val: ast::node_id} in ids.items() {
let llbbs = [];
let vals = [];
for ex: exit_node in map {

View File

@ -8,7 +8,6 @@ import codemap::filename;
type spanned<T> = {node: T, span: span};
type ident = istr;
type identistr = istr;
// Functions may or may not have names.
type fn_ident = option::t<ident>;

View File

@ -19,7 +19,6 @@ import fold::*;
import ast::node_id;
import ast_util::respan;
import ast::ident;
import ast::identistr;
import ast::path;
import ast::ty;
import ast::blk;
@ -157,9 +156,9 @@ fn compose_sels(s1: selector, s2: selector) -> selector {
type binders =
{real_binders: hashmap<identistr, selector>,
{real_binders: hashmap<ident, selector>,
mutable literal_ast_matchers: [selector]};
type bindings = hashmap<identistr, arb_depth<matchable>>;
type bindings = hashmap<ident, arb_depth<matchable>>;
fn acumm_bindings(_cx: &ext_ctxt, _b_dest: &bindings, _b_src: &bindings) { }
@ -191,7 +190,7 @@ fn use_selectors_to_bind(b: &binders, e: @expr) -> option::t<bindings> {
alt sel(match_expr(e)) { none. { ret none; } _ { } }
}
let never_mind: bool = false;
for each pair: @{key: identistr,
for each pair: @{key: ident,
val: selector} in b.real_binders.items() {
alt pair.val(match_expr(e)) {
none. { never_mind = true; }
@ -265,9 +264,9 @@ fn follow_for_trans(cx: &ext_ctxt, mmaybe: &option::t<arb_depth<matchable>>,
/* helper for transcribe_exprs: what vars from `b` occur in `e`? */
iter free_vars(b: &bindings, e: @expr) -> ident {
let idents: hashmap<identistr, ()> = new_str_hash::<()>();
let idents: hashmap<ident, ()> = new_str_hash::<()>();
fn mark_ident(i: &ident, _fld: ast_fold, b: &bindings,
idents: &hashmap<identistr, ()>) -> ident {
idents: &hashmap<ident, ()>) -> ident {
if b.contains_key(i) {
idents.insert(i, ());
}
@ -281,7 +280,7 @@ iter free_vars(b: &bindings, e: @expr) -> ident {
let f = make_fold(f_pre);
f.fold_expr(e); // ignore result
dummy_out(f);
for each id: identistr in idents.keys() { put id; }
for each id: ident in idents.keys() { put id; }
}