File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl ObjectModel<JuliaVM> for VMObjectModel {
109
109
// if cur_bytes == new_bytes you end up copying the whole src
110
110
// but before you say that dst += STORED_HASH_BYTES so you don't have space
111
111
// in dst to copy src
112
- debug_assert_ne ! ( cur_bytes, new_bytes) ;
112
+ debug_assert_eq ! ( cur_bytes + STORED_HASH_BYTES , new_bytes) ;
113
113
debug_assert_eq ! ( header_offset, 8 ) ;
114
114
115
115
// Store hash
@@ -403,9 +403,15 @@ pub unsafe fn get_object_start_ref(object: ObjectReference) -> Address {
403
403
}
404
404
}
405
405
406
+ // DONT USE THIS FUNCTION ANYWHERE OTHER THAN OBJECT SIZE QUERY, AS IT DOES NOT ALIGN UP AT ALL.
407
+ // This function is only used to align up the object size when we query object size.
408
+ // However, it seems that we don't need to align up. I am still keeping this function,
409
+ // in case that we figure out in the future that we actually need this align up.
410
+ // If we are certain that this align up is unnecessary, we can just remove this function.
406
411
#[ inline( always) ]
407
- pub unsafe fn llt_align ( size : usize , align : usize ) -> usize {
408
- ( ( size) + ( align) - 1 ) & !( ( align) - 1 )
412
+ unsafe fn llt_align ( size : usize , align : usize ) -> usize {
413
+ // ((size) + (align) - 1) & !((align) - 1)
414
+ size
409
415
}
410
416
411
417
#[ inline( always) ]
You can’t perform that action at this time.
0 commit comments