rustc: Add Rust intrinsic support to the crate metadata reader and writer

This commit is contained in:
Patrick Walton 2011-05-05 14:34:22 -07:00
parent 50ac893b00
commit 2d9ccf3ae5
2 changed files with 7 additions and 3 deletions

View file

@ -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);

View file

@ -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'); }
}