Remove native "rust" ABI

This commit is contained in:
Brian Anderson 2011-11-07 15:14:10 -08:00
parent b0c2416270
commit 1103fe8ca0
7 changed files with 2 additions and 13 deletions

View File

@ -51,7 +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_rust && m.abi != ast::native_abi_cdecl &&
if m.abi != ast::native_abi_cdecl &&
m.abi != ast::native_abi_c_stack_cdecl &&
m.abi != ast::native_abi_c_stack_stdcall {
ret;

View File

@ -259,7 +259,6 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
'N' {
let abi;
alt next(st) as char {
'r' { abi = ast::native_abi_rust; }
'i' { abi = ast::native_abi_rust_intrinsic; }
'c' { abi = ast::native_abi_cdecl; }
'l' { abi = ast::native_abi_llvm; }

View File

@ -142,7 +142,6 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
ty::ty_native_fn(abi, args, out) {
w.write_char('N');
alt abi {
native_abi_rust. { w.write_char('r'); }
native_abi_rust_intrinsic. { w.write_char('i'); }
native_abi_cdecl. { w.write_char('c'); }
native_abi_llvm. { w.write_char('l'); }

View File

@ -5531,7 +5531,7 @@ 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_rust. | ast::native_abi_cdecl. |
ast::native_abi_cdecl. |
ast::native_abi_llvm. | ast::native_abi_rust_intrinsic. |
ast::native_abi_x86stdcall. { ret true; }
ast::native_abi_c_stack_cdecl. |
@ -5571,11 +5571,6 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
let uses_retptr;
let cast_to_i32;
alt abi {
ast::native_abi_rust. {
pass_task = false;
uses_retptr = false;
cast_to_i32 = true;
}
ast::native_abi_rust_intrinsic. {
pass_task = true;
uses_retptr = true;

View File

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

View File

@ -2007,8 +2007,6 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
if !is_word(p, "mod") {
let t = parse_str(p);
if str::eq(t, "cdecl") {
} else if str::eq(t, "rust") {
abi = ast::native_abi_rust;
} else if str::eq(t, "llvm") {
abi = ast::native_abi_llvm;
} else if str::eq(t, "rust-intrinsic") {

View File

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