fix(runtime/lean): incorrect assertion
This commit is contained in:
parent
124c5da414
commit
79f4eeea62
2 changed files with 4 additions and 2 deletions
|
|
@ -123,7 +123,7 @@ bool object_compactor::insert_array(object * o) {
|
|||
new_o->m_size = sz;
|
||||
new_o->m_capacity = sz;
|
||||
for (size_t i = 0; i < sz; i++) {
|
||||
array_set((lean_object*)new_o, i, offsets[i]);
|
||||
lean_array_set_core((lean_object*)new_o, i, offsets[i]);
|
||||
}
|
||||
save(o, (lean_object*)new_o);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -702,7 +702,9 @@ static inline b_lean_obj_res lean_array_get_core(b_lean_obj_arg o, size_t i) {
|
|||
return lean_to_array(o)->m_data[i];
|
||||
}
|
||||
static inline void lean_array_set_core(u_lean_obj_arg o, size_t i, lean_obj_arg v) {
|
||||
assert(lean_is_exclusive(o));
|
||||
/* Remark: we use this procedure to update non shared arrays in the heap,
|
||||
and when copying objects to compact region at compact.cpp */
|
||||
assert(!lean_is_heap_object(o) || lean_is_exclusive(o));
|
||||
assert(i < lean_array_size(o));
|
||||
lean_to_array(o)->m_data[i] = v;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue