Skip to content

Commit d63667c

Browse files
Don't include ArrayGet/SetGenericValue_icall in UNITY_AOT
GetGenericValueImpl/SetGenericValueImpl will be replaced with intrinsics and will never be called.
1 parent 1e4274e commit d63667c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

mcs/class/corlib/System/Array.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,22 @@ internal void InternalArray__set_Item<T> (int index, T item)
211211
// Do not change this to call SetGenericValue_icall directly, due to special casing in the runtime.
212212
SetGenericValueImpl (index, ref item);
213213
}
214+
215+
#if UNITY_AOT
216+
217+
// This is a replaced by an intrinsic.
218+
internal void GetGenericValueImpl<T> (int pos, out T value)
219+
{
220+
throw new NotImplementedException("GetGenericValueImpl should be remapped to an intrinsic");
221+
}
222+
223+
// This is a replaced by an intrinsic.
224+
internal void SetGenericValueImpl<T> (int pos, ref T value)
225+
{
226+
throw new NotImplementedException("SetGenericValueImpl should be remapped to an intrinsic");
227+
}
228+
229+
#else
214230

215231
// CAUTION! No bounds checking!
216232
[MethodImplAttribute (MethodImplOptions.InternalCall)]
@@ -233,6 +249,7 @@ internal void SetGenericValueImpl<T> (int pos, ref T value)
233249
var self = this;
234250
SetGenericValue_icall (ref self, pos, ref value);
235251
}
252+
#endif
236253

237254
internal struct InternalEnumerator<T> : IEnumerator<T>
238255
{

0 commit comments

Comments
 (0)