Why does CompiledMethod>>#objectAt:put: work no longer on spur?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does CompiledMethod>>#objectAt:put: work no longer on spur?

Tobias Pape


In V3, this works:
| cm |
cm := (CompiledMethod newFrom: (ByteString >> #findSubstring:in:startingAt:matchTable:)).
cm objectAt: 1 put: (cm header bitAnd: 16r1FF bitInvert).

In SPUR, objectAt:put: raises a primitive Failed.

Best regards
        -Tobias
Reply | Threaded
Open this post in threaded view
|

Re: Why does CompiledMethod>>#objectAt:put: work no longer on spur?

Jakob Reschke-2
 
Note that the CompiledMethod header format has changed. That code now
erases part of the literal counter in the header, if I am not
mistaken. The primitive implementation prevents modification of the
literal count explicitly.

Best regards
Jakob

2015-06-25 11:59 GMT+02:00 Tobias Pape <[hidden email]>:

>
>
> In V3, this works:
> | cm |
> cm := (CompiledMethod newFrom: (ByteString >> #findSubstring:in:startingAt:matchTable:)).
> cm objectAt: 1 put: (cm header bitAnd: 16r1FF bitInvert).
>
> In SPUR, objectAt:put: raises a primitive Failed.
>
> Best regards
>         -Tobias
Reply | Threaded
Open this post in threaded view
|

Re: Why does CompiledMethod>>#objectAt:put: work no longer on spur?

Tobias Pape

Ok, now I see how this was actually API misuse.
I'll rephrase that.

Best regards
        -Tobias

On 25.06.2015, at 14:27, Jakob Reschke <[hidden email]> wrote:

>
> Note that the CompiledMethod header format has changed. That code now
> erases part of the literal counter in the header, if I am not
> mistaken. The primitive implementation prevents modification of the
> literal count explicitly.
>
> Best regards
> Jakob
>
> 2015-06-25 11:59 GMT+02:00 Tobias Pape <[hidden email]>:
>>
>>
>> In V3, this works:
>> | cm |
>> cm := (CompiledMethod newFrom: (ByteString >> #findSubstring:in:startingAt:matchTable:)).
>> cm objectAt: 1 put: (cm header bitAnd: 16r1FF bitInvert).
>>
>> In SPUR, objectAt:put: raises a primitive Failed.
>>
>> Best regards
>>        -Tobias