<div dir="ltr"><div>I'm not sure I totally understand the post of Igor, since I was in the process of responding to Eliot, I need more time :)<br><br>Concerning single precision Float, they all can be represented losslessly in such immediate double (but Nan and Inf),<br>
so it might be better to let the VM as simple as possible like strongly suggested by Igor, and let experiments occur at image side.<br><br></div><div>Of course, I'm pretty convinced that Character MUST be in the immediate zoo, it's an obvious optimization given that so many algorithms suffers from human interaction and must deal with text at one moment or another :)<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/12 Igor Stasenko <span dir="ltr"><<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@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 dir="ltr">And let me remind you what i proposed back then:<br><br>:)<br>===========<br>About immediates zoo.
<br><br>Keep in mind, that the more immediates we have, the more complex implementation
<br>tends to be.
<br><br>I would just keep 2 data types:
<br> - integers
<br> - floats
<br><br>and third, special 'arbitrary' immediate , which seen by VM as a 60-bit value.
<br>The interpretation of this value depends on lookup in range-table,
<br>where developer specifying the correspondence between the value
<br>interval and class:
<br>[min .. max] -> class
<br><br>intervals, of course, cannot overlap.
<br>Determining a class of such immediate might be slower - O(log2(n)) at
<br>best (where n is size of range table), but from other side,
<br>how many different kinds of immediates you can fit into 60-bit value?
<br>Right, it is 2^60. Much more than proposed 8 isn't? :)
<br><br>And this extra cost can be mitigated completely by inline cache.
<br>- in case of regular reference, you must fetch the object's class and
<br>then compare it with one, stored in cache.
<br>- in case of immediate reference, you compare immediate value with min
<br>and max stored in cache fields.
<br>And if value is in range, you got a cache hit, and free to proceed.
<br>So, its just 1 extra comparison comparing to 'classic' inline cache.
<br><br>And, after thinking how inline cache is organized, now you can scratch
<br>the first my paragraph related to immediates!
<br>We really don't need to discriminate between small integers/floats/rest!!
<br>They could also be nothing more than just one of a range(s) defined in
<br>our zoo of 'special' immediates!
<br><br>So, at the end we will have just two kinds of references:
<br> - zero bit == 0 -- an object pointer
<br> - zero bit == 1 -- an immediate
<br><br>Voila!.
<br><br>We can have real zoo of immediates, and simple implementation to support them.
<br>And not saying that range-table is provided by language-side, so we're
<br>free to rearrange them at any moment.
<br><br>And of course, it doesn't means that VM could not reserve some of the
<br>ranges for own 'contracted'
<br>immediates, like Characters, and even class reference for example.
<br>Think about it :)
<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 November 2013 11:56, Henrik Johansen <span dir="ltr"><<a href="mailto:henrik.s.johansen@veloxit.no" target="_blank">henrik.s.johansen@veloxit.no</a>></span> wrote:<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"><br><div><div>On 12 Nov 2013, at 11:55 , Henrik Johansen <<a href="mailto:henrik.s.johansen@veloxit.no" target="_blank">henrik.s.johansen@veloxit.no</a>> wrote:</div>
<br><blockquote type="cite"><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">nterest ~= time and: [skills]<span> </span></span></div>
</blockquote></div><br><div>OT: I swear, missing parenthesis will be the death of me!</div></div><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Igor Stasenko.
</div>
<br></blockquote></div><br></div>