[squeak-dev] The Inbox: Kernel-ul.1059.mcz

Tobias Pape Das.Linux at gmx.de
Sat Feb 11 08:24:25 UTC 2017


Hi Levente

On 11.02.2017, at 03:04, commits at source.squeak.org wrote:

> Levente Uzonyi uploaded a new version of Kernel to project The Inbox:
> http://source.squeak.org/inbox/Kernel-ul.1059.mcz
> 
> ==================== Summary ====================
> 
> Name: Kernel-ul.1059
> Author: ul
> Time: 11 February 2017, 3:00:22.370854 am
> UUID: b88b767b-b0d8-43ff-ba86-a19b11affe6d
> Ancestors: Kernel-ul.1058
> 
> - check the type of the argument of #& and #| of booleans

Why do we want the check?
I see no advantage…

Best regards
	-Tobias

> 
> =============== Diff against Kernel-ul.1058 ===============
> 
> Item was changed:
>  ----- Method: False>>& (in category 'logical operations') -----
>  & aBoolean 
> + 	"Evaluating conjunction -- answer false since receiver is false, but let the VM quickly check the type of the argument first."
> - 	"Evaluating conjunction -- answer false since receiver is false."
> 
> + 	aBoolean ifFalse: [ ^false ].
> + 	^false!
> - 	^self!
> 
> Item was changed:
>  ----- Method: False>>| (in category 'logical operations') -----
>  | aBoolean 
> + 	"Evaluating disjunction (OR) -- could  answer aBoolean since receiver is false, but let the VM quickly check the type of the argument instead."
> - 	"Evaluating disjunction (OR) -- answer with the argument, aBoolean."
> 
> + 	aBoolean ifTrue: [ ^true ].
> + 	^false!
> - 	^aBoolean!
> 
> Item was changed:
>  ----- Method: True>>& (in category 'logical operations') -----
>  & aBoolean 
> + 	"Evaluating conjunction -- could answer aBoolean since receiver is true, but let the VM quickly check the type of the argument instead."
> - 	"Evaluating conjunction -- answer aBoolean since receiver is true."
> 
> + 	aBoolean ifFalse: [ ^false ].
> + 	^true!
> - 	^aBoolean!
> 
> Item was changed:
>  ----- Method: True>>| (in category 'logical operations') -----
>  | aBoolean 
> + 	"Evaluating disjunction (OR) -- answer true since the receiver is true, but let the VM quickly check the type of the argument first."
> - 	"Evaluating disjunction (OR) -- answer true since the receiver is true."
> 
> + 	aBoolean ifTrue: [ ^true ].
> + 	^true!
> - 	^self!
> 
> 



More information about the Squeak-dev mailing list