LLVMValue.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 18 Sep 2015 06:19:28 +0100
changeset 43 597181c496f0
parent 33 feabf14b6c1d
child 61 c2e287d54de5
permissions -rw-r--r--
Added value-kind testing functions to LLVMValue so once can test whether the value #isFunction, #isInstruction, #isReturnInst and so on. Automatically LLVMValue to LLVMFunction (in LLVMValue>>initialize)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     1
"
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     2
    Copyright (C) 2015-now Jan Vrany
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     3
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     4
    This code is not an open-source (yet). You may use this code
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     5
    for your own experiments and projects, given that:
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     6
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     7
    * all modification to the code will be sent to the
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     8
      original author for inclusion in future releases
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
     9
    * this is not used in any commercial software
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    10
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    11
    This license is provisional and may (will) change in
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    12
    a future.
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    13
"
12
f98e97fd02ef Package renamed from jv:libllvms to jv:llvm_s
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    14
"{ Package: 'jv:llvm_s' }"
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
"{ NameSpace: Smalltalk }"
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
1
e3dcb6272f0b Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
    18
LLVMObject subclass:#LLVMValue
5
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    19
	instanceVariableNames:'type'
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
	classVariableNames:''
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
	poolDictionaries:''
13
fa967c0e1827 Renamed class categories to begin with LLVM-S
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12
diff changeset
    22
	category:'LLVM-S-Core'
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
!
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
14
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    25
!LLVMValue class methodsFor:'documentation'!
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    26
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    27
copyright
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    28
"
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    29
    Copyright (C) 2015-now Jan Vrany
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    30
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    31
    This code is not an open-source (yet). You may use this code
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    32
    for your own experiments and projects, given that:
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    33
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    34
    * all modification to the code will be sent to the
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    35
      original author for inclusion in future releases
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    36
    * this is not used in any commercial software
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    37
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    38
    This license is provisional and may (will) change in
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    39
    a future.
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    40
"
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    41
! !
c7dea3fcc5a7 Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    42
4
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    43
!LLVMValue methodsFor:'accessing'!
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    44
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    45
name
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    46
    ^ LLVM GetValueName: self
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    47
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    48
    "Created: / 11-07-2015 / 07:28:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    49
!
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    50
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    51
name: aString
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    52
    ^ LLVM SetValueName: self  _: aString
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    53
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    54
    "Created: / 11-07-2015 / 07:31:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    55
!
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    56
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    57
type
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    58
    type isNil ifTrue:[ 
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    59
        type := LLVM TypeOf: self.  
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    60
    ].
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    61
    ^ type
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    62
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    63
    "Created: / 11-07-2015 / 14:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    64
! !
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
    65
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    66
!LLVMValue methodsFor:'converting'!
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    67
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    68
asBasicBlock
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    69
    "Return the underlying basic block if the value represents
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    70
     a basic block. Otherwise raise an error"
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    71
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
    72
    self isBasicBlock ifFalse:[ 
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    73
        self error: 'Not a basic block value'.
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    74
    ].
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    75
    ^ LLVM ValueAsBasicBlock: self
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    76
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    77
    "Created: / 08-08-2015 / 02:16:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
    78
    "Modified: / 17-09-2015 / 19:25:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    79
!
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    80
33
feabf14b6c1d Initial support for generating (DWARF) debug info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    81
asLLVMMetadata
feabf14b6c1d Initial support for generating (DWARF) debug info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    82
    ^ LLVMCEXT ValueAsMetadata: self
feabf14b6c1d Initial support for generating (DWARF) debug info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    83
feabf14b6c1d Initial support for generating (DWARF) debug info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    84
    "Created: / 15-08-2015 / 06:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
feabf14b6c1d Initial support for generating (DWARF) debug info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    85
!
feabf14b6c1d Initial support for generating (DWARF) debug info.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 23
diff changeset
    86
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    87
asLLVMValue
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    88
    ^ self
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    89
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    90
    "Created: / 08-08-2015 / 02:28:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    91
! !
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
    92
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
!LLVMValue methodsFor:'debugging'!
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
2
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
    95
