Skip to content

Commit 4f3f046

Browse files
committed
Remove native "cdecl" ABI
1 parent d536bc2 commit 4f3f046

File tree

8 files changed

+5
-16
lines changed

8 files changed

+5
-16
lines changed

src/comp/metadata/creader.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ fn visit_view_item(e: env, i: @ast::view_item) {
5151
fn visit_item(e: env, i: @ast::item) {
5252
alt i.node {
5353
ast::item_native_mod(m) {
54-
if m.abi != ast::native_abi_cdecl &&
55-
m.abi != ast::native_abi_c_stack_cdecl &&
54+
if m.abi != ast::native_abi_c_stack_cdecl &&
5655
m.abi != ast::native_abi_c_stack_stdcall {
5756
ret;
5857
}

src/comp/metadata/tydecode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
260260
let abi;
261261
alt next(st) as char {
262262
'i' { abi = ast::native_abi_rust_intrinsic; }
263-
'c' { abi = ast::native_abi_cdecl; }
264263
's' { abi = ast::native_abi_x86stdcall; }
265264
'C' { abi = ast::native_abi_c_stack_cdecl; }
266265
'S' { abi = ast::native_abi_c_stack_stdcall; }

src/comp/metadata/tyencode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
143143
w.write_char('N');
144144
alt abi {
145145
native_abi_rust_intrinsic. { w.write_char('i'); }
146-
native_abi_cdecl. { w.write_char('c'); }
147146
native_abi_x86stdcall. { w.write_char('s'); }
148147
native_abi_c_stack_cdecl. { w.write_char('C'); }
149148
native_abi_c_stack_stdcall. { w.write_char('S'); }

src/comp/middle/trans.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5531,7 +5531,6 @@ fn native_fn_ty_param_count(cx: @crate_ctxt, id: ast::node_id) -> uint {
55315531

55325532
pure fn native_abi_requires_pair(abi: ast::native_abi) -> bool {
55335533
alt abi {
5534-
ast::native_abi_cdecl. |
55355534
ast::native_abi_rust_intrinsic. |
55365535
ast::native_abi_x86stdcall. { ret true; }
55375536
ast::native_abi_c_stack_cdecl. |
@@ -5576,11 +5575,6 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
55765575
uses_retptr = true;
55775576
cast_to_i32 = false;
55785577
}
5579-
ast::native_abi_cdecl. {
5580-
pass_task = false;
5581-
uses_retptr = false;
5582-
cast_to_i32 = true;
5583-
}
55845578
ast::native_abi_x86stdcall. {
55855579
pass_task = false;
55865580
uses_retptr = false;

src/comp/middle/typeck.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,8 @@ mod collect {
551551
alt it {
552552
some(ast_map::node_item(item)) { tpt = ty_of_item(cx, item); }
553553
some(ast_map::node_native_item(native_item)) {
554-
tpt = ty_of_native_item(cx, native_item, ast::native_abi_cdecl);
554+
tpt = ty_of_native_item(cx, native_item,
555+
ast::native_abi_c_stack_cdecl);
555556
}
556557
_ { cx.tcx.sess.fatal("internal error " + std::int::str(id.node)); }
557558
}

src/comp/syntax/ast.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ type anon_obj =
426426
type _mod = {view_items: [@view_item], items: [@item]};
427427

428428
tag native_abi {
429-
native_abi_cdecl;
430429
native_abi_rust_intrinsic;
431430
native_abi_x86stdcall;
432431
native_abi_c_stack_cdecl;

src/comp/syntax/parse/parser.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,11 +2003,10 @@ fn parse_native_mod_items(p: parser, native_name: str, abi: ast::native_abi,
20032003

20042004
fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
20052005
let lo = p.get_last_lo_pos();
2006-
let abi = ast::native_abi_cdecl;
2006+
let abi = ast::native_abi_c_stack_cdecl;
20072007
if !is_word(p, "mod") {
20082008
let t = parse_str(p);
2009-
if str::eq(t, "cdecl") {
2010-
} else if str::eq(t, "rust-intrinsic") {
2009+
if str::eq(t, "rust-intrinsic") {
20112010
abi = ast::native_abi_rust_intrinsic;
20122011
} else if str::eq(t, "x86stdcall") {
20132012
abi = ast::native_abi_x86stdcall;

src/comp/syntax/print/pprust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ fn print_item(s: ps, &&item: @ast::item) {
401401
ast::item_native_mod(nmod) {
402402
head(s, "native");
403403
alt nmod.abi {
404-
ast::native_abi_cdecl. { word_nbsp(s, "\"cdecl\""); }
405404
ast::native_abi_rust_intrinsic. {
406405
word_nbsp(s, "\"rust-intrinsic\"");
407406
}

0 commit comments

Comments
 (0)