Hi Juan,
here's a fix (inline and attached), but I haven't tested it on to:by:do:, which has a more complex transformation.
ensureCanCascade: encoder
special > 0 ifTrue: [special := 0. selector := encoder encodeSelector: selector key. "Undo transformation of e.g. ifTrue: to ifTrue:ifFalse:" arguments size > selector key numArgs ifTrue: [arguments := arguments copyFrom: 1 to: selector key numArgs]. "deoptimize any block args" arguments do: [:each| each isBlockNode ifTrue: [each deoptimize]]]
On Wed, Mar 2, 2011 at 11:46 AM, Juan Vuletich juan@jvuletich.org wrote:
Hi Folks,
commits@source.squeak.org wrote:
Nicolas Cellier uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-nice.189.mcz
==================== Summary ====================
Name: Compiler-nice.189 Author: nice Time: 13 February 2011, 7:44:38.363 pm UUID: 3f6f02cd-1acf-48de-a388-b5ac55e27055 Ancestors: Compiler-nice.188
Enable cascading of special messages by deoptimizing, thanks Eliot. This is mostly useless, but it removes an arbitrary limitation of the language.
=============== Diff against Compiler-nice.188 ===============
I integrated this nice code in Cuis, and tried:
true ifTrue: [ Transcript cr; show: 'was true' ]; yourself
I found that this works ok with the interpreter but does nothing in Cog. A bug, right?
Cheers, Juan Vuletich