From 1afc943c9174162888631c2ec02af33370a77115 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 9 Nov 2011 15:59:29 -0800 Subject: [PATCH] rustc: Rename native_abi_c_stack_cdecl to native_abi_cdecl --- src/comp/metadata/creader.rs | 2 +- src/comp/metadata/tydecode.rs | 2 +- src/comp/metadata/tyencode.rs | 2 +- src/comp/middle/trans.rs | 4 ++-- src/comp/middle/typeck.rs | 2 +- src/comp/syntax/ast.rs | 2 +- src/comp/syntax/parse/parser.rs | 4 ++-- src/comp/syntax/print/pprust.rs | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/comp/metadata/creader.rs b/src/comp/metadata/creader.rs index 5efcaaa0c2a..82dfb839354 100644 --- a/src/comp/metadata/creader.rs +++ b/src/comp/metadata/creader.rs @@ -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_c_stack_cdecl && + if m.abi != ast::native_abi_cdecl && m.abi != ast::native_abi_stdcall { ret; } diff --git a/src/comp/metadata/tydecode.rs b/src/comp/metadata/tydecode.rs index bda297fe119..156761eff4e 100644 --- a/src/comp/metadata/tydecode.rs +++ b/src/comp/metadata/tydecode.rs @@ -260,7 +260,7 @@ 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_c_stack_cdecl; } + 'C' { abi = ast::native_abi_cdecl; } 'S' { abi = ast::native_abi_stdcall; } } let func = parse_ty_fn(st, sd); diff --git a/src/comp/metadata/tyencode.rs b/src/comp/metadata/tyencode.rs index 3b03c1920a2..15c0b4d9e29 100644 --- a/src/comp/metadata/tyencode.rs +++ b/src/comp/metadata/tyencode.rs @@ -143,7 +143,7 @@ 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_c_stack_cdecl. { w.write_char('C'); } + native_abi_cdecl. { w.write_char('C'); } native_abi_stdcall. { w.write_char('S'); } } enc_ty_fn(w, cx, args, out, return_val, []); diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 6ea8571b75f..b98f7d528b1 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -5597,7 +5597,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_intrinsic. { ret true; } - ast::native_abi_c_stack_cdecl. | + ast::native_abi_cdecl. | ast::native_abi_stdcall. { ret false; } } } @@ -5641,7 +5641,7 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str, uses_retptr = true; cast_to_i32 = false; } - ast::native_abi_c_stack_cdecl. { + ast::native_abi_cdecl. { let llfn = decl_cdecl_fn(ccx.llmod, name, T_fn([], ccx.int_type)); ccx.item_ids.insert(id, llfn); ccx.item_symbols.insert(id, name); diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 7306ae41817..e61a50c235e 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -552,7 +552,7 @@ mod collect { 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_c_stack_cdecl); + ast::native_abi_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 e72e4b6da32..ebac944d64a 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -427,7 +427,7 @@ type _mod = {view_items: [@view_item], items: [@item]}; tag native_abi { native_abi_rust_intrinsic; - native_abi_c_stack_cdecl; + native_abi_cdecl; native_abi_stdcall; } diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 11d68160070..b5b5f15b595 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2003,13 +2003,13 @@ 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_c_stack_cdecl; + let abi = ast::native_abi_cdecl; if !is_word(p, "mod") { let t = parse_str(p); if str::eq(t, "rust-intrinsic") { abi = ast::native_abi_rust_intrinsic; } else if str::eq(t, "c-stack-cdecl") { - abi = ast::native_abi_c_stack_cdecl; + abi = ast::native_abi_cdecl; } else if str::eq(t, "c-stack-stdcall") { abi = ast::native_abi_stdcall; } else { diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 83e5dad1ff5..853ac67d93c 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -404,7 +404,7 @@ fn print_item(s: ps, &&item: @ast::item) { ast::native_abi_rust_intrinsic. { word_nbsp(s, "\"rust-intrinsic\""); } - ast::native_abi_c_stack_cdecl. { + ast::native_abi_cdecl. { word_nbsp(s, "\"c-stack-cdecl\""); } ast::native_abi_stdcall. {