Skip to content

Commit 0e0833e

Browse files
committed
Change "iid" identifiers (apparently "interface id") to "trait_id"
1 parent 5fd891f commit 0e0833e

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

src/rustc/middle/trans/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,9 +699,9 @@ fn make_visit_glue(bcx: block, v: ValueRef, t: ty::t) {
699699
let _icx = bcx.insn_ctxt(~"make_visit_glue");
700700
let mut bcx = bcx;
701701
assert bcx.ccx().tcx.intrinsic_defs.contains_key(@~"ty_visitor");
702-
let (iid, ty) = bcx.ccx().tcx.intrinsic_defs.get(@~"ty_visitor");
702+
let (trait_id, ty) = bcx.ccx().tcx.intrinsic_defs.get(@~"ty_visitor");
703703
let v = PointerCast(bcx, v, T_ptr(type_of::type_of(bcx.ccx(), ty)));
704-
bcx = reflect::emit_calls_to_trait_visit_ty(bcx, t, v, iid);
704+
bcx = reflect::emit_calls_to_trait_visit_ty(bcx, t, v, trait_id);
705705
build_return(bcx);
706706
}
707707

src/rustc/middle/trans/impl.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ fn trans_method_callee(bcx: block, callee_id: ast::node_id,
6666
{env: self_env(val, node_id_type(bcx, self.id), none)
6767
with lval_static_fn(bcx, did, callee_id)}
6868
}
69-
typeck::method_param({trait_id:iid, method_num:off,
69+
typeck::method_param({trait_id:trait_id, method_num:off,
7070
param_num:p, bound_num:b}) => {
7171
match check bcx.fcx.param_substs {
7272
some(substs) => {
7373
let vtbl = find_vtable_in_fn_ctxt(substs, p, b);
7474
trans_monomorphized_callee(bcx, callee_id, self, mentry.derefs,
75-
iid, off, vtbl)
75+
trait_id, off, vtbl)
7676
}
7777
}
7878
}
@@ -195,7 +195,7 @@ fn trans_monomorphized_callee(bcx: block, callee_id: ast::node_id,
195195
ccx, node_id_type(bcx, callee_id))))
196196
with lval}
197197
}
198-
typeck::vtable_trait(iid, tps) => {
198+
typeck::vtable_trait(trait_id, tps) => {
199199
let {bcx, val} = trans_temp_expr(bcx, base);
200200
let fty = node_id_type(bcx, callee_id);
201201
trans_trait_callee(bcx, val, fty, n_method)
@@ -250,14 +250,15 @@ fn resolve_vtables_in_fn_ctxt(fcx: fn_ctxt, vts: typeck::vtable_res)
250250
fn resolve_vtable_in_fn_ctxt(fcx: fn_ctxt, vt: typeck::vtable_origin)
251251
-> typeck::vtable_origin {
252252
match vt {
253-
typeck::vtable_static(iid, tys, sub) => {
253+
typeck::vtable_static(trait_id, tys, sub) => {
254254
let tys = match fcx.param_substs {
255255
some(substs) => {
256256
vec::map(tys, |t| ty::subst_tps(fcx.ccx.tcx, substs.tys, t))
257257
}
258258
_ => tys
259259
};
260-
typeck::vtable_static(iid, tys, resolve_vtables_in_fn_ctxt(fcx, sub))
260+
typeck::vtable_static(trait_id, tys,
261+
resolve_vtables_in_fn_ctxt(fcx, sub))
261262
}
262263
typeck::vtable_param(n_param, n_bound) => {
263264
match check fcx.param_substs {

src/rustc/middle/trans/reflect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ impl reflector {
288288
// Emit a sequence of calls to visit_ty::visit_foo
289289
fn emit_calls_to_trait_visit_ty(bcx: block, t: ty::t,
290290
visitor_val: ValueRef,
291-
visitor_iid: def_id) -> block {
291+
visitor_trait_id: def_id) -> block {
292292

293293
let final = sub_block(bcx, ~"final");
294294
assert bcx.ccx().tcx.intrinsic_defs.contains_key(@~"tydesc");
295295
let (_, tydesc_ty) = bcx.ccx().tcx.intrinsic_defs.get(@~"tydesc");
296296
let tydesc_ty = type_of::type_of(bcx.ccx(), tydesc_ty);
297297
let r = reflector({
298298
visitor_val: visitor_val,
299-
visitor_methods: ty::trait_methods(bcx.tcx(), visitor_iid),
299+
visitor_methods: ty::trait_methods(bcx.tcx(), visitor_trait_id),
300300
final_bcx: final,
301301
tydesc_ty: tydesc_ty,
302302
mut bcx: bcx

src/rustc/middle/typeck/check/method.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class lookup {
229229
let mut trait_bnd_idx = 0u; // count only trait bounds
230230
let bounds = tcx.ty_param_bounds.get(did.node);
231231
for vec::each(*bounds) |bound| {
232-
let (iid, bound_substs) = match bound {
232+
let (trait_id, bound_substs) = match bound {
233233
ty::bound_copy | ty::bound_send | ty::bound_const |
234234
ty::bound_owned => {
235235
again; /* ok */
@@ -241,7 +241,7 @@ class lookup {
241241
}
242242
};
243243

244-
let trt_methods = ty::trait_methods(tcx, iid);
244+
let trt_methods = ty::trait_methods(tcx, trait_id);
245245
match vec::position(*trt_methods, |m| m.ident == self.m_name) {
246246
none => {
247247
/* check next bound */
@@ -261,7 +261,7 @@ class lookup {
261261

262262
self.add_candidates_from_m(
263263
substs, trt_methods[pos],
264-
method_param({trait_id:iid,
264+
method_param({trait_id:trait_id,
265265
method_num:pos,
266266
param_num:n,
267267
bound_num:trait_bnd_idx}));

0 commit comments

Comments
 (0)