[Pkg] The Trunk: Compiler-ul.176.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Oct 27 22:28:13 UTC 2010


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

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

Name: Compiler-ul.176
Author: ul
Time: 24 October 2010, 7:33:17.308 am
UUID: f99f8cfe-e153-bb4e-b917-74dc15472d5a
Ancestors: Compiler-ul.175

- replace LiteralDictionaries with PluggableDictionaries part 2.

=============== Diff against Compiler-ul.175 ===============

Item was removed:
- Dictionary subclass: #LiteralDictionary
- 	instanceVariableNames: ''
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Compiler-Support'!
- 
- !LiteralDictionary commentStamp: '<historical>' prior: 0!
- A LiteralDictionary, like an IdentityDictionary, has a special test for equality.  In this case it is simple equality between objects of like class.  This allows equal Float or String literals to be shared without the possibility of erroneously sharing, say, 1 and 1.0!

Item was removed:
- ----- Method: LiteralDictionary>>literalEquality:and: (in category 'testing') -----
- literalEquality: x and: y
- 	"Check if two literals should be considered equal and reduced to a single literal.
- 	Delegate this task to the literal themselves, they are aware of their peculiarities and know how to behave."
- 	
- 	^ x literalEqual: y
- !

Item was removed:
- ----- Method: LiteralDictionary>>scanFor: (in category 'as yet unclassified') -----
- scanFor: anObject
- 	"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or raise an error if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements."
- 
- 	| index start |
- 	index := start := anObject hash \\ array size + 1.
- 	[ 
- 		| element |
- 		((element := array at: index) == nil or: [
- 			self literalEquality: element key and: anObject ])
- 				ifTrue: [ ^index ].
- 		(index := index \\ array size + 1) = start ] whileFalse.
- 	self errorNoFreeSpace!



More information about the Packages mailing list