[M3devel] -check_procs?

Antony Hosking hosking at cs.purdue.edu
Fri Sep 14 17:05:37 CEST 2012


The question is: what does calling a NIL procedure do on the target?  I suggest leave it for now as is for the targets that don’t do the check.  What is the exception handling story for NT/x86?  Why does it not work to use exception on NIL call for that target?

On Sep 14, 2012, at 4:41 AM, Jay K <jay.krell at cornell.edu> wrote:

> The front end has a lot of internal options.
> 
> 
> Here is one: -check_procs.
> 
> It has one effect:
> 
> 
> PROCEDURE Gen_Call_indirect (t: Type;  cc: CallingConvention) =
>   BEGIN
>     IF Host.doProcChk THEN Check_nil (RuntimeError.BadMemoryReference); END;
> 
> 
> Does it really make sense that we use this for NT/x86 and only NT/x86?
> I kind of think we should use it never or use it always.
> Or use it on all but NT/x86 -- where the exception handling mechanism is pretty well defined and easy to program. We use it on NT/x86 only (the opposite of my suggestion).
> 
> 
> Using it always would bloat our code but trivially give us "safe" portable/consistent behavior.
> The Modula-3 code would stop right away by calling portable code.
> Instead of triggering whatever platform-specific signal/exception.
> 
> 
> I happened on this code...looking at other stuff...obvious reasons if you look around...
> 
> 
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120914/26d7e7a4/attachment-0002.html>


More information about the M3devel mailing list