Levente Uzonyi uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-ul.193.mcz
==================== Summary ====================
Name: Compiler-ul.193 Author: ul Time: 28 February 2011, 7:27:29.293 am UUID: 2676a6c5-2140-814f-b508-e35126bd2c85 Ancestors: Compiler-nice.192
- removed guarding clauses from MessageNode's #checkBlock:as:from:maxArgs: and #transformCase: - removed all implementations of #canBeSpecialArgument
=============== Diff against Compiler-nice.192 ===============
Item was removed: - ----- Method: BlockNode>>canBeSpecialArgument (in category 'testing') ----- - canBeSpecialArgument - "Can I be an argument of (e.g.) ifTrue:?" - - ^arguments size = 0!
Item was changed: ----- Method: MessageNode>>checkBlock:as:from:maxArgs: (in category 'private') ----- checkBlock: node as: nodeName from: encoder maxArgs: maxArgs "Answer true if node is a BlockNode with at most maxArgs arguments. This check is required in order to inline some special messages. Notify some undue usage of these special messages."
+ node isBlockNode ifFalse: [ ^false ]. + node numberOfArguments <= maxArgs ifTrue: [ ^true ]. + ^encoder notify: '<- ', nodeName , ' of ' , (MacroSelectors at: special) , ' has too many arguments'! - node isBlockNode - ifTrue: - [node numberOfArguments <= maxArgs - ifTrue: [^true] - ifFalse: [encoder notify: '<- ', nodeName , ' of ' , - (MacroSelectors at: special) , ' has too many arguments']]. - ^false!
Item was changed: ----- Method: MessageNode>>transformCase: (in category 'macro transformations') ----- transformCase: encoder
| caseNode | caseNode := arguments first. + (caseNode isMemberOf: BraceNode) ifFalse: [ ^false ]. + (caseNode blockAssociationCheck: encoder) ifFalse: [ ^false ]. + (arguments size = 1 or: [ + self checkBlock: arguments last as: 'otherwise arg' from: encoder ]) ifFalse: [ + ^false ]. + caseNode elements do: [ :messageNode | + messageNode receiver noteOptimizedIn: self. + messageNode arguments first noteOptimizedIn: self ]. + arguments size = 2 ifTrue: [ arguments last noteOptimizedIn: self ]. + ^true! - (caseNode isMemberOf: BraceNode) ifTrue: - [((caseNode blockAssociationCheck: encoder) - and: [arguments size = 1 - or: [self checkBlock: arguments last as: 'otherwise arg' from: encoder]]) ifFalse: - [^false]. - caseNode elements do: - [:messageNode| - messageNode receiver noteOptimizedIn: self. - messageNode arguments first noteOptimizedIn: self]. - arguments size = 2 ifTrue: - [arguments last noteOptimizedIn: self]. - ^true]. - ^false!
Item was removed: - ----- Method: ParseNode>>canBeSpecialArgument (in category 'testing') ----- - canBeSpecialArgument - "Can I be an argument of (e.g.) ifTrue:?" - - ^false!
Item was removed: - ----- Method: VariableNode>>canBeSpecialArgument (in category 'testing') ----- - canBeSpecialArgument - "Can I be an argument of (e.g.) ifTrue:?" - - ^code < LdNil!
packages@lists.squeakfoundation.org