diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-18 13:14:33 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-18 13:56:15 -0700 |
| commit | c40d6265ce2ae093b3bb9e15177f60b375a158fa (patch) | |
| tree | 6e189545311d1b6e2c46a3aa0cd4b623327dfd44 /src/comp/syntax | |
| parent | 682875929efe558b42318d6ae8b2ef8dc625e94a (diff) | |
| download | rust-c40d6265ce2ae093b3bb9e15177f60b375a158fa.tar.gz rust-c40d6265ce2ae093b3bb9e15177f60b375a158fa.zip | |
Support x86 stdcall convention
This allows rust to call the Win32 API
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 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index fd5a308cbb8..745aa4e1fcd 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -526,6 +526,7 @@ tag native_abi { native_abi_cdecl; native_abi_llvm; native_abi_rust_intrinsic; + native_abi_x86stdcall; } type native_mod = diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 183c9ce0c47..59dbf72f7c5 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2004,6 +2004,8 @@ fn parse_item_native_mod(&parser p, &ast::attribute[] attrs) -> @ast::item { abi = ast::native_abi_llvm; } else if (str::eq(t, "rust-intrinsic")) { abi = ast::native_abi_rust_intrinsic; + } else if (str::eq(t, "x86stdcall")) { + abi = ast::native_abi_x86stdcall; } else { p.fatal("unsupported abi: " + t); fail; } } expect_word(p, "mod"); |
