[squeak-dev] Block Equality (and startpc)

Sean P. DeNigris sean at clipperadams.com
Sat Oct 5 02:37:23 UTC 2019


Currently,
BlockClosure >> #= aClosure
	self == aClosure ifTrue: [^true].
	aClosure class = self class ifFalse: [^false].
	(self method == aClosure method and: [startpc = aClosure startpc and: [self
isClean]]) "<--- this line"
		ifTrue: [^true].
	^outerContext = aClosure outerContext and: [startpc = aClosure startpc]

I wonder about `startpc = aClosure startpc` the first time it appears (in
the comment-marked line). With it, in a workspace, the following is false:
`[1] = [1]`, but removing that test makes it true. I'm not an expert on
blocks, but doesn't `#isClean` preclude the need/desire for a startpc check
in that statement?



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list