[Vm-dev] Re: VM inconsistency detected for reporting error code for numbered primitives

Igor Stasenko siguctua at gmail.com
Fri Mar 16 18:13:31 UTC 2012


here the bytecode of corresponding methods:
<primitive: 3 error: code>
13 <81 41> storeIntoTemp: 1
15 <11> pushTemp: 1
16 <7C> returnTop

<primitive: 'qweqw' error: code>
17 <81 41> storeIntoTemp: 1
19 <11> pushTemp: 1
20 <7C> returnTop

apparently, the ball is on VM side :)

On 16 March 2012 19:11, Igor Stasenko <siguctua at gmail.com> wrote:
> SmallInteger>>++ aNumber
>        "Primitive. Add the receiver to the argument and answer with the result
>        if it is a SmallInteger. Fail if the argument or the result is not a
>        SmallInteger  Essential  No Lookup. See Object documentation whatIsAPrimitive."
>
>        <primitive: 1 error: code >
>        ^  code
>
> 11 ++ 'ww'  => nil
>
> (i tried different numbered primitives, and it seems like all of them
> not using error codes, it always returns nil)
>
> Named prims, however working ok:
>
> SmallInteger>>+++ aNumber
>        "Primitive. Add the receiver to the argument and answer with the result
>        if it is a SmallInteger. Fail if the argument or the result is not a
>        SmallInteger  Essential  No Lookup. See Object documentation whatIsAPrimitive."
>
>        <primitive: 'qweqw' error: code >
>        ^  code
>
> 11 +++ 'ww'  => #'not found'
>
>
>  'CoInterpreter VMMaker.oscog-eem.152 uuid:
> d39d62b0-45ca-4621-8f67-e3981bbe1875 Mar  3 2012,
> StackToRegisterMappingCogit VMMaker.oscog-eem.148 uuid:
> bb53aa60-4173-48ed-874b-dc0ff5a48992 Mar  3 2012, r2538
> http://www.squeakvm.org/svn/squeak/branches/Cog'
>
> --
> Best regards,
> Igor Stasenko.



-- 
Best regards,
Igor Stasenko.


More information about the Vm-dev mailing list