@@ -64,9 +64,9 @@ DEF_D_RUNTIME (CALLINTERFACEFINALIZER, "_d_callinterfacefinalizer", RT(VOID),
6464
6565/* Used for casting to a class or interface. */
6666DEF_D_RUNTIME (DYNAMIC_CAST, "_d_dynamic_cast", RT(OBJECT),
67- P2(OBJECT, CLASSINFO), ECF_LEAF)
67+ P2(OBJECT, CLASSINFO), ECF_CONST | ECF_LEAF)
6868DEF_D_RUNTIME (INTERFACE_CAST, "_d_interface_cast", RT(OBJECT),
69- P2(OBJECT, CLASSINFO), ECF_LEAF)
69+ P2(OBJECT, CLASSINFO), ECF_CONST | ECF_LEAF)
7070
7171/* Used when calling new on a pointer. The `i' variant is for when the
7272 initialiser is non-zero. */
@@ -111,7 +111,7 @@ DEF_D_RUNTIME (ADCMP2, "_adCmp2", RT(INT),
111111/* Used when casting from one array type to another where the index type
112112 sizes differ. Such as from int[] to short[]. */
113113DEF_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_CONST | ECF_LEAF)
115115
116116/* Used for (array.length = n) expressions. The `i' variant is for when the
117117 initialiser is non-zero. */
@@ -179,15 +179,16 @@ DEF_D_RUNTIME (AAEQUAL, "_aaEqual", RT(INT),
179179
180180/* Used to determine is a key exists in an associative array. */
181181DEF_D_RUNTIME (AAINX, "_aaInX", RT(VOIDPTR),
182- P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR), ECF_LEAF)
182+ P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR), ECF_CONST | ECF_LEAF)
183183
184184/* Used to retrieve a value from an associative array index by a key. The
185185 `Rvalue' variant returns null if the key is not found, where as aaGetY
186186 will create new key entry for assignment. */
187187DEF_D_RUNTIME (AAGETY, "_aaGetY", RT(VOIDPTR),
188188 P4(POINTER_ASSOCARRAY, CONST_TYPEINFO, SIZE_T, VOIDPTR), 0)
189189DEF_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)
191192
192193/* Used when calling delete on a key entry in an associative array. */
193194DEF_D_RUNTIME (AADELX, "_aaDelX", RT(BOOL),
@@ -211,11 +212,11 @@ DEF_D_RUNTIME (INVARIANT, "_D9invariant12_d_invariantFC6ObjectZv", RT(VOID),
211212/* Used when performing a switch/cases on a string. The `u' and `d' variants
212213 are for UTF-16 and UTF-32 strings respectively. */
213214DEF_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)
215216DEF_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)
217218DEF_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)
219220
220221/* Used when throwing an error that a switch statement has no default case,
221222 and yet none of the existing cases matched. */
0 commit comments