--- a/compiler/TUnionType.st Wed Sep 02 09:18:00 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-"{ Package: 'jv:tea/compiler' }"
-
-"{ NameSpace: Smalltalk }"
-
-TType subclass:#TUnionType
- instanceVariableNames:'types'
- classVariableNames:''
- poolDictionaries:''
- category:'Languages-Tea-Compiler-Types'
-!
-
-!TUnionType class methodsFor:'instance creation'!
-
-with: type1 with: type2
- ^ self new initializeWith: type1 and: type2
-
- "Created: / 21-08-2015 / 18:38:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-withAll: types
- ^ self new initializeWithAll: types
-
- "Created: / 25-08-2015 / 22:51:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!TUnionType methodsFor:'accessing'!
-
-types
- ^ types
-! !
-
-!TUnionType methodsFor:'comparing'!
-
-hash
- | h |
-
- h := types size.
- types do:[:type | h := h bitXor: type hash ].
- ^ h
-
- "Created: / 25-08-2015 / 23:35:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!TUnionType methodsFor:'initialization'!
-
-initializeWith: type1 with: type2
- type1 isUnionType
- ifTrue: [ types := type1 types copy ]
- ifFalse:[ types := Array with: type1 ].
- type2 isUnionType
- ifTrue: [ types := types , type2 types ]
- ifFalse:[ types := types copyWith: type2 ].
-
- "Created: / 21-08-2015 / 18:39:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-initializeWithAll: aCollection
- types := OrderedCollection new: aCollection size.
- aCollection do:[:type |
- type isUnionType
- ifTrue:[ types addAll: type types ]
- ifFalse:[types add: type ].
- ].
- types := types asArray.
-
- "Created: / 25-08-2015 / 22:50:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!TUnionType methodsFor:'testing'!
-
-isUnionType
- ^ true
-! !
-