<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Hi Eliot.<br><br>Thank you. I have to switch gears for a couple of days to make some $$. I will study this in detail later this week.<br><br><br>Cordially,<br><br>tty<br><div id="1"><br>---- On Tue, 22 Jul 2014 08:59:12 -0700 <b>Eliot Miranda &lt;eliot.miranda@gmail.com&gt;</b> wrote ---- <br></div><br><blockquote style="border-left: 1px solid #0000FF; padding-left: 6px; margin:0 0 0 5px"> <div dir="ltr">Hi Timothy,<br><div><br><br><div>On Sun, Jul 20, 2014 at 12:40 PM, gettimothy <span dir="ltr">&lt;<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>&gt;</span> wrote:<br> <blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">&nbsp;<br><u></u><div><div style="font-size:10pt;font-family:verdana,arial,helvetica,sans-serif"> <div>Hi Eliot.<br></div><div><br></div><div>I was able to get the code to compile by modifiying the function declarations in cogit.c and gcc3x-interp.c</div><div><br></div><div>Apologies in advance if my terms are not exact--I am a bit tired and my brain is duller than usual.</div> <div><br></div><div>Taking the first compile error as representative,</div><div><br><blockquote style="border:1px solid rgb(204,204,204);padding:7px;background-color:rgb(245,245,245)"><div>&nbsp;<br>/home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:1820:1: error: conflicting types for 'abstractRegisterForConcreteRegister'<br>  abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)<br> ^<br>/home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:384:14: note: previous declaration of 'abstractRegisterForConcreteRegister' was here<br>  static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) NoDbgRegParms;</div></blockquote><br></div><div>&nbsp;the problem was the "NoDbgRegParms" tacked on to the end of the function declaration at line 384 and not being there on the function implementation at 1820--that error happened for all the declarations.</div> </div></div></blockquote><div><br></div><div>Read the commit comment for r2922:</div><div><br></div><div><div>Slang:</div><div>In non-production VMs add an attribute to disable register parameters (at least</div><div>for GCC-compliant compilers), allowing all static functions to be called from</div> <div>gdb even in the -O1 assert VMs.</div></div><div><br></div><div>These defines, which precede the external declaration of e.g. abstractRegisterForConcreteRegister:</div><div><br></div><div>#if !PRODUCTION &amp;&amp; defined(__GNUC__) &amp;&amp; !defined(NoDbgRegParms)</div> <div># define NoDbgRegParms __attribute__ ((regparm (0)))</div><div>#endif</div><div><br></div><div>#if !defined(NoDbgRegParms)</div><div># define NoDbgRegParms /*empty*/</div><div>#endif</div><div><br></div><div>should result in&nbsp;</div> <div><br></div><div>static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)&nbsp;__attribute__ ((regparm (0)));</div><div>...</div><div>static sqInt</div><div> abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)</div><div>{</div><div>...</div><div><br></div><div><br></div><div>or</div><div><br><br></div><div> static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg);</div><div>...</div><div>static sqInt</div><div>abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)</div> <div>{</div><div>...</div><div><br></div><div>The first is legal input to gcc. &nbsp;The second is legal C.</div><div>&nbsp;</div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <div><div style="font-size:10pt;font-family:verdana,arial,helvetica,sans-serif"><div>you can see them here:<br></div><div><br></div><div><br><blockquote style="border:1px solid rgb(204,204,204);padding:7px;background-color:rgb(245,245,245)"> <div><a href="http://www.squeakvm.org/svn/squeak/branches/Cog/src/vm/cogit.c" target="_blank">http://www.squeakvm.org/svn/squeak/branches/Cog/src/vm/cogit.c</a></div></blockquote> </div><div><br></div><div>I noticed too that my old branch did not have those NoDbgRegParms tacked on while the live Cog trunk does.</div> <div><br></div><div><br></div><div>So, I edited both cogit.c and gcc3x-cointerp.c and got rid of those NoDbgRegParms and then torched the -DNDEBUG -DDEBUGVM flags and the thing compiled in both cmake and make and ran.<br> </div><div>(The cmake version does use the -D flags)</div><div><br></div><div><br></div><div>It will be a couple of days before I can devote a study session to your email on the assertion inlining stuff. I just wanted to bring this to your attention &nbsp;in case some 'assertion inlined code' was submitted to svn if such a thing is possible.</div> <div><br></div><div>Thanks for your pointers on the -w stuff. I have always lived in fear of gcc output, but I am starting to look at it logically;&nbsp;<em>&nbsp;</em>I am beginning to see the outlines of a forest for the trees (:</div> <div><br></div><div><br></div><div>cordially,</div><div><br></div><div>tty.</div></div></div></blockquote></div><div><br></div>-- <br>Aloha,<div>Eliot</div> </div></div> </blockquote><br></div></body></html>