Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.239.mcz ==================== Summary ==================== Name: Compiler-eem.239 Author: eem Time: 5 November 2012, 3:09:13.298 pm UUID: 074c58f2-bc92-4c3f-adff-56c47d3884ef Ancestors: Compiler-eem.238 Eliminate horrible side-effect in printing whileTrue/whileFalse nodes that undid the tranformation to whileTrue:/whileFalse:. =============== Diff against Compiler-eem.238 =============== Item was changed: ----- Method: MessageNode>>printWhileOn:indent: (in category 'printing') ----- printWhileOn: aStream indent: level - self printReceiver: receiver on: aStream indent: level. + self + printKeywords: originalSelector + arguments: originalArguments - (arguments isEmpty not - and: [arguments first isJust: NodeNil]) ifTrue: - [selector := SelectorNode new - key: - (selector key == #whileTrue: - ifTrue: [#whileTrue] - ifFalse: [#whileFalse]) - code: #macro. - arguments := Array new]. - self printKeywords: selector key arguments: arguments on: aStream indent: level! |
Some kind of Heisenberg principle, you cannot observe a node without
some sort of interaction ;). We should create a price for the best anti-pattern of the month. It's invaluable for teaching. Nicolas 2012/11/6 <[hidden email]>: > Eliot Miranda uploaded a new version of Compiler to project The Trunk: > http://source.squeak.org/trunk/Compiler-eem.239.mcz > > ==================== Summary ==================== > > Name: Compiler-eem.239 > Author: eem > Time: 5 November 2012, 3:09:13.298 pm > UUID: 074c58f2-bc92-4c3f-adff-56c47d3884ef > Ancestors: Compiler-eem.238 > > Eliminate horrible side-effect in printing whileTrue/whileFalse > nodes that undid the tranformation to whileTrue:/whileFalse:. > > =============== Diff against Compiler-eem.238 =============== > > Item was changed: > ----- Method: MessageNode>>printWhileOn:indent: (in category 'printing') ----- > printWhileOn: aStream indent: level > - > self printReceiver: receiver on: aStream indent: level. > + self > + printKeywords: originalSelector > + arguments: originalArguments > - (arguments isEmpty not > - and: [arguments first isJust: NodeNil]) ifTrue: > - [selector := SelectorNode new > - key: > - (selector key == #whileTrue: > - ifTrue: [#whileTrue] > - ifFalse: [#whileFalse]) > - code: #macro. > - arguments := Array new]. > - self printKeywords: selector key arguments: arguments > on: aStream indent: level! > > |
This update results in a new test failure in ClosureCompilerTest>>testDecompiledDoitMethodTempNames.
This is probably just a test issue that can be fixed with an update to ClosureCompilerTest>>closureCases, but I am not an expert here. Eliot, Nicolas - could one of you please check this and fix the test if that is what is required? Also, a new test to document the problem being fixed by this update would be a good thing. Thanks, Dave On Tue, Nov 06, 2012 at 01:03:30PM +0100, Nicolas Cellier wrote: > Some kind of Heisenberg principle, you cannot observe a node without > some sort of interaction ;). > We should create a price for the best anti-pattern of the month. > It's invaluable for teaching. > > Nicolas > > 2012/11/6 <[hidden email]>: > > Eliot Miranda uploaded a new version of Compiler to project The Trunk: > > http://source.squeak.org/trunk/Compiler-eem.239.mcz > > > > ==================== Summary ==================== > > > > Name: Compiler-eem.239 > > Author: eem > > Time: 5 November 2012, 3:09:13.298 pm > > UUID: 074c58f2-bc92-4c3f-adff-56c47d3884ef > > Ancestors: Compiler-eem.238 > > > > Eliminate horrible side-effect in printing whileTrue/whileFalse > > nodes that undid the tranformation to whileTrue:/whileFalse:. > > > > =============== Diff against Compiler-eem.238 =============== > > > > Item was changed: > > ----- Method: MessageNode>>printWhileOn:indent: (in category 'printing') ----- > > printWhileOn: aStream indent: level > > - > > self printReceiver: receiver on: aStream indent: level. > > + self > > + printKeywords: originalSelector > > + arguments: originalArguments > > - (arguments isEmpty not > > - and: [arguments first isJust: NodeNil]) ifTrue: > > - [selector := SelectorNode new > > - key: > > - (selector key == #whileTrue: > > - ifTrue: [#whileTrue] > > - ifFalse: [#whileFalse]) > > - code: #macro. > > - arguments := Array new]. > > - self printKeywords: selector key arguments: arguments > > on: aStream indent: level! > > > > |
In reply to this post by Nicolas Cellier
On Tue, Nov 6, 2012 at 4:03 AM, Nicolas Cellier <[hidden email]> wrote: Some kind of Heisenberg principle, you cannot observe a node without :) it confused the hell out of me yesterday as i tried ti debug some compiler stuff. It was the explorer that invoked printing and that wasn't obvious either :)
It's invaluable for teaching. best, Eliot |
In reply to this post by David T. Lewis
On Tue, Nov 6, 2012 at 5:44 AM, David T. Lewis <[hidden email]> wrote: This update results in a new test failure in ClosureCompilerTest>>testDecompiledDoitMethodTempNames. done. checking in soon.
will do.
best, Eliot |
On Tue, Nov 6, 2012 at 12:54 PM, Eliot Miranda <[hidden email]> wrote:
Hmmm. Turns out to be rather hard to write the test. Both the new code and the old code are trying to print whileTrue: [] as whileTrue, and the compiler is trying to compile whileTrue: [] as whileTrue. So all forces move against leaving whileTrue: [] alone, and the bug was that the old code would transform whileTrue: [] into whileTrue when printing. So forgive me for now but I'll fix the decompiler and not write the test for the original fix :-/.
best, Eliot |
On Tue, Nov 06, 2012 at 01:11:08PM -0800, Eliot Miranda wrote:
> On Tue, Nov 6, 2012 at 12:54 PM, Eliot Miranda <[hidden email]>wrote: > > > > > > > On Tue, Nov 6, 2012 at 5:44 AM, David T. Lewis <[hidden email]>wrote: > > > >> This update results in a new test failure in > >> ClosureCompilerTest>>testDecompiledDoitMethodTempNames. > >> This is probably just a test issue that can be fixed with an update to > >> ClosureCompilerTest>>closureCases, but I am not an expert here. > >> > >> Eliot, Nicolas - could one of you please check this and fix the test if > >> that is what is required? > >> > > > > done. checking in soon. > > > > > >> > >> Also, a new test to document the problem being fixed by this update would > >> be a good thing. > >> > > > > will do. > > > > Hmmm. Turns out to be rather hard to write the test. Both the new code > and the old code are trying to print whileTrue: [] as whileTrue, and the > compiler is trying to compile whileTrue: [] as whileTrue. So all forces > move against leaving whileTrue: [] alone, and the bug was that the old code > would transform whileTrue: [] into whileTrue when printing. So forgive me > for now but I'll fix the decompiler and not write the test for the original > fix :-/. Phew! Thanks a lot for following up on this, #testDecompiledDoitMethodTempNames is passing now. Dave |
Free forum by Nabble | Edit this page |