LLVM type system refactored to use a subclass per kind.
This models LLVM types bit more object-oriented as type-specific methods such as
access to parameter/member types is implemented in specific classes only.
The FFI callouts still return a generic LLVMType, which later changes its class
during it's initialization (see LLVMType>>initialize).
Added some tests for types.
"
Copyright (C) 2015-now Jan Vrany
This code is not an open-source (yet). You may use this code
for your own experiments and projects, given that:
* all modification to the code will be sent to the
original author for inclusion in future releases
* this is not used in any commercial software
This license is provisional and may (will) change in
a future.
"
"{ Package: 'jv:llvm_s' }"
"{ NameSpace: Smalltalk }"
LLVMType subclass:#LLVMTypeDouble
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'LLVM-S-Core-Types'
!
!LLVMTypeDouble class methodsFor:'documentation'!
copyright
"
Copyright (C) 2015-now Jan Vrany
This code is not an open-source (yet). You may use this code
for your own experiments and projects, given that:
* all modification to the code will be sent to the
original author for inclusion in future releases
* this is not used in any commercial software
This license is provisional and may (will) change in
a future.
"
! !
!LLVMTypeDouble methodsFor:'accessing'!
sizeInBits
"For integer, pointer, FP types, return the size in bits. For all
other types, throw an LLVMTypeError.
LLVMType int32 sizeInBits -> 32
LLVMType int1 sizeInBits -> 1
"
^ 64
"Created: / 13-08-2015 / 17:02:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!LLVMTypeDouble methodsFor:'testing'!
isDoubleType
^ true
"Created: / 13-08-2015 / 16:50:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !