@@ -52,8 +52,8 @@ state type crate_ctxt = rec(session.session sess,
52
52
ModuleRef llmod,
53
53
hashmap[ str, ValueRef ] upcalls,
54
54
hashmap[ str, ValueRef ] intrinsics,
55
- hashmap[ str, ValueRef ] fn_names ,
56
- hashmap[ ast. def_id , ValueRef ] fn_ids ,
55
+ hashmap[ str, ValueRef ] item_names ,
56
+ hashmap[ ast. def_id , ValueRef ] item_ids ,
57
57
hashmap[ ast. def_id , @ast. item ] items,
58
58
hashmap[ ast. def_id , @tag_info] tags,
59
59
@glue_fns glues,
@@ -1126,8 +1126,8 @@ fn trans_name(@block_ctxt cx, &ast.name n, &option.t[ast.def] dopt)
1126
1126
true ) ;
1127
1127
}
1128
1128
case ( ast. def_fn ( ?did) ) {
1129
- check ( cx. fcx . ccx . fn_ids . contains_key ( did) ) ;
1130
- ret tup( res ( cx, cx. fcx . ccx . fn_ids . get ( did) ) ,
1129
+ check ( cx. fcx . ccx . item_ids . contains_key ( did) ) ;
1130
+ ret tup( res ( cx, cx. fcx . ccx . item_ids . get ( did) ) ,
1131
1131
false ) ;
1132
1132
}
1133
1133
case ( ast. def_variant ( ?tid, ?vid) ) {
@@ -1610,9 +1610,9 @@ fn new_fn_ctxt(@crate_ctxt cx,
1610
1610
& ast . _fn f,
1611
1611
ast. def_id fid ) -> @fn_ctxt {
1612
1612
1613
- check ( cx. fn_ids . contains_key ( fid) ) ;
1614
- let ValueRef llfn = cx. fn_ids . get ( fid) ;
1615
- cx. fn_names . insert ( cx. path , llfn) ;
1613
+ check ( cx. item_ids . contains_key ( fid) ) ;
1614
+ let ValueRef llfn = cx. item_ids . get ( fid) ;
1615
+ cx. item_names . insert ( cx. path , llfn) ;
1616
1616
1617
1617
let ValueRef lltaskptr = llvm. LLVMGetParam ( llfn, 0 u) ;
1618
1618
let uint arg_n = 1 u;
@@ -1779,7 +1779,7 @@ fn collect_item(&@crate_ctxt cx, @ast.item i) -> @crate_ctxt {
1779
1779
auto llty = node_type ( cx, ann) ;
1780
1780
let str s = cx. names . next ( "_rust_fn" ) + "." + name;
1781
1781
let ValueRef llfn = decl_fastcall_fn ( cx. llmod , s, llty) ;
1782
- cx. fn_ids . insert ( fid, llfn) ;
1782
+ cx. item_ids . insert ( fid, llfn) ;
1783
1783
}
1784
1784
1785
1785
case ( ast. item_mod ( ?name, ?m, ?mid) ) {
@@ -1899,8 +1899,8 @@ fn trans_main_fn(@crate_ctxt cx, ValueRef llcrate) {
1899
1899
1900
1900
auto llargc = llvm. LLVMGetParam ( llmain, 0 u) ;
1901
1901
auto llargv = llvm. LLVMGetParam ( llmain, 1 u) ;
1902
- check ( cx. fn_names . contains_key ( "_rust.main" ) ) ;
1903
- auto llrust_main = cx. fn_names . get ( "_rust.main" ) ;
1902
+ check ( cx. item_names . contains_key ( "_rust.main" ) ) ;
1903
+ auto llrust_main = cx. item_names . get ( "_rust.main" ) ;
1904
1904
1905
1905
//
1906
1906
// Emit the moral equivalent of:
@@ -1977,8 +1977,8 @@ fn trans_crate(session.session sess, @ast.crate crate, str output) {
1977
1977
llmod = llmod,
1978
1978
upcalls = new_str_hash[ ValueRef ] ( ) ,
1979
1979
intrinsics = intrinsics,
1980
- fn_names = new_str_hash[ ValueRef ] ( ) ,
1981
- fn_ids = new_def_hash[ ValueRef ] ( ) ,
1980
+ item_names = new_str_hash[ ValueRef ] ( ) ,
1981
+ item_ids = new_def_hash[ ValueRef ] ( ) ,
1982
1982
items = new_def_hash[ @ast. item ] ( ) ,
1983
1983
tags = new_def_hash[ @tag_info] ( ) ,
1984
1984
glues = glues,
0 commit comments