[m-dev.] samples/calculator on .NET

Tyson Dowd trd at cs.mu.OZ.AU
Sun Jul 29 19:51:48 AEST 2001


On 29-Jul-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 26-Jul-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > Simplify boxing, unboxing and casts in the IL backend.
> > 
> > compiler/mlds_to_il.m:
> > 	Previously we generated calls to out-of-line procedures written
> > 	in C++ (and then they forwarded to ones written in IL) for
> > 	various reasons mostly to do with churn of the .NET
> > 	implementation of boxing.
> > 
> > 	Now we generate much better code:
> > 		- "unbox" and "ldobj" for unboxing
> > 		- "box" for boxing
> > 		- "castclass" for casts between reference types
> > 		- nothing for casts to the same type
> > 		- for casting from mercury types to value types we
> > 		  unload from the MR_Word, and unbox the value
> > 
> > 	The last item fixes a bug where unification for characters
> > 	wasn't working as it was being passed as an MR_Word, and was not
> > 	being unpacked correctly.  This means samples/calculator.m now
> > 	works (modulo cygwin not passing EOF correctly at the moment).
> 
> What's the issue with EOF?
> 
> Cygwin handles EOF fine, AFAIK.  Note that the EOF character is control-Z
> not control-D.

I know.  It used to work for me, but now it doesn't.

> Last time I looked there was an issue with the input containing carriage returns.
> But that is a bug in our implementation of the Mercury I/O library for .NET,
> not a problem with Cygwin, I'm pretty sure.
> 
> I have been using the following patch to work around it.

This will probably work if you run the program from CMD, but it isn't
necessary for cygwin.

I can *use* calculator just fine under cygwin, I just can't quit it.

But then ctrl-c wasn't working either, so perhaps cygwin is just all
screwed up and I should reboot that machine.

Tyson.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list