/
ThreadedFFICalloutStateForARM32.class.st
100 lines (77 loc) · 2.44 KB
/
ThreadedFFICalloutStateForARM32.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Class {
#name : #ThreadedFFICalloutStateForARM32,
#superclass : #ThreadedFFICalloutState,
#instVars : [
'integerRegisterIndex',
'integerRegisters',
'floatRegisterIndex',
'backfillFloatRegisterIndex',
'floatRegisters'
],
#category : #'VMMaker-Plugins-FFI'
}
{ #category : #translation }
ThreadedFFICalloutStateForARM32 class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [
"enumerate aBinaryBlock with the names and C type strings for the inst vars to include in a ThreadedFFICalloutState struct."
superclass instVarNamesAndTypesForTranslationDo: aBinaryBlock.
self instVarNames do:
[:ivn|
aBinaryBlock
value: ivn
value: (ivn caseOf: {
['integerRegisters'] -> [{#sqInt. '[NumIntRegArgs]'}].
['floatRegisters'] -> [{#float. '[NumFloatRegArgs]'}] }
otherwise:
[#sqInt])]
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> backfillFloatRegisterIndex [
^ backfillFloatRegisterIndex
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> backfillFloatRegisterIndex: anObject [
^backfillFloatRegisterIndex := anObject
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> floatRegisterIndex [
^ floatRegisterIndex
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> floatRegisterIndex: anObject [
^floatRegisterIndex := anObject
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> floatRegisters [
^ floatRegisters
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> floatRegisters: anObject [
^floatRegisters := anObject
]
{ #category : #'initialize-release' }
ThreadedFFICalloutStateForARM32 >> initialize [
super initialize.
integerRegisterIndex := 0.
floatRegisterIndex := 0.
backfillFloatRegisterIndex := 0.
integerRegisters := CArrayAccessor on: (Array new: ThreadedARM32FFIPlugin numIntRegArgs).
floatRegisters := CArrayAccessor on: (Array new: ThreadedARM32FFIPlugin numFloatRegArgs)
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> integerRegisterIndex [
^ integerRegisterIndex
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> integerRegisterIndex: anObject [
^integerRegisterIndex := anObject
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> integerRegisters [
"Answer the value of integerRegisters"
^ integerRegisters
]
{ #category : #accessing }
ThreadedFFICalloutStateForARM32 >> integerRegisters: anObject [
"Set the value of integerRegisters"
^integerRegisters := anObject
]