LLVMTypeInteger.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 06 Jul 2016 22:40:59 +0100
changeset 71 ab03b0a6d037
parent 53 bbf3a88e2358
permissions -rw-r--r--
Implemented LLVMType>>sizeInBits/sizeInBytes for all data types ...i.e., also for structures, vectors and arrays.

"
    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 }"

LLVMTypeScalar subclass:#LLVMTypeInteger
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'LLVM-S-Core-Types'
!

!LLVMTypeInteger 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.
"
! !

!LLVMTypeInteger methodsFor:'converting'!

vector: numberOfElements
    "Create a fixed-size vector whose elements are of type of receiver."

    self assertIsIntegerUnsigned: numberOfElements.  
    ^ LLVM VectorType: self _:  numberOfElements

    "Created: / 13-08-2015 / 18:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!LLVMTypeInteger methodsFor:'testing'!

isIntegerType
    ^ true

    "Created: / 13-08-2015 / 16:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!LLVMTypeInteger class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !