Skip to content

rustc: Remove 'morestack_addr' intrinsic. Unused #12096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/librustc/middle/trans/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,17 +463,6 @@ pub fn trans_intrinsic(ccx: @CrateContext,
abi::tydesc_field_visit_glue, None);
RetVoid(bcx);
}
"morestack_addr" => {
// FIXME This is a hack to grab the address of this particular
// native function. There should be a general in-language
// way to do this
let llfty = type_of_rust_fn(bcx.ccx(), false, [], ty::mk_nil());
let morestack_addr = decl_cdecl_fn(bcx.ccx().llmod, "__morestack",
llfty, ty::mk_nil());
let morestack_addr = PointerCast(bcx, morestack_addr,
Type::nil().ptr_to());
Ret(bcx, morestack_addr);
}
"offset" => {
let ptr = get_param(decl, first_real_arg);
let offset = get_param(decl, first_real_arg + 1);
Expand Down
3 changes: 0 additions & 3 deletions src/librustc/middle/typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4128,9 +4128,6 @@ pub fn check_intrinsic_type(ccx: @CrateCtxt, it: &ast::ForeignItem) {
});
(0, ~[ td_ptr, visitor_object_ty ], ty::mk_nil())
}
"morestack_addr" => {
(0u, ~[], ty::mk_nil_ptr(ccx.tcx))
}
"offset" => {
(1,
~[
Expand Down
3 changes: 0 additions & 3 deletions src/libstd/unstable/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,6 @@ extern "rust-intrinsic" {

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

/// Get the address of the `__morestack` stack growth function.
pub fn morestack_addr() -> *();

/// Calculates the offset from a pointer. The offset *must* be in-bounds of
/// the object, or one-byte-past-the-end. An arithmetic overflow is also
/// undefined behaviour.
Expand Down
24 changes: 0 additions & 24 deletions src/test/run-pass/morestack-address.rs

This file was deleted.