[m-rev.] diff: speed up breakpoints in ssdebug
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Jun 18 17:39:34 AEST 2010
Hi,
On Fri, 18 Jun 2010, Peter Wang wrote:
> @@ -2944,58 +3039,17 @@ process_short_options(Handler, Chars, Data0, Res) :-
> :- pragma inline(invent_io/1).
> :- impure pred invent_io(io::uo) is det.
>
...
> +invent_io(IO) :-
> + promise_impure (
> + private_builtin.unsafe_type_cast(0, IO0),
> + unsafe_promise_unique(IO0, IO)
> + ).
Use builtins.impure_true/0 here rather than the promise_impure
scope.
> :- pragma inline(consume_io/1).
> :- impure pred consume_io(io::di) is det.
>
> -:- pragma foreign_proc("C",
> - consume_io(_IO::di),
> - [will_not_call_mercury, thread_safe],
> -"
> -").
> -
> -:- pragma foreign_proc("Erlang",
> - consume_io(_IO::di),
> - [will_not_call_mercury, thread_safe],
> -"
> - void
> -").
> -
> -:- pragma foreign_proc("C#",
> - consume_io(_IO::di),
> - [will_not_call_mercury, thread_safe],
> -"
> -").
> -
> -:- pragma foreign_proc("Java",
> - consume_io(_IO::di),
> - [will_not_call_mercury, thread_safe],
> -"
> -").
> +consume_io(_) :-
> + promise_impure true.
Likewise here.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list