Re-classify some err / bug cases as unimpl. Ideally rustboot should never produce a backtrace.

This commit is contained in:
Graydon Hoare 2010-07-22 15:25:29 -07:00
parent 0f220ecae9
commit 1cb4a57b7b
6 changed files with 14 additions and 11 deletions

View File

@ -1011,7 +1011,7 @@ let expand_pexp_custom
[| spanner (Ast.STMT_init_str (dst_lval, r())) |]
| _ ->
raise (err ("unsupported syntax extension: " ^ nstr) ps)
raise (err ("unknown syntax extension: " ^ nstr) ps)
;;
(*

View File

@ -397,7 +397,8 @@ let trans_crate
match ty with
Ast.TY_port _
| Ast.TY_chan _
| Ast.TY_task -> bug () "unimplemented ty in Lltrans.free_ty"
| Ast.TY_task ->
Common.unimpl None "ty %a in Lltrans.free_ty" Ast.sprintf_ty ty
| _ -> trans_free llbuilder lltask ptr
in
@ -428,7 +429,8 @@ let trans_crate
| Ast.TY_iso _
| Ast.TY_fn _
| Ast.TY_obj _ ->
bug () "unimplemented ty in Lltrans.iter_ty_parts_full"
Common.unimpl None
"ty %a in Lltrans.iter_ty_parts_full" Ast.sprintf_ty ty
| _ -> ()
@ -1006,8 +1008,8 @@ let trans_crate
| Ast.TY_mach (TY_u32) | Ast.TY_mach (TY_i8)
| Ast.TY_mach (TY_i16) | Ast.TY_mach (TY_i32) ->
trans_log_int a
| _ -> Semant.bugi sem_cx head.id
"unimplemented logging type"
| _ -> Common.unimpl (Some head.id)
"logging type"
end;
trans_tail ()

View File

@ -2082,7 +2082,7 @@ let dwarf_visitor
| Ast.TY_mutable t -> mutable_type t
| Ast.TY_box t -> box_type t
| _ ->
bug () "unimplemented dwarf encoding for type %a"
unimpl None "dwarf encoding for type %a"
Ast.sprintf_ty ty
in

View File

@ -2476,7 +2476,7 @@ let trans_visitor
end
else
begin
bug () "Unsupported form of seq iter: src != dst."
unimpl None "seq iter with src != dst."
end
@ -4390,7 +4390,7 @@ let trans_visitor
| Ast.TY_mach (TY_i8) | Ast.TY_mach (TY_i16)
| Ast.TY_mach (TY_i32) ->
trans_log_int a
| _ -> bugi cx id "unimplemented logging type"
| _ -> unimpl (Some id) "logging type"
and trans_stmt_full (stmt:Ast.stmt) : unit =
@ -5043,7 +5043,8 @@ let trans_visitor
Ast.MOD_ITEM_fn f -> trans_required_fn i.id f.Ast.fn_body.id
| Ast.MOD_ITEM_mod _ -> ()
| Ast.MOD_ITEM_type _ -> ()
| _ -> bugi cx i.id "unsupported type of require: %s" (path_name())
| _ -> unimpl (Some i.id)
"unsupported type of require: %s" (path_name())
in
let visit_obj_drop_pre obj b =

View File

@ -470,7 +470,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
sprintf_ltype lty
| Some _, (LTYPE_poly _) ->
(* FIXME: auto-instantiate *)
Common.err
Common.unimpl
None
"sorry, automatic polymorphic instantiation isn't supported yet; \
please supply type parameters explicitly"

View File

@ -523,7 +523,7 @@ and walk_stmt
| Ast.STMT_note _
| Ast.STMT_alt_type _
| Ast.STMT_alt_port _ ->
bug () "unimplemented statement type in Walk.walk_stmt"
unimpl (Some s.id) "statement type in Walk.walk_stmt"
in
walk_bracketed
v.visit_stmt_pre