Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions mmtk/src/julia_scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,7 @@ pub unsafe fn scan_julia_object<SV: SlotVisitor<JuliaVMSlot>>(obj: Address, clos
return;
}

if vtag_usize == ((jl_small_typeof_tags_jl_datatype_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_unionall_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_uniontype_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_typeeq_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_tvar_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_vararg_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_globalref_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_gotoifnot_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_returnnode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_enternode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_pinode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_phinode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_phicnode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_upsilonnode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_quotenode_tag as usize) << 4)
{
if crate::object_model::is_small_typeof_tag_with_no_pointer(vtag_usize) {
// these objects have pointers in them, but no other special handling
// so we want these to fall through to the end
vtag_usize = jl_small_typeof[vtag.as_usize() / std::mem::size_of::<Address>()] as usize;
Expand Down
35 changes: 20 additions & 15 deletions mmtk/src/object_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,7 @@ pub unsafe fn get_so_object_size(object: ObjectReference) -> usize {
return mmtk_get_obj_size(object);
}

if vtag_usize == ((jl_small_typeof_tags_jl_datatype_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_unionall_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_uniontype_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_tvar_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_vararg_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_globalref_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_gotoifnot_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_returnnode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_enternode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_pinode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_phinode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_phicnode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_upsilonnode_tag as usize) << 4)
|| vtag_usize == ((jl_small_typeof_tags_jl_quotenode_tag as usize) << 4)
{
if is_small_typeof_tag_with_no_pointer(vtag_usize) {
// these objects have pointers in them, but no other special handling
// so we want these to fall through to the end
vtag_usize = jl_small_typeof[vtag.as_usize() / std::mem::size_of::<Address>()] as usize;
Expand Down Expand Up @@ -334,3 +320,22 @@ pub unsafe fn mmtk_jl_is_uniontype(t: *const jl_datatype_t) -> bool {
mmtk_jl_typetagof(Address::from_ptr(t)).as_usize()
== (jl_small_typeof_tags_jl_uniontype_tag << 4) as usize
}

#[inline(always)]
pub fn is_small_typeof_tag_with_no_pointer(vtag: usize) -> bool {
vtag == ((jl_small_typeof_tags_jl_datatype_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_unionall_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_uniontype_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_typeeq_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_tvar_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_vararg_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_globalref_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_gotoifnot_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_returnnode_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_enternode_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_pinode_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_phinode_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_phicnode_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_upsilonnode_tag as usize) << 4)
|| vtag == ((jl_small_typeof_tags_jl_quotenode_tag as usize) << 4)
}
Loading