[m-rev.] for review: wrap main in exception handler
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat Jul 14 16:46:16 AEST 2001
On 13-Jul-2001, Peter Ross <peter.ross at miscrit.be> wrote:
>
> mlds_to_il.m:
> Wrap an exception handler around main. This avoids those annoying
> pop up windows, and hence allows people to use windows machines via
> ssh.
This change broke samples/hello.m, and a number of the test cases in
the tests/benchmarks directory.
The problem is that the .maxstack directive for `main' isn't correct anymore.
Fortunately in this case the fix was easy -- see below.
But in general it would be nice if you'd test your changes a bit more
before committing them.
----------
Estimated hours taken: 0.5
Branches: main
compiler/ilds.m:
Fix a bug: it was computing the `.maxstack' size for `catch' blocks
incorrectly.
Workspace: /mnt/mars/home/mars/fjh/ws2/mercury
Index: compiler/ilds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ilds.m,v
retrieving revision 1.6
diff -u -d -r1.6 ilds.m
--- compiler/ilds.m 2001/07/04 12:57:02 1.6
+++ compiler/ilds.m 2001/07/14 06:34:27
@@ -384,7 +384,9 @@
:- func get_stack_difference(ilds__instr) = int.
get_stack_difference(end_block(_, _)) = 0.
get_stack_difference(comment(_)) = 0.
-get_stack_difference(start_block(_, _)) = 0.
+get_stack_difference(start_block(scope(_), _)) = 0.
+get_stack_difference(start_block(try, _)) = 0.
+get_stack_difference(start_block(catch(_), _)) = 1.
get_stack_difference(context(_, _)) = 0.
get_stack_difference(label(_Label)) = 0.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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