<p>Hi Nicolas,</p>
<pre><code>I apologize for not having noticed this issue until now.  As far as writing the tests so that the JIT code will be run, you can either write the test recursively, e.g.
</code></pre>
<p>fooTest<br>
self fooTest: 0</p>
<p>fooTest: n<br>
n < 2 ifTrue: [^self fooTest: n + 1]. "Make sure method is JITTED"<br>
...</p>
<p>or run the tests in a block and make sure the block is repeated, say, 10 times.  There is a secret primitive in the VM one can use to test for JITTED ness.  See Context>>X-ray in Cog-Tests.  If you need this in the KernelTests then you can add it as an extension.</p>
<p>xray<br>
"Lift the veil from a context and answer an integer describing its interior state.<br>
Used for e.g. VM tests so they can verify they're testing what they think they're testing.<br>
0 implies a vanilla heap context.<br>
Bit 0 = is or was married to a frame<br>
Bit 1 = is still married to a frame<br>
Bit 2 = frame is executing machine code<br>
Bit 3 = has machine code pc (as opposed to nil or a bytecode pc)<br>
Bit 4 = method is currently compiled to machine code"<br>
<primitive: 213><br>
^0 "Can only fail if unimplemented; therefore simply answer 0"</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/417?email_source=notifications&email_token=AIJPEW2TXLKDO4BV6TY6473QGRKLNA5CNFSM4IN66INKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5F37RY#issuecomment-525057991">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW6JV2F43YIM2DHMLADQGRKLNANCNFSM4IN66INA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AIJPEW6Q4USVRSNGD4TTOS3QGRKLNA5CNFSM4IN66INKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5F37RY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/417?email_source=notifications\u0026email_token=AIJPEW2TXLKDO4BV6TY6473QGRKLNA5CNFSM4IN66INKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5F37RY#issuecomment-525057991",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/417?email_source=notifications\u0026email_token=AIJPEW2TXLKDO4BV6TY6473QGRKLNA5CNFSM4IN66INKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5F37RY#issuecomment-525057991",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>