The Trunk: Compiler-nice.174.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Compiler-nice.174.mcz

commits-2
Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.174.mcz

==================== Summary ====================

Name: Compiler-nice.174
Author: nice
Time: 10 October 2010, 5:51:12.369 pm
UUID: 61855825-aa9b-47ef-a4cb-cbf9e34486f5
Ancestors: Compiler-nice.173

Prevent the compiler to be pedantic with inlined messages.
When the selector is special (#ifTrue:ifFalse: #to:do: etc...), but the receiver or the arguments are not the Block expected by the inliner, the compiler pedantically #notify: the user and refuse to compile.
Change this behaviour so that a normal send occurs.

=============== Diff against Compiler-nice.173 ===============

Item was changed:
  ----- Method: MessageNode>>checkBlock:as:from:maxArgs: (in category 'private') -----
  checkBlock: node as: nodeName from: encoder maxArgs: maxArgs
  "vb: #canBeSpecialArgument for blocks hardcodes 0 arguments as the requirement for special blocks. We work around that here by further checking the number of arguments for blocks.."
 
  node canBeSpecialArgument ifTrue:
  [^node isBlockNode].
  ^node isBlockNode
  ifTrue:
  [node numberOfArguments <= maxArgs
  ifTrue: [true]
  ifFalse: [encoder notify: '<- ', nodeName , ' of ' ,
  (MacroSelectors at: special) , ' has too many arguments']]
  ifFalse:
+ [false]!
- [encoder notify: '<- ', nodeName , ' of ' ,
- (MacroSelectors at: special) , ' must be a block or variable']!