Skip to content

Commit 5d65c90

Browse files
udesouqinsoon
authored andcommitted
Adding usings_backedges root
1 parent 478ba4e commit 5d65c90

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

mmtk/src/julia_scanning.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ pub unsafe fn scan_julia_object<SV: SlotVisitor<JuliaVMSlot>>(obj: Address, clos
132132
}
133133
process_slot(closure, Address::from_ptr(parent_slot));
134134

135+
let usings_backeges_slot = ::std::ptr::addr_of!((*m).usings_backedges);
136+
if PRINT_OBJ_TYPE {
137+
println!(" - scan parent: {:?}\n", usings_backeges_slot);
138+
}
139+
process_slot(closure, Address::from_ptr(usings_backeges_slot));
140+
135141
// m.usings.items may be inlined in the module when the array list size <= AL_N_INLINE (cf. arraylist_new)
136142
// In that case it may be an mmtk object and not a malloced address.
137143
// If it is an mmtk object, (*m).usings.items will then be an internal pointer to the module

mmtk/src/julia_types.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,7 @@ pub struct _jl_module_t {
21222122
pub bindingkeyset: u64,
21232123
pub file: *mut jl_sym_t,
21242124
pub line: i32,
2125+
pub usings_backedges: *mut jl_value_t,
21252126
pub usings: arraylist_t,
21262127
pub build_id: jl_uuid_t,
21272128
pub uuid: jl_uuid_t,
@@ -2137,7 +2138,7 @@ pub struct _jl_module_t {
21372138
}
21382139
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
21392140
const _: () = {
2140-
["Size of _jl_module_t"][::std::mem::size_of::<_jl_module_t>() - 376usize];
2141+
["Size of _jl_module_t"][::std::mem::size_of::<_jl_module_t>() - 384usize];
21412142
["Alignment of _jl_module_t"][::std::mem::align_of::<_jl_module_t>() - 8usize];
21422143
["Offset of field: _jl_module_t::name"][::std::mem::offset_of!(_jl_module_t, name) - 0usize];
21432144
["Offset of field: _jl_module_t::parent"]
@@ -2148,27 +2149,29 @@ const _: () = {
21482149
[::std::mem::offset_of!(_jl_module_t, bindingkeyset) - 24usize];
21492150
["Offset of field: _jl_module_t::file"][::std::mem::offset_of!(_jl_module_t, file) - 32usize];
21502151
["Offset of field: _jl_module_t::line"][::std::mem::offset_of!(_jl_module_t, line) - 40usize];
2152+
["Offset of field: _jl_module_t::usings_backedges"]
2153+
[::std::mem::offset_of!(_jl_module_t, usings_backedges) - 48usize];
21512154
["Offset of field: _jl_module_t::usings"]
2152-
[::std::mem::offset_of!(_jl_module_t, usings) - 48usize];
2155+
[::std::mem::offset_of!(_jl_module_t, usings) - 56usize];
21532156
["Offset of field: _jl_module_t::build_id"]
2154-
[::std::mem::offset_of!(_jl_module_t, build_id) - 304usize];
2155-
["Offset of field: _jl_module_t::uuid"][::std::mem::offset_of!(_jl_module_t, uuid) - 320usize];
2157+
[::std::mem::offset_of!(_jl_module_t, build_id) - 312usize];
2158+
["Offset of field: _jl_module_t::uuid"][::std::mem::offset_of!(_jl_module_t, uuid) - 328usize];
21562159
["Offset of field: _jl_module_t::counter"]
2157-
[::std::mem::offset_of!(_jl_module_t, counter) - 336usize];
2160+
[::std::mem::offset_of!(_jl_module_t, counter) - 344usize];
21582161
["Offset of field: _jl_module_t::nospecialize"]
2159-
[::std::mem::offset_of!(_jl_module_t, nospecialize) - 340usize];
2162+
[::std::mem::offset_of!(_jl_module_t, nospecialize) - 348usize];
21602163
["Offset of field: _jl_module_t::optlevel"]
2161-
[::std::mem::offset_of!(_jl_module_t, optlevel) - 344usize];
2164+
[::std::mem::offset_of!(_jl_module_t, optlevel) - 352usize];
21622165
["Offset of field: _jl_module_t::compile"]
2163-
[::std::mem::offset_of!(_jl_module_t, compile) - 345usize];
2166+
[::std::mem::offset_of!(_jl_module_t, compile) - 353usize];
21642167
["Offset of field: _jl_module_t::infer"]
2165-
[::std::mem::offset_of!(_jl_module_t, infer) - 346usize];
2168+
[::std::mem::offset_of!(_jl_module_t, infer) - 354usize];
21662169
["Offset of field: _jl_module_t::istopmod"]
2167-
[::std::mem::offset_of!(_jl_module_t, istopmod) - 347usize];
2170+
[::std::mem::offset_of!(_jl_module_t, istopmod) - 355usize];
21682171
["Offset of field: _jl_module_t::max_methods"]
2169-
[::std::mem::offset_of!(_jl_module_t, max_methods) - 348usize];
2170-
["Offset of field: _jl_module_t::lock"][::std::mem::offset_of!(_jl_module_t, lock) - 352usize];
2171-
["Offset of field: _jl_module_t::hash"][::std::mem::offset_of!(_jl_module_t, hash) - 368usize];
2172+
[::std::mem::offset_of!(_jl_module_t, max_methods) - 356usize];
2173+
["Offset of field: _jl_module_t::lock"][::std::mem::offset_of!(_jl_module_t, lock) - 360usize];
2174+
["Offset of field: _jl_module_t::hash"][::std::mem::offset_of!(_jl_module_t, hash) - 376usize];
21722175
};
21732176
pub type jl_module_t = _jl_module_t;
21742177
#[repr(C)]

0 commit comments

Comments
 (0)