From 2d9ccf3ae56ce8d403b66a3cb0a560161eb9cb03 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 5 May 2011 14:34:22 -0700 Subject: [PATCH] rustc: Add Rust intrinsic support to the crate metadata reader and writer --- src/comp/front/creader.rs | 7 ++++--- 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 cdbafe5a099..a9660bf52e5 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 5f222cd43d9..ce37822d642 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'); } }