The Trunk: Kernel-ul.1059.mcz

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

The Trunk: Kernel-ul.1059.mcz

commits-2
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/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

=============== 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!