Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- 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
August 2009
- 77 participants
- 1342 messages
Re: [Pharo-project] BlockClosure>>isValid
by Stéphane Ducasse
done!
This is great!
I will continue to log the changes and like that we can check that
fast and focus on the cool ones.
Adrian got some problems yesterday for integration so I'm holding the
horses :)
Stef
> And asMinimalRepresentation is implemented ^self in Pharo already, so
> you can close 1091 ;)
>
> Cheers
> Henry
>
>
> On Aug 27, 2009, at 9:35 10AM, Stéphane Ducasse wrote:
>
>> Thanks henrik!
>> this is exactly the kind of feedback I want to log
>> One left to do :)
>>
>> Stef
>>
>> On Aug 27, 2009, at 9:20 AM, Henrik Johansen wrote:
>>
>>> This was done months ago shortly after closures were introduced, to
>>> make Polymorph work.
>>>
>>> The associated tests might be nice to have in Pharo as well
>>> though :)
>>>
>>> Cheers,
>>> Henry
>>>
>>> On Aug 27, 2009, at 8:47 17AM, Stéphane Ducasse wrote:
>>>
>>>>
>>>>
>>>> Begin forwarded message:
>>>>
>>>>> From: commits(a)source.squeak.org
>>>>> Date: August 27, 2009 6:02:12 AM CEDT
>>>>> To: squeak-dev(a)lists.squeakfoundation.org
>>>>> Subject: [squeak-dev] The Trunk: Kernel-ar.230.mcz
>>>>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>>>>
>>>>> Andreas Raab uploaded a new version of Kernel to project The
>>>>> Trunk:
>>>>> http://source.squeak.org/trunk/Kernel-ar.230.mcz
>>>>>
>>>>> ==================== Summary ====================
>>>>>
>>>>> Name: Kernel-ar.230
>>>>> Author: ar
>>>>> Time: 26 August 2009, 9:01:37 am
>>>>> UUID: d0759469-14fd-2c40-a5bd-90aab36cd9a5
>>>>> Ancestors: Kernel-ar.229
>>>>>
>>>>> Implementations for BlockClosure>>isValid and
>>>>> asMinimalRepresentation for compatibility of BlockClosure with the
>>>>> when:evaluate: protocol.
>>>>>
>>>>> =============== Diff against Kernel-ar.229 ===============
>>>>>
>>>>> Item was added:
>>>>> + ----- Method: BlockClosure>>isValid (in category 'events-
>>>>> support')
>>>>> -----
>>>>> + isValid
>>>>> + "For use in the when:evaluate: protocol, i.e.,
>>>>> + foo when: #bar evaluate:[self handleBar].
>>>>> + Return true."
>>>>> + ^true!
>>>>>
>>>>> Item was added:
>>>>> + ----- Method: BlockClosure>>asMinimalRepresentation (in category
>>>>> 'events-support') -----
>>>>> + asMinimalRepresentation
>>>>> + "For use in the when:evaluate: protocol, i.e.,
>>>>> + foo when: #bar evaluate:[self handleBar].
>>>>> + Return the receiver."
>>>>> + ^true!
>>>>>
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 27, 2009
[Pharo-project] New Pharo based on core 10418 - Win32 Installer
by Torsten Bergmann
The according Win32 Setup is available from:
http://pharo-project.org/pharo-download
or directly
http://gforge.inria.fr/frs/download.php/22828/setup_pharo1.0-10418-BETAdev0…
What is new:
============
- the name of the setup follows the pharo version scheme
(see [1]) as requested by Miguel and therefore matches
the name of Damiens ZIP package
- the newest windows VM 3.11.4 from Andreas is used (see [2])
- the VM now correctly reports it's version when you select
Properties -> Version in the explorer (see [3])
- includes the lates image 10418 from Damien (see [4])
Have fun
T.
[1] http://n2.nabble.com/Pharo-name-format-td3365418.html#a3385477
[2] http://lists.squeakfoundation.org/pipermail/vm-dev/2009-August/002993.html
[3] http://lists.squeakfoundation.org/pipermail/vm-dev/2009-August/002996.html
[4] http://lists.gforge.inria.fr/pipermail/pharo-project/2009-August/012923.html
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
Aug. 27, 2009
Re: [Pharo-project] BlockClosure>>isValid
by Henrik Johansen
And asMinimalRepresentation is implemented ^self in Pharo already, so
you can close 1091 ;)
Cheers
Henry
On Aug 27, 2009, at 9:35 10AM, Stéphane Ducasse wrote:
> Thanks henrik!
> this is exactly the kind of feedback I want to log
> One left to do :)
>
> Stef
>
> On Aug 27, 2009, at 9:20 AM, Henrik Johansen wrote:
>
>> This was done months ago shortly after closures were introduced, to
>> make Polymorph work.
>>
>> The associated tests might be nice to have in Pharo as well though :)
>>
>> Cheers,
>> Henry
>>
>> On Aug 27, 2009, at 8:47 17AM, Stéphane Ducasse wrote:
>>
>>>
>>>
>>> Begin forwarded message:
>>>
>>>> From: commits(a)source.squeak.org
>>>> Date: August 27, 2009 6:02:12 AM CEDT
>>>> To: squeak-dev(a)lists.squeakfoundation.org
>>>> Subject: [squeak-dev] The Trunk: Kernel-ar.230.mcz
>>>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>>>
>>>> Andreas Raab uploaded a new version of Kernel to project The Trunk:
>>>> http://source.squeak.org/trunk/Kernel-ar.230.mcz
>>>>
>>>> ==================== Summary ====================
>>>>
>>>> Name: Kernel-ar.230
>>>> Author: ar
>>>> Time: 26 August 2009, 9:01:37 am
>>>> UUID: d0759469-14fd-2c40-a5bd-90aab36cd9a5
>>>> Ancestors: Kernel-ar.229
>>>>
>>>> Implementations for BlockClosure>>isValid and
>>>> asMinimalRepresentation for compatibility of BlockClosure with the
>>>> when:evaluate: protocol.
>>>>
>>>> =============== Diff against Kernel-ar.229 ===============
>>>>
>>>> Item was added:
>>>> + ----- Method: BlockClosure>>isValid (in category 'events-
>>>> support')
>>>> -----
>>>> + isValid
>>>> + "For use in the when:evaluate: protocol, i.e.,
>>>> + foo when: #bar evaluate:[self handleBar].
>>>> + Return true."
>>>> + ^true!
>>>>
>>>> Item was added:
>>>> + ----- Method: BlockClosure>>asMinimalRepresentation (in category
>>>> 'events-support') -----
>>>> + asMinimalRepresentation
>>>> + "For use in the when:evaluate: protocol, i.e.,
>>>> + foo when: #bar evaluate:[self handleBar].
>>>> + Return the receiver."
>>>> + ^true!
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
Aug. 27, 2009
Re: [Pharo-project] BlockClosure>>isValid
by Stéphane Ducasse
Thanks henrik!
this is exactly the kind of feedback I want to log
One left to do :)
Stef
On Aug 27, 2009, at 9:20 AM, Henrik Johansen wrote:
> This was done months ago shortly after closures were introduced, to
> make Polymorph work.
>
> The associated tests might be nice to have in Pharo as well though :)
>
> Cheers,
> Henry
>
> On Aug 27, 2009, at 8:47 17AM, Stéphane Ducasse wrote:
>
>>
>>
>> Begin forwarded message:
>>
>>> From: commits(a)source.squeak.org
>>> Date: August 27, 2009 6:02:12 AM CEDT
>>> To: squeak-dev(a)lists.squeakfoundation.org
>>> Subject: [squeak-dev] The Trunk: Kernel-ar.230.mcz
>>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>>
>>> Andreas Raab uploaded a new version of Kernel to project The Trunk:
>>> http://source.squeak.org/trunk/Kernel-ar.230.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Kernel-ar.230
>>> Author: ar
>>> Time: 26 August 2009, 9:01:37 am
>>> UUID: d0759469-14fd-2c40-a5bd-90aab36cd9a5
>>> Ancestors: Kernel-ar.229
>>>
>>> Implementations for BlockClosure>>isValid and
>>> asMinimalRepresentation for compatibility of BlockClosure with the
>>> when:evaluate: protocol.
>>>
>>> =============== Diff against Kernel-ar.229 ===============
>>>
>>> Item was added:
>>> + ----- Method: BlockClosure>>isValid (in category 'events-support')
>>> -----
>>> + isValid
>>> + "For use in the when:evaluate: protocol, i.e.,
>>> + foo when: #bar evaluate:[self handleBar].
>>> + Return true."
>>> + ^true!
>>>
>>> Item was added:
>>> + ----- Method: BlockClosure>>asMinimalRepresentation (in category
>>> 'events-support') -----
>>> + asMinimalRepresentation
>>> + "For use in the when:evaluate: protocol, i.e.,
>>> + foo when: #bar evaluate:[self handleBar].
>>> + Return the receiver."
>>> + ^true!
>>>
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 27, 2009
Re: [Pharo-project] Tests for when:evaluate: with blocks.
by Stéphane Ducasse
http://code.google.com/p/pharo/issues/detail?id=1092
On Aug 27, 2009, at 8:47 AM, Stéphane Ducasse wrote:
>
>
> Begin forwarded message:
>
>> From: commits(a)source.squeak.org
>> Date: August 27, 2009 6:43:27 AM CEDT
>> To: squeak-dev(a)lists.squeakfoundation.org
>> Subject: [squeak-dev] The Trunk: System-ar.137.mcz
>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>
>> Andreas Raab uploaded a new version of System to project The Trunk:
>> http://source.squeak.org/trunk/System-ar.137.mcz
>>
>> ==================== Summary ====================
>>
>> Name: System-ar.137
>> Author: ar
>> Time: 26 August 2009, 9:42:31 am
>> UUID: 49aa20fd-c8be-bf47-bda6-81e8a3dcdb83
>> Ancestors: System-ar.136
>>
>> Tests for when:evaluate: with blocks. Remove EventTest while we are
>> at it because it was a duplicate of EventManagerTest.
>>
>> =============== Diff against System-ar.136 ===============
>>
>> Item was added:
>> + ----- Method: EventManagerTest>>testBlockReceiverNoArgs (in
>> category 'running-dependent action') -----
>> + testBlockReceiverNoArgs
>> + eventSource when: #anEvent evaluate:[self heardEvent].
>> + eventSource triggerEvent: #anEvent.
>> + self should: [succeeded]!
>>
>> Item was added:
>> + ----- Method: EventManagerTest>>testBlockReceiverTwoArgs (in
>> category 'running-dependent action') -----
>> + testBlockReceiverTwoArgs
>> + eventSource when: #anEvent:info: evaluate:[:arg1 :arg2| self
>> addArg1: arg1 addArg2: arg2].
>> + eventSource triggerEvent: #anEvent:info: withArguments: #( 9 42 ).
>> + self should: [(eventListener includes: 9) and: [eventListener
>> includes: 42]]!
>>
>> Item was added:
>> + ----- Method: EventManagerTest>>testBlockReceiverOneArg (in
>> category 'running-dependent action') -----
>> + testBlockReceiverOneArg
>> + eventSource when: #anEvent: evaluate:[:arg1| eventListener add:
>> arg1].
>> + eventSource triggerEvent: #anEvent: with: 9.
>> + self should: [eventListener includes: 9]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testReturnValueWithManyListeners (in
>> category 'running-dependent value') -----
>> - testReturnValueWithManyListeners
>> -
>> - | value newListener |
>> - newListener := 'busybody'.
>> - eventSource
>> - when: #needsValue
>> - send: #yourself
>> - to: eventListener.
>> - eventSource
>> - when: #needsValue
>> - send: #yourself
>> - to: newListener.
>> - value := eventSource triggerEvent: #needsValue.
>> - self should: [value == newListener]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>addArg1:addArg2: (in category 'private')
>> -----
>> - addArg1: arg1
>> - addArg2: arg2
>> -
>> - eventListener
>> - add: arg1;
>> - add: arg2!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testNoValueSupplierHasArguments (in
>> category 'running-broadcast query') -----
>> - testNoValueSupplierHasArguments
>> -
>> - succeeded := eventSource
>> - triggerEvent: #needsValue:
>> - with: 'nelja'
>> - ifNotHandled: [true].
>> - self should: [succeeded]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testOneArgumentEvent (in category
>> 'running-dependent action') -----
>> - testOneArgumentEvent
>> -
>> - eventSource when: #anEvent: send: #add: to: eventListener.
>> - eventSource triggerEvent: #anEvent: with: 9.
>> - self should: [eventListener includes: 9]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testReturnValueWithNoListeners (in
>> category 'running-dependent value') -----
>> - testReturnValueWithNoListeners
>> -
>> - | value |
>> - value := eventSource triggerEvent: #needsValue.
>> - self should: [value == nil]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testSingleValueSupplier (in category
>> 'running-broadcast query') -----
>> - testSingleValueSupplier
>> -
>> - eventSource
>> - when: #needsValue
>> - send: #getTrue
>> - to: self.
>> - succeeded := eventSource triggerEvent: #needsValue.
>> - self should: [succeeded]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>getTrue: (in category 'private') -----
>> - getTrue: anArg
>> -
>> - ^true!
>>
>> Item was removed:
>> - ----- Method: EventTest>>getTrue (in category 'private') -----
>> - getTrue
>> -
>> - ^true!
>>
>> Item was removed:
>> - ----- Method:
>> EventTest>>testNoArgumentEventDependentSuppliedArgument (in category
>> 'running-dependent action supplied arguments') -----
>> - testNoArgumentEventDependentSuppliedArgument
>> -
>> - eventSource when: #anEvent send: #add: to: eventListener with:
>> 'boundValue'.
>> - eventSource triggerEvent: #anEvent.
>> - self should: [eventListener includes: 'boundValue']!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testNoValueSupplier (in category 'running-
>> broadcast query') -----
>> - testNoValueSupplier
>> -
>> - succeeded := eventSource
>> - triggerEvent: #needsValue
>> - ifNotHandled: [true].
>> - self should: [succeeded]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testNoArgumentEvent (in category 'running-
>> dependent action') -----
>> - testNoArgumentEvent
>> -
>> - eventSource when: #anEvent send: #heardEvent to: self.
>> - eventSource triggerEvent: #anEvent.
>> - self should: [succeeded]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testTwoArgumentEvent (in category
>> 'running-dependent action') -----
>> - testTwoArgumentEvent
>> -
>> - eventSource when: #anEvent:info: send: #addArg1:addArg2: to: self.
>> - eventSource triggerEvent: #anEvent:info: withArguments: #( 9 42 ).
>> - self should: [(eventListener includes: 9) and: [eventListener
>> includes: 42]]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testReturnValueWithOneListener (in
>> category 'running-dependent value') -----
>> - testReturnValueWithOneListener
>> -
>> - | value |
>> - eventSource
>> - when: #needsValue
>> - send: #yourself
>> - to: eventListener.
>> - value := eventSource triggerEvent: #needsValue.
>> - self should: [value == eventListener]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>getFalse (in category 'private') -----
>> - getFalse
>> -
>> - ^false!
>>
>> Item was removed:
>> - ----- Method: EventTest>>setUp (in category 'running') -----
>> - setUp
>> -
>> - super setUp.
>> - eventSource := Object new.
>> - eventListener := Bag new.
>> - succeeded := false!
>>
>> Item was removed:
>> - TestCase subclass: #EventTest
>> - instanceVariableNames: 'eventSource eventListener succeeded'
>> - classVariableNames: ''
>> - poolDictionaries: ''
>> - category: 'System-Object Events-Tests'!
>>
>> Item was removed:
>> - ----- Method: EventTest>>heardEvent (in category 'private') -----
>> - heardEvent
>> -
>> - succeeded := true!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testRemoveActionsTwiceForEvent (in
>> category 'running-remove actions') -----
>> - testRemoveActionsTwiceForEvent
>> -
>> - eventSource
>> - when: #anEvent send: #size to: eventListener;
>> - when: #anEvent send: #getTrue to: self;
>> - when: #anEvent: send: #fizzbin to: self.
>> - eventSource removeActionsForEvent: #anEvent.
>> - self assert: (eventSource hasActionForEvent: #anEvent) not.
>> - eventSource removeActionsForEvent: #anEvent.
>> - self assert: (eventSource hasActionForEvent: #anEvent) not.!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testRemoveActionsForEvent (in category
>> 'running-remove actions') -----
>> - testRemoveActionsForEvent
>> -
>> - eventSource
>> - when: #anEvent send: #size to: eventListener;
>> - when: #anEvent send: #getTrue to: self;
>> - when: #anEvent: send: #fizzbin to: self.
>> - eventSource removeActionsForEvent: #anEvent.
>> - self shouldnt: [eventSource hasActionForEvent: #anEvent]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testMultipleValueSuppliers (in category
>> 'running-broadcast query') -----
>> - testMultipleValueSuppliers
>> -
>> - eventSource
>> - when: #needsValue
>> - send: #getFalse
>> - to: self.
>> - eventSource
>> - when: #needsValue
>> - send: #getTrue
>> - to: self.
>> - succeeded := eventSource triggerEvent: #needsValue.
>> - self should: [succeeded]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>testRemoveActionsWithReceiver (in
>> category 'running-remove actions') -----
>> - testRemoveActionsWithReceiver
>> -
>> - | action |
>> - eventSource
>> - when: #anEvent send: #size to: eventListener;
>> - when: #anEvent send: #getTrue to: self;
>> - when: #anEvent: send: #fizzbin to: self.
>> - eventSource removeActionsWithReceiver: self.
>> - action := eventSource actionForEvent: #anEvent.
>> - self assert: (action respondsTo: #receiver).
>> - self assert: ((action receiver == self) not)!
>>
>> Item was removed:
>> - ----- Method:
>> EventTest>>testMultipleValueSuppliersEventHasArgumentsWithGC (in
>> category 'running-broadcast query') -----
>> - testMultipleValueSuppliersEventHasArgumentsWithGC
>> -
>> - eventSource
>> - when: #needsValue:
>> - send: #getFalse:
>> - to: self
>> - with: Object new.
>> - eventSource
>> - when: #needsValue:
>> - send: #getTrue:
>> - to: self
>> - with: Object new.
>> - Smalltalk garbageCollectMost.
>> - succeeded := eventSource triggerEvent: #needsValue: with: 'kolme'.
>> - self should: [succeeded = nil]
>> - !
>>
>> Item was removed:
>> - ----- Method:
>> EventTest>>testMultipleValueSuppliersEventHasArguments (in category
>> 'running-broadcast query') -----
>> - testMultipleValueSuppliersEventHasArguments
>> -
>> - eventSource
>> - when: #needsValue:
>> - send: #getFalse:
>> - to: self.
>> - eventSource
>> - when: #needsValue:
>> - send: #getTrue:
>> - to: self.
>> - succeeded := eventSource triggerEvent: #needsValue: with: 'kolme'.
>> - self should: [succeeded]!
>>
>> Item was removed:
>> - ----- Method: EventTest>>tearDown (in category 'running') -----
>> - tearDown
>> -
>> - eventSource releaseActionMap.
>> - eventSource := nil.
>> - eventListener := nil.
>> - super tearDown.
>> - !
>>
>> Item was removed:
>> - ----- Method: EventTest>>getFalse: (in category 'private') -----
>> - getFalse: anArg
>> -
>> - ^false!
>>
>> Item was removed:
>> - ----- Method:
>> EventTest>>testNoArgumentEventDependentSuppliedArguments (in
>> category 'running-dependent action supplied arguments') -----
>> - testNoArgumentEventDependentSuppliedArguments
>> -
>> - eventSource
>> - when: #anEvent
>> - send: #addArg1:addArg2:
>> - to: self
>> - withArguments: #('hello' 'world').
>> - eventSource triggerEvent: #anEvent.
>> - self should: [(eventListener includes: 'hello') and:
>> [eventListener includes: 'world']]!
>>
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 27, 2009
Re: [Pharo-project] BlockClosure>>asMinimalRepresentation
by Stéphane Ducasse
http://code.google.com/p/pharo/issues/detail?id=1091
On Aug 27, 2009, at 8:41 AM, Stéphane Ducasse wrote:
>>
>> From: commits(a)source.squeak.org
>> Date: August 27, 2009 6:45:17 AM CEDT
>> To: squeak-dev(a)lists.squeakfoundation.org
>> Subject: [squeak-dev] The Trunk: Kernel-ar.231.mcz
>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>
>> Andreas Raab uploaded a new version of Kernel to project The Trunk:
>> http://source.squeak.org/trunk/Kernel-ar.231.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Kernel-ar.231
>> Author: ar
>> Time: 26 August 2009, 9:44:33 am
>> UUID: 0fa0cc93-b060-8546-b78f-afa7b8429e80
>> Ancestors: Kernel-ar.230
>>
>> BlockClosure>>asMinimalRepresentation needs to return self, just
>> like the comment says.
>>
>> =============== Diff against Kernel-ar.230 ===============
>>
>> Item was changed:
>> ----- Method: BlockClosure>>asMinimalRepresentation (in category
>> 'events-support') -----
>> asMinimalRepresentation
>> "For use in the when:evaluate: protocol, i.e.,
>> foo when: #bar evaluate:[self handleBar].
>> Return the receiver."
>> + ^self!
>> - ^true!
>>
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 27, 2009
Re: [Pharo-project] Compiled Method The Trunk: Kernel-ar.229.mcz
by Stéphane Ducasse
http://code.google.com/p/pharo/issues/detail?id=1090
>> Andreas Raab uploaded a new version of Kernel to project The Trunk:
>> http://source.squeak.org/trunk/Kernel-ar.229.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Kernel-ar.229
>> Author: ar
>> Time: 26 August 2009, 8:42:37 am
>> UUID: fad5617c-3a41-4c4e-80af-d8b2234cca10
>> Ancestors: Kernel-dtl.226, Kernel-djr.228
>>
>> Merging Kernel-djr.228:
>>
>> CompiledMethod>>= seems to be broken. Attempt to fix it.
>>
>> MethodProperties>>analogousCodeTo: calls Pragma>>analogousCodeTo:
>> which does not exist.
>>
>> Further assume when both properties are nil and both pragmas are
>> empty, its equal.
>>
>> =============== Diff against Kernel-dtl.226 ===============
>>
>> Item was changed:
>> ----- Method: MethodProperties>>analogousCodeTo: (in category
>> 'testing') -----
>> analogousCodeTo: aMethodProperties
>> pragmas
>> ifNil: [aMethodProperties pragmas notEmpty ifTrue: [^false]]
>> ifNotNil:
>> + [pragmas size ~= aMethodProperties pragmas size ifTrue:
>> - [aMethodProperties pragmas isEmpty ifTrue: [^false].
>> - pragmas size ~= aMethodProperties pragmas size ifTrue:
>> [^false].
>> pragmas with: aMethodProperties pragmas do:
>> [:mine :others|
>> (mine analogousCodeTo: others) ifFalse: [^false]]].
>> + (self propertiesIsNil and: [aMethodProperties propertiesIsNil])
>> ifTrue: [^true].
>> ^(self hasAtLeastTheSamePropertiesAs: aMethodProperties)
>> and: [aMethodProperties hasAtLeastTheSamePropertiesAs: self]!
>>
>> Item was added:
>> + ----- Method: MethodProperties>>propertiesIsNil (in category
>> 'testing') -----
>> + propertiesIsNil
>> + ^ properties isNil!
>>
>> Item was added:
>> + ----- Method: MethodProperties>>keysAndValuesDo: (in category
>> 'accessing') -----
>> + keysAndValuesDo: aBlock
>> + properties keysAndValuesDo: aBlock!
>>
>> Item was added:
>> + ----- Method: Pragma>>analogousCodeTo: (in category 'testing')
>> -----
>> + analogousCodeTo: aPragma
>> + ^ (self arguments = aPragma arguments) &
>> + (self keyword = aPragma keyword)!
>>
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 27, 2009
Re: [Pharo-project] compiler notification :)
by Stéphane Ducasse
Yes I will :)
or if people want to jon and participate this is ok too.
On Aug 27, 2009, at 9:11 AM, Adrian Lienhard wrote:
> Stef, I think it would make sense to create issues in the tracker for
> these changes so that we can keep track of. With mails they get
> quickly lost and forgotten. What do you think?
>
> Cheers,
> Adrian
>
> On Aug 27, 2009, at 08:58 , Stéphane Ducasse wrote:
>
>>
>>
>> Begin forwarded message:
>>
>>> From: commits(a)source.squeak.org
>>> Date: August 26, 2009 6:27:44 AM CEDT
>>> To: squeak-dev(a)lists.squeakfoundation.org
>>> Subject: [squeak-dev] The Trunk: Compiler-cwp.73.mcz
>>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>>
>>> Andreas Raab uploaded a new version of Compiler to project The
>>> Trunk:
>>> http://source.squeak.org/trunk/Compiler-cwp.73.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Compiler-cwp.73
>>> Author: cwp
>>> Time: 25 August 2009, 8:45:22 am
>>> UUID: 0fc4552f-d0c6-481a-8fa0-2bea842240b2
>>> Ancestors: Compiler-rss.72
>>>
>>> The compiler now uses notifications to signal that a correctable
>>> error has been found in the method source, rather than interacting
>>> directly with the user.
>>>
>>> =============== Diff against Compiler-rss.72 ===============
>>>
>>> Item was added:
>>> + ----- Method: ParserNotification>>setName: (in category 'as yet
>>> unclassified') -----
>>> + setName: aString
>>> + name _ aString!
>>>
>>> Item was changed:
>>> SystemOrganization addCategory: #'Compiler-Kernel'!
>>> SystemOrganization addCategory: #'Compiler-ParseNodes'!
>>> SystemOrganization addCategory: #'Compiler-Support'!
>>> SystemOrganization addCategory: #'Compiler-Tests'!
>>> SystemOrganization addCategory: #'Compiler-Syntax'!
>>> + SystemOrganization addCategory: #'Compiler-Exceptions'!
>>>
>>> Item was added:
>>> + TestCase subclass: #CompilerExceptionsTest
>>> + instanceVariableNames: ''
>>> + classVariableNames: ''
>>> + poolDictionaries: ''
>>> + category: 'Compiler-Tests'!
>>>
>>> Item was added:
>>> + ----- Method: ParserNotification>>defaultAction (in category 'as
>>> yet unclassified') -----
>>> + defaultAction
>>> +
>>> + self openMenuIn:
>>> + [:labels :lines :caption |
>>> + UIManager default chooseFrom: labels lines: lines title:
>>> caption]!
>>>
>>> Item was added:
>>> + ----- Method: UndeclaredVariable class>>signalFor:name:inRange:
>>> (in category 'as yet unclassified') -----
>>> + signalFor: aParser name: aString inRange: anInterval
>>> + ^ (self new setParser: aParser name: aString range: anInterval)
>>> signal!
>>>
>>> Item was added:
>>> + ----- Method: ParserNotification>>openMenuIn: (in category 'as yet
>>> unclassified') -----
>>> + openMenuIn: aBlock
>>> + self subclassResponsibility!
>>>
>>> Item was changed:
>>> ----- Method:
>>> Parser>>correctSelector:wordIntervals:exprInterval:ifAbort: (in
>>> category 'error correction') -----
>>> correctSelector: proposedKeyword wordIntervals: spots exprInterval:
>>> expInt ifAbort: abortAction
>>> "Correct the proposedKeyword to some selector symbol, correcting
>>> the original text if such action is indicated. abortAction is
>>> invoked if the proposedKeyword couldn't be converted into a valid
>>> selector. Spots is an ordered collection of intervals within the
>>> test stream of the for each of the keyword parts."
>>>
>>> + | correctSelector userSelection |
>>> - | alternatives aStream choice correctSelector userSelection lines
>>> firstLine |
>>> "If we can't ask the user, assume that the keyword will be defined
>>> later"
>>> self interactive ifFalse: [ ^ proposedKeyword asSymbol ].
>>>
>>> + userSelection _ requestor selectionInterval.
>>> - userSelection := requestor selectionInterval.
>>> requestor selectFrom: spots first first to: spots last last.
>>> requestor select.
>>> - alternatives := Symbol possibleSelectorsFor: proposedKeyword.
>>> - self flag: #toBeFixed.
>>> - "alternatives addAll: (MultiSymbol possibleSelectorsFor:
>>> proposedKeyword)."
>>>
>>> + correctSelector _ UnknownSelector name: proposedKeyword.
>>> + correctSelector ifNil: [ ^ abortAction value ].
>>> - aStream := WriteStream on: (String new: 200).
>>> - aStream nextPutAll: (proposedKeyword contractTo: 35); cr.
>>> - firstLine := 1.
>>> - alternatives do:
>>> - [:sel | aStream nextPutAll: (sel contractTo: 35); nextPut:
>>> Character cr].
>>> - aStream nextPutAll: 'cancel'.
>>> - lines := Array with: firstLine with: (alternatives size +
>>> firstLine).
>>> -
>>> - choice := (UIManager default
>>> - chooseFrom: (aStream contents substrings)
>>> - lines: lines
>>> - title: 'Unknown selector, please\confirm, correct, or cancel'
>>> withCRs).
>>> -
>>> - (choice = 0) | (choice > (lines at: 2))
>>> - ifTrue: [ ^ abortAction value ].
>>>
>>> requestor deselect.
>>> requestor selectInvisiblyFrom: userSelection first to:
>>> userSelection last.
>>>
>>> - choice = 1 ifTrue: [ ^ proposedKeyword asSymbol ].
>>> - correctSelector := alternatives at: choice - 1.
>>> self substituteSelector: correctSelector keywords wordIntervals:
>>> spots.
>>> + ((proposedKeyword last ~~ $:) and: [correctSelector last == $:])
>>> ifTrue: [
>>> - ((proposedKeyword last ~= $:) and: [correctSelector last == $:])
>>> ifTrue: [
>>> ^ abortAction value].
>>> ^ correctSelector.
>>> !
>>>
>>> Item was added:
>>> + ----- Method: UnknownSelector>>openMenuIn: (in category 'as yet
>>> unclassified') -----
>>> + openMenuIn: aBlock
>>> + | alternatives labels lines caption choice |
>>> + alternatives _ Symbol possibleSelectorsFor: name.
>>> + labels _ Array streamContents:
>>> + [:s | s nextPut: name; nextPutAll: alternatives; nextPut:
>>> 'cancel'].
>>> + lines _ {1. alternatives size + 1}.
>>> + caption _ 'Unknown selector, please\confirm, correct, or cancel'
>>> withCRs.
>>> +
>>> + choice _ aBlock value: labels value: lines value: caption.
>>> + choice = 0 ifTrue: [self resume: nil].
>>> + choice = 1 ifTrue: [self resume: name asSymbol].
>>> + choice = labels size ifTrue: [self resume: nil].
>>> + self resume: (alternatives at: choice - 1).!
>>>
>>> Item was added:
>>> + ParserNotification subclass: #UnknownSelector
>>> + instanceVariableNames: ''
>>> + classVariableNames: ''
>>> + poolDictionaries: ''
>>> + category: 'Compiler-Exceptions'!
>>>
>>> Item was changed:
>>> ----- Method: Parser>>queryUndefined (in category 'error
>>> correction') -----
>>> queryUndefined
>>> | varStart varName |
>>> + varName _ parseNode key.
>>> + varStart _ self endOfLastToken + requestorOffset - varName size +
>>> 1.
>>> - varName := parseNode key.
>>> - varStart := self endOfLastToken + requestorOffset - varName size
>>> + 1.
>>> requestor selectFrom: varStart to: varStart + varName size - 1;
>>> select.
>>> + (UndefinedVariable name: varName) ifFalse: [^ self fail]!
>>> - (UIManager default chooseFrom: #('yes' 'no') title:
>>> - ((varName , ' appears to be
>>> - undefined at this point.
>>> - Proceed anyway?') asText makeBoldFrom: 1 to: varName size))
>>> - = 1 ifFalse: [^ self fail]!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>selectFrom:to: (in category
>>> 'emulating') -----
>>> + selectFrom: start to: end
>>> + !
>>>
>>> Item was added:
>>> + ----- Method: ParserNotification class>>name: (in category 'as yet
>>> unclassified') -----
>>> + name: aString
>>> + ^ (self new setName: aString) signal!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>testUnknownSelector (in
>>> category 'tests') -----
>>> + testUnknownSelector
>>> + self
>>> + should:
>>> + [self class
>>> + compile: 'griffle self reallyHopeThisIsntImplementedAnywhere'
>>> + notifying: self]
>>> + raise: UnknownSelector!
>>>
>>> Item was changed:
>>> ----- Method: Parser>>correctVariable:interval: (in category 'error
>>> correction') -----
>>> + correctVariable: proposedVariable interval: spot
>>> - correctVariable: proposedVariable interval: spot
>>> "Correct the proposedVariable to a known variable, or declare it
>>> as a new
>>> variable if such action is requested. We support declaring
>>> lowercase
>>> variables as temps or inst-vars, and uppercase variables as
>>> Globals or
>>> ClassVars, depending on whether the context is nil
>>> (class=UndefinedObject).
>>> Spot is the interval within the test stream of the variable.
>>> rr 3/4/2004 10:26 : adds the option to define a new class. "
>>>
>>> - | tempIvar labels actions lines alternatives binding
>>> userSelection choice action |
>>> -
>>> "Check if this is an i-var, that has been corrected already (ugly)"
>>> - (encoder classEncoding allInstVarNames includes:
>>> proposedVariable) ifTrue: [
>>> - ^InstanceVariableNode new
>>> - name: proposedVariable
>>> - index: (encoder classEncoding allInstVarNames indexOf:
>>> proposedVariable)].
>>> -
>>> - "If we can't ask the user for correction, make it undeclared"
>>> - self interactive
>>> - ifFalse: [ ^encoder undeclared: proposedVariable ].
>>> -
>>> - "First check to see if the requestor knows anything about the
>>> variable"
>>> - tempIvar := proposedVariable first canBeNonGlobalVarInitial.
>>> - (tempIvar and: [ (binding := requestor bindingOf:
>>> proposedVariable) notNil ])
>>> - ifTrue: [ ^encoder global: binding name: proposedVariable ].
>>> - userSelection := requestor selectionInterval.
>>> - requestor selectFrom: spot first to: spot last.
>>> - requestor select.
>>> -
>>> - "Build the menu with alternatives"
>>> - labels := OrderedCollection new. actions := OrderedCollection
>>> new. lines := OrderedCollection new.
>>> - alternatives := encoder possibleVariablesFor: proposedVariable.
>>> - tempIvar
>>> - ifTrue: [
>>> - labels add: 'declare temp'.
>>> - actions add: [ self declareTempAndPaste: proposedVariable ].
>>> - labels add: 'declare instance'.
>>> - actions add: [ self declareInstVar: proposedVariable ] ]
>>> - ifFalse: [
>>> - labels add: 'define new class'.
>>> - actions add: [self defineClass: proposedVariable].
>>> - labels add: 'declare global'.
>>> - actions add: [ self declareGlobal: proposedVariable ].
>>> - encoder classEncoding == UndefinedObject ifFalse: [
>>> - labels add: 'declare class variable'.
>>> - actions add: [ self declareClassVar: proposedVariable ] ] ].
>>> - lines add: labels size.
>>> - alternatives do: [ :each |
>>> - labels add: each.
>>> - actions add: [
>>> - self substituteWord: each wordInterval: spot offset: 0.
>>> - encoder encodeVariable: each ] fixTemps ].
>>> - lines add: labels size.
>>> - labels add: 'cancel'.
>>>
>>> "Display the pop-up menu"
>>> +
>>> + | tempIvar binding userSelection action |
>>> + (encoder classEncoding instVarNames includes: proposedVariable)
>>> + ifTrue:
>>> + [^(LiteralVariableNode new)
>>> + name: proposedVariable
>>> + index: (encoder classEncoding instVarNames indexOf:
>>> proposedVariable) - 1
>>> + type: 1;
>>> + yourself].
>>> +
>>> + "If we can't ask the user for correction, make it undeclared"
>>> + self interactive ifFalse: [^encoder undeclared:
>>> proposedVariable].
>>> +
>>> + "First check to see if the requestor knows anything about the
>>> variable"
>>> + tempIvar := proposedVariable first isLowercase.
>>> + (tempIvar and: [(binding := requestor bindingOf:
>>> proposedVariable) notNil])
>>> + ifTrue: [^encoder global: binding name: proposedVariable].
>>> + userSelection := requestor selectionInterval.
>>> + requestor selectFrom: spot first to: spot last.
>>> + requestor select.
>>> +
>>> + "Build the menu with alternatives"
>>> + action := UndeclaredVariable
>>> + signalFor: self
>>> + name: proposedVariable
>>> + inRange: spot.
>>> + action ifNil: [^self fail].
>>> - choice := (UIManager default chooseFrom: labels asArray lines:
>>> lines asArray
>>> - title: 'Unknown variable: ', proposedVariable, ' please
>>> correct, or cancel:').
>>> - action := actions at: choice ifAbsent: [ ^self fail ].
>>>
>>> "Execute the selected action"
>>> requestor deselect.
>>> requestor selectInvisiblyFrom: userSelection first to:
>>> userSelection last.
>>> ^action value!
>>>
>>> Item was added:
>>> + ParserNotification subclass: #UndeclaredVariable
>>> + instanceVariableNames: 'parser interval'
>>> + classVariableNames: ''
>>> + poolDictionaries: ''
>>> + category: 'Compiler-Exceptions'!
>>>
>>> Item was added:
>>> + ParserNotification subclass: #UndefinedVariable
>>> + instanceVariableNames: ''
>>> + classVariableNames: ''
>>> + poolDictionaries: ''
>>> + category: 'Compiler-Exceptions'!
>>>
>>> Item was added:
>>> + Notification subclass: #ParserNotification
>>> + instanceVariableNames: 'name'
>>> + classVariableNames: ''
>>> + poolDictionaries: ''
>>> + category: 'Compiler-Exceptions'!
>>>
>>> Item was added:
>>> + ----- Method: UndeclaredVariable>>openMenuIn: (in category 'as yet
>>> unclassified') -----
>>> + openMenuIn: aBlock
>>> + | alternatives labels actions lines caption choice |
>>> + alternatives := parser possibleVariablesFor: name.
>>> + labels := OrderedCollection new.
>>> + actions := OrderedCollection new.
>>> + lines := OrderedCollection new.
>>> + name first isLowercase
>>> + ifTrue:
>>> + [labels add: 'declare temp'.
>>> + actions add: [parser declareTempAndPaste: name].
>>> + labels add: 'declare instance'.
>>> + actions add: [parser declareInstVar: name]]
>>> + ifFalse:
>>> + [labels add: 'define new class'.
>>> + actions add: [parser defineClass: name].
>>> + labels add: 'declare global'.
>>> + actions add: [parser declareGlobal: name].
>>> + parser canDeclareClassVariable
>>> + ifTrue:
>>> + [labels add: 'declare class variable'.
>>> + actions add: [parser declareClassVar: name]]].
>>> + lines add: labels size.
>>> + alternatives do:
>>> + [:each |
>>> + labels add: each.
>>> + actions add: [parser subsituteVariable: each atInterval:
>>> interval] fixTemps].
>>> + lines add: labels size.
>>> + labels add: 'cancel'.
>>> + caption := 'Unknown variable: ' , name , ' please correct, or
>>> cancel:'.
>>> + choice := aBlock value: labels value: lines value: caption.
>>> + self resume: (actions at: choice ifAbsent: [nil])!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>select (in category
>>> 'emulating') -----
>>> + select
>>> + !
>>>
>>> Item was added:
>>> + ----- Method: Parser>>canDeclareClassVariable (in category 'error
>>> correction') -----
>>> + canDeclareClassVariable
>>> + ^encoder classEncoding ~~ UndefinedObject!
>>>
>>> Item was added:
>>> + ----- Method: UndefinedVariable>>openMenuIn: (in category 'as yet
>>> unclassified') -----
>>> + openMenuIn: aBlock
>>> + | labels caption index |
>>> + labels _ #('yes' 'no').
>>> + caption _ name, ' appears to be
>>> + undefined at this point.
>>> + Proceed anyway?'.
>>> +
>>> + index _ aBlock value: labels value: #() value: caption.
>>> + ^ self resume: index = 1!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>selectionInterval (in
>>> category 'emulating') -----
>>> + selectionInterval
>>> + ^ 1 to: 0!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>griffle (in category 'as yet
>>> unclassified') -----
>>> + griffle | goo |!
>>>
>>> Item was changed:
>>> ----- Method: Parser>>removeUnusedTemps (in category 'error
>>> correction') -----
>>> removeUnusedTemps
>>> "Scan for unused temp names, and prompt the user about the
>>> prospect of removing each one found"
>>>
>>> | str end start madeChanges |
>>> + madeChanges _ false.
>>> + str _ requestor text string.
>>> - madeChanges := false.
>>> - str := requestor text string.
>>> ((tempsMark between: 1 and: str size)
>>> and: [(str at: tempsMark) = $|]) ifFalse: [^ self].
>>> encoder unusedTempNames do:
>>> [:temp |
>>> + (UnusedVariable name: temp) ifTrue:
>>> - (UIManager default chooseFrom: #('yes' 'no') title:
>>> - ((temp , ' appears to be\unused in this method.\OK to remove
>>> it?' withCRs) asText makeBoldFrom: 1 to: temp size))
>>> - = 1
>>> - ifTrue:
>>> [(encoder encodeVariable: temp) isUndefTemp
>>> ifTrue:
>>> + [end _ tempsMark.
>>> - [end := tempsMark.
>>> ["Beginning at right temp marker..."
>>> + start _ end - temp size + 1.
>>> - start := end - temp size + 1.
>>> end < temp size or: [temp = (str copyFrom: start to: end)
>>> and: [(str at: start-1) isSeparator & (str at: end+1)
>>> isSeparator]]]
>>> + whileFalse:
>>> + ["Search left for the unused temp"
>>> + end _ requestor nextTokenFrom: end direction: -1].
>>> - whileFalse:
>>> - ["Search left for the unused temp"
>>> - end := requestor nextTokenFrom: end direction: -1].
>>> end < temp size ifFalse:
>>> + [(str at: start-1) = $ ifTrue: [start _ start-1].
>>> - [(str at: start-1) = $ ifTrue: [start := start-1].
>>> requestor correctFrom: start to: end with: ''.
>>> + str _ str copyReplaceFrom: start to: end with: ''.
>>> + madeChanges _ true.
>>> + tempsMark _ tempsMark - (end-start+1)]]
>>> - str := str copyReplaceFrom: start to: end with: ''.
>>> - madeChanges := true.
>>> - tempsMark := tempsMark - (end-start+1)]]
>>> ifFalse:
>>> [self inform:
>>> + 'You''ll first have to remove the
>>> + statement where it''s stored into']]].
>>> + madeChanges ifTrue: [ParserRemovedUnusedTemps signal]!
>>> - 'You''ll first have to remove the\statement where it''s stored
>>> into' withCRs]]].
>>> - madeChanges ifTrue: [ReparseAfterSourceEditing signal]!
>>>
>>> Item was added:
>>> + ParserNotification subclass: #UnusedVariable
>>> + instanceVariableNames: ''
>>> + classVariableNames: ''
>>> + poolDictionaries: ''
>>> + category: 'Compiler-Exceptions'!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>testUndeclaredVariable (in
>>> category 'tests') -----
>>> + testUndeclaredVariable
>>> + self
>>> + should:
>>> + [self class
>>> + compile: 'griffle ^ goo'
>>> + notifying: self]
>>> + raise: UndeclaredVariable!
>>>
>>> Item was added:
>>> + ----- Method: UnusedVariable>>openMenuIn: (in category 'as yet
>>> unclassified') -----
>>> + openMenuIn: aBlock
>>> + | labels caption index |
>>> + labels _ #('yes' 'no').
>>> + caption _ name , ' appears to be
>>> + unused in this method.
>>> + OK to remove it?'.
>>> +
>>> + index _ aBlock value: labels value: #() value: caption.
>>> + self resume: index = 1!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>testUndefinedVariable (in
>>> category 'tests') -----
>>> + testUndefinedVariable
>>> + self
>>> + should:
>>> + [self class
>>> + compile: 'griffle | goo | ^ goo'
>>> + notifying: self]
>>> + raise: UndefinedVariable!
>>>
>>> Item was added:
>>> + ----- Method: Parser>>subsituteVariable:atInterval: (in category
>>> 'error correction') -----
>>> + subsituteVariable: each atInterval: anInterval
>>> + self
>>> + substituteWord: each
>>> + wordInterval: anInterval
>>> + offset: 0.
>>> + ^encoder encodeVariable: each!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>unusedVariableSource (in
>>> category 'private') -----
>>> + unusedVariableSource
>>> + ^ 'griffle
>>> + | goo |
>>> + ^ nil'!
>>>
>>> Item was added:
>>> + ----- Method: UndeclaredVariable>>setParser:name:range: (in
>>> category 'as yet unclassified') -----
>>> + setParser: aParser name: aString range: anInterval
>>> + parser := aParser.
>>> + name := aString.
>>> + interval := anInterval!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>text (in category
>>> 'emulating') -----
>>> + text
>>> + ^ self unusedVariableSource!
>>>
>>> Item was added:
>>> + ----- Method: Parser>>possibleVariablesFor: (in category 'error
>>> correction') -----
>>> + possibleVariablesFor: proposedVariable
>>> + ^encoder possibleVariablesFor: proposedVariable!
>>>
>>> Item was added:
>>> + ----- Method: CompilerExceptionsTest>>testUnusedVariable (in
>>> category 'tests') -----
>>> + testUnusedVariable
>>> + self
>>> + should:
>>> + [self class
>>> + compile: self unusedVariableSource
>>> + notifying: self]
>>> + raise: UnusedVariable!
>>>
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 27, 2009
Re: [Pharo-project] BlockClosure>>isValid
by Henrik Johansen
This was done months ago shortly after closures were introduced, to
make Polymorph work.
The associated tests might be nice to have in Pharo as well though :)
Cheers,
Henry
On Aug 27, 2009, at 8:47 17AM, Stéphane Ducasse wrote:
>
>
> Begin forwarded message:
>
>> From: commits(a)source.squeak.org
>> Date: August 27, 2009 6:02:12 AM CEDT
>> To: squeak-dev(a)lists.squeakfoundation.org
>> Subject: [squeak-dev] The Trunk: Kernel-ar.230.mcz
>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>
>> Andreas Raab uploaded a new version of Kernel to project The Trunk:
>> http://source.squeak.org/trunk/Kernel-ar.230.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Kernel-ar.230
>> Author: ar
>> Time: 26 August 2009, 9:01:37 am
>> UUID: d0759469-14fd-2c40-a5bd-90aab36cd9a5
>> Ancestors: Kernel-ar.229
>>
>> Implementations for BlockClosure>>isValid and
>> asMinimalRepresentation for compatibility of BlockClosure with the
>> when:evaluate: protocol.
>>
>> =============== Diff against Kernel-ar.229 ===============
>>
>> Item was added:
>> + ----- Method: BlockClosure>>isValid (in category 'events-support')
>> -----
>> + isValid
>> + "For use in the when:evaluate: protocol, i.e.,
>> + foo when: #bar evaluate:[self handleBar].
>> + Return true."
>> + ^true!
>>
>> Item was added:
>> + ----- Method: BlockClosure>>asMinimalRepresentation (in category
>> 'events-support') -----
>> + asMinimalRepresentation
>> + "For use in the when:evaluate: protocol, i.e.,
>> + foo when: #bar evaluate:[self handleBar].
>> + Return the receiver."
>> + ^true!
>>
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
Aug. 27, 2009
Re: [Pharo-project] compiler notification :)
by Adrian Lienhard
Stef, I think it would make sense to create issues in the tracker for
these changes so that we can keep track of. With mails they get
quickly lost and forgotten. What do you think?
Cheers,
Adrian
On Aug 27, 2009, at 08:58 , Stéphane Ducasse wrote:
>
>
> Begin forwarded message:
>
>> From: commits(a)source.squeak.org
>> Date: August 26, 2009 6:27:44 AM CEDT
>> To: squeak-dev(a)lists.squeakfoundation.org
>> Subject: [squeak-dev] The Trunk: Compiler-cwp.73.mcz
>> Reply-To: squeak-dev(a)lists.squeakfoundation.org
>>
>> Andreas Raab uploaded a new version of Compiler to project The Trunk:
>> http://source.squeak.org/trunk/Compiler-cwp.73.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Compiler-cwp.73
>> Author: cwp
>> Time: 25 August 2009, 8:45:22 am
>> UUID: 0fc4552f-d0c6-481a-8fa0-2bea842240b2
>> Ancestors: Compiler-rss.72
>>
>> The compiler now uses notifications to signal that a correctable
>> error has been found in the method source, rather than interacting
>> directly with the user.
>>
>> =============== Diff against Compiler-rss.72 ===============
>>
>> Item was added:
>> + ----- Method: ParserNotification>>setName: (in category 'as yet
>> unclassified') -----
>> + setName: aString
>> + name _ aString!
>>
>> Item was changed:
>> SystemOrganization addCategory: #'Compiler-Kernel'!
>> SystemOrganization addCategory: #'Compiler-ParseNodes'!
>> SystemOrganization addCategory: #'Compiler-Support'!
>> SystemOrganization addCategory: #'Compiler-Tests'!
>> SystemOrganization addCategory: #'Compiler-Syntax'!
>> + SystemOrganization addCategory: #'Compiler-Exceptions'!
>>
>> Item was added:
>> + TestCase subclass: #CompilerExceptionsTest
>> + instanceVariableNames: ''
>> + classVariableNames: ''
>> + poolDictionaries: ''
>> + category: 'Compiler-Tests'!
>>
>> Item was added:
>> + ----- Method: ParserNotification>>defaultAction (in category 'as
>> yet unclassified') -----
>> + defaultAction
>> +
>> + self openMenuIn:
>> + [:labels :lines :caption |
>> + UIManager default chooseFrom: labels lines: lines title:
>> caption]!
>>
>> Item was added:
>> + ----- Method: UndeclaredVariable class>>signalFor:name:inRange:
>> (in category 'as yet unclassified') -----
>> + signalFor: aParser name: aString inRange: anInterval
>> + ^ (self new setParser: aParser name: aString range: anInterval)
>> signal!
>>
>> Item was added:
>> + ----- Method: ParserNotification>>openMenuIn: (in category 'as yet
>> unclassified') -----
>> + openMenuIn: aBlock
>> + self subclassResponsibility!
>>
>> Item was changed:
>> ----- Method:
>> Parser>>correctSelector:wordIntervals:exprInterval:ifAbort: (in
>> category 'error correction') -----
>> correctSelector: proposedKeyword wordIntervals: spots exprInterval:
>> expInt ifAbort: abortAction
>> "Correct the proposedKeyword to some selector symbol, correcting
>> the original text if such action is indicated. abortAction is
>> invoked if the proposedKeyword couldn't be converted into a valid
>> selector. Spots is an ordered collection of intervals within the
>> test stream of the for each of the keyword parts."
>>
>> + | correctSelector userSelection |
>> - | alternatives aStream choice correctSelector userSelection lines
>> firstLine |
>> "If we can't ask the user, assume that the keyword will be defined
>> later"
>> self interactive ifFalse: [ ^ proposedKeyword asSymbol ].
>>
>> + userSelection _ requestor selectionInterval.
>> - userSelection := requestor selectionInterval.
>> requestor selectFrom: spots first first to: spots last last.
>> requestor select.
>> - alternatives := Symbol possibleSelectorsFor: proposedKeyword.
>> - self flag: #toBeFixed.
>> - "alternatives addAll: (MultiSymbol possibleSelectorsFor:
>> proposedKeyword)."
>>
>> + correctSelector _ UnknownSelector name: proposedKeyword.
>> + correctSelector ifNil: [ ^ abortAction value ].
>> - aStream := WriteStream on: (String new: 200).
>> - aStream nextPutAll: (proposedKeyword contractTo: 35); cr.
>> - firstLine := 1.
>> - alternatives do:
>> - [:sel | aStream nextPutAll: (sel contractTo: 35); nextPut:
>> Character cr].
>> - aStream nextPutAll: 'cancel'.
>> - lines := Array with: firstLine with: (alternatives size +
>> firstLine).
>> -
>> - choice := (UIManager default
>> - chooseFrom: (aStream contents substrings)
>> - lines: lines
>> - title: 'Unknown selector, please\confirm, correct, or cancel'
>> withCRs).
>> -
>> - (choice = 0) | (choice > (lines at: 2))
>> - ifTrue: [ ^ abortAction value ].
>>
>> requestor deselect.
>> requestor selectInvisiblyFrom: userSelection first to:
>> userSelection last.
>>
>> - choice = 1 ifTrue: [ ^ proposedKeyword asSymbol ].
>> - correctSelector := alternatives at: choice - 1.
>> self substituteSelector: correctSelector keywords wordIntervals:
>> spots.
>> + ((proposedKeyword last ~~ $:) and: [correctSelector last == $:])
>> ifTrue: [
>> - ((proposedKeyword last ~= $:) and: [correctSelector last == $:])
>> ifTrue: [
>> ^ abortAction value].
>> ^ correctSelector.
>> !
>>
>> Item was added:
>> + ----- Method: UnknownSelector>>openMenuIn: (in category 'as yet
>> unclassified') -----
>> + openMenuIn: aBlock
>> + | alternatives labels lines caption choice |
>> + alternatives _ Symbol possibleSelectorsFor: name.
>> + labels _ Array streamContents:
>> + [:s | s nextPut: name; nextPutAll: alternatives; nextPut:
>> 'cancel'].
>> + lines _ {1. alternatives size + 1}.
>> + caption _ 'Unknown selector, please\confirm, correct, or cancel'
>> withCRs.
>> +
>> + choice _ aBlock value: labels value: lines value: caption.
>> + choice = 0 ifTrue: [self resume: nil].
>> + choice = 1 ifTrue: [self resume: name asSymbol].
>> + choice = labels size ifTrue: [self resume: nil].
>> + self resume: (alternatives at: choice - 1).!
>>
>> Item was added:
>> + ParserNotification subclass: #UnknownSelector
>> + instanceVariableNames: ''
>> + classVariableNames: ''
>> + poolDictionaries: ''
>> + category: 'Compiler-Exceptions'!
>>
>> Item was changed:
>> ----- Method: Parser>>queryUndefined (in category 'error
>> correction') -----
>> queryUndefined
>> | varStart varName |
>> + varName _ parseNode key.
>> + varStart _ self endOfLastToken + requestorOffset - varName size +
>> 1.
>> - varName := parseNode key.
>> - varStart := self endOfLastToken + requestorOffset - varName size
>> + 1.
>> requestor selectFrom: varStart to: varStart + varName size - 1;
>> select.
>> + (UndefinedVariable name: varName) ifFalse: [^ self fail]!
>> - (UIManager default chooseFrom: #('yes' 'no') title:
>> - ((varName , ' appears to be
>> - undefined at this point.
>> - Proceed anyway?') asText makeBoldFrom: 1 to: varName size))
>> - = 1 ifFalse: [^ self fail]!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>selectFrom:to: (in category
>> 'emulating') -----
>> + selectFrom: start to: end
>> + !
>>
>> Item was added:
>> + ----- Method: ParserNotification class>>name: (in category 'as yet
>> unclassified') -----
>> + name: aString
>> + ^ (self new setName: aString) signal!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>testUnknownSelector (in
>> category 'tests') -----
>> + testUnknownSelector
>> + self
>> + should:
>> + [self class
>> + compile: 'griffle self reallyHopeThisIsntImplementedAnywhere'
>> + notifying: self]
>> + raise: UnknownSelector!
>>
>> Item was changed:
>> ----- Method: Parser>>correctVariable:interval: (in category 'error
>> correction') -----
>> + correctVariable: proposedVariable interval: spot
>> - correctVariable: proposedVariable interval: spot
>> "Correct the proposedVariable to a known variable, or declare it
>> as a new
>> variable if such action is requested. We support declaring
>> lowercase
>> variables as temps or inst-vars, and uppercase variables as
>> Globals or
>> ClassVars, depending on whether the context is nil
>> (class=UndefinedObject).
>> Spot is the interval within the test stream of the variable.
>> rr 3/4/2004 10:26 : adds the option to define a new class. "
>>
>> - | tempIvar labels actions lines alternatives binding
>> userSelection choice action |
>> -
>> "Check if this is an i-var, that has been corrected already (ugly)"
>> - (encoder classEncoding allInstVarNames includes:
>> proposedVariable) ifTrue: [
>> - ^InstanceVariableNode new
>> - name: proposedVariable
>> - index: (encoder classEncoding allInstVarNames indexOf:
>> proposedVariable)].
>> -
>> - "If we can't ask the user for correction, make it undeclared"
>> - self interactive
>> - ifFalse: [ ^encoder undeclared: proposedVariable ].
>> -
>> - "First check to see if the requestor knows anything about the
>> variable"
>> - tempIvar := proposedVariable first canBeNonGlobalVarInitial.
>> - (tempIvar and: [ (binding := requestor bindingOf:
>> proposedVariable) notNil ])
>> - ifTrue: [ ^encoder global: binding name: proposedVariable ].
>> - userSelection := requestor selectionInterval.
>> - requestor selectFrom: spot first to: spot last.
>> - requestor select.
>> -
>> - "Build the menu with alternatives"
>> - labels := OrderedCollection new. actions := OrderedCollection
>> new. lines := OrderedCollection new.
>> - alternatives := encoder possibleVariablesFor: proposedVariable.
>> - tempIvar
>> - ifTrue: [
>> - labels add: 'declare temp'.
>> - actions add: [ self declareTempAndPaste: proposedVariable ].
>> - labels add: 'declare instance'.
>> - actions add: [ self declareInstVar: proposedVariable ] ]
>> - ifFalse: [
>> - labels add: 'define new class'.
>> - actions add: [self defineClass: proposedVariable].
>> - labels add: 'declare global'.
>> - actions add: [ self declareGlobal: proposedVariable ].
>> - encoder classEncoding == UndefinedObject ifFalse: [
>> - labels add: 'declare class variable'.
>> - actions add: [ self declareClassVar: proposedVariable ] ] ].
>> - lines add: labels size.
>> - alternatives do: [ :each |
>> - labels add: each.
>> - actions add: [
>> - self substituteWord: each wordInterval: spot offset: 0.
>> - encoder encodeVariable: each ] fixTemps ].
>> - lines add: labels size.
>> - labels add: 'cancel'.
>>
>> "Display the pop-up menu"
>> +
>> + | tempIvar binding userSelection action |
>> + (encoder classEncoding instVarNames includes: proposedVariable)
>> + ifTrue:
>> + [^(LiteralVariableNode new)
>> + name: proposedVariable
>> + index: (encoder classEncoding instVarNames indexOf:
>> proposedVariable) - 1
>> + type: 1;
>> + yourself].
>> +
>> + "If we can't ask the user for correction, make it undeclared"
>> + self interactive ifFalse: [^encoder undeclared: proposedVariable].
>> +
>> + "First check to see if the requestor knows anything about the
>> variable"
>> + tempIvar := proposedVariable first isLowercase.
>> + (tempIvar and: [(binding := requestor bindingOf:
>> proposedVariable) notNil])
>> + ifTrue: [^encoder global: binding name: proposedVariable].
>> + userSelection := requestor selectionInterval.
>> + requestor selectFrom: spot first to: spot last.
>> + requestor select.
>> +
>> + "Build the menu with alternatives"
>> + action := UndeclaredVariable
>> + signalFor: self
>> + name: proposedVariable
>> + inRange: spot.
>> + action ifNil: [^self fail].
>> - choice := (UIManager default chooseFrom: labels asArray lines:
>> lines asArray
>> - title: 'Unknown variable: ', proposedVariable, ' please
>> correct, or cancel:').
>> - action := actions at: choice ifAbsent: [ ^self fail ].
>>
>> "Execute the selected action"
>> requestor deselect.
>> requestor selectInvisiblyFrom: userSelection first to:
>> userSelection last.
>> ^action value!
>>
>> Item was added:
>> + ParserNotification subclass: #UndeclaredVariable
>> + instanceVariableNames: 'parser interval'
>> + classVariableNames: ''
>> + poolDictionaries: ''
>> + category: 'Compiler-Exceptions'!
>>
>> Item was added:
>> + ParserNotification subclass: #UndefinedVariable
>> + instanceVariableNames: ''
>> + classVariableNames: ''
>> + poolDictionaries: ''
>> + category: 'Compiler-Exceptions'!
>>
>> Item was added:
>> + Notification subclass: #ParserNotification
>> + instanceVariableNames: 'name'
>> + classVariableNames: ''
>> + poolDictionaries: ''
>> + category: 'Compiler-Exceptions'!
>>
>> Item was added:
>> + ----- Method: UndeclaredVariable>>openMenuIn: (in category 'as yet
>> unclassified') -----
>> + openMenuIn: aBlock
>> + | alternatives labels actions lines caption choice |
>> + alternatives := parser possibleVariablesFor: name.
>> + labels := OrderedCollection new.
>> + actions := OrderedCollection new.
>> + lines := OrderedCollection new.
>> + name first isLowercase
>> + ifTrue:
>> + [labels add: 'declare temp'.
>> + actions add: [parser declareTempAndPaste: name].
>> + labels add: 'declare instance'.
>> + actions add: [parser declareInstVar: name]]
>> + ifFalse:
>> + [labels add: 'define new class'.
>> + actions add: [parser defineClass: name].
>> + labels add: 'declare global'.
>> + actions add: [parser declareGlobal: name].
>> + parser canDeclareClassVariable
>> + ifTrue:
>> + [labels add: 'declare class variable'.
>> + actions add: [parser declareClassVar: name]]].
>> + lines add: labels size.
>> + alternatives do:
>> + [:each |
>> + labels add: each.
>> + actions add: [parser subsituteVariable: each atInterval:
>> interval] fixTemps].
>> + lines add: labels size.
>> + labels add: 'cancel'.
>> + caption := 'Unknown variable: ' , name , ' please correct, or
>> cancel:'.
>> + choice := aBlock value: labels value: lines value: caption.
>> + self resume: (actions at: choice ifAbsent: [nil])!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>select (in category
>> 'emulating') -----
>> + select
>> + !
>>
>> Item was added:
>> + ----- Method: Parser>>canDeclareClassVariable (in category 'error
>> correction') -----
>> + canDeclareClassVariable
>> + ^encoder classEncoding ~~ UndefinedObject!
>>
>> Item was added:
>> + ----- Method: UndefinedVariable>>openMenuIn: (in category 'as yet
>> unclassified') -----
>> + openMenuIn: aBlock
>> + | labels caption index |
>> + labels _ #('yes' 'no').
>> + caption _ name, ' appears to be
>> + undefined at this point.
>> + Proceed anyway?'.
>> +
>> + index _ aBlock value: labels value: #() value: caption.
>> + ^ self resume: index = 1!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>selectionInterval (in
>> category 'emulating') -----
>> + selectionInterval
>> + ^ 1 to: 0!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>griffle (in category 'as yet
>> unclassified') -----
>> + griffle | goo |!
>>
>> Item was changed:
>> ----- Method: Parser>>removeUnusedTemps (in category 'error
>> correction') -----
>> removeUnusedTemps
>> "Scan for unused temp names, and prompt the user about the
>> prospect of removing each one found"
>>
>> | str end start madeChanges |
>> + madeChanges _ false.
>> + str _ requestor text string.
>> - madeChanges := false.
>> - str := requestor text string.
>> ((tempsMark between: 1 and: str size)
>> and: [(str at: tempsMark) = $|]) ifFalse: [^ self].
>> encoder unusedTempNames do:
>> [:temp |
>> + (UnusedVariable name: temp) ifTrue:
>> - (UIManager default chooseFrom: #('yes' 'no') title:
>> - ((temp , ' appears to be\unused in this method.\OK to remove
>> it?' withCRs) asText makeBoldFrom: 1 to: temp size))
>> - = 1
>> - ifTrue:
>> [(encoder encodeVariable: temp) isUndefTemp
>> ifTrue:
>> + [end _ tempsMark.
>> - [end := tempsMark.
>> ["Beginning at right temp marker..."
>> + start _ end - temp size + 1.
>> - start := end - temp size + 1.
>> end < temp size or: [temp = (str copyFrom: start to: end)
>> and: [(str at: start-1) isSeparator & (str at: end+1)
>> isSeparator]]]
>> + whileFalse:
>> + ["Search left for the unused temp"
>> + end _ requestor nextTokenFrom: end direction: -1].
>> - whileFalse:
>> - ["Search left for the unused temp"
>> - end := requestor nextTokenFrom: end direction: -1].
>> end < temp size ifFalse:
>> + [(str at: start-1) = $ ifTrue: [start _ start-1].
>> - [(str at: start-1) = $ ifTrue: [start := start-1].
>> requestor correctFrom: start to: end with: ''.
>> + str _ str copyReplaceFrom: start to: end with: ''.
>> + madeChanges _ true.
>> + tempsMark _ tempsMark - (end-start+1)]]
>> - str := str copyReplaceFrom: start to: end with: ''.
>> - madeChanges := true.
>> - tempsMark := tempsMark - (end-start+1)]]
>> ifFalse:
>> [self inform:
>> + 'You''ll first have to remove the
>> + statement where it''s stored into']]].
>> + madeChanges ifTrue: [ParserRemovedUnusedTemps signal]!
>> - 'You''ll first have to remove the\statement where it''s stored
>> into' withCRs]]].
>> - madeChanges ifTrue: [ReparseAfterSourceEditing signal]!
>>
>> Item was added:
>> + ParserNotification subclass: #UnusedVariable
>> + instanceVariableNames: ''
>> + classVariableNames: ''
>> + poolDictionaries: ''
>> + category: 'Compiler-Exceptions'!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>testUndeclaredVariable (in
>> category 'tests') -----
>> + testUndeclaredVariable
>> + self
>> + should:
>> + [self class
>> + compile: 'griffle ^ goo'
>> + notifying: self]
>> + raise: UndeclaredVariable!
>>
>> Item was added:
>> + ----- Method: UnusedVariable>>openMenuIn: (in category 'as yet
>> unclassified') -----
>> + openMenuIn: aBlock
>> + | labels caption index |
>> + labels _ #('yes' 'no').
>> + caption _ name , ' appears to be
>> + unused in this method.
>> + OK to remove it?'.
>> +
>> + index _ aBlock value: labels value: #() value: caption.
>> + self resume: index = 1!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>testUndefinedVariable (in
>> category 'tests') -----
>> + testUndefinedVariable
>> + self
>> + should:
>> + [self class
>> + compile: 'griffle | goo | ^ goo'
>> + notifying: self]
>> + raise: UndefinedVariable!
>>
>> Item was added:
>> + ----- Method: Parser>>subsituteVariable:atInterval: (in category
>> 'error correction') -----
>> + subsituteVariable: each atInterval: anInterval
>> + self
>> + substituteWord: each
>> + wordInterval: anInterval
>> + offset: 0.
>> + ^encoder encodeVariable: each!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>unusedVariableSource (in
>> category 'private') -----
>> + unusedVariableSource
>> + ^ 'griffle
>> + | goo |
>> + ^ nil'!
>>
>> Item was added:
>> + ----- Method: UndeclaredVariable>>setParser:name:range: (in
>> category 'as yet unclassified') -----
>> + setParser: aParser name: aString range: anInterval
>> + parser := aParser.
>> + name := aString.
>> + interval := anInterval!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>text (in category
>> 'emulating') -----
>> + text
>> + ^ self unusedVariableSource!
>>
>> Item was added:
>> + ----- Method: Parser>>possibleVariablesFor: (in category 'error
>> correction') -----
>> + possibleVariablesFor: proposedVariable
>> + ^encoder possibleVariablesFor: proposedVariable!
>>
>> Item was added:
>> + ----- Method: CompilerExceptionsTest>>testUnusedVariable (in
>> category 'tests') -----
>> + testUnusedVariable
>> + self
>> + should:
>> + [self class
>> + compile: self unusedVariableSource
>> + notifying: self]
>> + raise: UnusedVariable!
>>
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Aug. 27, 2009