- array_set_value_impl_raw (arr, value, pos, &error);
- mono_error_set_pending_exception (&error);
+ MONO_HANDLE_ARRAY_GETVAL (idx, idxs, gint32, 0);
+ mono_handle_array_get_bounds_dim (arr, 0, &dim);
+ pos = idx - dim.lower_bound;
+ for (i = 1; i < ac->rank; i++) {
+ mono_handle_array_get_bounds_dim (arr, i, &dim);
+ MONO_HANDLE_ARRAY_GETVAL (idx, idxs, gint32, i);
+ pos = pos * dim.length + idx - dim.lower_bound;
+ }
+
+ array_set_value_impl (arr, value, pos, error);