Revert "Add intrinsic calling convention." Isn't going to work.

This reverts commit 72c6c60d80.
This commit is contained in:
Graydon Hoare 2010-06-25 01:30:23 -07:00
parent 287d69ddac
commit 5dfe101e51
3 changed files with 2 additions and 34 deletions

View File

@ -4525,12 +4525,10 @@ let trans_visitor
[| Asm.WORD (word_ty_mach, Asm.IMM 0L) |]))
in
let trans_real_required_fn
(fnid:node_id)
(blockid:node_id) : unit =
let (ilib, conv) = Hashtbl.find cx.ctxt_required_items fnid in
let trans_required_fn (fnid:node_id) (blockid:node_id) : unit =
trans_frame_entry fnid;
emit (Il.Enter (Hashtbl.find cx.ctxt_block_fixups blockid));
let (ilib, conv) = Hashtbl.find cx.ctxt_required_items fnid in
let lib_num =
htab_search_or_add cx.ctxt_required_lib_num ilib
(fun _ -> Hashtbl.length cx.ctxt_required_lib_num)
@ -4657,12 +4655,6 @@ let trans_visitor
"Trans.required_rust_fn on unexpected form of require library"
in
let trans_required_fn (fnid:node_id) (blockid:node_id) : unit =
if fn_is_intrinsic cx fnid
then ()
else trans_real_required_fn fnid blockid
in
let trans_tag
(n:Ast.ident)
(tagid:node_id)

View File

@ -225,28 +225,6 @@ let iter_rec_slots
(Array.map snd entries) f curr_iso
;;
let intrinsic_name (cx:ctxt) (fnid:node_id) : string =
match Hashtbl.find cx.ctxt_all_item_names fnid with
Ast.NAME_base (Ast.BASE_ident id) -> id
| Ast.NAME_base (Ast.BASE_app (id, _)) -> id
| Ast.NAME_ext (_, Ast.COMP_ident id) -> id
| Ast.NAME_ext (_, Ast.COMP_app (id, _)) -> id
| _ -> err (Some fnid) "unexpected name for intrinsic fn"
;;
let fn_is_intrinsic (cx:ctxt) (fnid:node_id) : bool =
let (_, conv) = Hashtbl.find cx.ctxt_required_items fnid in
conv = CONV_intrinsic
;;
let lval_is_intrinsic (cx:ctxt) (lval:Ast.lval) : bool =
let item = lval_item cx lval in
match item.node.Ast.decl_item with
Ast.MOD_ITEM_fn _
when Hashtbl.mem cx.ctxt_required_items item.id ->
fn_is_intrinsic cx item.id
| _ -> false
;;

View File

@ -105,7 +105,6 @@ type ty_param_idx = int
type nabi_conv =
CONV_rust
| CONV_cdecl
| CONV_intrinsic
;;
type nabi = { nabi_indirect: bool;
@ -116,7 +115,6 @@ let string_to_conv (a:string) : nabi_conv option =
match a with
"cdecl" -> Some CONV_cdecl
| "rust" -> Some CONV_rust
| "intrinsic" -> Some CONV_intrinsic
| _ -> None
(* FIXME: remove this when native items go away. *)