LLVMTypeFloat.st
changeset 27 b26354bbff25
child 33 feabf14b6c1d
equal deleted inserted replaced
26:f6379df4b5ea 27:b26354bbff25
       
     1 "
       
     2     Copyright (C) 2015-now Jan Vrany
       
     3 
       
     4     This code is not an open-source (yet). You may use this code
       
     5     for your own experiments and projects, given that:
       
     6 
       
     7     * all modification to the code will be sent to the
       
     8       original author for inclusion in future releases
       
     9     * this is not used in any commercial software
       
    10 
       
    11     This license is provisional and may (will) change in
       
    12     a future.
       
    13 "
       
    14 "{ Package: 'jv:llvm_s' }"
       
    15 
       
    16 "{ NameSpace: Smalltalk }"
       
    17 
       
    18 LLVMType subclass:#LLVMTypeFloat
       
    19 	instanceVariableNames:''
       
    20 	classVariableNames:''
       
    21 	poolDictionaries:''
       
    22 	category:'LLVM-S-Core-Types'
       
    23 !
       
    24 
       
    25 !LLVMTypeFloat class methodsFor:'documentation'!
       
    26 
       
    27 copyright
       
    28 "
       
    29     Copyright (C) 2015-now Jan Vrany
       
    30 
       
    31     This code is not an open-source (yet). You may use this code
       
    32     for your own experiments and projects, given that:
       
    33 
       
    34     * all modification to the code will be sent to the
       
    35       original author for inclusion in future releases
       
    36     * this is not used in any commercial software
       
    37 
       
    38     This license is provisional and may (will) change in
       
    39     a future.
       
    40 "
       
    41 ! !
       
    42 
       
    43 !LLVMTypeFloat methodsFor:'accessing'!
       
    44 
       
    45 sizeInBits
       
    46     "For integer, pointer, FP  types, return the size in bits. For all 
       
    47      other types, throw an LLVMTypeError.
       
    48 
       
    49      LLVMType int32 sizeInBits -> 32
       
    50      LLVMType int1 sizeInBits  -> 1
       
    51     "
       
    52     ^ 32
       
    53 
       
    54     "Created: / 13-08-2015 / 17:02:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    55 ! !
       
    56 
       
    57 !LLVMTypeFloat methodsFor:'testing'!
       
    58 
       
    59 isFloatType
       
    60     ^ true
       
    61 
       
    62     "Created: / 13-08-2015 / 16:51:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    63 ! !
       
    64