inspectorExtraAttributes 
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
    96
    | d |
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
    97
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
    98
    d := super inspectorExtraAttributes.      
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
    99
    d add: '-dump' -> [ self dumpString ].
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   100
    ^ d
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   101
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   102
    "Created: / 10-07-2015 / 14:36:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   103
! !
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   104
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   105
!LLVMValue methodsFor:'debugging-dumping'!
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
2
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   107
dumpOn: aStream
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   108
    aStream nextPutAll: self dumpString
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   109
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   110
    "Created: / 10-07-2015 / 14:32:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   111
!
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   112
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   113
dumpString
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   114
    | cstr str|
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   115
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   116
    cstr := LLVM PrintValueToString: self.
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   117
    str := cstr copyCStringFromHeap.
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   118
    LLVM DisposeMessage: cstr.
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   119
    ^ str
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   120
53abac7217de Added support for creating execution engines and fetching function addresses.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1
diff changeset
   121
    "Created: / 10-07-2015 / 14:31:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
   122
!
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
4
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
   124
printOn: aStream
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   125
    | name |
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   126
4
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
   127
    super printOn: aStream.
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   128
    aStream nextPut: $(.
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   129
    name := self name.
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   130
    name notEmptyOrNil ifTrue:[ 
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   131
        aStream nextPutAll: name
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   132
    ] ifFalse:[ 
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   133
        aStream nextPutAll: '<anon>'
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   134
    ].
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   135
    aStream space.
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   136
    aStream nextPutAll: self type dumpString.
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   137
    aStream nextPut: $)
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
4
d33c64726c86 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2
diff changeset
   139
    "Created: / 11-07-2015 / 07:09:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   140
    "Modified: / 08-08-2015 / 04:22:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
! !
38af781b75ab First shot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   143
!LLVMValue methodsFor:'initialization'!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   144
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   145
initialize
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   146
    self class == LLVMValue ifTrue:[ 
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   147
        self isFunction ifTrue:[ 
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   148
            self changeClassTo: LLVMFunction.
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   149
        ].
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   150
    ].
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   151
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   152
    "Created: / 18-09-2015 / 06:14:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   153
! !
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   154
5
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   155
!LLVMValue methodsFor:'testing'!
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   156
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   157
isAddrSpaceCastInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   158
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   159
    ^ LLVM IsAAddrSpaceCastInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   160
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   161
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   162
isAllocaInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   163
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   164
    ^ LLVM IsAAllocaInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   165
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   166
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   167
isArgument
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   168
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   169
    ^ LLVM IsAArgument: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   170
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   171
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   172
isBasicBlock
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   173
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   174
    ^ LLVM IsABasicBlock: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   175
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   176
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   177
isBinaryOperator
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   178
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   179
    ^ LLVM IsABinaryOperator: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   180
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   181
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   182
isBitCastInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   183
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   184
    ^ LLVM IsABitCastInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   185
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   186
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   187
isBlockAddress
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   188
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   189
    ^ LLVM IsABlockAddress: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   190
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   191
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   192
isBranchInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   193
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   194
    ^ LLVM IsABranchInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   195
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   196
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   197
isCallInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   198
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   199
    ^ LLVM IsACallInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   200
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   201
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   202
isCastInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   203
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   204
    ^ LLVM IsACastInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   205
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   206
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   207
isCatchEndPadInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   208
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   209
    ^ LLVM IsACatchEndPadInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   210
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   211
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   212
isCatchPadInst
16
23e82cf19788 Tests refactored to be actually a testcase. Introduced LLVMConstant class
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14
diff changeset
   213
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   214
    ^ LLVM IsACatchPadInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   215
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   216
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   217
isCatchReturnInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   218
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   219
    ^ LLVM IsACatchReturnInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   220
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   221
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   222
isCleanupPadInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   223
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   224
    ^ LLVM IsACleanupPadInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   225
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   226
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   227
isCleanupReturnInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   228
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   229
    ^ LLVM IsACleanupReturnInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   230
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   231
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   232
isCmpInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   233
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   234
    ^ LLVM IsACmpInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   235
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   236
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   237
isConstant
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   238
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   239
    ^ LLVM IsAConstant: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   240
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   241
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   242
isConstantAggregateZero
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   243
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   244
    ^ LLVM IsAConstantAggregateZero: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   245
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   246
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   247
isConstantArray
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   248
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   249
    ^ LLVM IsAConstantArray: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   250
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   251
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   252
isConstantDataArray
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   253
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   254
    ^ LLVM IsAConstantDataArray: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   255
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   256
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   257
isConstantDataSequential
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   258
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   259
    ^ LLVM IsAConstantDataSequential: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   260
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   261
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   262
isConstantDataVector
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   263
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   264
    ^ LLVM IsAConstantDataVector: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   265
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   266
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   267
isConstantExpr
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   268
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   269
    ^ LLVM IsAConstantExpr: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   270
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   271
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   272
isConstantFP
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   273
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   274
    ^ LLVM IsAConstantFP: self
