Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
February 2013
- 79 participants
- 1346 messages
Re: [Pharo-project] Pharo 2 changes management
by Norbert Hartl
Am 20.02.2013 um 11:34 schrieb Esteban Lorenzano <estebanlm(a)gmail.com>:
>
> On Feb 20, 2013, at 11:25 AM, Norbert Hartl <norbert(a)hartl.name> wrote:
>
>>
>> Am 20.02.2013 um 11:17 schrieb Esteban Lorenzano <estebanlm(a)gmail.com>:
>>
>>> there is a problem with the package definition, I think (PetitXPath != Petitxpath), and new RPackage cannot detect they are the same... in fact, IMO that exposes an old PackageInfo bug, not an RPackage problem, so I think the real solution is to commit a package with a good package name.
>>
>> So, what are the rules. Does the case sensitivity also reflect in method extensions? Meaning do I need to call the extension *petitXPath or even *PetitXPath?
>
> nono, method extensions remains the same (case insensitive). What I mean is that I made a mistake when I create the PetitXPath package originally (I committed with a bad mc name)... that's the origin of your problem now (yep, once again, my fault :).
> But it shouldn't happen with other well-formed packages. And in my opinion, best way to proceed is to create a package as it should be and re-commit, because is not a MC problem, nor an RPackage problem, is a problem with that specific package.
>
Hmm, can't get it to work. Now I have problems to get the method extensions into the package. Because of the Petitxpath being written lower case I had to remove the working copy. I created a new package with the letters in proper upper-/lowercase. The changes diff looks ok now but method extensions are not be part of the package. If I write the package and look at them use the "browse" button in monticello browser I can see that they are not included in the package.
Norbert
>>
>>> Also, it does not looks like you have the lastest image... you should be seeing something like this:
>>>
>> Yeah, I made the screenshot with an older image. I retried it then with updating the image first. But seeing that the result ist the same made me send the old screenshot.
>
> fiuuuuu... I was worried :)
>
> Esteban
>
>> Norbert
>>
>>> <Screen Shot 2013-02-20 at 11.15.07 AM.png>
>>>
>>>
>>> (notice the diff morph has a bar in the middle, also two text label on top).
>>>
>>>
>>> On Feb 20, 2013, at 11:08 AM, Norbert Hartl <norbert(a)hartl.name> wrote:
>>>
>>>> I opened a fresh pharo 2 (#20559) and loaded PetitXPath. Modifying a method does not mark the package dirty in monticello browser. And If I press the "changes" button I can see
>>>>
>>>> <Bildschirmfoto 2013-02-20 um 11.00.54.png>
>>>>
>>>> That basically shows all the code that is in the package. But from my own change I cannot see anything in there.
>>>>
>>>> Norbert
>>>
>>
>
Feb. 20, 2013
Re: [Pharo-project] About condensing sources, becoming CompiledMethods and VM crashes
by Igor Stasenko
but aside of making things work,
i really wonder why become on methods makes VM crash.
we should have an easily reproducible case for study.
--
Best regards,
Igor Stasenko.
Feb. 20, 2013
[Pharo-project] Inbox in SmalltalkHub ?
by Serge Stinckwich
Dear all,
If I remember correctly, in previous version of SmalltalkHub,
there was an inbox for every project. Apparently this is not more the
case in current version ?
Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/
Feb. 20, 2013
[Pharo-project] [update 2.0] #20560
by Esteban Lorenzano
20560
-----
Issue 7535: [SPEC] ClassMethodBrowser double initialization
http://code.google.com/p/pharo/issues/detail?id=7535
Issue 7546: add failing windows NB tests as windows-only known failures
http://code.google.com/p/pharo/issues/detail?id=7546
Diff information:
http://ss3.gemstone.com/ss/Pharo20/Spec-Examples-EstebanLorenzano.18.diff
http://ss3.gemstone.com/ss/Pharo20/NativeBoost-Win32-EstebanLorenzano.35.di…
http://ss3.gemstone.com/ss/Pharo20/NativeBoost-Tests-EstebanLorenzano.50.di…
http://ss3.gemstone.com/ss/Pharo20/NativeBoost-Examples-EstebanLorenzano.16…
http://ss3.gemstone.com/ss/Pharo20/NativeBoost-Core-EstebanLorenzano.111.di…
Feb. 20, 2013
Re: [Pharo-project] About condensing sources, becoming CompiledMethods and VM crashes
by Marcus Denker
On Feb 20, 2013, at 1:41 PM, Guillermo Polito <guillermopolito(a)gmail.com> wrote:
>
>
> On Wed, Feb 20, 2013 at 1:35 PM, Marcus Denker <marcus.denker(a)inria.fr> wrote:
> Hi,
>
> Why do we create new methods at all? *every* existing, installed
> method has enough space
> at the end for any kind of trailer.
>
> So can't we just write the source in the file, get the offset, then
> put that offset in the *existing*
> method?
>
> But isn't that circumstantial? I mean, today we have source pointers inside all compiled methods, but there is infrastructure to do something different in the future...
>
If we do anything, after we have done that, there will be no condensing necessary...
> Anyway, I'm in hacky mode now, so I didn't think to much, just made it work :P
>
:-)
Feb. 20, 2013
Re: [Pharo-project] About condensing sources, becoming CompiledMethods and VM crashes
by Guillermo Polito
On Wed, Feb 20, 2013 at 1:35 PM, Marcus Denker <marcus.denker(a)inria.fr>wrote:
> Hi,
>
> Why do we create new methods at all? *every* existing, installed
> method has enough space
> at the end for any kind of trailer.
>
> So can't we just write the source in the file, get the offset, then
> put that offset in the *existing*
> method?
>
But isn't that circumstantial? I mean, today we have source pointers inside
all compiled methods, but there is infrastructure to do something different
in the future...
Anyway, I'm in hacky mode now, so I didn't think to much, just made it work
:P
>
> Marcus
>
> On Wed, Feb 20, 2013 at 12:26 PM, Guillermo Polito
> <guillermopolito(a)gmail.com> wrote:
> > Ok, so I did that, and have this. So the condense looks finished, but
> when
> > returning to the UI thread, canvas is nil?
> >
> > Hmm, I think we should stop the UI thread also and spawn a new one after
> > condensing...
> >
> > Error: MessageNotUnderstood: receiver of "finish" is nil
> > UndefinedObject(Object)>>error:
> > WorldState>>displayWorldSafely: in Block: [:t2 :t3 | ...
> > BlockClosure>>cull:cull:
> > BlockClosure>>ifError: in Block: [:t2 | t1 cull: t2 description cull: t2
> > receiver]
> > BlockClosure>>cull:
> > MethodContext(ContextPart)>>handleSignal: in Block: [self
> > exceptionHandlerBlock cull: exception]
> > BlockClosure>>ensure:
> > MethodContext(ContextPart)>>handleSignal:
> > MessageNotUnderstood(Exception)>>signal
> > UndefinedObject(Object)>>doesNotUnderstand: #finish
> > WorldState>>displayWorld:submorphs:
> >
> > On Wed, Feb 20, 2013 at 12:15 PM, Marcus Denker <marcus.denker(a)inria.fr>
> > wrote:
> >>
> >>
> >> On Feb 20, 2013, at 12:13 PM, Guillermo Polito <
> guillermopolito(a)gmail.com>
> >> wrote:
> >>
> >> Ok, I tried the following:
> >>
> >> - changed the become in #setSourcePointer: by an #at:put: in the method
> >> dict
> >> - before exporting the sources, I run the shutdown and after, I run the
> >> startup lists.
> >> - I ran the condense sources like
> >>
> >> [ Smalltalk condenseSources ] forkAt: Processor highestPriority.
> >>
> >>
> >> Then, the export runs ok, but there is a crash in the CompiledMethod
> >> class>>cleanUp
> >>
> >>
> >> I think the cleanup is not necessary when condensing⦠it touches only
> >> methods
> >> that are *not* installed in classes.
> >> We should remove that call from the condense method.
> >>
> >> Segmentation fault
> >>
> >>
> >> Smalltalk stack dump:
> >> 0xbffbe2d0 M ByteString class(String class)>new: 528605460: a(n)
> >> ByteString class
> >> 0xbffbe2f8 M ByteString(SequenceableCollection)>copyReplaceFrom:to:with:
> >> 531139536: a(n) ByteString
> >> 0xbffbe31c M ByteString(SequenceableCollection)>, 531139536: a(n)
> >> ByteString
> >> 0xbffbe33c M CompiledMethodTrailer>encode 570089224: a(n)
> >> CompiledMethodTrailer
> >> 0xbffbe35c M CompiledMethodTrailer>createMethod:class:header: 570089224:
> >> a(n) CompiledMethodTrailer
> >> 0xbffbe39c M CompiledMethod>copyWithTrailerBytes: 530925156: a(n)
> >> CompiledMethod
> >> 0xbffbe3bc M CompiledMethod>zapSourcePointer 530925156: a(n)
> >> CompiledMethod
> >> 0xbffbe3d4 M [] in CompiledMethod class>cleanUp 528604864: a(n)
> >> CompiledMethod class
> >>
> >> On Wed, Feb 20, 2013 at 12:00 PM, Igor Stasenko <siguctua(a)gmail.com>
> >> wrote:
> >>>
> >>> i thinking that become is unnecessary,
> >>> it can be just at:put: into method dictionary,
> >>> so eventually all methods will be updated (after restarting permanent
> >>> processes)
> >>>
> >>> On 20 February 2013 11:13, Guillermo Polito <guillermopolito(a)gmail.com
> >
> >>> wrote:
> >>> > I summon Eliot :).
> >>> >
> >>> >
> >>> > On Wed, Feb 20, 2013 at 11:03 AM, Marcus Denker
> >>> > <marcus.denker(a)inria.fr>
> >>> > wrote:
> >>> >>
> >>> >>
> >>> >> On Feb 20, 2013, at 11:01 AM, Guillermo Polito
> >>> >> <guillermopolito(a)gmail.com>
> >>> >> wrote:
> >>> >>
> >>> >> 'cause you don't know if the method has trailer or not I think...
> >>> >> There
> >>> >> are empty trailers and trailers embedding source (directly in the
> >>> >> image)...
> >>> >> isn't it?
> >>> >>
> >>> >> Not for those methods installed in classes⦠we are updating an
> >>> >> existing
> >>> >> pointer here.
> >>> >>
> >>> >> Marcus
> >>> >>
> >>> >>
> >>> >> On Wed, Feb 20, 2013 at 10:52 AM, Marcus Denker
> >>> >> <marcus.denker(a)inria.fr>
> >>> >> wrote:
> >>> >>>
> >>> >>>
> >>> >>> On Feb 20, 2013, at 10:45 AM, Guillermo Polito
> >>> >>> <guillermopolito(a)gmail.com> wrote:
> >>> >>>
> >>> >>> Hi!
> >>> >>>
> >>> >>> There is this bug open I was taking a look yesterday:
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>>
> http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=Milest…
> >>> >>>
> >>> >>> The condense sources compacts the changes and source files, and
> adds
> >>> >>> a
> >>> >>> new method trailer to a compiled method with it's new source
> pointer.
> >>> >>> In
> >>> >>> order to do that, it does a #becomeForward: to the method.
> >>> >>>
> >>> >>> CompiledMethod>>setSourcePointer: srcPointer
> >>> >>> "We can't change the trailer of existing method, since
> >>> >>> it could have completely different format. Therefore we need to
> >>> >>> generate a copy with new trailer, containing an scrPointer, and
> then
> >>> >>> #become it"
> >>> >>> | trailer copy |
> >>> >>> trailer := CompiledMethodTrailer new sourcePointer: srcPointer.
> >>> >>> copy := self copyWithTrailerBytes: trailer.
> >>> >>> >>> self becomeForward: copy.
> >>> >>> ^ copy
> >>> >>>
> >>> >>> So far, with simple methods, so good.
> >>> >>>
> >>> >>> However, there are cases, in which becoming the compiled method,
> >>> >>> breaks
> >>> >>> processes, sometimes getting a crash in the VM. For example:
> >>> >>>
> >>> >>> (Delay class>>#handleTimerEvent) setSourcePosition: 200 inFile: 1
> >>> >>>
> >>> >>> (ProcessorScheduler class>>#idleProcess) setSourcePosition: 200
> >>> >>> inFile: 1
> >>> >>>
> >>> >>> My assumption is that the #becomeForward: of compiled methods do
> not
> >>> >>> get
> >>> >>> well with the stack mapping in the vm... But just guessing.
> >>> >>>
> >>> >>>
> >>> >>> I wonder why we don't just update the pointer.
> >>> >>> That is: we keep the method the same, rewrite the pointer, and
> >>> >>> nothing
> >>> >>> else.
> >>> >>>
> >>> >>> Marcus
> >>> >>>
> >>> >>
> >>> >>
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Best regards,
> >>> Igor Stasenko.
> >>>
> >>
> >>
> >
>
>
>
> --
> --
> Marcus Denker -- denker(a)acm.org
> http://www.marcusdenker.de
>
>
Feb. 20, 2013
Re: [Pharo-project] About condensing sources, becoming CompiledMethods and VM crashes
by Guillermo Polito
So, this (hacky) changeset does the trick.
[ Smalltalk condenseSources ] forkAt: Processor highestPriority.
works..
Resuming:
- changed the becomeForward by an at:put:
- a little hack/fix to serialize unicode chars in the sources file
(Japanese environment)
- removed the progress bar stuff from condenseChanges
- before condensing process the shutdown list
- after condensing process the startup list
- do not cleanup methods
- after processing the startuplist, kill current UIProcess and start a new
one
- run the condense changes in highest priority so it does not get preempted
by inconsistent processes.
On Wed, Feb 20, 2013 at 12:26 PM, Guillermo Polito <
guillermopolito(a)gmail.com> wrote:
> Ok, so I did that, and have this. So the condense looks finished, but when
> returning to the UI thread, canvas is nil?
>
> Hmm, I think we should stop the UI thread also and spawn a new one after
> condensing...
>
> Error: MessageNotUnderstood: receiver of "finish" is nil
> UndefinedObject(Object)>>error:
> WorldState>>displayWorldSafely: in Block: [:t2 :t3 | ...
> BlockClosure>>cull:cull:
> BlockClosure>>ifError: in Block: [:t2 | t1 cull: t2 description cull: t2
> receiver]
> BlockClosure>>cull:
> MethodContext(ContextPart)>>handleSignal: in Block: [self
> exceptionHandlerBlock cull: exception]
> BlockClosure>>ensure:
> MethodContext(ContextPart)>>handleSignal:
> MessageNotUnderstood(Exception)>>signal
> UndefinedObject(Object)>>doesNotUnderstand: #finish
> WorldState>>displayWorld:submorphs:
>
> On Wed, Feb 20, 2013 at 12:15 PM, Marcus Denker <marcus.denker(a)inria.fr>wrote:
>
>>
>> On Feb 20, 2013, at 12:13 PM, Guillermo Polito <guillermopolito(a)gmail.com>
>> wrote:
>>
>> Ok, I tried the following:
>>
>> - changed the become in #setSourcePointer: by an #at:put: in the method
>> dict
>> - before exporting the sources, I run the shutdown and after, I run the
>> startup lists.
>> - I ran the condense sources like
>>
>> [ Smalltalk condenseSources ] forkAt: Processor highestPriority.
>>
>>
>> Then, the export runs ok, but there is a crash in the CompiledMethod
>> class>>cleanUp
>>
>>
>> I think the cleanup is not necessary when condensing⦠it touches only
>> methods
>> that are *not* installed in classes.
>> We should remove that call from the condense method.
>>
>> Segmentation fault
>>
>>
>> Smalltalk stack dump:
>> 0xbffbe2d0 M ByteString class(String class)>new: 528605460: a(n)
>> ByteString class
>> 0xbffbe2f8 M ByteString(SequenceableCollection)>copyReplaceFrom:to:with:
>> 531139536: a(n) ByteString
>> 0xbffbe31c M ByteString(SequenceableCollection)>, 531139536: a(n)
>> ByteString
>> 0xbffbe33c M CompiledMethodTrailer>encode 570089224: a(n)
>> CompiledMethodTrailer
>> 0xbffbe35c M CompiledMethodTrailer>createMethod:class:header: 570089224:
>> a(n) CompiledMethodTrailer
>> 0xbffbe39c M CompiledMethod>copyWithTrailerBytes: 530925156: a(n)
>> CompiledMethod
>> 0xbffbe3bc M CompiledMethod>zapSourcePointer 530925156: a(n)
>> CompiledMethod
>> 0xbffbe3d4 M [] in CompiledMethod class>cleanUp 528604864: a(n)
>> CompiledMethod class
>>
>> On Wed, Feb 20, 2013 at 12:00 PM, Igor Stasenko <siguctua(a)gmail.com>wrote:
>>
>>> i thinking that become is unnecessary,
>>> it can be just at:put: into method dictionary,
>>> so eventually all methods will be updated (after restarting permanent
>>> processes)
>>>
>>> On 20 February 2013 11:13, Guillermo Polito <guillermopolito(a)gmail.com>
>>> wrote:
>>> > I summon Eliot :).
>>> >
>>> >
>>> > On Wed, Feb 20, 2013 at 11:03 AM, Marcus Denker <
>>> marcus.denker(a)inria.fr>
>>> > wrote:
>>> >>
>>> >>
>>> >> On Feb 20, 2013, at 11:01 AM, Guillermo Polito <
>>> guillermopolito(a)gmail.com>
>>> >> wrote:
>>> >>
>>> >> 'cause you don't know if the method has trailer or not I think...
>>> There
>>> >> are empty trailers and trailers embedding source (directly in the
>>> image)...
>>> >> isn't it?
>>> >>
>>> >> Not for those methods installed in classes⦠we are updating an
>>> existing
>>> >> pointer here.
>>> >>
>>> >> Marcus
>>> >>
>>> >>
>>> >> On Wed, Feb 20, 2013 at 10:52 AM, Marcus Denker <
>>> marcus.denker(a)inria.fr>
>>> >> wrote:
>>> >>>
>>> >>>
>>> >>> On Feb 20, 2013, at 10:45 AM, Guillermo Polito
>>> >>> <guillermopolito(a)gmail.com> wrote:
>>> >>>
>>> >>> Hi!
>>> >>>
>>> >>> There is this bug open I was taking a look yesterday:
>>> >>>
>>> >>>
>>> >>>
>>> http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=Milest…
>>> >>>
>>> >>> The condense sources compacts the changes and source files, and adds
>>> a
>>> >>> new method trailer to a compiled method with it's new source
>>> pointer. In
>>> >>> order to do that, it does a #becomeForward: to the method.
>>> >>>
>>> >>> CompiledMethod>>setSourcePointer: srcPointer
>>> >>> "We can't change the trailer of existing method, since
>>> >>> it could have completely different format. Therefore we need to
>>> >>> generate a copy with new trailer, containing an scrPointer, and then
>>> >>> #become it"
>>> >>> | trailer copy |
>>> >>> trailer := CompiledMethodTrailer new sourcePointer: srcPointer.
>>> >>> copy := self copyWithTrailerBytes: trailer.
>>> >>> >>> self becomeForward: copy.
>>> >>> ^ copy
>>> >>>
>>> >>> So far, with simple methods, so good.
>>> >>>
>>> >>> However, there are cases, in which becoming the compiled method,
>>> breaks
>>> >>> processes, sometimes getting a crash in the VM. For example:
>>> >>>
>>> >>> (Delay class>>#handleTimerEvent) setSourcePosition: 200 inFile: 1
>>> >>>
>>> >>> (ProcessorScheduler class>>#idleProcess) setSourcePosition: 200
>>> inFile: 1
>>> >>>
>>> >>> My assumption is that the #becomeForward: of compiled methods do not
>>> get
>>> >>> well with the stack mapping in the vm... But just guessing.
>>> >>>
>>> >>>
>>> >>> I wonder why we don't just update the pointer.
>>> >>> That is: we keep the method the same, rewrite the pointer, and
>>> nothing
>>> >>> else.
>>> >>>
>>> >>> Marcus
>>> >>>
>>> >>
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>>>
>>
>>
>
Feb. 20, 2013
Re: [Pharo-project] About condensing sources, becoming CompiledMethods and VM crashes
by Marcus Denker
Hi,
Why do we create new methods at all? *every* existing, installed
method has enough space
at the end for any kind of trailer.
So can't we just write the source in the file, get the offset, then
put that offset in the *existing*
method?
Marcus
On Wed, Feb 20, 2013 at 12:26 PM, Guillermo Polito
<guillermopolito(a)gmail.com> wrote:
> Ok, so I did that, and have this. So the condense looks finished, but when
> returning to the UI thread, canvas is nil?
>
> Hmm, I think we should stop the UI thread also and spawn a new one after
> condensing...
>
> Error: MessageNotUnderstood: receiver of "finish" is nil
> UndefinedObject(Object)>>error:
> WorldState>>displayWorldSafely: in Block: [:t2 :t3 | ...
> BlockClosure>>cull:cull:
> BlockClosure>>ifError: in Block: [:t2 | t1 cull: t2 description cull: t2
> receiver]
> BlockClosure>>cull:
> MethodContext(ContextPart)>>handleSignal: in Block: [self
> exceptionHandlerBlock cull: exception]
> BlockClosure>>ensure:
> MethodContext(ContextPart)>>handleSignal:
> MessageNotUnderstood(Exception)>>signal
> UndefinedObject(Object)>>doesNotUnderstand: #finish
> WorldState>>displayWorld:submorphs:
>
> On Wed, Feb 20, 2013 at 12:15 PM, Marcus Denker <marcus.denker(a)inria.fr>
> wrote:
>>
>>
>> On Feb 20, 2013, at 12:13 PM, Guillermo Polito <guillermopolito(a)gmail.com>
>> wrote:
>>
>> Ok, I tried the following:
>>
>> - changed the become in #setSourcePointer: by an #at:put: in the method
>> dict
>> - before exporting the sources, I run the shutdown and after, I run the
>> startup lists.
>> - I ran the condense sources like
>>
>> [ Smalltalk condenseSources ] forkAt: Processor highestPriority.
>>
>>
>> Then, the export runs ok, but there is a crash in the CompiledMethod
>> class>>cleanUp
>>
>>
>> I think the cleanup is not necessary when condensing⦠it touches only
>> methods
>> that are *not* installed in classes.
>> We should remove that call from the condense method.
>>
>> Segmentation fault
>>
>>
>> Smalltalk stack dump:
>> 0xbffbe2d0 M ByteString class(String class)>new: 528605460: a(n)
>> ByteString class
>> 0xbffbe2f8 M ByteString(SequenceableCollection)>copyReplaceFrom:to:with:
>> 531139536: a(n) ByteString
>> 0xbffbe31c M ByteString(SequenceableCollection)>, 531139536: a(n)
>> ByteString
>> 0xbffbe33c M CompiledMethodTrailer>encode 570089224: a(n)
>> CompiledMethodTrailer
>> 0xbffbe35c M CompiledMethodTrailer>createMethod:class:header: 570089224:
>> a(n) CompiledMethodTrailer
>> 0xbffbe39c M CompiledMethod>copyWithTrailerBytes: 530925156: a(n)
>> CompiledMethod
>> 0xbffbe3bc M CompiledMethod>zapSourcePointer 530925156: a(n)
>> CompiledMethod
>> 0xbffbe3d4 M [] in CompiledMethod class>cleanUp 528604864: a(n)
>> CompiledMethod class
>>
>> On Wed, Feb 20, 2013 at 12:00 PM, Igor Stasenko <siguctua(a)gmail.com>
>> wrote:
>>>
>>> i thinking that become is unnecessary,
>>> it can be just at:put: into method dictionary,
>>> so eventually all methods will be updated (after restarting permanent
>>> processes)
>>>
>>> On 20 February 2013 11:13, Guillermo Polito <guillermopolito(a)gmail.com>
>>> wrote:
>>> > I summon Eliot :).
>>> >
>>> >
>>> > On Wed, Feb 20, 2013 at 11:03 AM, Marcus Denker
>>> > <marcus.denker(a)inria.fr>
>>> > wrote:
>>> >>
>>> >>
>>> >> On Feb 20, 2013, at 11:01 AM, Guillermo Polito
>>> >> <guillermopolito(a)gmail.com>
>>> >> wrote:
>>> >>
>>> >> 'cause you don't know if the method has trailer or not I think...
>>> >> There
>>> >> are empty trailers and trailers embedding source (directly in the
>>> >> image)...
>>> >> isn't it?
>>> >>
>>> >> Not for those methods installed in classes⦠we are updating an
>>> >> existing
>>> >> pointer here.
>>> >>
>>> >> Marcus
>>> >>
>>> >>
>>> >> On Wed, Feb 20, 2013 at 10:52 AM, Marcus Denker
>>> >> <marcus.denker(a)inria.fr>
>>> >> wrote:
>>> >>>
>>> >>>
>>> >>> On Feb 20, 2013, at 10:45 AM, Guillermo Polito
>>> >>> <guillermopolito(a)gmail.com> wrote:
>>> >>>
>>> >>> Hi!
>>> >>>
>>> >>> There is this bug open I was taking a look yesterday:
>>> >>>
>>> >>>
>>> >>>
>>> >>> http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=Milest…
>>> >>>
>>> >>> The condense sources compacts the changes and source files, and adds
>>> >>> a
>>> >>> new method trailer to a compiled method with it's new source pointer.
>>> >>> In
>>> >>> order to do that, it does a #becomeForward: to the method.
>>> >>>
>>> >>> CompiledMethod>>setSourcePointer: srcPointer
>>> >>> "We can't change the trailer of existing method, since
>>> >>> it could have completely different format. Therefore we need to
>>> >>> generate a copy with new trailer, containing an scrPointer, and then
>>> >>> #become it"
>>> >>> | trailer copy |
>>> >>> trailer := CompiledMethodTrailer new sourcePointer: srcPointer.
>>> >>> copy := self copyWithTrailerBytes: trailer.
>>> >>> >>> self becomeForward: copy.
>>> >>> ^ copy
>>> >>>
>>> >>> So far, with simple methods, so good.
>>> >>>
>>> >>> However, there are cases, in which becoming the compiled method,
>>> >>> breaks
>>> >>> processes, sometimes getting a crash in the VM. For example:
>>> >>>
>>> >>> (Delay class>>#handleTimerEvent) setSourcePosition: 200 inFile: 1
>>> >>>
>>> >>> (ProcessorScheduler class>>#idleProcess) setSourcePosition: 200
>>> >>> inFile: 1
>>> >>>
>>> >>> My assumption is that the #becomeForward: of compiled methods do not
>>> >>> get
>>> >>> well with the stack mapping in the vm... But just guessing.
>>> >>>
>>> >>>
>>> >>> I wonder why we don't just update the pointer.
>>> >>> That is: we keep the method the same, rewrite the pointer, and
>>> >>> nothing
>>> >>> else.
>>> >>>
>>> >>> Marcus
>>> >>>
>>> >>
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>>
>>
>
--
--
Marcus Denker -- denker(a)acm.org
http://www.marcusdenker.de
Feb. 20, 2013
Re: [Pharo-project] Weird behavior in Nautilus when doing a method rename
by Benjamin
There is actually no simple way to simply rename a method.
We should maybe add one which keep track of the versions :)
Historically (even if it sounds wrong today) you create a new method,
and delete the old one (and indeed this is disturbing for new comers ^^)
I really think that both usage are valid even if I think that most of the time,
you want to do a refactoring while renaming :)
Let's release Pharo 2.0, and then we will have fun experimenting this ^^
Ben
On Feb 20, 2013, at 11:45 AM, phil(a)highoctane.be wrote:
> Yes, usability matters. Especially to get traction with new people.
>
> Alt-R,Alt-N is perfectly usable, no matter how deep it is in the
> refactoring menu.
>
> Refactoring fine for dealing with a codebase. Not so when dealing with
> typos or removing methods from a path while at the same time not
> really removing them (aka rename doThis to doThis_ temporarily for
> example).
>
> Phil
>
> 2013/2/20 Esteban Lorenzano <estebanlm(a)gmail.com>:
>> yes, but the debate is interesting, because is about usability... and we certainly need to improve a lot in that area.
>> I think that currently, when people performs an operation like rename, they are waiting for a refactor, not for the clean rename (if you look at eclipse, for instance, that's what you have when you rename a method or a class)... what has become quite uncommon is to perform the "non-refactored operation".
>> Of course we could have a place for that operation too, but since the "refactored one" is what people expects/uses, that has to be the one that will be easier to fetch.
>>
>> Esteban
>>
>> On Feb 20, 2013, at 11:25 AM, "phil(a)highoctane.be" <phil(a)highoctane.be> wrote:
>>
>>> Yes, but the rename is *not* in the refactoring menu. It is *below*
>>> the refactoring menu.
>>> So, it is an unexpected refactoring in disguise...
>>>
>>> There was a simple rename in 1.4 I think. Maybe can we get that one
>>> back (in 3.0 of course...)
>>>
>>> Phil
>>>
>>> 2013/2/20 Fernando Olivero <fernando.olivero(a)usi.ch>:
>>>> Hi, i had the same misconception once, but i recall Lukas pointed out
>>>> that the refactoring engine is built on the original refactoring's
>>>> from Fowler's book, and implemented in Smalltalk by Roberts and
>>>> Johnson [1].
>>>>
>>>> So the semantics of the refactoring are preserved in the implementation.
>>>>
>>>> If you just want a method rename, not a method refactoring rename,
>>>> maybe is best have an option for that in the menu [2].
>>>>
>>>>
>>>> Fernando
>>>>
>>>> [1] http://st-www.cs.illinois.edu/users/droberts/tapos.pdf
>>>> [2] or use a better widget for editing methods, than a simple code
>>>> editor within the pane of the browser, as in Gaucho..which i'm working
>>>> on.
>>>>
>>>> On Wed, Feb 20, 2013 at 11:03 AM, Esteban Lorenzano <estebanlm(a)gmail.com> wrote:
>>>>> and you are right, scoped browsing is a very powerful feature that can be tricky to newcomers... but at least now with nautilus it is there, as first option (in OB it was there, but more or less hidden in a submenu)...
>>>>> It is a small step, but is something... and well... we can improve in next releases, one step at a time :)
>>>>>
>>>>> Esteban
>>>>>
>>>>> On Feb 20, 2013, at 10:52 AM, "phil(a)highoctane.be" <phil(a)highoctane.be> wrote:
>>>>>
>>>>>> Yes, thanks, I figured that out. A newcomer wouldn't... and renaming
>>>>>> is pretty common.
>>>>>>
>>>>>> What will happen is that people will remove the method and recreate a new one.
>>>>>> Version history will then go away.
>>>>>>
>>>>>> Or is the system smart enough to find out about these things?
>>>>>>
>>>>>> Phil
>>>>>>
>>>>>> 2013/2/20 Esteban Lorenzano <estebanlm(a)gmail.com>:
>>>>>>> hi,
>>>>>>>
>>>>>>> yes, you are right.. but that is a "nice to have", not a bug... so it will wait to 3.0 :)
>>>>>>> In the mean time, you can do a scoped rename: you select the packages you want, then right click and "browse scoped", then you apply you rename, and it will apply the refactor in the scoped selection, not all the image.
>>>>>>>
>>>>>>> cheers,
>>>>>>> Esteban
>>>>>>>
>>>>>>> On Feb 20, 2013, at 10:21 AM, "phil(a)highoctane.be" <phil(a)highoctane.be> wrote:
>>>>>>>
>>>>>>>> Well, look at the screenshot then tell me that this is what I want.
>>>>>>>>
>>>>>>>> It is definitively *not* what I want. Especially unchecking that
>>>>>>>> endless list of methods.
>>>>>>>>
>>>>>>>> Adding a "Uncheck all" "Check all" button to the Changes Browser list
>>>>>>>> would help...
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Phil
>>>>>>>>
>>>>>>>> 2013/2/20 Camillo Bruni <camillobruni(a)gmail.com>:
>>>>>>>>> there is 1 certain bug, that is that you cannot see the changes of the refactoring:
>>>>>>>>>
>>>>>>>>> https://code.google.com/p/pharo/issues/detail?id=7547
>>>>>>>>>
>>>>>>>>> the rest I would consider a bug as well. But in the terms of refactoring it might
>>>>>>>>> be "valid". It does preserve behavior by renaming also all implementors.
>>>>>>>>>
>>>>>>>>> How about this reasoning:
>>>>>>>>>
>>>>>>>>> Rename method
>>>>>>>>> => rename all senders (since you refactor)
>>>>>>>>> => you have to rename all implementors as well since you renamed all send sites
>>>>>>>>> otherwise you'll run for sure into a DNU
>>>>>>>>>
>>>>>>>>> I think I just convinced myself :D
>>>>>>>>>
>>>>>>>>> On 2013-02-20, at 09:26, "phil(a)highoctane.be" <phil(a)highoctane.be> wrote:
>>>>>>>>>> I was doing a Refactoring>rename of the initialize method in Nautilus
>>>>>>>>>> for the ClassMethodBrowser and then the changes browser proposed me to
>>>>>>>>>> change all classes with initialize. WTF?
>>>>>>>>>>
>>>>>>>>>> Phil
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> <PharoScreenshot.3.png>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>>
>
Feb. 20, 2013
Re: [Pharo-project] About condensing sources, becoming CompiledMethods and VM crashes
by Guillermo Polito
Ok, so I did that, and have this. So the condense looks finished, but when
returning to the UI thread, canvas is nil?
Hmm, I think we should stop the UI thread also and spawn a new one after
condensing...
Error: MessageNotUnderstood: receiver of "finish" is nil
UndefinedObject(Object)>>error:
WorldState>>displayWorldSafely: in Block: [:t2 :t3 | ...
BlockClosure>>cull:cull:
BlockClosure>>ifError: in Block: [:t2 | t1 cull: t2 description cull: t2
receiver]
BlockClosure>>cull:
MethodContext(ContextPart)>>handleSignal: in Block: [self
exceptionHandlerBlock cull: exception]
BlockClosure>>ensure:
MethodContext(ContextPart)>>handleSignal:
MessageNotUnderstood(Exception)>>signal
UndefinedObject(Object)>>doesNotUnderstand: #finish
WorldState>>displayWorld:submorphs:
On Wed, Feb 20, 2013 at 12:15 PM, Marcus Denker <marcus.denker(a)inria.fr>wrote:
>
> On Feb 20, 2013, at 12:13 PM, Guillermo Polito <guillermopolito(a)gmail.com>
> wrote:
>
> Ok, I tried the following:
>
> - changed the become in #setSourcePointer: by an #at:put: in the method
> dict
> - before exporting the sources, I run the shutdown and after, I run the
> startup lists.
> - I ran the condense sources like
>
> [ Smalltalk condenseSources ] forkAt: Processor highestPriority.
>
>
> Then, the export runs ok, but there is a crash in the CompiledMethod
> class>>cleanUp
>
>
> I think the cleanup is not necessary when condensing⦠it touches only
> methods
> that are *not* installed in classes.
> We should remove that call from the condense method.
>
> Segmentation fault
>
>
> Smalltalk stack dump:
> 0xbffbe2d0 M ByteString class(String class)>new: 528605460: a(n)
> ByteString class
> 0xbffbe2f8 M ByteString(SequenceableCollection)>copyReplaceFrom:to:with:
> 531139536: a(n) ByteString
> 0xbffbe31c M ByteString(SequenceableCollection)>, 531139536: a(n)
> ByteString
> 0xbffbe33c M CompiledMethodTrailer>encode 570089224: a(n)
> CompiledMethodTrailer
> 0xbffbe35c M CompiledMethodTrailer>createMethod:class:header: 570089224:
> a(n) CompiledMethodTrailer
> 0xbffbe39c M CompiledMethod>copyWithTrailerBytes: 530925156: a(n)
> CompiledMethod
> 0xbffbe3bc M CompiledMethod>zapSourcePointer 530925156: a(n) CompiledMethod
> 0xbffbe3d4 M [] in CompiledMethod class>cleanUp 528604864: a(n)
> CompiledMethod class
>
> On Wed, Feb 20, 2013 at 12:00 PM, Igor Stasenko <siguctua(a)gmail.com>wrote:
>
>> i thinking that become is unnecessary,
>> it can be just at:put: into method dictionary,
>> so eventually all methods will be updated (after restarting permanent
>> processes)
>>
>> On 20 February 2013 11:13, Guillermo Polito <guillermopolito(a)gmail.com>
>> wrote:
>> > I summon Eliot :).
>> >
>> >
>> > On Wed, Feb 20, 2013 at 11:03 AM, Marcus Denker <marcus.denker(a)inria.fr
>> >
>> > wrote:
>> >>
>> >>
>> >> On Feb 20, 2013, at 11:01 AM, Guillermo Polito <
>> guillermopolito(a)gmail.com>
>> >> wrote:
>> >>
>> >> 'cause you don't know if the method has trailer or not I think... There
>> >> are empty trailers and trailers embedding source (directly in the
>> image)...
>> >> isn't it?
>> >>
>> >> Not for those methods installed in classes⦠we are updating an existing
>> >> pointer here.
>> >>
>> >> Marcus
>> >>
>> >>
>> >> On Wed, Feb 20, 2013 at 10:52 AM, Marcus Denker <
>> marcus.denker(a)inria.fr>
>> >> wrote:
>> >>>
>> >>>
>> >>> On Feb 20, 2013, at 10:45 AM, Guillermo Polito
>> >>> <guillermopolito(a)gmail.com> wrote:
>> >>>
>> >>> Hi!
>> >>>
>> >>> There is this bug open I was taking a look yesterday:
>> >>>
>> >>>
>> >>>
>> http://code.google.com/p/pharo/issues/detail?can=2&start=0&num=100&q=Milest…
>> >>>
>> >>> The condense sources compacts the changes and source files, and adds a
>> >>> new method trailer to a compiled method with it's new source pointer.
>> In
>> >>> order to do that, it does a #becomeForward: to the method.
>> >>>
>> >>> CompiledMethod>>setSourcePointer: srcPointer
>> >>> "We can't change the trailer of existing method, since
>> >>> it could have completely different format. Therefore we need to
>> >>> generate a copy with new trailer, containing an scrPointer, and then
>> >>> #become it"
>> >>> | trailer copy |
>> >>> trailer := CompiledMethodTrailer new sourcePointer: srcPointer.
>> >>> copy := self copyWithTrailerBytes: trailer.
>> >>> >>> self becomeForward: copy.
>> >>> ^ copy
>> >>>
>> >>> So far, with simple methods, so good.
>> >>>
>> >>> However, there are cases, in which becoming the compiled method,
>> breaks
>> >>> processes, sometimes getting a crash in the VM. For example:
>> >>>
>> >>> (Delay class>>#handleTimerEvent) setSourcePosition: 200 inFile: 1
>> >>>
>> >>> (ProcessorScheduler class>>#idleProcess) setSourcePosition: 200
>> inFile: 1
>> >>>
>> >>> My assumption is that the #becomeForward: of compiled methods do not
>> get
>> >>> well with the stack mapping in the vm... But just guessing.
>> >>>
>> >>>
>> >>> I wonder why we don't just update the pointer.
>> >>> That is: we keep the method the same, rewrite the pointer, and nothing
>> >>> else.
>> >>>
>> >>> Marcus
>> >>>
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>>
>
>
Feb. 20, 2013