<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Good question. I can look into that. But notice that it will *definitely* be different. But maybe not<br>in a critical way -- they use trampolines.<br><br> - Jay<br><br><hr id="stopSpelling">From: hosking@cs.purdue.edu<br>Date: Fri, 19 Nov 2010 09:39:00 -0500<br>To: jay.krell@cornell.edu<br>CC: m3devel@elegosoft.com<br>Subject: Re: [M3devel] nested functions vs. setjmp vs. inlining<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">This is a shame.<div>1. gcc supports nested functions.</div><div>2. gcc supports inlining.</div><div>3. gcc should work with both nested functions and inlining.</div><div><br></div><div>If gcc can handle all of this for C but not M3 then we must be doing something wrong.</div><div>Can we see how similar code fragments behave when expressed in C?<br>
<br><div><div>On Nov 19, 2010, at 4:12 AM, Jay K wrote:</div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Tahoma;">parse.c:<br>/* don't inline anything, to fix:<br>elego/m3msh/src/M3MiniShell.m3: In function 'M3MiniShell__ProcessParameters':<br>elego/m3msh/src/M3MiniShell.m3:608:0: error: variable '_nonlocal_var_rec.188' might be clobbered by 'longjmp' or 'vfork'<br>*/<br><br><br>I'm very welling to make an extra pass through the IR, and only turn off inlining if I see both nested functions and calls to setjmp/longjmp/fork/vfork.<br>Oh, and a use of a static link.<br>I wouldn't check for their intersection.<br>Most modules wouldn't have any nested functions. And then sometimes nested functions are only nested to limit their use.<br><br>I tried selectively disabling inlining. No luck.<br> I might try again, but don't plan on success there.<br><br><br>OK?<br><br><br>Fixing this "properly" I'm not keen on doing right now either, as I already spent a while trying to figure out how and failed.<br>(not to mention my keenness for evading this issue entirely, such as by using C or having the frontend transform away nested functions...)<br><br><br> - Jay<br></div></span></blockquote></div><br></div> </body>
</html>