author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 30 Aug 2016 16:57:29 +0100 | |
changeset 78 | 7a4c769a9fea |
parent 71 | ab03b0a6d037 |
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 |
LLVMTypeSequential subclass:#LLVMTypePointer |
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 |
!LLVMTypePointer 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 |
!LLVMTypePointer methodsFor:'accessing'! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
44 |
|
50
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
45 |
pointee |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
46 |
^ LLVM GetElementType: self |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
47 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
48 |
"Created: / 12-10-2015 / 16:23:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
27
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
! ! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
|
53
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
51 |
!LLVMTypePointer methodsFor:'converting'! |
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
52 |
|
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
53 |
vector: numberOfElements |
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
54 |
"Create a fixed-size vector whose elements are of type of receiver." |
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
55 |
|
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
56 |
self assertIsIntegerUnsigned: numberOfElements. |
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
57 |
^ LLVM VectorType: self _: numberOfElements |
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
58 |
|
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
59 |
"Created: / 13-08-2015 / 18:59:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
60 |
! ! |
bbf3a88e2358
LLVM 3.9: Vector types are supported only for pointers, integer and floating points.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
61 |
|
50
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
62 |
!LLVMTypePointer methodsFor:'inspecting'! |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
63 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
64 |
inspectorExtraAttributes |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
65 |
^ super inspectorExtraAttributes |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
66 |
at: '-pointee' put: self pointee; |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
67 |
yourself. |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
68 |
|
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
69 |
"Created: / 12-10-2015 / 17:02:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
70 |
! ! |
dbda820d4d24
Support for creating recursive structures.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
38
diff
changeset
|
71 |
|
27
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
72 |
!LLVMTypePointer methodsFor:'testing'! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
73 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
74 |
isPointerType |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
75 |
^ true |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
76 |
|
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
77 |
"Created: / 13-08-2015 / 17:00: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
|
78 |
! ! |
b26354bbff25
LLVM type system refactored to use a subclass per kind.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
79 |
|
38
52be9bfdf7e1
Added LLVMIRBuilder>>block returning current insertion block
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
80 |
!LLVMTypePointer class methodsFor:'documentation'! |
52be9bfdf7e1
Added LLVMIRBuilder>>block returning current insertion block
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
81 |
|
52be9bfdf7e1
Added LLVMIRBuilder>>block returning current insertion block
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
82 |
version_HG |
52be9bfdf7e1
Added LLVMIRBuilder>>block returning current insertion block
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
83 |
|
52be9bfdf7e1
Added LLVMIRBuilder>>block returning current insertion block
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
84 |
^ '$Changeset: <not expanded> $' |
52be9bfdf7e1
Added LLVMIRBuilder>>block returning current insertion block
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
85 |
! ! |
52be9bfdf7e1
Added LLVMIRBuilder>>block returning current insertion block
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
27
diff
changeset
|
86 |