Skip to content

Commit 98a45f8

Browse files
committed
---
yaml --- r: 5600 b: refs/heads/master c: f7d0c1c h: refs/heads/master v: v3
1 parent 7530528 commit 98a45f8

File tree

7 files changed

+15
-2
lines changed

7 files changed

+15
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 657e3ffaf528c9ca9406a7ce89b6d949bce416cf
2+
refs/heads/master: f7d0c1cec3d65131cf4da273e6909ee97682dc42

trunk/src/comp/metadata/tydecode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
263263
'c' { abi = ast::native_abi_cdecl; }
264264
'l' { abi = ast::native_abi_llvm; }
265265
's' { abi = ast::native_abi_x86stdcall; }
266+
'C' { abi = ast::native_abi_c_stack_cdecl; }
266267
}
267268
let func = parse_ty_fn(st, sd);
268269
ret ty::mk_native_fn(st.tcx, abi, func.args, func.ty);

trunk/src/comp/metadata/tyencode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
147147
native_abi_cdecl. { w.write_char('c'); }
148148
native_abi_llvm. { w.write_char('l'); }
149149
native_abi_x86stdcall. { w.write_char('s'); }
150+
native_abi_c_stack_cdecl. { w.write_char('C'); }
150151
}
151152
enc_ty_fn(w, cx, args, out, return_val, []);
152153
}

trunk/src/comp/middle/trans.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5715,6 +5715,9 @@ fn register_native_fn(ccx: @crate_ctxt, sp: span, path: [str], name: str,
57155715
uses_retptr = false;
57165716
cast_to_i32 = true;
57175717
}
5718+
ast::native_abi_c_stack_cdecl. {
5719+
fail "C stack cdecl ABI shouldn't have a wrapper";
5720+
}
57185721
}
57195722

57205723
let lltaskptr;

trunk/src/comp/syntax/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ tag native_abi {
419419
native_abi_llvm;
420420
native_abi_rust_intrinsic;
421421
native_abi_x86stdcall;
422+
native_abi_c_stack_cdecl;
422423
}
423424

424425
type native_mod =

trunk/src/comp/syntax/parse/parser.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,11 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
20122012
abi = ast::native_abi_rust_intrinsic;
20132013
} else if str::eq(t, "x86stdcall") {
20142014
abi = ast::native_abi_x86stdcall;
2015-
} else { p.fatal("unsupported abi: " + t); }
2015+
} else if str::eq(t, "c-stack-cdecl") {
2016+
abi = ast::native_abi_c_stack_cdecl;
2017+
} else {
2018+
p.fatal("unsupported abi: " + t);
2019+
}
20162020
}
20172021
expect_word(p, "mod");
20182022
let id = parse_ident(p);

trunk/src/comp/syntax/print/pprust.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ fn print_item(s: ps, item: @ast::item) {
408408
word_nbsp(s, "\"rust-intrinsic\"");
409409
}
410410
ast::native_abi_x86stdcall. { word_nbsp(s, "\"x86stdcall\""); }
411+
ast::native_abi_c_stack_cdecl. {
412+
word_nbsp(s, "\"c-stack-cdecl\"");
413+
}
411414
}
412415
word_nbsp(s, "mod");
413416
word_nbsp(s, item.ident);

0 commit comments

Comments
 (0)