[Pkg] The Trunk: Kernel-ul.577.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Apr 30 02:06:52 UTC 2011


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

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

Name: Kernel-ul.577
Author: ul
Time: 30 April 2011, 4:06:16.848 am
UUID: f674fdde-21e4-f14c-a297-a29dfe42219c
Ancestors: Kernel-ul.576, Kernel-ul.575

Merged.

=============== Diff against Kernel-ul.576 ===============

Item was removed:
- ----- Method: BlockContext>>copyTo:blocks: (in category 'private') -----
- copyTo: aContext blocks: dict
- 	"Copy self and my sender chain down to, but not including, aContext.  End of copied chain will have nil sender.  BlockContexts whose home is also copied will point to the copy.  However, blockContexts that are not on the stack but may be later will not have their home pointing in the new copied thread.  So an error will be raised if one of these tries to return directly to its home."
- 
- 	| copy |
- 	self == aContext ifTrue: [^ nil].
- 	copy := self copy.
- 	(dict at: self home ifAbsentPut: [OrderedCollection new]) add: copy.
- 	self sender ifNotNil: [
- 		copy privSender: (self sender copyTo: aContext blocks: dict)].
- 	^ copy!

Item was changed:
  ----- Method: ContextPart>>copyTo: (in category 'query') -----
  copyTo: aContext
+ 	"Copy self and my sender chain down to, but not including, aContext.  End of copied chain will have nil sender."
- 	"Copy self and my sender chain down to, but not including, aContext.  End of copied chain will have nil sender.  BlockContexts whose home is also copied will point to the copy.  However, blockContexts that are not on the stack but may be later will not have their home pointing in the new copied thread.  So an error will be raised if one of these tries to return directly to its home.  It is best to use BlockClosures instead.  They only hold a ContextTag, which will work for all copies of the original home context."
  
+ 	| copy |
+ 	self == aContext ifTrue: [ ^nil ].
+ 	copy := self copy.
+ 	sender ifNotNil: [ copy privSender: (sender copyTo: aContext) ].
+ 	^copy!
- 	^ self copyTo: aContext blocks: IdentityDictionary new!

Item was removed:
- ----- Method: ContextPart>>copyTo:blocks: (in category 'private') -----
- copyTo: aContext blocks: dict
- 	"Copy self and my sender chain down to, but not including, aContext.  End of copied chain will have nil sender.  BlockContexts whose home is also copied will point to the copy.  However, blockContexts that are not on the stack but may be later will not have their home pointing in the new copied thread.  So an error will be raised if one of these tries to return directly to its home."
- 
- 	| copy |
- 	self == aContext ifTrue: [^ nil].
- 	copy := self copy.
- 	dict at: self ifPresent: [:blocks | blocks do: [:b | b privHome: copy]].
- 	self sender ifNotNil: [
- 		copy privSender: (self sender copyTo: aContext blocks: dict)].
- 	^ copy!

Item was added:
+ ----- Method: ContextPart>>copyTo:bottomContextDo: (in category 'query') -----
+ copyTo: aContext bottomContextDo: aBlock
+ 	"Copy self and my sender chain down to, but not including, aContext.  End of copied chain will have nil sender. Evaluate aBlock with the copy of bottom context when it still points to the original sender."
+ 
+ 	| copy |
+ 	self == aContext ifTrue: [ ^nil ].
+ 	copy := self copy.
+ 	sender
+ 		ifNil: [ aBlock value: copy ]
+ 		ifNotNil: [
+ 			sender == aContext ifTrue: [ aBlock value: copy ].
+ 			copy privSender: (sender copyTo: aContext bottomContextDo: aBlock) ].
+ 	^copy!



More information about the Packages mailing list