--- a/LLVMType.st Fri Aug 07 14:10:48 2015 +0100
+++ b/LLVMType.st Sat Aug 08 04:43:00 2015 +0100
@@ -72,13 +72,13 @@
!LLVMType class methodsFor:'types - integers'!
int1
- Int64 isNil ifTrue:[
- Int64 := LLVM Int64Type
+ Int1 isNil ifTrue:[
+ Int1 := LLVM Int1Type
].
- ^ Int64
+ ^ Int1
"Created: / 07-07-2015 / 21:21:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 11-07-2015 / 07:01:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-08-2015 / 04:23:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
int16
@@ -122,6 +122,20 @@
"Created: / 07-07-2015 / 21:59:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!LLVMType methodsFor:'comparing'!
+
+= anotherType
+ ^ anotherType isLLVMType and:[ self address == anotherType address ]
+
+ "Created: / 08-08-2015 / 02:56:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hash
+ ^ self address
+
+ "Created: / 08-08-2015 / 02:50:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!LLVMType methodsFor:'converting'!
pointer
@@ -155,8 +169,12 @@
printOn: aStream
| kind |
- super printOn: aStream.
+ self class name printOn:aStream.
+ aStream nextPut:$(.
+ self address printOn:aStream base:16.
+ aStream space.
aStream nextPutAll: self dumpString.
+ "
aStream nextPutAll: ' ['.
kind := self kind.
kind == LLVMVoidTypeKind ifTrue:[
@@ -191,8 +209,11 @@
aStream nextPutAll:'x86-mmx'
]]]]]]]]]]]]]]].
aStream nextPutAll: ']'.
+ "
+ aStream nextPut:$).
"Created: / 11-07-2015 / 07:08:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-08-2015 / 04:21:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!LLVMType methodsFor:'testing'!
@@ -203,6 +224,14 @@
"Created: / 11-07-2015 / 14:56:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+isLLVMType
+ "Return true, if receiver represents an LLVM type"
+
+ ^ true
+
+ "Created: / 08-08-2015 / 02:46:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
isVectorType
^ self kind == LLVMVectorTypeKind