about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-08 17:17:06 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-08 17:17:06 -0800
commit4f3f04643f2ba6760e66e8efd54be07cb08a6b9c (patch)
tree2a45764aabb28eee335af48d6b08aabf20ce5e74 /src
parentd536bc2c10b7008dd3bccdfc9e82ba0af2533f34 (diff)
downloadrust-4f3f04643f2ba6760e66e8efd54be07cb08a6b9c.tar.gz
rust-4f3f04643f2ba6760e66e8efd54be07cb08a6b9c.zip
Remove native "cdecl" ABI
Diffstat (limited to 'src')
-rw-r--r--src/comp/metadata/creader.rs3
-rw-r--r--src/comp/metadata/tydecode.rs1
-rw-r--r--src/comp/metadata/tyencode.rs1
-rw-r--r--src/comp/middle/trans.rs6
-rw-r--r--src/comp/middle/typeck.rs3
-rw-r--r--src/comp/syntax/ast.rs1
-rw-r--r--src/comp/syntax/parse/parser.rs5
-rw-r--r--src/comp/syntax/print/pprust.rs1
8 files changed, 5 insertions, 16 deletions
diff --git a/src/comp/metadata/creader.rs b/src/comp/metadata/creader.rs
index 0764d54d616..eab64b9a750 100644
--- a/src/comp/metadata/creader.rs
+++ b/src/comp/metadata/creader.rs
@@ -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;
         }
diff --git a/src/comp/metadata/tydecode.rs b/src/comp/metadata/tydecode.rs
index 5ee4fd88cc0..5f34f1b52eb 100644
--- a/src/comp/metadata/tydecode.rs
+++ b/src/comp/metadata/tydecode.rs
@@ -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; }
diff --git a/src/comp/metadata/tyencode.rs b/src/comp/metadata/tyencode.rs
index 26bce6f802b..79298d29757 100644
--- a/src/comp/metadata/tyencode.rs
+++ b/src/comp/metadata/tyencode.rs
@@ -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'); }
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index ff67fb37257..e054d359bb9 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -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;
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index be79474536d..7306ae41817 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -551,7 +551,8 @@ mod collect {
         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)); }
         }
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs
index f1b1d16dd6f..75ece99a1b6 100644
--- a/src/comp/syntax/ast.rs
+++ b/src/comp/syntax/ast.rs
@@ -426,7 +426,6 @@ type anon_obj =
 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;
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 9db7c8ae5f0..1358d704fe0 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -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;
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index b52c6dfe450..1028feaffc4 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -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\"");
           }