[Vm-dev] Re: A possible Cog bug (was: Re: [squeak-dev] Direct
implementation of shift/reset in Smalltalk)
Eliot Miranda
eliot.miranda at gmail.com
Tue Apr 26 21:59:00 UTC 2011
Hi Levente,
try out the latest VMs. They don't fix the bugs, but do change the
symptoms. e.g. in
c := [ 3 + PartialContinuationNotification signal ]
on: PartialContinuationNotification
do: [ :not | not continuation ].
c value: 4. "==> 7"
there is now an MNU of #+ since 3 has been replaced by a MethodContext.
So if I could ask you could dig in again, that would help.
thanks!
best,
Eliot
2011/4/25 Levente Uzonyi <leves at elte.hu>
>
> On Sun, 24 Apr 2011, Eliot Miranda wrote:
>
> Great catch Levente. I'll try and track this down asap.
>>
>
> Great, thanks. I found that primitive 148 (#shallowCopy) doesn't copy the
> pc and the temporaries (indexable fields). But there are some other
> interesting cases, where the number of indexable fields are different. To
> reproduce this issue, replace ContextPart >> #copyTo: with the following:
>
> copyTo: aContext
> "Copy self and my sender chain down to, but not including, aContext.
> End of copied chain will have nil sender."
>
> | copy |
> self == aContext ifTrue: [ ^nil ].
> copy := self copy.
> "Cog doesn't copy the pc, so copy it here."
> copy pc: pc.
> copy basicSize = self basicSize ifFalse: [ self halt ].
> sender ifNotNil: [ copy privSender: (sender copyTo: aContext) ].
> ^copy
>
> Then evaluate
>
> c := [ 3 + [ :k | k ] shift ] reset.
>
> in the workspace in the image I prepared. Two halts will appear after each
> other (proceed after the first). In the first case the size of the copy is
> smaller than the original, in the second case it's larger.
>
>
> Levente
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110426/55f6a2c3/attachment.htm
More information about the Vm-dev
mailing list