diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-10-03 13:59:38 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-10-03 13:59:38 -0700 |
| commit | 968b66ad40c3925aaf34bf90740dfb3377c8d786 (patch) | |
| tree | 9518f777a21495a828e48e9aa4c788d9038f754b /src/comp/syntax | |
| parent | 9be0dc1250aaf657d9c50d4f98aacb73a9aa832c (diff) | |
| download | rust-968b66ad40c3925aaf34bf90740dfb3377c8d786.tar.gz rust-968b66ad40c3925aaf34bf90740dfb3377c8d786.zip | |
rustc: Implement C stack stdcall
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/ast.rs | 1 | ||||
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 3 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index 87d417d5701..52aa6cb31d9 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -420,6 +420,7 @@ tag native_abi { native_abi_rust_intrinsic; native_abi_x86stdcall; native_abi_c_stack_cdecl; + native_abi_c_stack_stdcall; } type native_mod = diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 8fa705d6418..5e9d49d833c 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2014,6 +2014,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item { abi = ast::native_abi_x86stdcall; } else if str::eq(t, "c-stack-cdecl") { abi = ast::native_abi_c_stack_cdecl; + } else if str::eq(t, "c-stack-stdcall") { + abi = ast::native_abi_c_stack_stdcall; } else { p.fatal("unsupported abi: " + t); } diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 2b0bff104cd..555cd7fddee 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -411,6 +411,9 @@ fn print_item(s: ps, item: @ast::item) { ast::native_abi_c_stack_cdecl. { word_nbsp(s, "\"c-stack-cdecl\""); } + ast::native_abi_c_stack_stdcall. { + word_nbsp(s, "\"c-stack-stdcall\""); + } } word_nbsp(s, "mod"); word_nbsp(s, item.ident); |
