diff options
| author | Patrick Walton <[email protected]> | 2011-05-05 14:34:22 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-05-05 14:35:18 -0700 |
| commit | 2d9ccf3ae56ce8d403b66a3cb0a560161eb9cb03 (patch) | |
| tree | dc6e88b6705d7395fa2dd1ef5722dc48af4f7567 | |
| parent | Attempt to fix fs.dirname harder. (diff) | |
| download | rust-2d9ccf3ae56ce8d403b66a3cb0a560161eb9cb03.tar.xz rust-2d9ccf3ae56ce8d403b66a3cb0a560161eb9cb03.zip | |
rustc: Add Rust intrinsic support to the crate metadata reader and writer
| -rw-r--r-- | src/comp/front/creader.rs | 7 | ||||
| -rw-r--r-- | src/comp/middle/metadata.rs | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/comp/front/creader.rs b/src/comp/front/creader.rs index cdbafe5a..a9660bf5 100644 --- a/src/comp/front/creader.rs +++ b/src/comp/front/creader.rs @@ -141,9 +141,10 @@ fn parse_ty(@pstate st, str_def sd) -> ty.t { case ('N') { auto abi; alt (next(st) as char) { - case ('r') {abi = ast.native_abi_rust;} - case ('c') {abi = ast.native_abi_cdecl;} - case ('l') {abi = ast.native_abi_llvm;} + case ('r') { abi = ast.native_abi_rust; } + case ('i') { abi = ast.native_abi_rust_intrinsic; } + case ('c') { abi = ast.native_abi_cdecl; } + case ('l') { abi = ast.native_abi_llvm; } } auto func = parse_ty_fn(st, sd); ret ty.mk_native_fn(st.tcx,abi,func._0,func._1); diff --git a/src/comp/middle/metadata.rs b/src/comp/middle/metadata.rs index 5f222cd4..ce37822d 100644 --- a/src/comp/middle/metadata.rs +++ b/src/comp/middle/metadata.rs @@ -190,6 +190,9 @@ mod Encode { w.write_char('N'); alt (abi) { case (ast.native_abi_rust) { w.write_char('r'); } + case (ast.native_abi_rust_intrinsic) { + w.write_char('i'); + } case (ast.native_abi_cdecl) { w.write_char('c'); } case (ast.native_abi_llvm) { w.write_char('l'); } } |