LLVMTypePointer.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 11 Aug 2016 09:12:17 +0100
changeset 73 466c492b0062
parent 71 ab03b0a6d037
permissions -rw-r--r--
Oops, fixed examples after a rename #store:_: to #store:at:

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

LLVMTypeSequential subclass:#LLVMTypePointer
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'LLVM-S-Core-Types'
!

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

!LLVMTypePointer methodsFor:'accessing'!

pointee
    ^ LLVM GetElementType: self

    "Created: / 12-10-2015 / 16:23:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!LLVMTypePointer 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>"
! !

!LLVMTypePointer methodsFor:'inspecting'!

inspectorExtraAttributes
    ^ super inspectorExtraAttributes
        at: '-pointee' put: self pointee;
        yourself.

    "Created: / 12-10-2015 / 17:02:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!LLVMTypePointer methodsFor:'testing'!

isPointerType
    ^ true

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

!LLVMTypePointer class methodsFor:'documentation'!

version_HG

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