<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>On 8 Jan 2009, at 14:50, Jay wrote:</div></span></span></span></span></span></span></span></span></div></span></div><div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> > I would hate for the compiler to inject a type for<span class="Apple-converted-space"> </span><br> > something like jmpbuf which is an *internal* detail<span class="Apple-converted-space"> </span><br> > of the exceptions implementation rather than a language-defined type<span class="Apple-converted-space"> </span><br><br>The compiler and runtime are unavoidably somewhat interdependent on each other.<br> You know, that the compiler generates calls to RTHooks.i3.</div></span></blockquote><div><br></div><div>Yes, of course they are, but we want to keep the interface between them as narrow as possible.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">If you want the ability to retarget the compiler to a slightly different runtime, then the runtime should<br>inform the compiler, and not the other way around, but they remain interdepenent.</div></span></blockquote><div><br></div><div>Not sure how you would achieve that.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> There are similar issues here probably regarding RT0.i3 and RTBuiltin.c.</div></span></blockquote><div><br></div><div>Here be dragons...</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">I guess you don't want the compiler to clutter the global type/modulespace, as a communications channel, to share information.</div></span></blockquote><div><br></div><div>Precisely.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">But I think language and library are somewhat murky.</div></span></blockquote><div><br></div><div>True. Java has a simple core language, but lots of powerful libraries.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Is INTERFACE Word in the language or the library?<br>Is LOCK language or library?<br>These are both in-between.<br>INTERFACE Word is in the "standard library", and I think it is only in the compiler as an implementation specific optimization. LOCK is necessarily in both.<br> <br> - Jay<br><br><br><hr id="stopSpelling"><br>From:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Subject: RE: [M3devel] duplication between compiler, m3makefile, and libraries; cross build easing<br>Date: Thu, 8 Jan 2009 03:44:40 +0000<br><br>Is table-based exception handling close to being feasible on many targets?<br>I figured it was mostly a lost cause but wouldn't mind being wrong.<br>Perhaps the evolution of gcc has made it much easier these days?<br>You know, what with Ada and C++ exception handling support being whatever it is?<br> <br>Imho target-specific information should be<br> kept to a minimum<br> kept to a minimum number of places/files<span class="Apple-converted-space"> </span><br> perhaps kept to a minimum distance from other target-specific information (places/files)<br> and like other information, not duplicated<br> <br> <br>If jumpbuf wasn't used by the compiler, then my position weakens.<br>However currently the size and alignment of jumpbuf is duplicated.<br>And endianness is duplicated. And wordsize is duplicated.<br>I wouldn't mind if jumpbuf was only, say, Csetjmp.i3, and wordsize was only in the config file.<br>But duplication bugs me.<br> <br> > why context for exception handling vs. setjmp/longjmp.<br> <br>Just my ignorant questioning. If setjmp/longjmp suffice, ok.<br>They are just similar and perhaps if switch one, switch the other.<br>I realize that longjmp can only officially be called once per setjmp, and that contexts are "reusable" (can be swapped an arbitrary number of times).<br> <br> - Jay<br><br><br><br><hr id="EC_stopSpelling"><br><br>From:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>Date: Thu, 8 Jan 2009 13:46:58 +1100<br>CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Subject: Re: [M3devel] duplication between compiler, m3makefile, and libraries; cross build easing<br><br>Why would the compiler know anything about jmpbuf in general? (Yes, I know it is used for exception handling). I would prefer that we had table-based exception handling as on SOLgnu for all targets, but that depends on support for stack unwinding for each target. I would hate for the compiler to inject a type for something like jmpbuf which is an *internal* detail of the exceptions implementation rather than a language-defined type. Also, there are advantages in the current approach, which decouples communication of information amongst the tool-chain components.<br><br><div><br></div><div>Why would you use setcontext, getcontext, etc. for exception handling. setjmp/longjmp are perfectly adequate to the task. setcontext/getcontext are intended for user-thread switching, etc.</div><div><br></div><div>I think you'll find there already is a compiler mode that does not invoke cm3cg.<br><div><br><div><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><div style="word-wrap: break-word; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><div><font class="EC_EC_Apple-style-span" color="#0000ff"><font class="EC_EC_Apple-style-span" face="Gill Sans"><span class="EC_EC_Apple-style-span" style="color: rgb(0, 0, 255); font-family: 'Gill Sans'; "><span class="EC_EC_Apple-style-span" style="color: rgb(0, 0, 255); font-family: 'Gill Sans'; ">Antony Hosking</span></span></font></font><font class="EC_EC_Apple-style-span" face="Gill Sans"><span class="EC_EC_Apple-style-span" style="font-family: 'Gill Sans'; "><span class="EC_EC_Apple-style-span" style="font-family: 'Gill Sans'; "><span class="Apple-converted-space"> </span>|<span class="Apple-converted-space"> </span></span></span><span class="EC_EC_Apple-style-span" style="font-family: 'Gill Sans'; "><span class="EC_EC_Apple-style-span" style="font-family: 'Gill Sans'; ">Associate Professor</span></span><span class="EC_EC_Apple-style-span" style="font-family: 'Gill Sans'; "><span class="EC_EC_Apple-style-span" style="font-family: 'Gill Sans'; "> | Computer Science | Purdue University</span></span></font></div><div><font class="EC_EC_Apple-style-span" face="GillSans-Light"><span class="EC_EC_Apple-style-span" style="font-family: GillSans-Light; ">305 N. University Street | West Lafayette | IN 47907 | USA</span></font></div><div><font class="EC_EC_Apple-style-span" face="Gill Sans" color="#0000ff"><span class="EC_EC_Apple-style-span" style="color: rgb(0, 0, 255); font-family: 'Gill Sans'; "><span class="EC_EC_Apple-style-span" style="color: rgb(0, 0, 255); font-family: 'Gill Sans'; ">Office</span></span></font><font class="EC_EC_Apple-style-span" face="GillSans-Light"><span class="EC_EC_Apple-style-span" style="font-family: GillSans-Light; "><span class="EC_EC_Apple-style-span" style="font-family: GillSans-Light; "> +1 765 494 6001 |<span class="Apple-converted-space"> </span></span></span></font><font class="EC_EC_Apple-style-span" face="Gill Sans" color="#0000ff"><span class="EC_EC_Apple-style-span" style="color: rgb(0, 0, 255); font-family: 'Gill Sans'; "><span class="EC_EC_Apple-style-span" style="color: rgb(0, 0, 255); font-family: 'Gill Sans'; ">Mobile</span></span></font><font class="EC_EC_Apple-style-span" face="GillSans-Light"><span class="EC_EC_Apple-style-span" style="font-family: GillSans-Light; "><span class="EC_EC_Apple-style-span" style="font-family: GillSans-Light; "><span class="Apple-converted-space"> </span>+1 765 427 5484</span></span></font></div><div><font class="EC_EC_Apple-style-span" face="GillSans-Light"><br class="EC_EC_khtml-block-placeholder"></font></div></span></span></span></span></span></span></span><br class="EC_EC_Apple-interchange-newline"></span></div></span></div><br><div><div>On 8 Jan 2009, at 00:36, Jay wrote:</div><br class="EC_EC_Apple-interchange-newline"><blockquote><span class="EC_EC_Apple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><div class="EC_EC_hmmessage" style="font-size: 10pt; font-family: Verdana; ">duplication between compiler, m3makefile, and libraries.<br> <br><br>I propose that there should be reduced or no duplication<br>among the compiler, m3makefile, and libraries.<br> <br><br>I propose that the compiler reveal (some) of what it knows.<br> <br><br>For example, m3makefile shall not specify WORD_SIZE.<br>The compiler should.<br>Granted, this buys very little.<br> <br><br>m3makefile shall not contain tables identifiying endianness.<br>Compiler shall defined TARGET_ENDIAN to "BIG" or "LITTLE",<br>or perhaps "big" or "little".<br>Granted, this buys very little.<br> <br><br>Libraries shall not define jumpbuf, in a sense.<br>Compile shall define, something like:<br> TARGET_JUMPBUF_ELEMENT = "INTEGER" or "LONGINT".<br> aka jmpbuf alignment.<br> TARGET_JUMPBUF_SIZE = a decimal integer.<br>Leaving library to say:<br> TYPE jmpbuf = ARRAY [1..size] OF element<br>which m3makefile shall produce.<br> <br><br>or perhaps even compiler shall inject the type itself,<br>as it injects a few things like INTERFACE Word functions.<br> <br><br>or compiler shall define TARGET_JUMPBUF_ALIGN = 32 or 64,<br>and TARGET_JUMPBUF_SIZE in bytes<br>leaving m3makefile to map 32 to Ctypes.int and 64 to LONGINT itself.<br><br> <br>The jumpbuf size/align bothers me more than word size and endianness.<br>Word size and endianness are more widely known to humans I think.<br>Endianness and word size are usually fairly obvious, though<br>not 100%. I didn't know the endianness of e.g. 88k, vax, and the historically<br>terse names don't make it obvious.<br><br> <br>However, let me not confuse "jumpbuf" with "Thread.State" or such.<br>Assume user threads stops using setjmp/longjmp and modify<br>or generalize proposal accordingly.<br><br>Wonder if exception handling should use set/get/make/swapcontext also??<br>Assume jumpbuf might remain on some platforms?<br><br> ?<br><br>As well, one should be able to specify m3config on the command line.<br>One should be able to specify target on the command line.<br>Compiler shall take specified target and search /somehow/ for the right config file.<br>Perhaps in path to cm3\..\config\target.<br>Don't probe like crazy -- not like I have it coded in Quake currently.<br>That really bites when there is more than one, and you edit the wrong one.<br><br>Probably something like,<br> probe for path to cm3\..\config\target.<br><br>but if defined $CM3_CONFIG_DIRECTORY, search instead $CM3_CONFIG_DIRECTORY\target.<br>however this is perhaps colon or semicolon delimited, so maybe CM3_CONFIG_PATH.<br>(In particular, I have nearly all my config files in m3-sys/cminstall/src/config-no-install,<br>except NT386, which I'd really like to move, but will probably break something and<br>doesn't seem important).<br><br>Reasonable ideas?<br><br> <br>Personally what I do is my Python scripts accept a target name anywhere on the<br>command line, and if present, they set $M3CONFIG.<br>So I have what I want via python already.<br>You know, kind of a successful (imho) prototype, that should perhaps be elevated<br>into the "real" stuff?<br> <br><br>You know, make it easier and easier to contruct cross-capable installations,<br>where switching targets is changing environment variables and/or command lines,<br>and not editing/copying files.<br><br> <br>If there isn't already, there should be a mode that doesn't run cm3cg.<br>And possibly can still ship.<br>That way /any/ system can do a bunch of cross-build "checking".<br>And the file system layout for creating a "boot" archive becomes<br>about the same as the layout of a "real" system.<br> Not like what I use -- I use one flat directory, since Modula-3<br> requires that every..basically ever .i3, .m3, .o file have a unique name.<br> (.i3 and .m3 can clash with each other, once each, that's it).<br><br> - Jay<br><br><br></div></span></blockquote></div><br></div></div></div></span><br class="Apple-interchange-newline"></blockquote></div><br></body></html>