[m-rev.] for review: will_not_throw_exception foreign proc attribute

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Dec 3 19:09:45 AEDT 2004


On 03-Dec-2004, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:

Zoltan.

> +:- type may_throw_exception
> +	--->	will_not_throw_exception
> +			% The foreign code makes calls back to Mercury
> +			% but none of them will result in an exception
> +			% being thrown.

Why is the first part of the comment relevant? Users of this attribute
should use it only to test for exceptions, not for calls to Mercury.


> +	;	depends_on_mercury_calls.
> +			% Whether or not the foreign code throws an
> +			% exception depend on whether it makes alls back
> +			% to Mercury (all foreign procs that don't make
> +			% calls back to Mercury cannot cause an exception
> +			% to be thrown).

They may, since throw itself may one day be implemented as a foreign proc.
However, that can be handled with a comment that any such predicate should
have a fake may_call_mercury annotation.

> +MCFLAGS-promise_will_not_thorw=--analyse-exceptions

That is misspelt.

The rest looks OK.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list