16
23e82cf19788 Tests refactored to be actually a testcase. Introduced LLVMConstant class
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14
diff changeset
   275
!
23e82cf19788 Tests refactored to be actually a testcase. Introduced LLVMConstant class
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14
diff changeset
   276
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   277
isConstantInt
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   278
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   279
    ^ LLVM IsAConstantInt: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   280
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   281
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   282
isConstantPointerNull
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   283
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   284
    ^ LLVM IsAConstantPointerNull: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   285
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   286
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   287
isConstantStruct
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   288
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   289
    ^ LLVM IsAConstantStruct: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   290
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   291
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   292
isConstantVector
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   293
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   294
    ^ LLVM IsAConstantVector: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   295
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   296
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   297
isDbgDeclareInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   298
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   299
    ^ LLVM IsADbgDeclareInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   300
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   301
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   302
isDbgInfoIntrinsic
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   303
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   304
    ^ LLVM IsADbgInfoIntrinsic: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   305
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   306
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   307
isExtractElementInst
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   308
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   309
    ^ LLVM IsAExtractElementInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   310
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   311
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   312
isExtractValueInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   313
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   314
    ^ LLVM IsAExtractValueInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   315
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   316
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   317
isFCmpInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   318
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   319
    ^ LLVM IsAFCmpInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   320
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   321
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   322
isFPExtInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   323
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   324
    ^ LLVM IsAFPExtInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   325
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   326
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   327
isFPToSIInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   328
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   329
    ^ LLVM IsAFPToSIInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   330
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   331
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   332
isFPToUIInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   333
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   334
    ^ LLVM IsAFPToUIInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   335
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   336
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   337
isFPTruncInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   338
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   339
    ^ LLVM IsAFPTruncInst: self
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   340
!
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   341
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   342
isFunction
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   343
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   344
    ^ LLVM IsAFunction: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   345
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   346
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   347
isGetElementPtrInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   348
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   349
    ^ LLVM IsAGetElementPtrInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   350
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   351
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   352
isGlobalAlias
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   353
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   354
    ^ LLVM IsAGlobalAlias: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   355
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   356
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   357
isGlobalObject
5
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   358
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   359
    ^ LLVM IsAGlobalObject: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   360
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   361
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   362
isGlobalValue
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   363
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   364
    ^ LLVM IsAGlobalValue: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   365
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   366
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   367
isGlobalVariable
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   368
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   369
    ^ LLVM IsAGlobalVariable: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   370
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   371
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   372
isICmpInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   373
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   374
    ^ LLVM IsAICmpInst: self
5
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   375
!
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   376
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   377
isIndirectBrInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   378
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   379
    ^ LLVM IsAIndirectBrInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   380
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   381
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   382
isInlineAsm
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   383
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   384
    ^ LLVM IsAInlineAsm: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   385
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   386
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   387
isInsertElementInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   388
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   389
    ^ LLVM IsAInsertElementInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   390
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   391
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   392
isInsertValueInst
5
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   393
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   394
    ^ LLVM IsAInsertValueInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   395
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   396
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   397
isInstruction
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   398
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   399
    ^ LLVM IsAInstruction: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   400
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   401
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   402
isIntToPtrInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   403
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   404
    ^ LLVM IsAIntToPtrInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   405
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   406
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   407
isIntrinsicInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   408
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   409
    ^ LLVM IsAIntrinsicInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   410
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   411
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   412
isInvokeInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   413
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   414
    ^ LLVM IsAInvokeInst: self
