[squeak-dev] The Trunk: Kernel-ul.611.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 4 01:09:15 UTC 2011


Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.611.mcz

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

Name: Kernel-ul.611
Author: ul
Time: 3 August 2011, 1:45:38.639 am
UUID: f6f9f434-559e-4442-a77a-58e4c0e29442
Ancestors: Kernel-nice.610

Removed unnecessary blocks.

=============== Diff against Kernel-nice.610 ===============

Item was changed:
  ----- Method: Behavior>>compiledMethodAt:ifAbsent: (in category 'accessing method dictionary') -----
  compiledMethodAt: selector ifAbsent: aBlock
  	"Answer the compiled method associated with the argument, selector (a Symbol), a message selector in the receiver's method dictionary. If the selector is not in the dictionary, return the value of aBlock"
  
+ 	^ self methodDict at: selector ifAbsent: aBlock!
- 	^ self methodDict at: selector ifAbsent: [aBlock value]!

Item was changed:
  ----- Method: BlockClosure>>on:do:on:do: (in category 'exceptions') -----
  on: exc1 do: block1 on: exc2 do: block2
  
  	^[
+ 		self
- 		[ self value ]
  			on: exc1
  			do: block1 ]
- 
  		on: exc2
  		do: block2!

Item was changed:
  ----- Method: BlockClosure>>on:do:on:do:on:do: (in category 'exceptions') -----
  on: exc1 do: block1 on: exc2 do: block2 on: exc3 do: block3
  
  	^[
+ 		self
- 		[ self value ]
  			on: exc1
  			do: block1 ]
- 
  		on: exc2
  		do: block2
- 
  		on: exc3
  		do: block3!

Item was changed:
  ----- Method: BlockClosure>>valueSupplyingAnswers: (in category 'evaluating') -----
  valueSupplyingAnswers: aListOfPairs
  	"evaluate the block using a list of questions / answers that might be called upon to
  	automatically respond to Object>>confirm: or FillInTheBlank requests"
  
+ 	^self
- 	^ [self value] 
  		on: ProvideAnswerNotification
+ 		do: [ :notification |
+ 			| caption |
+ 			caption := notification messageText withSeparatorsCompacted. "to remove new lines"
+ 			aListOfPairs
+ 				detect:  [ :each |
+ 					caption = each first
+ 						or: [ (caption includesSubstring: each first caseSensitive: false)
+ 						or: [ each first match: caption ] ] ]
+ 				ifFound: [ :answer | notification resume: answer second ]
+ 				ifNone: [
+ 					(ProvideAnswerNotification signal: notification messageText)
+ 						ifNil: [ notification resume ]
+ 						ifNotNil: [ :outerAnswer | notification resume: outerAnswer ] ] ]!
- 		do: 
- 			[:notify | | answer caption |
- 			
- 			caption := notify messageText withSeparatorsCompacted. "to remove new lines"
- 			answer := aListOfPairs
- 				detect: 
- 					[:each | caption = each first
- 						or: [(caption includesSubstring: each first caseSensitive: false)
- 						or: [each first match: caption]]]
- 					ifNone: [nil].
- 			answer
- 				ifNotNil: [notify resume: answer second]
- 				ifNil: 
- 					[ | outerAnswer |
- 					outerAnswer := ProvideAnswerNotification signal: notify messageText.
- 					outerAnswer 
- 						ifNil: [notify resume] 
- 						ifNotNil: [notify resume: outerAnswer]]]!

Item was changed:
  ----- Method: BlockContext>>on:do:on:do: (in category 'exceptions') -----
  on: exc1 do: block1 on: exc2 do: block2
  
  	^[
+ 		self
- 		[ self value ]
  			on: exc1
  			do: block1 ]
- 
  		on: exc2
  		do: block2!

Item was changed:
  ----- Method: BlockContext>>on:do:on:do:on:do: (in category 'exceptions') -----
  on: exc1 do: block1 on: exc2 do: block2 on: exc3 do: block3
  
  	^[
+ 		self
- 		[ self value ]
  			on: exc1
  			do: block1 ]
- 
  		on: exc2
  		do: block2
- 
  		on: exc3
  		do: block3!

Item was changed:
  ----- Method: BlockContext>>valueSupplyingAnswers: (in category 'evaluating') -----
  valueSupplyingAnswers: aListOfPairs
  	"evaluate the block using a list of questions / answers that might be called upon to
  	automatically respond to Object>>confirm: or FillInTheBlank requests"
  
+ 	^self
- 	^ [self value] 
  		on: ProvideAnswerNotification
  		do: 
  			[:notify | | answer caption |
  			
  			caption := notify messageText withSeparatorsCompacted. "to remove new lines"
  			answer := aListOfPairs
  				detect: 
  					[:each | caption = each first
  						or: [(caption includesSubstring: each first caseSensitive: false)
  						or: [each first match: caption]]]
  					ifNone: [nil].
  			answer
  				ifNotNil: [notify resume: answer second]
  				ifNil: 
  					[ | outerAnswer |
  					outerAnswer := ProvideAnswerNotification signal: notify messageText.
  					outerAnswer 
  						ifNil: [notify resume] 
  						ifNotNil: [notify resume: outerAnswer]]]!

Item was changed:
  ----- Method: Object>>removeActionsSatisfying:forEvent: (in category 'events-removing') -----
  removeActionsSatisfying: aOneArgBlock 
  forEvent: anEventSelector
  
      self
          setActionSequence:
              ((self actionSequenceForEvent: anEventSelector)
+                 reject: aOneArgBlock)
-                 reject: [:anAction | aOneArgBlock value: anAction])
          forEvent: anEventSelector!

Item was changed:
  ----- Method: WeakMessageSend>>valueOtherwise: (in category 'evaluating') -----
  valueOtherwise: aBlock
+ 
  	^ arguments
  		ifNil: [
+ 			self withEnsuredReceiverDo: [ :r | r perform: selector ] otherwise: aBlock ]
- 			self withEnsuredReceiverDo: [ :r | r perform: selector ] otherwise: [ aBlock value ]]
  		ifNotNil: [
  			self
  				withEnsuredReceiverAndArgumentsDo: [ :r :a |
  					r
  						perform: selector
  						withArguments: a ]
+ 				otherwise: aBlock ]!
- 				otherwise: [ aBlock value ]]!

Item was changed:
  ----- Method: WeakMessageSend>>valueWithArguments:otherwise: (in category 'evaluating') -----
  valueWithArguments: anArray otherwise: aBlock
  	| argsToUse |
  	
  	"Safe to use, because they are built before ensureing receiver and args..."
  	argsToUse := self collectArguments: anArray.
  	^ self
  		withEnsuredReceiverAndArgumentsDo: [ :r :a |
  			r
  				perform: selector
  				withArguments: argsToUse ]
+ 		otherwise: aBlock!
- 		otherwise: [ aBlock value ]!




More information about the Squeak-dev mailing list