-
Notifications
You must be signed in to change notification settings - Fork 71
/
CogBlockMethodSurrogate64.class.st
165 lines (140 loc) · 4.63 KB
/
CogBlockMethodSurrogate64.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
Class {
#name : #CogBlockMethodSurrogate64,
#superclass : #CogMethodSurrogate,
#category : #'VMMaker-JITSimulation'
}
{ #category : #accessing }
CogBlockMethodSurrogate64 class >> alignedByteSize [
^8 + self baseHeaderSize
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cbUsesInstVars [
^(((memory unsignedByteAt: address + 2 + baseHeaderSize) bitShift: -1) bitAnd: 16r1) ~= 0
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cbUsesInstVars: aValue [
memory
unsignedByteAt: address + baseHeaderSize + 2
put: (((memory unsignedByteAt: address + baseHeaderSize + 2) bitAnd: 16rFD) + ((aValue ifTrue: [1] ifFalse: [0]) bitShift: 1)).
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmIsUnlinked [
^(((memory unsignedByteAt: address + 10) bitShift: -4) bitAnd: 16r1) ~= 0
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmIsUnlinked: aValue [
memory
unsignedByteAt: address + 10
put: (((memory unsignedByteAt: address + 10) bitAnd: 16rEF) + ((aValue ifTrue: [1] ifFalse: [0]) bitShift: 4)).
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmNumArgs [
^memory unsignedByteAt: address + 0 + baseHeaderSize
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmNumArgs: aValue [
^memory
unsignedByteAt: address + baseHeaderSize + 0
put: aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmRefersToYoung [
^(((memory unsignedByteAt: address + 1 + baseHeaderSize) bitShift: -3) bitAnd: 16r1) ~= 0
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmRefersToYoung: aValue [
memory
unsignedByteAt: address + baseHeaderSize + 1
put: (((memory unsignedByteAt: address + baseHeaderSize + 1) bitAnd: 16rF7) + ((aValue ifTrue: [1] ifFalse: [0]) bitShift: 3)).
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmType [
^(memory unsignedByteAt: address + 1 + baseHeaderSize) bitAnd: 16r7
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmType: aValue [
self assert: (aValue between: 0 and: 16r7).
memory
unsignedByteAt: address + baseHeaderSize + 1
put: ((memory unsignedByteAt: address + baseHeaderSize + 1) bitAnd: 16rF8) + aValue.
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmUsageCount [
^((memory unsignedByteAt: address + 1 + baseHeaderSize) bitShift: -5) bitAnd: 16r7
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmUsageCount: aValue [
self assert: (aValue between: 0 and: 16r7).
memory
unsignedByteAt: address + baseHeaderSize + 1
put: ((memory unsignedByteAt: address + baseHeaderSize + 1) bitAnd: 16r1F) + (aValue bitShift: 5).
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmUsesPenultimateLit [
^((memory unsignedByteAt: address + 2 + baseHeaderSize) bitAnd: 16r1) ~= 0
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cmUsesPenultimateLit: aValue [
memory
unsignedByteAt: address + baseHeaderSize + 2
put: (((memory unsignedByteAt: address + baseHeaderSize + 2) bitAnd: 16rFE) + (aValue ifTrue: [1] ifFalse: [0])).
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cpicHasMNUCaseOrCMIsFullBlock [
^(((memory unsignedByteAt: address + 1 + baseHeaderSize) bitShift: -4) bitAnd: 16r1) ~= 0
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> cpicHasMNUCaseOrCMIsFullBlock: aValue [
memory
unsignedByteAt: address + baseHeaderSize + 1
put: (((memory unsignedByteAt: address + baseHeaderSize + 1) bitAnd: 16rEF) + ((aValue ifTrue: [1] ifFalse: [0]) bitShift: 4)).
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> homeOffset [
^memory unsignedShortAt: address + 0
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> homeOffset: aValue [
^memory
unsignedShortAt: address + 0
put: aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> padToWord [
^memory unsignedLong64At: address + 4
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> padToWord: aValue [
^memory
unsignedLong64At: address + 4
put: aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> stackCheckOffset [
^((memory unsignedShortAt: address + 2 + baseHeaderSize) bitShift: -4) bitAnd: 16rFFF
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> stackCheckOffset: aValue [
self assert: (aValue between: 0 and: 16rFFF).
memory
unsignedShortAt: address + baseHeaderSize + 2
put: ((memory unsignedShortAt: address + baseHeaderSize + 2) bitAnd: 16rF) + (aValue bitShift: 4).
^aValue
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> startpc [
^memory unsignedShortAt: address + 2
]
{ #category : #accessing }
CogBlockMethodSurrogate64 >> startpc: aValue [
^memory
unsignedShortAt: address + 2
put: aValue
]