<br><br><div><span class="gmail_quote">2006/7/19, Andreas Raab &lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
mathieu wrote:<br>&gt; I don't understand why you have to ask in 2 different way the<br>&gt; ExternalType (xType := descriptorClass atomicTypeNamed: here and xType<br>&gt; := descriptorClass structTypeNamed: sym)?<br><br>
There is no particular reason that I remember why there isn't a unified<br>interface like #typeNamed:. I think it's probably because this code<br>changed a number of times and I wrote it under pressure and never looked<br>
at it again (hey, it works just fine even if it ain't the most pretty<br>code ;-) There are reasons why you'd have to know in other places but<br>the parser really couldn't care less.<br><br>&gt; What the mssage #hasInterned:ifTrue: served for in this case?
<br><br>Only as an optimization (if there isn't an interned name for the type we<br>don't even need to check). I *vaguely* seem to remember that the<br>structure management used to be a lot more complex than it ultimately
<br>ended up being; this might also explain why I'd split the two into the<br>(cheap) atomic test and an (expensive) struct variant.</blockquote><div><br><br>ok I see. :)<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Note that the line saying &quot;self interactive ifTrue:[^nil]&quot; *is* relevant<br>however. What it does is to disable the &quot;forward declaration&quot; of<br>external types that are used in FFI calls. It is required since two
<br>ExternalTypes can refer to each other in their methods (e.g.,<br>TypeA&gt;&gt;methodA using TypeB and TypeB&gt;&gt;methodB using TypeA) and without<br>this forward declaration feature you'd never be able to load any such
<br>classes. The particular line simply disables that when you use an<br>interactive input (browser) to ensure that you do indeed declare the<br>types when you use the parser interactively.</blockquote><div><br><br>ok thanks :)
<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Cheers,<br>&nbsp;&nbsp; - Andreas<br><br></blockquote></div><br>