mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
rustc: Rename native_abi_c_stack_cdecl to native_abi_cdecl
This commit is contained in:
parent
10c35959e7
commit
1afc943c91
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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, []);
|
||||
|
@ -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);
|
||||
|
@ -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)); }
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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. {
|
||||
|
Loading…
Reference in New Issue
Block a user