Skip to content

Commit e8cbb5d

Browse files
committed
---
yaml --- r: 124605 b: refs/heads/auto c: d368ffd h: refs/heads/master i: 124603: cfd25c5 v: v3
1 parent 3b675d8 commit e8cbb5d

File tree

3 files changed

+6
-23
lines changed

3 files changed

+6
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 33a4dd824f708d1e7c25ad26d8a4fe801d0b25e8
16+
refs/heads/auto: d368ffdb26144fd1f451d3d8ba4344b0a8e82f99
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc/middle/trans/glue.rs

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -178,29 +178,12 @@ pub fn lazily_emit_visit_glue(ccx: &CrateContext, ti: &tydesc_info) -> ValueRef
178178
}
179179

180180
// See [Note-arg-mode]
181-
pub fn call_visit_glue(bcx: &Block, v: ValueRef, tydesc: ValueRef,
182-
static_ti: Option<&tydesc_info>) {
181+
pub fn call_visit_glue(bcx: &Block, v: ValueRef, tydesc: ValueRef) {
183182
let _icx = push_ctxt("call_visit_glue");
184-
let ccx = bcx.ccx();
185-
let static_glue_fn = static_ti.map(|sti| lazily_emit_visit_glue(ccx, sti));
186-
187-
// When static type info is available, avoid casting to a generic pointer.
188-
let llrawptr = if static_glue_fn.is_none() {
189-
PointerCast(bcx, v, Type::i8p(ccx))
190-
} else {
191-
v
192-
};
193183

194-
let llfn = {
195-
match static_glue_fn {
196-
None => {
197-
// Select out the glue function to call from the tydesc
198-
let llfnptr = GEPi(bcx, tydesc, [0u, abi::tydesc_field_visit_glue]);
199-
Load(bcx, llfnptr)
200-
}
201-
Some(sgf) => sgf
202-
}
203-
};
184+
// Select the glue function to call from the tydesc
185+
let llfn = Load(bcx, GEPi(bcx, tydesc, [0u, abi::tydesc_field_visit_glue]));
186+
let llrawptr = PointerCast(bcx, v, Type::i8p(bcx.ccx()));
204187

205188
Call(bcx, llfn, [llrawptr], []);
206189
}

branches/auto/src/librustc/middle/trans/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ pub fn trans_intrinsic_call<'a>(mut bcx: &'a Block<'a>, node: ast::NodeId,
290290
let td = *llargs.get(0);
291291
let visitor = *llargs.get(1);
292292
let td = PointerCast(bcx, td, ccx.tydesc_type().ptr_to());
293-
glue::call_visit_glue(bcx, visitor, td, None);
293+
glue::call_visit_glue(bcx, visitor, td);
294294
C_nil(ccx)
295295
}
296296
(_, "offset") => {

0 commit comments

Comments
 (0)