author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sat, 08 Aug 2015 04:43:00 +0100 | |
changeset 22 | 789a35bd30ac |
parent 19 | 706be0fcef22 |
child 23 | 0744cd9c0acc |
permissions | -rw-r--r-- |
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:
9
diff
changeset
|
14 |
"{ Package: 'jv:llvm_s' }" |
0 | 15 |
|
16 |
"{ NameSpace: Smalltalk }" |
|
17 |
||
1
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
18 |
LLVMDisposableObject subclass:#LLVMBuilder |
0 | 19 |
instanceVariableNames:'' |
20 |
classVariableNames:'' |
|
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
21 |
poolDictionaries:'LLVMIntPredicate LLVMRealPredicate' |
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 | 23 |
! |
24 |
||
14
c7dea3fcc5a7
Added short README, license.txt and updated copyright information
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
25 |
!LLVMBuilder 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 |
! ! |
1
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
42 |
|
0 | 43 |
!LLVMBuilder class methodsFor:'instance creation'! |
44 |
||
45 |
new |
|
46 |
^ LLVM CreateBuilder |
|
47 |
||
48 |
"Created: / 07-07-2015 / 22:38:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
49 |
! ! |
|
50 |
||
5 | 51 |
!LLVMBuilder class methodsFor:'generators'! |
52 |
||
53 |
instructions |
|
54 |
^ #( |
|
55 |
add:to: (isIntegerOrVector isIntegerOrVector) |
|
56 |
lsrh:by: (isIntegerOrVector isIntegerOrVector) |
|
57 |
) |
|
58 |
||
59 |
"Created: / 11-07-2015 / 13:05:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
60 |
! ! |
|
61 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
62 |
!LLVMBuilder methodsFor:'assertions'! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
63 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
64 |
assertIsBasicBlockValue:value |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
65 |
<resource: #skipInDebuggersWalkback> |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
66 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
67 |
self assert:value isLLVMValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
68 |
self assert:value isBasicBlockValue |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
69 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
70 |
"Created: / 08-08-2015 / 02:43:57 / 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:
19
diff
changeset
|
71 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
72 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
73 |
assertIsIntegerOrIntegerVectorValue:value |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
74 |
<resource: #skipInDebuggersWalkback> |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
75 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
76 |
self assert:(value class == LLVMValue) message:'value is not an LLVMValue'. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
77 |
self assert:(value isIntegerOrIntegerVectorValue) |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
78 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
79 |
"Modified (format): / 08-08-2015 / 02:41:56 / 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:
19
diff
changeset
|
80 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
81 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
82 |
assertIsString:aString |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
83 |
<resource: #skipInDebuggersWalkback> |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
84 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
85 |
self assert:aString isSingleByteString description:'string is not a valid LLVM name (twine)' |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
86 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
87 |
"Created: / 07-08-2015 / 18:38:16 / 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:
19
diff
changeset
|
88 |
"Modified (format): / 08-08-2015 / 02:41:59 / 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:
19
diff
changeset
|
89 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
90 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
91 |
assertIsValue: value |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
92 |
<resource: #skipInDebuggersWalkback> |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
93 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
94 |
self assert: value isLLVMValue message: 'value is not an LLVMValue'. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
95 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
96 |
"Created: / 08-08-2015 / 03:11:16 / 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:
19
diff
changeset
|
97 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
98 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
99 |
assertIsValue: value ofType: type |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
100 |
<resource: #skipInDebuggersWalkback> |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
101 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
102 |
self assert: value isLLVMValue message: 'value is not an LLVMValue'. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
103 |
self assert: value type = type message: 'value has incorrect type' |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
104 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
105 |
"Created: / 08-08-2015 / 02:49:12 / 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:
19
diff
changeset
|
106 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
107 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
108 |
assertIsValueOfSameType:value1 as:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
109 |
<resource: #skipInDebuggersWalkback> |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
110 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
111 |
self assert: value1 type = value2 type message:'types of values differ!!' |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
112 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
113 |
"Created: / 07-08-2015 / 18:37:29 / 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:
19
diff
changeset
|
114 |
"Modified: / 08-08-2015 / 02:57:28 / 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:
19
diff
changeset
|
115 |
! ! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
116 |
|
1
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
117 |
!LLVMBuilder methodsFor:'initialization & release'! |
0 | 118 |
|
1
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
119 |
dispose |
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
120 |
^ LLVM DisposeBuilder: self. |
0 | 121 |
|
1
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
122 |
"Modified (comment): / 08-07-2015 / 22:39:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 123 |
! ! |
124 |
||
5 | 125 |
!LLVMBuilder methodsFor:'instructions - binary'! |
126 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
127 |
add:value1 _:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
128 |
^ self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
129 |
add:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
130 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
131 |
as:'' |
0 | 132 |
|
5 | 133 |
"Created: / 07-07-2015 / 22:52:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
134 |
"Modified (format): / 11-07-2015 / 13:00:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
135 |
! |
|
136 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
137 |
add:value1 _:value2 as:name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
138 |
self assert:(value1 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
139 |
self assert:value1 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
140 |
self assert:(value2 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
141 |
self assert:value2 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
142 |
self assert:(name isSingleByteString). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
143 |
^ LLVM |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
144 |
BuildAdd:self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
145 |
_:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
146 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
147 |
_:name |
0 | 148 |
|
149 |
"Created: / 07-07-2015 / 22:52:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5 | 150 |
"Modified: / 11-07-2015 / 14:57:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
151 |
! |
|
152 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
153 |
and:value1 _:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
154 |
^ self and:value1 _:value2 as:'' |
5 | 155 |
|
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
156 |
"Created: / 07-08-2015 / 16:51:53 / 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:
19
diff
changeset
|
157 |
"Modified: / 07-08-2015 / 17:56:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5 | 158 |
! |
159 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
160 |
and:value1 _:value2 as: name |
5 | 161 |
self assert: (value1 isKindOf: LLVMValue). |
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
162 |
self assert: value1 isIntegerOrIntegerVectorValue. |
5 | 163 |
self assert: (value2 isKindOf: LLVMValue). |
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
164 |
self assert: value2 isIntegerOrIntegerVectorValue. |
5 | 165 |
self assert: (name isSingleByteString). |
166 |
^LLVM BuildAnd: self _: value1 _: value2 _: name |
|
167 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
168 |
"Created: / 07-08-2015 / 17:56:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5 | 169 |
! |
170 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
171 |
ashr:value1 _:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
172 |
^ self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
173 |
ashr:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
174 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
175 |
as:'' |
5 | 176 |
|
177 |
"Created: / 11-07-2015 / 16:46:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
0 | 178 |
! |
179 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
180 |
ashr:value1 _:value2 as:name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
181 |
self assert:(value1 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
182 |
self assert:value1 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
183 |
self assert:(value2 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
184 |
self assert:value2 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
185 |
self assert:(name isSingleByteString). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
186 |
^ LLVM |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
187 |
BuildAShr:self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
188 |
_:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
189 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
190 |
_:name |
5 | 191 |
|
192 |
"Created: / 11-07-2015 / 16:46:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
193 |
! |
|
194 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
195 |
lshr:value1 _:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
196 |
^ self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
197 |
lshr:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
198 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
199 |
as:'' |
5 | 200 |
|
201 |
"Created: / 11-07-2015 / 13:02:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
202 |
! |
|
203 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
204 |
lshr:value1 _:value2 as:name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
205 |
self assert:(value1 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
206 |
self assert:value1 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
207 |
self assert:(value2 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
208 |
self assert:value2 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
209 |
self assert:(name isSingleByteString). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
210 |
^ LLVM |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
211 |
BuildLShr:self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
212 |
_:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
213 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
214 |
_:name |
5 | 215 |
|
216 |
"Created: / 11-07-2015 / 14:49:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
217 |
! |
|
218 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
219 |
or:value1 _:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
220 |
^ self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
221 |
or:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
222 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
223 |
as:'' |
6 | 224 |
|
225 |
"Created: / 11-07-2015 / 17:17:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
226 |
! |
|
227 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
228 |
or:value1 _:value2 as:name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
229 |
self assert:(value1 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
230 |
self assert:value1 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
231 |
self assert:(value2 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
232 |
self assert:value2 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
233 |
self assert:(name isSingleByteString). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
234 |
^ LLVM |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
235 |
BuildOr:self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
236 |
_:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
237 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
238 |
_:name |
6 | 239 |
|
240 |
"Created: / 11-07-2015 / 17:16:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
241 |
! |
|
242 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
243 |
shl:value1 _:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
244 |
^ self shl:value1 _:value2 as:'' |
5 | 245 |
|
246 |
"Created: / 11-07-2015 / 16:37:17 / 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:
19
diff
changeset
|
247 |
"Modified (format): / 07-08-2015 / 17:58:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5 | 248 |
! |
0 | 249 |
|
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
250 |
shl:value1 _:value2 as:name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
251 |
self assert:(value1 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
252 |
self assert:value1 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
253 |
self assert:(value2 isKindOf:LLVMValue). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
254 |
self assert:value2 isIntegerOrIntegerVectorValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
255 |
self assert:(name isSingleByteString). |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
256 |
^ LLVM |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
257 |
BuildShl:self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
258 |
_:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
259 |
_:value2 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
260 |
_:name |
5 | 261 |
|
262 |
"Created: / 11-07-2015 / 16:37:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
263 |
! ! |
|
264 |
||
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
265 |
!LLVMBuilder methodsFor:'instructions - binary - compare'! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
266 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
267 |
icmp:value1 _:value2 cond: cond |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
268 |
^ self icmp:value1 _:value2 cond: cond as: '' |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
269 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
270 |
"Created: / 07-08-2015 / 18:39:45 / 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:
19
diff
changeset
|
271 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
272 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
273 |
icmp:value1 _:value2 cond: cond as: name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
274 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
275 |
self assertIsIntegerOrIntegerVectorValue:value1. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
276 |
self assertIsIntegerOrIntegerVectorValue:value2. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
277 |
self assertIsValueOfSameType:value1 as:value2. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
278 |
self assertIsString:name. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
279 |
^ LLVM BuildICmp: self _: cond _: value1 _: value2 _: name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
280 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
281 |
"Created: / 07-08-2015 / 18:18:39 / 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:
19
diff
changeset
|
282 |
! ! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
283 |
|
9
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
284 |
!LLVMBuilder methodsFor:'instructions - other'! |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
285 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
286 |
call: function with: arg1 |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
287 |
^ self call: function withArguments: (Array with: arg1) as: ''. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
288 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
289 |
"Created: / 17-07-2015 / 12:48:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
290 |
! |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
291 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
292 |
call: function with: arg1 with: arg2 |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
293 |
^ self call: function withArguments: (Array with: arg1 with: arg2) as: ''. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
294 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
295 |
"Created: / 17-07-2015 / 12:48:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
296 |
! |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
297 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
298 |
call: function with: arg1 with: arg2 with: arg3 |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
299 |
^ self call: function withArguments: (Array with: arg1 with: arg2 with: arg3) as: ''. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
300 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
301 |
"Created: / 17-07-2015 / 12:48:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
302 |
! |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
303 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
304 |
call: function withArguments: arguments |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
305 |
^ self call: function withArguments: arguments as: ''. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
306 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
307 |
"Created: / 17-07-2015 / 12:47:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
308 |
! |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
309 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
310 |
call: function withArguments: arguments as: name |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
311 |
| argumentsArray argumentsSize | |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
312 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
313 |
self assert: (function isKindOf: LLVMFunction). |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
314 |
self assert: (arguments isCollection). |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
315 |
arguments do:[:argument | |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
316 |
self assert: (argument isKindOf:LLVMValue). |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
317 |
]. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
318 |
self assert: name isSingleByteString. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
319 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
320 |
argumentsSize := arguments size. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
321 |
argumentsArray := arguments asLLVMObjectArray. |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
322 |
^ LLVM BuildCall: self _: function _: argumentsArray _: argumentsSize _: name |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
323 |
|
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
324 |
"Created: / 17-07-2015 / 11:09:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
19
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
325 |
! |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
326 |
|
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
327 |
gep: pointer at: integerOrArrayOfIntegers |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
328 |
^ self gep: pointer at: integerOrArrayOfIntegers as: '' |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
329 |
|
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
330 |
"Created: / 05-08-2015 / 20:58:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
331 |
! |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
332 |
|
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
333 |
gep: pointer at: integerOrArrayOfIntegers as: name |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
334 |
| indices | |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
335 |
|
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
336 |
self assert: (pointer isKindOf: LLVMValue). |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
337 |
self assert: (integerOrArrayOfIntegers isInteger |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
338 |
or:[ integerOrArrayOfIntegers isSequenceable and:[ integerOrArrayOfIntegers allSatisfy:[:e|e isInteger] ] ]). |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
339 |
self assert: (name isSingleByteString). |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
340 |
integerOrArrayOfIntegers isInteger ifTrue:[ |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
341 |
indices := LLVMObjectArray with: (LLVMConstant uint32: integerOrArrayOfIntegers) |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
342 |
] ifFalse:[ |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
343 |
indices := LLVMObjectArray new: integerOrArrayOfIntegers size. |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
344 |
1 to: indices size do:[:i | |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
345 |
indices at: i put: (LLVMConstant uint32: (integerOrArrayOfIntegers at: i)). |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
346 |
]. |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
347 |
]. |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
348 |
^ LLVM BuildGEP: self _: pointer _: indices _: indices size _: name. |
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
349 |
|
706be0fcef22
Refactored 'Hello World' example to ise GEP.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
350 |
"Created: / 05-08-2015 / 20:58:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
351 |
! ! |
540c1c31a33d
Added basic support for calling functions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
352 |
|
5 | 353 |
!LLVMBuilder methodsFor:'instructions - terminators'! |
0 | 354 |
|
22
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
355 |
br: target |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
356 |
| targetAsValue | |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
357 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
358 |
targetAsValue := target asLLVMValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
359 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
360 |
self assertIsBasicBlockValue: targetAsValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
361 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
362 |
^ LLVM BuildBr: self _: targetAsValue |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
363 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
364 |
"Created: / 08-08-2015 / 02:59:25 / 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:
19
diff
changeset
|
365 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
366 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
367 |
if: cond then: then else: else |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
368 |
^ self if: cond then: then else: else as: '' |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
369 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
370 |
"Created: / 08-08-2015 / 04:15:44 / 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:
19
diff
changeset
|
371 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
372 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
373 |
if: cond then: then else: else as: name |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
374 |
| thenAsValue elseAsValue | |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
375 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
376 |
thenAsValue := then asLLVMValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
377 |
elseAsValue := else asLLVMValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
378 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
379 |
self assertIsBasicBlockValue: thenAsValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
380 |
self assertIsBasicBlockValue: elseAsValue. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
381 |
self assertIsValue: cond ofType: LLVMType int1. |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
382 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
383 |
^ LLVM BuildCondBr: self _: cond _: thenAsValue _: elseAsValue |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
384 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
385 |
"Created: / 07-08-2015 / 18:42:28 / 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:
19
diff
changeset
|
386 |
"Modified: / 08-08-2015 / 02:58:39 / 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:
19
diff
changeset
|
387 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
388 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
389 |
ret |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
390 |
^ LLVM BuildRetVoid: self |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
391 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
392 |
"Created: / 07-08-2015 / 18:14:37 / 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:
19
diff
changeset
|
393 |
! |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
394 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
395 |
ret:value1 |
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
396 |
|
789a35bd30ac
Added example for compiling conditional. Added convenience API to simply code generation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
397 |
self assertIsValue: value1. |
0 | 398 |
^ LLVM BuildRet: self _: value1 |
399 |
||
400 |
"Created: / 07-07-2015 / 22:55:27 / 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:
19
diff
changeset
|
401 |
"Modified: / 08-08-2015 / 03:11:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 402 |
! ! |
403 |
||
1
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
404 |
!LLVMBuilder methodsFor:'positioning'! |
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
405 |
|
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
406 |
positionAtEnd: basicBlock |
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
407 |
LLVM PositionBuilderAtEnd: self _: basicBlock |
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
408 |
|
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
409 |
"Created: / 07-07-2015 / 22:45:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
410 |
! ! |
e3dcb6272f0b
Introduced abstract superclasses LLVMObject and LLVMDisposableObject
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
411 |