[M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Mon Jan 18 23:57:08 CET 2010


Maybe I'll use those.
I like a very direct mechanical translation where I can.
 
 
IF foo> bar
 => IF TInt.GT(foo, bar)
 
 
whereas I could have used:
 => IF TInt.LT(bar, foo)
 
 
and not introduced GT.
 
 
imm := 16_FFFF
 => imm := TInt.FFFF
 
 
whereas I could have used, had I known/though of it.
 Target.UInt16.max or such.
 
 
TInt vs. TWord, ok.
Their distinction is not always clear to me.
For example TWord doesn't have as many conversion functions.
 
 
I think NT386 mainly needs this stuff for efficiency not actually making it work. In particular it does constant folding.
And it checks for it hi/lo/range checks can be eliminated -- which I suspect is redundant with m3front.
 
 
I find the "n" parameter to FromInt confusing.
Most uses I see use Target.Integer.bytes so I do too, but
I'm not sure. That's a reason for forming constants,
to avoid the unclear FromInt function.
 
 
Why can't I just pass a host integer?
Is that ambiguous?
 
 
 - Jay


________________________________
> From: hosking at cs.purdue.edu
> Date: Mon, 18 Jan 2010 16:57:24 -0500
> To: jay.krell at cornell.edu
> CC: m3commit at elegosoft.com
> Subject: Re: [M3commit] CVS Update: cm3
>
>
>
> On 18 Jan 2010, at 15:52, Jay K wrote:
>
> Putting them elsewhere violates the opacity.
>
> What's wrong with Target.Int8.max/min, etc.?
>
> Also, why should unsigned values be in TInt instead of TWord?
>
> Not using this code in m3back would require duplication.
>
> Understood.
>
> m3back does recieve plenty of Target.Int parameters, and already uses TInt and maybe TWord, and TFloat.
> Hard to deal with the opaque parameters unless TInt is available...
>
> Nothing wrong with using TInt. Just use Target.x.min/max, instead of TInt consts.
>
>
> - Jay
>
> ________________________________
> From: hosking at cs.purdue.edu
> Date: Mon, 18 Jan 2010 09:11:02 -0500
> To: jkrell at elego.de
> CC: m3commit at elegosoft.com
> Subject: Re: [M3commit] CVS Update: cm3
>
> Jay,
>
> m3middle is intended for m3front as the client.
> Not m3back. If you need all these constants you should put them somewhere in m3back.
>
> Antony Hosking | Associate Professor | Computer Science | Purdue University
> 305 N. University Street | West Lafayette | IN 47907 | USA
> Office +1 765 494 6001 +1 765 494 6001 | Mobile +1 765 427 5484 +1 765 427 5484
>
>
>
>
> On 18 Jan 2010, at 14:28, Jay Krell wrote:
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 10/01/18 14:28:43
>
> Modified files:
> cm3/m3-sys/m3middle/src/: TInt.i3
>
> Log message:
> add more constants for m3back; restore more verbose form that makes it easier to see these are arrays of bytes
>
>
> 		 	   		  


More information about the M3commit mailing list