@@ -130,32 +130,23 @@ typedef enum {
130
130
* Structure representing a method transformed for the interpreter
131
131
* This is domain specific
132
132
*/
133
- typedef struct _InterpMethod
134
- {
133
+ typedef struct InterpMethod InterpMethod ;
134
+ struct InterpMethod {
135
135
/* NOTE: These first two elements (method and
136
136
next_jit_code_hash) must be in the same order and at the
137
137
same offset as in MonoJitInfo, because of the jit_code_hash
138
138
internal hash table in MonoDomain. */
139
139
MonoMethod * method ;
140
- struct _InterpMethod * next_jit_code_hash ;
141
- guint32 locals_size ;
142
- guint32 total_locals_size ;
143
- guint32 stack_size ;
144
- guint32 vt_stack_size ;
145
- guint32 alloca_size ;
146
- unsigned int init_locals : 1 ;
147
- unsigned int vararg : 1 ;
148
- unsigned int needs_thread_attach : 1 ;
140
+ InterpMethod * next_jit_code_hash ;
141
+
142
+ // Sort pointers ahead of integers to minimize padding for alignment.
143
+
149
144
unsigned short * code ;
150
145
MonoPIFunc func ;
151
- int num_clauses ;
152
- MonoExceptionClause * clauses ;
146
+ MonoExceptionClause * clauses ; // num_clauses
153
147
void * * data_items ;
154
- int transformed ;
155
148
guint32 * local_offsets ;
156
149
guint32 * exvar_offsets ;
157
- unsigned int param_count ;
158
- unsigned int hasthis ;
159
150
gpointer jit_wrapper ;
160
151
gpointer jit_addr ;
161
152
MonoMethodSignature * jit_sig ;
@@ -165,12 +156,25 @@ typedef struct _InterpMethod
165
156
MonoType * * param_types ;
166
157
MonoJitInfo * jinfo ;
167
158
MonoDomain * domain ;
159
+
160
+ guint32 locals_size ;
161
+ guint32 total_locals_size ;
162
+ guint32 stack_size ;
163
+ guint32 vt_stack_size ;
164
+ guint32 alloca_size ;
165
+ int num_clauses ; // clauses
166
+ int transformed ; // boolean
167
+ unsigned int param_count ;
168
+ unsigned int hasthis ; // boolean
168
169
MonoProfilerCallInstrumentationFlags prof_flags ;
169
170
InterpMethodCodeType code_type ;
170
171
#ifdef ENABLE_EXPERIMENT_TIERED
171
172
MiniTieredCounter tiered_counter ;
172
173
#endif
173
- } InterpMethod ;
174
+ unsigned int init_locals : 1 ;
175
+ unsigned int vararg : 1 ;
176
+ unsigned int needs_thread_attach : 1 ;
177
+ };
174
178
175
179
typedef struct _StackFragment StackFragment ;
176
180
struct _StackFragment {
0 commit comments