[Vm-dev] Question about pointer comparison

Eliot Miranda eliot.miranda at gmail.com
Wed Mar 25 05:32:32 UTC 2015


On Tue, Mar 24, 2015 at 8:33 PM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

>
> Hi,
>
> in checkStackIntegrity, there is a comparison of char *
>
> theSP <= frameRcvrOffset
>
> Is it OK, or should we better use oop:isLessThanOrEqualTo: ?
>

Providing that both are typed as non-void pointers to the same type this
will work.  oop:isLessThanOrEqualTo: is there for comparing sqInt values
(i.e. oops) as this is a signed type and oop:isLessThanOrEqualTo: forces an
unsigned comparison.
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150324/08cf0c73/attachment.htm


More information about the Vm-dev mailing list