<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 26.05.2011, at 20:41, Denis Kudriashov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello<br><br><div class="gmail_quote">2011/5/26 Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br></div>
loadInternalModule: moduleName<br>
loadExternalModule: moduleName path: pathToModuleLibrary<br>
<br>
and by analogy, for FFI:<br>
<br>
loadExternalLibrary: pathToExternalLibrary<br>
<br></blockquote><div><br>Can you explain what the difference between this kind of module loading. Why not enough just loadLibrary: pathToLibrary? <br></div></div>
</blockquote></div><div><br></div><div>VM modules are not just arbitrary libraries. They provide primitive Smalltalk methods. They have special entry points like setInterpreter to be able to interface with the VM directly. Their location is known to the VM. Internal modules are already loaded. But they are still only "activated" when one of their primitive is called. They do the name-to-function-address mapping on their own rather than using the OS's name resolution mechanism.</div><div><br></div><div>Libraries loaded using FFI are just C libraries, nothing special about them. The provide C functions. Name lookup is done using OS functions. The VM can only guess about their location. Igor was proposing to take the guessing out of the VM and put it into the image.</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Lucida Grande; 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="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>