<div dir="ltr">Hi,<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Just to clarify, I guess you mean you provide a native machine code compiler, so a separate C compiler step is not required?</div><div><br></div><div>With
 the right CPU model, would Lowtalk facilitate generating native 
microcontroller machine code from Smalltalk code, for devices like...</div><div>   <a href="https://www.adafruit.com/product/3403" target="_blank">https://www.adafruit.com/<wbr>product/3403</a></div><div>   <a href="https://www.adafruit.com/product/3501" target="_blank">https://www.adafruit.com/<wbr>product/3501</a></div><div>which might be interesting to mix with Dennis' work with microcontrollers...</div><div>  <a href="http://forum.world.st/Ann-PharoThings-a-live-programming-IoT-platform-based-on-Pharo-td4964090.html#a4964103" target="_blank">http://forum.world.st/Ann-<wbr>PharoThings-a-live-<wbr>programming-IoT-platform-<wbr>based-on-Pharo-td4964090.html#<wbr>a4964103</a></div></blockquote><div>This requires making a backend for ARM. It should be easier to implement than the current backend for x86(-64).</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div><div><div>How do you rate generating LLVM intermediate 
representation (IR) ?  How otherwise do low level optimisations come 
into your concept? <br></div><div>I couple of articles I found interesting...</div><div>  <a href="https://idea.popcount.org/2013-07-24-ir-is-better-than-assembly/" target="_blank">https://idea.popcount.org/<wbr>2013-07-24-ir-is-better-than-<wbr>assembly/</a><br></div><div>  <a href="https://stackoverflow.com/questions/15150116/translation-to-llvm-ir-directly-or-via-c-clang" target="_blank">https://stackoverflow.com/<wbr>questions/15150116/<wbr>translation-to-llvm-ir-<wbr>directly-or-via-c-clang</a><br></div></div><div><br></div>cheers -ben</div></blockquote><div>My intermediate representation is based on the one used by LLVM. The problem of actually using LLVM, is that it is necessary to extend LLVM with custom calling conventions to be able to support two smalltalk features: thisContext (via the stack to context mapping), and non-local returns. By using a custom calling convention, it is possible to support these features in the same way that is made by Cog. However, adding the calling convention requires writing code in C++ to extend LLVM.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail_extra">P.S. @Eliot, et al...</div><div class="gmail_extra">I
 found it interesting that several alternate calling conventions are 
implemented for LLVM.  Could such a thing be useful to support Smalltalk
 better, and be a useful research topic for someone?  </div><div class="gmail_extra">  <a href="http://clang-developers.42468.n3.nabble.com/RFC-Implementing-the-Swift-calling-convention-in-LLVM-and-Clang-td4050248.html" target="_blank">http://clang-developers.42468.<wbr>n3.nabble.com/RFC-<wbr>Implementing-the-Swift-<wbr>calling-convention-in-LLVM-<wbr>and-Clang-td4050248.html</a><br></div><div class="gmail_extra">  <a href="http://lists.llvm.org/pipermail/llvm-dev/2016-June/101338.html" target="_blank">http://lists.llvm.org/<wbr>pipermail/llvm-dev/2016-June/<wbr>101338.html</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">(although maybe a WebAssembly target might be a better research topic.)</div></div></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>We are  studying WebAssembly and have in the hands a Cuis fork with all necessary for have Smalltalk both sides of Web 2.0.<div>This .image for server side and Amber and Morphic.js on the client side.</div><div>So
 I glad to share experiments and feedback of my students and me on 
Smalltalk, WebAssembly and ways on made Web 2.0 nice and fast.</div><div><br></div><div>Edgar</div><div>@morplenauta</div><div><br></div></div></blockquote><div><br></div><div>It seems that everybody is interested on WebAssembly, and having Smalltalk on the Web. I checked the WebAssembly spec and I see that it is not possible to support Smalltalk completely in an efficient way. There is no way for accessing the stack to implement thisContext. There is also no way for doing setjmp/longjmp directly on webassembly to implement non-local returns and Smalltalk exceptions. By doing a goggle search, it seems that the behavior of setjmp/longjmp  is simulated by wrapping a method in javascript code, and using javascript exception handling for doing the longjmp.</div><div><br></div><div>Best regards,</div><div>Ronie<br></div><div> <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-17 23:53 GMT+02:00 Edgar De Cleene <span dir="ltr"><<a href="mailto:edgardec2005@gmail.com" target="_blank">edgardec2005@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div style="word-wrap:break-word;line-break:after-white-space">We are  studying WebAssembly and have in the hands a Cuis fork with all necessary for have Smalltalk both sides of Web 2.0.<div>This .image for server side and Amber and Morphic.js on the client side.</div><div>So I glad to share experiments and feedback of my students and me on Smalltalk, WebAssembly and ways on made Web 2.0 nice and fast.</div><div><br></div><div>Edgar</div><div>@morplenauta</div><div><br></div><div><br><div><br><blockquote type="cite"><div>On 17 Sep 2017, at 11:44, Ben Coman <<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>> wrote:</div><br class="m_7785250962401292310Apple-interchange-newline"><div><span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">(although maybe a WebAssembly target might be a better research topic.)</span></div></blockquote></div><br></div></div><br></blockquote></div><br></div>