Remove native "cdecl" ABI

This commit is contained in:
Brian Anderson 2011-11-08 17:17:06 -08:00
parent d536bc2c10
commit 4f3f04643f
8 changed files with 5 additions and 16 deletions

View File

@ -51,8 +51,7 @@ fn visit_view_item(e: env, i: @ast::view_item) {
fn visit_item(e: env, i: @ast::item) {
alt i.node {
ast::item_native_mod(m) {
if m.abi != ast::native_abi_cdecl &&
m.abi != ast::native_abi_c_stack_cdecl &&
if m.abi != ast::native_abi_c_stack_cdecl &&
m.abi != ast::native_abi_c_stack_stdcall {
ret;
}

View File

@ -260,7 +260,6 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
let abi;
alt next(st) as char {
'i' { abi = ast::native_abi_rust_intrinsic; }
'c' { abi = ast::native_abi_cdecl; }
's' { abi = ast::native_abi_x86stdcall; }
'C' { abi = ast::native_abi_c_stack_cdecl; }
'S' { abi = ast::native_abi_c_stack_stdcall; }

View File

@ -143,7 +143,6 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
w.write_char('N');
alt abi {
native_abi_rust_intrinsic. { w.write_char('i'); }
native_abi_cdecl. { w.write_char('c'); }
native_abi_x86stdcall. { w.write_char('s'); }
native_abi_c_stack_cdecl. { w.write_char('C'); }
native_abi_c_stack_stdcall. { w.write_char('S'); }

View File

@ -5531,7 +5531,6 @@ fn native_fn_ty_param_count(cx: @crate_ctxt, id: ast::node_id) -> uint {
pure fn native_abi_requires_pair(abi: ast::native_abi) -> bool {
alt abi {
ast::native_abi_cdecl. |
ast::native_abi_rust_intrinsic. |
ast::native_abi_x86stdcall. { ret true; }
ast::native_abi_c_stack_cdecl. |
@ -5576,11 +5575,6 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
uses_retptr = true;
cast_to_i32 = false;
}
ast::native_abi_cdecl. {
pass_task = false;
uses_retptr = false;
cast_to_i32 = true;
}
ast::native_abi_x86stdcall. {
pass_task = false;
uses_retptr = false;

View File

@ -551,7 +551,8 @@ fn getter(cx: @ctxt, id: ast::def_id) -> ty::ty_param_kinds_and_ty {
alt it {
some(ast_map::node_item(item)) { tpt = ty_of_item(cx, item); }
some(ast_map::node_native_item(native_item)) {
tpt = ty_of_native_item(cx, native_item, ast::native_abi_cdecl);
tpt = ty_of_native_item(cx, native_item,
ast::native_abi_c_stack_cdecl);
}
_ { cx.tcx.sess.fatal("internal error " + std::int::str(id.node)); }
}

View File

@ -426,7 +426,6 @@
type _mod = {view_items: [@view_item], items: [@item]};
tag native_abi {
native_abi_cdecl;
native_abi_rust_intrinsic;
native_abi_x86stdcall;
native_abi_c_stack_cdecl;

View File

@ -2003,11 +2003,10 @@ fn parse_native_mod_items(p: parser, native_name: str, abi: ast::native_abi,
fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
let lo = p.get_last_lo_pos();
let abi = ast::native_abi_cdecl;
let abi = ast::native_abi_c_stack_cdecl;
if !is_word(p, "mod") {
let t = parse_str(p);
if str::eq(t, "cdecl") {
} else if str::eq(t, "rust-intrinsic") {
if str::eq(t, "rust-intrinsic") {
abi = ast::native_abi_rust_intrinsic;
} else if str::eq(t, "x86stdcall") {
abi = ast::native_abi_x86stdcall;

View File

@ -401,7 +401,6 @@ fn print_item(s: ps, &&item: @ast::item) {
ast::item_native_mod(nmod) {
head(s, "native");
alt nmod.abi {
ast::native_abi_cdecl. { word_nbsp(s, "\"cdecl\""); }
ast::native_abi_rust_intrinsic. {
word_nbsp(s, "\"rust-intrinsic\"");
}