<br><br><div class="gmail_quote">On Mon, Dec 13, 2010 at 11:48 PM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 <br><div style="word-wrap: break-word;"><br><div><div>On 13.12.2010, at 13:06, Mariano Martinez Peck wrote:</div><br><blockquote type="cite">sorry, it should be<br><br>SmallInteger class &gt;&gt; initialize<br>    self addInstVarName: 
&#39;Zaraza&#39;.<br><br>Notice I want to add a class variable to SmallIneteger, not instVar. <br></blockquote></div><div><br></div><div><br></div><div>This is not really a VM question. Class variables are held in a dictionary. The VM knows nothing about this.</div>
<div><br></div></div></blockquote><div><br>Ok, perfect. I asked because once I was doing some proxies for Classes and I realized that the VM automatically access the offset of the Class instVar like methodDict, etc.<br>I thought that maybe at some place the same could happen with SmallInteger class.<br>
<br>Thanks<br><br>Mariano<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div></div><div>You add class variables simply by adding them to the class pool:</div>
<div><br></div><div><span style="white-space: pre-wrap;">        </span>SmallInteger ensureClassPool.</div><div><span style="white-space: pre-wrap;">        </span>SmallInteger classPool at: #Zaraza put: 42.</div><div><br></div><div>
<div style="font-family: Helvetica; font-size: 12px;"><span style="font-family: Helvetica;">- Bert -</span></div></div><br></div><br></blockquote></div><br>