author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 06 Jul 2016 22:40:59 +0100 | |
changeset 71 | ab03b0a6d037 |
parent 50 | dbda820d4d24 |
permissions | -rw-r--r-- |
27
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
Copyright (C) 2015-now Jan Vrany |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
This code is not an open-source (yet). You may use this code |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
for your own experiments and projects, given that: |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
* all modification to the code will be sent to the |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
original author for inclusion in future releases |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
* this is not used in any commercial software |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
This license is provisional and may (will) change in |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
a future. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
"{ Package: 'jv:llvm_s' }" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
"{ NameSpace: Smalltalk }" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
LLVMType subclass:#LLVMTypeStruct |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
instanceVariableNames:'' |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
classVariableNames:'' |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
poolDictionaries:'' |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
category:'LLVM-S-Core-Types' |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
!LLVMTypeStruct class methodsFor:'documentation'! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
copyright |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
Copyright (C) 2015-now Jan Vrany |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
This code is not an open-source (yet). You may use this code |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
for your own experiments and projects, given that: |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
* all modification to the code will be sent to the |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
original author for inclusion in future releases |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
* this is not used in any commercial software |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
This license is provisional and may (will) change in |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
a future. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
41 |
! ! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
43 |
!LLVMTypeStruct methodsFor:'accessing'! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
44 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
45 |
elementTypeAt: n |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
46 |
"Return types of `n`th member of the structure. Index starts at 1 as |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
47 |
customary in Smalltalk. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
48 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
Uses term `element` instead of `member` to be in sync |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
with LLVM naming." |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
51 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
52 |
(n between: 1 and: self numElements) ifTrue:[ |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
53 |
^ LLVM StructGetTypeAtIndex: self _: n - 1. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
54 |
]. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
55 |
LLVMTypeError new signal: 'index out of bounds'. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
56 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
57 |
"Created: / 14-08-2015 / 05:56:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
58 |
! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
59 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
60 |
elementTypes |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
61 |
"Return types of members of this structure. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
62 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
63 |
Uses term `element` instead of `member` to be in sync |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
64 |
with LLVM naming." |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
65 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
66 |
| numElements elementTypePointers elementTypes | |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
67 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
68 |
numElements := self numElements. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
69 |
numElements == 0 ifTrue:[ ^ #() ]. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
70 |
elementTypePointers := LLVMObjectArray new: numElements. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
71 |
elementTypes := Array new: numElements. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
72 |
LLVM GetStructElementTypes: self _: elementTypePointers. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
73 |
1 to: numElements do:[:i | elementTypes at: i put: (LLVMType newAddress: (elementTypePointers at: i)) ]. |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
74 |
^ elementTypes |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
75 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
76 |
"Created: / 14-08-2015 / 05:54:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
77 |
! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
78 |
|
50
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
79 |
elementTypes: elementTypes |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
80 |
"Set member types of the structure. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
81 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
82 |
Uses term `element` instead of `member` to be in sync |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
83 |
with LLVM naming." |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
84 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
85 |
^ self elementTypes: elementTypes package: false. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
86 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
87 |
"Created: / 12-10-2015 / 14:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
88 |
! |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
89 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
90 |
elementTypes: elementTypes package: packed |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
91 |
"Set member types of the structure. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
92 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
93 |
Uses term `element` instead of `member` to be in sync |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
94 |
with LLVM naming." |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
95 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
96 |
self assertIsTypeArray: elementTypes. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
97 |
self assertIsBoolean: packed. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
98 |
^ LLVM StructSetBody: self _: elementTypes asLLVMObjectArray _: elementTypes size _: packed |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
99 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
100 |
"Created: / 12-10-2015 / 14:57:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
101 |
! |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
102 |
|
27
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
103 |
numElements |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
104 |
"Return a number of members of this structure" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
105 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
106 |
^ LLVM CountStructElementTypes: self |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
107 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
108 |
"Created: / 14-08-2015 / 05:53:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
109 |
! ! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
110 |
|
50
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
111 |
!LLVMTypeStruct methodsFor:'inspecting'! |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
112 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
113 |
inspectorExtraAttributes |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
114 |
| extras | |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
115 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
116 |
extras := super inspectorExtraAttributes. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
117 |
self elementTypes withIndexDo:[:type :index | |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
118 |
extras at: '-element type ', index printString put: type |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
119 |
]. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
120 |
^ extras |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
121 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
122 |
"Created: / 12-10-2015 / 17:00:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
123 |
"Modified: / 12-10-2015 / 18:05:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
124 |
! ! |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
125 |
|
27
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
126 |
!LLVMTypeStruct methodsFor:'testing'! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
127 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
128 |
isOpaque |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
129 |
^ LLVM IsOpaqueStruct: self |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
130 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
131 |
"Created: / 14-08-2015 / 06:11:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
132 |
! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
133 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
134 |
isPacked |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
135 |
^ LLVM IsPackedStruct: self |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
136 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
137 |
"Created: / 14-08-2015 / 06:11:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
138 |
! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
140 |
isStructType |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
^ true |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
142 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
143 |
"Created: / 13-08-2015 / 16:52:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
144 |
! ! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
145 |