Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.192.mcz
==================== Summary ====================
Name: Compiler-nice.192
Author: nice
Time: 20 February 2011, 5:12:00.371 pm
UUID: 3be37582-d3a2-4825-8210-073dd0af3f61
Ancestors: Compiler-ul.191
Let #caseOf: accept any ParseNode argument, not just BraceNode and VariableNode.
Remove usage of canBeSpecialArgument which is now unsent.
=============== Diff against Compiler-ul.191 ===============
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."
- "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 isBlockNode
- node canBeSpecialArgument ifTrue:
- [^node isBlockNode].
- ^node isBlockNode
ifTrue:
[node numberOfArguments <= maxArgs
+ ifTrue: [^true]
- ifTrue: [true]
ifFalse: [encoder notify: '<- ', nodeName , ' of ' ,
+ (MacroSelectors at: special) , ' has too many arguments']].
+ ^false!
- (MacroSelectors at: special) , ' has too many arguments']]
- ifFalse:
- [false]!
Item was changed:
----- Method: MessageNode>>transformCase: (in category 'macro transformations') -----
transformCase: encoder
| caseNode |
caseNode := arguments first.
(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!
- (caseNode canBeSpecialArgument and: [(caseNode isMemberOf: BlockNode) not]) ifTrue:
- [^false]. "caseOf: variable"
- ^encoder notify: 'caseOf: argument must be a brace construct or a variable'!
Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.192.mcz
==================== Summary ====================
Name: Compiler-nice.192
Author: nice
Time: 20 February 2011, 5:12:00.371 pm
UUID: 3be37582-d3a2-4825-8210-073dd0af3f61
Ancestors: Compiler-ul.191
Let #caseOf: accept any ParseNode argument, not just BraceNode and VariableNode.
Remove usage of canBeSpecialArgument which is now unsent.
=============== Diff against Compiler-ul.191 ===============
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."
- "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 isBlockNode
- node canBeSpecialArgument ifTrue:
- [^node isBlockNode].
- ^node isBlockNode
ifTrue:
[node numberOfArguments <= maxArgs
+ ifTrue: [^true]
- ifTrue: [true]
ifFalse: [encoder notify: '<- ', nodeName , ' of ' ,
+ (MacroSelectors at: special) , ' has too many arguments']].
+ ^false!
- (MacroSelectors at: special) , ' has too many arguments']]
- ifFalse:
- [false]!
Item was changed:
----- Method: MessageNode>>transformCase: (in category 'macro transformations') -----
transformCase: encoder
| caseNode |
caseNode := arguments first.
(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!
- (caseNode canBeSpecialArgument and: [(caseNode isMemberOf: BlockNode) not]) ifTrue:
- [^false]. "caseOf: variable"
- ^encoder notify: 'caseOf: argument must be a brace construct or a variable'!
Nicolas Cellier uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-nice.192.mcz
==================== Summary ====================
Name: Compiler-nice.192
Author: nice
Time: 20 February 2011, 5:12:00.371 pm
UUID: 3be37582-d3a2-4825-8210-073dd0af3f61
Ancestors: Compiler-ul.191
Let #caseOf: accept any ParseNode argument, not just BraceNode and VariableNode.
Remove usage of canBeSpecialArgument which is now unsent.
=============== Diff against Compiler-ul.191 ===============
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."
- "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 isBlockNode
- node canBeSpecialArgument ifTrue:
- [^node isBlockNode].
- ^node isBlockNode
ifTrue:
[node numberOfArguments <= maxArgs
+ ifTrue: [^true]
- ifTrue: [true]
ifFalse: [encoder notify: '<- ', nodeName , ' of ' ,
+ (MacroSelectors at: special) , ' has too many arguments']].
+ ^false!
- (MacroSelectors at: special) , ' has too many arguments']]
- ifFalse:
- [false]!
Item was changed:
----- Method: MessageNode>>transformCase: (in category 'macro transformations') -----
transformCase: encoder
| caseNode |
caseNode := arguments first.
(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!
- (caseNode canBeSpecialArgument and: [(caseNode isMemberOf: BlockNode) not]) ifTrue:
- [^false]. "caseOf: variable"
- ^encoder notify: 'caseOf: argument must be a brace construct or a variable'!
Levente Uzonyi uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ul.191.mcz
==================== Summary ====================
Name: Compiler-ul.191
Author: ul
Time: 19 February 2011, 10:02:37.736 pm
UUID: a7628e80-ae41-e348-b9b0-6b5f475cd90b
Ancestors: Compiler-ul.190
Restored VariableNode >> #canBeSpecialArgument, which got lost with Compiler-nice.188 for some unknown reason. It is required to compile #caseOf: with non-brace array arguments.
=============== Diff against Compiler-ul.190 ===============
Item was added:
+ ----- Method: VariableNode>>canBeSpecialArgument (in category 'testing') -----
+ canBeSpecialArgument
+ "Can I be an argument of (e.g.) ifTrue:?"
+
+ ^code < LdNil!
Levente Uzonyi uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ul.191.mcz
==================== Summary ====================
Name: Compiler-ul.191
Author: ul
Time: 19 February 2011, 10:02:37.736 pm
UUID: a7628e80-ae41-e348-b9b0-6b5f475cd90b
Ancestors: Compiler-ul.190
Restored VariableNode >> #canBeSpecialArgument, which got lost with Compiler-nice.188 for some unknown reason. It is required to compile #caseOf: with non-brace array arguments.
=============== Diff against Compiler-ul.190 ===============
Item was added:
+ ----- Method: VariableNode>>canBeSpecialArgument (in category 'testing') -----
+ canBeSpecialArgument
+ "Can I be an argument of (e.g.) ifTrue:?"
+
+ ^code < LdNil!
Levente Uzonyi uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ul.191.mcz
==================== Summary ====================
Name: Compiler-ul.191
Author: ul
Time: 19 February 2011, 10:02:37.736 pm
UUID: a7628e80-ae41-e348-b9b0-6b5f475cd90b
Ancestors: Compiler-ul.190
Restored VariableNode >> #canBeSpecialArgument, which got lost with Compiler-nice.188 for some unknown reason. It is required to compile #caseOf: with non-brace array arguments.
=============== Diff against Compiler-ul.190 ===============
Item was added:
+ ----- Method: VariableNode>>canBeSpecialArgument (in category 'testing') -----
+ canBeSpecialArgument
+ "Can I be an argument of (e.g.) ifTrue:?"
+
+ ^code < LdNil!
Chris Muller uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cmm.547.mcz
==================== Summary ====================
Name: Kernel-cmm.547
Author: cmm
Time: 16 February 2011, 11:17:16.084 am
UUID: 31a5eb93-bfb3-45c7-950a-a92b5860d0fa
Ancestors: Kernel-fbs.546, Kernel-cmm.541
Merged cmm.541.
=============== Diff against Kernel-fbs.546 ===============
Item was changed:
----- Method: Object>>asStringOrText (in category 'converting') -----
asStringOrText
"Answer a string that represents the receiver."
+ ^ self asString!
-
- ^ self printString !
Chris Muller uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cmm.547.mcz
==================== Summary ====================
Name: Kernel-cmm.547
Author: cmm
Time: 16 February 2011, 11:17:16.084 am
UUID: 31a5eb93-bfb3-45c7-950a-a92b5860d0fa
Ancestors: Kernel-fbs.546, Kernel-cmm.541
Merged cmm.541.
=============== Diff against Kernel-fbs.546 ===============
Item was changed:
----- Method: Object>>asStringOrText (in category 'converting') -----
asStringOrText
"Answer a string that represents the receiver."
+ ^ self asString!
-
- ^ self printString !
Chris Muller uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cmm.547.mcz
==================== Summary ====================
Name: Kernel-cmm.547
Author: cmm
Time: 16 February 2011, 11:17:16.084 am
UUID: 31a5eb93-bfb3-45c7-950a-a92b5860d0fa
Ancestors: Kernel-fbs.546, Kernel-cmm.541
Merged cmm.541.
=============== Diff against Kernel-fbs.546 ===============
Item was changed:
----- Method: Object>>asStringOrText (in category 'converting') -----
asStringOrText
"Answer a string that represents the receiver."
+ ^ self asString!
-
- ^ self printString !
Chris Muller uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cmm.541.mcz
==================== Summary ====================
Name: Kernel-cmm.541
Author: cmm
Time: 30 January 2011, 3:12:21.568 pm
UUID: 3d47b3f2-cb83-4759-a9b6-93f6dbda47f7
Ancestors: Kernel-ul.540
#asStringOrText should return the receiver #asString, not printString. This is the correct behavior to be able to render first-class objects in PluggableListMorphs without quotes around them.
=============== Diff against Kernel-ul.540 ===============
Item was changed:
----- Method: Object>>asStringOrText (in category 'converting') -----
asStringOrText
"Answer a string that represents the receiver."
+ ^ self asString!
-
- ^ self printString !