Skip to content

Commit b91caac

Browse files
committed
rustc: Remove 'morestack_addr' intrinsic. Unused
1 parent 6aad3bf commit b91caac

File tree

4 files changed

+0
-41
lines changed

4 files changed

+0
-41
lines changed

src/librustc/middle/trans/intrinsic.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -463,17 +463,6 @@ pub fn trans_intrinsic(ccx: @CrateContext,
463463
abi::tydesc_field_visit_glue, None);
464464
RetVoid(bcx);
465465
}
466-
"morestack_addr" => {
467-
// FIXME This is a hack to grab the address of this particular
468-
// native function. There should be a general in-language
469-
// way to do this
470-
let llfty = type_of_rust_fn(bcx.ccx(), false, [], ty::mk_nil());
471-
let morestack_addr = decl_cdecl_fn(bcx.ccx().llmod, "__morestack",
472-
llfty, ty::mk_nil());
473-
let morestack_addr = PointerCast(bcx, morestack_addr,
474-
Type::nil().ptr_to());
475-
Ret(bcx, morestack_addr);
476-
}
477466
"offset" => {
478467
let ptr = get_param(decl, first_real_arg);
479468
let offset = get_param(decl, first_real_arg + 1);

src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4128,9 +4128,6 @@ pub fn check_intrinsic_type(ccx: @CrateCtxt, it: &ast::ForeignItem) {
41284128
});
41294129
(0, ~[ td_ptr, visitor_object_ty ], ty::mk_nil())
41304130
}
4131-
"morestack_addr" => {
4132-
(0u, ~[], ty::mk_nil_ptr(ccx.tcx))
4133-
}
41344131
"offset" => {
41354132
(1,
41364133
~[

src/libstd/unstable/intrinsics.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,6 @@ extern "rust-intrinsic" {
310310

311311
pub fn visit_tydesc(td: *TyDesc, tv: &mut TyVisitor);
312312

313-
/// Get the address of the `__morestack` stack growth function.
314-
pub fn morestack_addr() -> *();
315-
316313
/// Calculates the offset from a pointer. The offset *must* be in-bounds of
317314
/// the object, or one-byte-past-the-end. An arithmetic overflow is also
318315
/// undefined behaviour.

src/test/run-pass/morestack-address.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)