<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I wonder if we need<BR>
TInt8, TInt16, TInt32, TInt64, TInt, TLong<BR>
TWord8, TWord16, TWord32, TWord64, TWord, TLongWord<BR>
<BR>
that accurately implement ints/words of the exact specified size,<BR>
with TInt/TWord/TLong/TLongWord depending on the target.<BR>
I wouldn't mind trying to remove this word "Word".<BR>
And replace it with UInt or such.<BR>
TInt, TUInt, TLong, TULong?<BR>
TSignedInt, TUnsignedInt, TSignedLong, TUnsignedLong?<BR>
TInt, TUnsignedInt, TLong, TUnsignedLong?<BR>
<BR>
TInt.Zero is just always 8 bytes.<BR>
The size is I believe meant to be fairly opaque to the user.<BR>
This is the first I've noticed it being visible, such that TInt.EQ is true for values with "quite different" behavior. I would have "thunk" (thought without much thought) that anything TInt.EQ is more equivalent than they actually are.<BR>
<BR>
<BR>
- Jay<BR><BR> <BR>
<HR id=stopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu<BR>Date: Mon, 8 Feb 2010 01:47:59 +0000<BR>CC: m3commit@elegosoft.com<BR>Subject: Re: [M3commit] CVS Update: cm3<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
hm. Bug perhaps in TWord:<BR> <BR>PROCEDURE Extract (READONLY x: Int; i, n: CARDINAL; VAR r: Int): BOOLEAN =<BR> VAR w, b: INTEGER;<BR> size := x.n * BITSIZE (IByte);<BR> BEGIN<BR> IF i + n > size THEN RETURN FALSE; END;<BR> Shift (x, -i, r);<BR><BR> <BR>and maybe:<BR> <BR> <BR>PROCEDURE Insert (READONLY x, y: Int; i, n: CARDINAL; VAR r: Int): BOOLEAN =<BR> VAR yy, yyy, yyyy: Int;<BR> size := x.n * BITSIZE (IByte);<BR> BEGIN<BR> IF i + n > size THEN RETURN FALSE; END;<BR><BR> <BR>I propose that TWord.Extract interpret all values as infinitely extended with zeros.<BR>Er, well, except that it makes me a bit scared too (esp. I'm currently without my good editor to really search/read the code).<BR>And Insert widen infinitely to fit whatever is being inserted?<BR> <BR> <BR>Will it break stuff?<BR> <BR> <BR> - Jay<BR><BR> <BR>
<HR id=ecxstopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu<BR>Date: Mon, 8 Feb 2010 01:40:46 +0000<BR>CC: m3commit@elegosoft.com<BR>Subject: Re: [M3commit] CVS Update: cm3<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
This really puzzles me, that using TInt.Zero makes it fail.<BR>I do see a subtle difference, n of TInt.Zero is always 8,<BR>but the CG.m3 code uses 4 for for 32bit.<BR> <BR> - Jay<BR> <BR>
<HR id=ecxecxstopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu<BR>Date: Mon, 8 Feb 2010 01:27:30 +0000<BR>CC: m3commit@elegosoft.com<BR>Subject: Re: [M3commit] CVS Update: cm3<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
Oddly, just using TInt.Zero apparently breaks it all.<BR>Assertion failures all over ThreadWin32.m3.<BR>I'll dig a *little*.<BR>Well, er, maybe just try your change without the TInt.Zero part?<BR> <BR> - Jay<BR> <BR>
<HR id=ecxecxecxstopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu<BR>Date: Mon, 8 Feb 2010 01:09:42 +0000<BR>CC: m3commit@elegosoft.com<BR>Subject: Re: [M3commit] CVS Update: cm3<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
Same thing on Linux/x86.<BR>i.e. it breaks everything.<BR> <BR> - Jay<BR><BR> <BR>
<HR id=ecxecxecxecxstopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu<BR>Date: Mon, 8 Feb 2010 01:05:58 +0000<BR>CC: m3commit@elegosoft.com<BR>Subject: Re: [M3commit] CVS Update: cm3<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
I'll look a bit.<BR>I'll double check the starting point, and try on Linux. This was on NT386, which has another problem initializing things larger than integer.<BR> <BR> - Jay<BR><BR> <BR>
<HR id=ecxecxecxecxecxstopSpelling>
Subject: Re: [M3commit] CVS Update: cm3<BR>From: hosking@cs.purdue.edu<BR>Date: Sun, 7 Feb 2010 19:57:17 -0500<BR>CC: m3commit@elegosoft.com<BR>To: jay.krell@cornell.edu<BR><BR><BASE>Rats! I'll look into it.
<DIV><BR>
<DIV><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span>
<DIV><FONT class=ecxecxecxecxecxecxApple-style-span color=#0000ff><FONT class=ecxecxecxecxecxecxApple-style-span face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=ecxecxecxecxecxecxApple-style-span>Antony Hosking</SPAN></SPAN></FONT></FONT><FONT class=ecxecxecxecxecxecxApple-style-span face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'" class=ecxecxecxecxecxecxApple-style-span><SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN>|<SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Gill Sans'" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'" class=ecxecxecxecxecxecxApple-style-span>Associate Professor</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Gill Sans'" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'" class=ecxecxecxecxecxecxApple-style-span> | Computer Science | Purdue University</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=ecxecxecxecxecxecxApple-style-span face=GillSans-Light><SPAN style="FONT-FAMILY: GillSans-Light" class=ecxecxecxecxecxecxApple-style-span>305 N. University Street | West Lafayette | IN 47907 | USA</SPAN></FONT></DIV>
<DIV><FONT class=ecxecxecxecxecxecxApple-style-span color=#0000ff face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=ecxecxecxecxecxecxApple-style-span>Office</SPAN></SPAN></FONT><FONT class=ecxecxecxecxecxecxApple-style-span face=GillSans-Light><SPAN style="FONT-FAMILY: GillSans-Light" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: GillSans-Light" class=ecxecxecxecxecxecxApple-style-span> +1 765 494 6001 |<SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN></SPAN></SPAN></FONT><FONT class=ecxecxecxecxecxecxApple-style-span color=#0000ff face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=ecxecxecxecxecxecxApple-style-span>Mobile</SPAN></SPAN></FONT><FONT class=ecxecxecxecxecxecxApple-style-span face=GillSans-Light><SPAN style="FONT-FAMILY: GillSans-Light" class=ecxecxecxecxecxecxApple-style-span><SPAN style="FONT-FAMILY: GillSans-Light" class=ecxecxecxecxecxecxApple-style-span><SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN>+1 765 427 5484</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=ecxecxecxecxecxecxApple-style-span face=GillSans-Light><BR class=ecxecxecxecxecxecxkhtml-block-placeholder></FONT></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN><BR class=ecxecxecxecxecxecxApple-interchange-newline></SPAN></DIV></SPAN></SPAN><BR class=ecxecxecxecxecxecxApple-interchange-newline></DIV><BR>
<DIV>
<DIV>On 7 Feb 2010, at 19:49, Jay K wrote:</DIV><BR class=ecxecxecxecxecxecxApple-interchange-newline>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px" class=ecxecxecxecxecxecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxecxecxecxecxecxhmmessage>new source -> compiling RTHooks.m3<BR>"..\src\runtime\common\RTHooks.m3", line 18: ** INTERNAL CG ERROR *** unable to<BR>convert or initialize bit field value?? n_bytes=4 size=32<BR>"..\src\runtime\common\RTHooks.m3", line 18: ** INTERNAL CG ERROR *** unable to<BR>convert or initialize bit field value?? n_bytes=4 size=32<BR>"..\src\runtime\common\RTHooks.m3", line 18: ** INTERNAL CG ERROR *** unable to<BR>convert or initialize bit field value?? n_bytes=4 size=32<BR>"..\src\runtime\common\RTHooks.m3", line 18: ** INTERNAL CG ERROR *** unable to<BR>convert or initialize bit field value?? n_bytes=4 size=32<BR>"..\src\runtime\common\RTHooks.m3", line 18: ** INTERNAL CG ERROR *** unable to<BR>convert or initialize bit field value?? n_bytes=4 size=32<BR>"..\src\runtime\common\RTHooks.m3", line 18: ** INTERNAL CG ERROR *** unable to<BR><BR><BR> - Jay<BR><BR> <BR>> Date: Mon, 8 Feb 2010 01:18:13 +0000<BR>> To:<SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><A href="mailto:m3commit@elegosoft.com">m3commit@elegosoft.com</A><BR>> From:<SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><A href="mailto:hosking@elego.de">hosking@elego.de</A><BR>> Subject: [M3commit] CVS Update: cm3<BR>><SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><BR>> CVSROOT: /usr/cvs<BR>> Changes by: hosking@birch. 10/02/08 01:18:13<BR>><SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><BR>> Modified files:<BR>> cm3/m3-sys/m3front/src/misc/: CG.m3<SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><BR>><SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><BR>> Log message:<BR>> Fix bug for constant initialization of LONGINT static data:<BR>><SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><BR>> MODULE Main;<BR>> VAR a := 1L;<BR>> BEGIN<BR>> END Main.<BR>><SPAN class=ecxecxecxecxecxecxApple-converted-space> </SPAN><BR></DIV></SPAN></BLOCKQUOTE></DIV><BR></DIV> </body>
</html>