<p></p>
<p dir="auto">As reported by Marcel on Squeak-dev, this snippet:</p>
<pre><code>Compiler evaluate: (String with: $$ with: (Character value: 16r8000)).
</code></pre>
<p dir="auto">will return a Character with a negative value (-32768).</p>
<p dir="auto">This is because character literal in the range 16r100-16rFFFF are encoded with an extended B bytecode, and the extended B is interpreted as signed value.</p>
<p dir="auto">I suggested</p>
<ul dir="auto">
<li>a workaround : using <code>(extB bitAnd: 16rFF) << 8</code> to reconstruct an unsigned Character value</li>
<li>a fix: using extA instead of extB so as to have it interpreted unsigned</li>
</ul>
<p dir="auto">See <a href="https://source.squeak.org/VMMakerInbox/VMMaker.oscog-nice.3174.diff" rel="nofollow">https://source.squeak.org/VMMakerInbox/VMMaker.oscog-nice.3174.diff</a> for the former solution.</p>
<p dir="auto">The later solution require more changes and a careful recompilation of CompiledMethods at image side.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/618">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEWYZN5ZCKCIBN5R2PBLU7ECLRANCNFSM5QKT7R5A">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AIJPEW4CK7CQIQL4VXFJVILU7ECLRA5CNFSM5QKT7R5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RLHL6JQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><OpenSmalltalk/opensmalltalk-vm/issues/618</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/618",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/618",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>