22
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   415
!
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   416
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   417
isLLVMValue
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   418
    ^ true
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   419
789a35bd30ac Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   420
    "Created: / 08-08-2015 / 03:28:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
43
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   421
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   422
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   423
isLandingPadInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   424
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   425
    ^ LLVM IsALandingPadInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   426
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   427
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   428
isLoadInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   429
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   430
    ^ LLVM IsALoadInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   431
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   432
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   433
isMDNode
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   434
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   435
    ^ LLVM IsAMDNode: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   436
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   437
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   438
isMDString
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   439
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   440
    ^ LLVM IsAMDString: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   441
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   442
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   443
isMemCpyInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   444
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   445
    ^ LLVM IsAMemCpyInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   446
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   447
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   448
isMemIntrinsic
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   449
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   450
    ^ LLVM IsAMemIntrinsic: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   451
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   452
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   453
isMemMoveInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   454
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   455
    ^ LLVM IsAMemMoveInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   456
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   457
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   458
isMemSetInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   459
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   460
    ^ LLVM IsAMemSetInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   461
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   462
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   463
isPHINode
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   464
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   465
    ^ LLVM IsAPHINode: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   466
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   467
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   468
isPtrToIntInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   469
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   470
    ^ LLVM IsAPtrToIntInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   471
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   472
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   473
isResumeInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   474
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   475
    ^ LLVM IsAResumeInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   476
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   477
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   478
isReturnInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   479
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   480
    ^ LLVM IsAReturnInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   481
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   482
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   483
isSExtInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   484
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   485
    ^ LLVM IsASExtInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   486
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   487
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   488
isSIToFPInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   489
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   490
    ^ LLVM IsASIToFPInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   491
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   492
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   493
isSelectInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   494
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   495
    ^ LLVM IsASelectInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   496
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   497
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   498
isShuffleVectorInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   499
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   500
    ^ LLVM IsAShuffleVectorInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   501
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   502
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   503
isStoreInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   504
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   505
    ^ LLVM IsAStoreInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   506
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   507
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   508
isSwitchInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   509
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   510
    ^ LLVM IsASwitchInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   511
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   512
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   513
isTerminatePadInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   514
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   515
    ^ LLVM IsATerminatePadInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   516
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   517
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   518
isTerminatorInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   519
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   520
    ^ LLVM IsATerminatorInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   521
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   522
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   523
isTruncInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   524
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   525
    ^ LLVM IsATruncInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   526
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   527
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   528
isUIToFPInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   529
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   530
    ^ LLVM IsAUIToFPInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   531
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   532
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   533
isUnaryInstruction
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   534
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   535
    ^ LLVM IsAUnaryInstruction: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   536
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   537
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   538
isUndefValue
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   539
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   540
    ^ LLVM IsAUndefValue: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   541
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   542
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   543
isUnreachableInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   544
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   545
    ^ LLVM IsAUnreachableInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   546
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   547
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   548
isUser
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   549
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   550
    ^ LLVM IsAUser: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   551
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   552
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   553
isVAArgInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   554
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   555
    ^ LLVM IsAVAArgInst: self
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   556
!
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   557
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   558
isZExtInst
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   559
597181c496f0 Added value-kind testing functions to LLVMValue
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 33
diff changeset
   560
    ^ LLVM IsAZExtInst: self
5
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   561
! !
3ac0c9381634 Temporary commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   562
23
0744cd9c0acc Added an example of iterative factorial function
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 22
diff changeset
   563
!LLVMValue class methodsFor:'documentation'!
0744cd9c0acc Added an example of iterative factorial function
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 22
diff changeset
   564
0744cd9c0acc Added an example of iterative factorial function
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 22
diff changeset
   565
version_HG
0744cd9c0acc Added an example of iterative factorial function
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 22
diff changeset
   566
0744cd9c0acc Added an example of iterative factorial function
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 22
diff changeset
   567
    ^ '$Changeset: <not expanded> $'
0744cd9c0acc Added an example of iterative factorial function
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 22
diff changeset
   568
! !
0744cd9c0acc Added an example of iterative factorial function
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 22
diff changeset
   569