@@ -64,9 +64,9 @@ DEF_D_RUNTIME (CALLINTERFACEFINALIZER, "_d_callinterfacefinalizer", RT(VOID),
64
64
65
65
/* Used for casting to a class or interface. */
66
66
DEF_D_RUNTIME (DYNAMIC_CAST, "_d_dynamic_cast", RT(OBJECT),
67
- P2(OBJECT, CLASSINFO), ECF_LEAF)
67
+ P2(OBJECT, CLASSINFO), ECF_LEAF | ECF_CONST )
68
68
DEF_D_RUNTIME (INTERFACE_CAST, "_d_interface_cast", RT(OBJECT),
69
- P2(OBJECT, CLASSINFO), ECF_LEAF)
69
+ P2(OBJECT, CLASSINFO), ECF_LEAF | ECF_CONST )
70
70
71
71
/* Used when calling new on a pointer. The `i' variant is for when the
72
72
initialiser is non-zero. */
@@ -104,14 +104,14 @@ DEF_D_RUNTIME (DELARRAYT, "_d_delarray_t", RT(VOID),
104
104
/* Used for value equality (x == y) and comparisons (x < y) of non-trivial
105
105
arrays. Such as an array of structs or classes. */
106
106
DEF_D_RUNTIME (ADEQ2, "_adEq2", RT(INT),
107
- P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), 0 )
107
+ P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), ECF_CONST )
108
108
DEF_D_RUNTIME (ADCMP2, "_adCmp2", RT(INT),
109
- P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), 0 )
109
+ P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), ECF_CONST )
110
110
111
111
/* Used when casting from one array type to another where the index type
112
112
sizes differ. Such as from int[] to short[]. */
113
113
DEF_D_RUNTIME (ARRAYCAST, "_d_arraycast", RT(ARRAY_VOID),
114
- P3(SIZE_T, SIZE_T, ARRAY_VOID), ECF_LEAF)
114
+ P3(SIZE_T, SIZE_T, ARRAY_VOID), ECF_LEAF | ECF_CONST )
115
115
116
116
/* Used for (array.length = n) expressions. The `i' variant is for when the
117
117
initialiser is non-zero. */
@@ -175,19 +175,20 @@ DEF_D_RUNTIME (ASSOCARRAYLITERALTX, "_d_assocarrayliteralTX", RT(VOIDPTR),
175
175
176
176
/* Used for value equality of two associative arrays. */
177
177
DEF_D_RUNTIME (AAEQUAL, "_aaEqual", RT(INT),
178
- P3(CONST_TYPEINFO, ASSOCARRAY, ASSOCARRAY), 0 )
178
+ P3(CONST_TYPEINFO, ASSOCARRAY, ASSOCARRAY), ECF_CONST )
179
179
180
180
/* Used to determine is a key exists in an associative array. */
181
181
DEF_D_RUNTIME (AAINX, "_aaInX", RT(VOIDPTR),
182
- P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR), ECF_LEAF)
182
+ P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR), ECF_CONST | ECF_LEAF)
183
183
184
184
/* Used to retrieve a value from an associative array index by a key. The
185
185
`Rvalue' variant returns null if the key is not found, where as aaGetY
186
186
will create new key entry for assignment. */
187
187
DEF_D_RUNTIME (AAGETY, "_aaGetY", RT(VOIDPTR),
188
188
P4(POINTER_ASSOCARRAY, CONST_TYPEINFO, SIZE_T, VOIDPTR), 0)
189
189
DEF_D_RUNTIME (AAGETRVALUEX, "_aaGetRvalueX", RT(VOIDPTR),
190
- P4(ASSOCARRAY, CONST_TYPEINFO, SIZE_T, VOIDPTR), ECF_LEAF)
190
+ P4(ASSOCARRAY, CONST_TYPEINFO, SIZE_T, VOIDPTR),
191
+ ECF_CONST | ECF_LEAF)
191
192
192
193
/* Used when calling delete on a key entry in an associative array. */
193
194
DEF_D_RUNTIME (AADELX, "_aaDelX", RT(BOOL),
@@ -211,11 +212,11 @@ DEF_D_RUNTIME (INVARIANT, "_D9invariant12_d_invariantFC6ObjectZv", RT(VOID),
211
212
/* Used when performing a switch/cases on a string. The `u' and `d' variants
212
213
are for UTF-16 and UTF-32 strings respectively. */
213
214
DEF_D_RUNTIME (SWITCH_STRING, "_d_switch_string", RT(INT),
214
- P2(ARRAY_STRING, STRING), ECF_LEAF)
215
+ P2(ARRAY_STRING, STRING), ECF_CONST | ECF_LEAF)
215
216
DEF_D_RUNTIME (SWITCH_USTRING, "_d_switch_ustring", RT(INT),
216
- P2(ARRAY_WSTRING, WSTRING), ECF_LEAF)
217
+ P2(ARRAY_WSTRING, WSTRING), ECF_CONST | ECF_LEAF)
217
218
DEF_D_RUNTIME (SWITCH_DSTRING, "_d_switch_dstring", RT(INT),
218
- P2(ARRAY_DSTRING, DSTRING), ECF_LEAF)
219
+ P2(ARRAY_DSTRING, DSTRING), ECF_CONST | ECF_LEAF)
219
220
220
221
/* Used when throwing an error that a switch statement has no default case,
221
222
and yet none of the existing cases matched. */
0 commit comments