Skip to content

Commit 10ad663

Browse files
authored
Adding usings_backedges root (#228)
This PR added a new root and changed the layout for `_jl_module_t`. Updating the binding to reflect that change.
1 parent c9e046b commit 10ad663

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

.github/scripts/ci-test-stdlib.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ declare -a tests_to_skip=(
2222
"SparseArrays"
2323
# Running LinearAlgebra in a separate job
2424
"LinearAlgebra"
25+
# Skipping Distributed tests
26+
"Distributed"
2527
)
2628
# These tests need multiple workers.
2729
declare -a tests_with_multi_workers=(

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
@@ -1985,6 +1985,7 @@ pub struct _jl_module_t {
19851985
pub bindingkeyset: u64,
19861986
pub file: *mut jl_sym_t,
19871987
pub line: i32,
1988+
pub usings_backedges: *mut jl_value_t,
19881989
pub usings: arraylist_t,
19891990
pub build_id: jl_uuid_t,
19901991
pub uuid: jl_uuid_t,
@@ -2000,7 +2001,7 @@ pub struct _jl_module_t {
20002001
}
20012002
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
20022003
const _: () = {
2003-
["Size of _jl_module_t"][::std::mem::size_of::<_jl_module_t>() - 376usize];
2004+
["Size of _jl_module_t"][::std::mem::size_of::<_jl_module_t>() - 384usize];
20042005
["Alignment of _jl_module_t"][::std::mem::align_of::<_jl_module_t>() - 8usize];
20052006
["Offset of field: _jl_module_t::name"][::std::mem::offset_of!(_jl_module_t, name) - 0usize];
20062007
["Offset of field: _jl_module_t::parent"]
@@ -2011,27 +2012,29 @@ const _: () = {
20112012
[::std::mem::offset_of!(_jl_module_t, bindingkeyset) - 24usize];
20122013
["Offset of field: _jl_module_t::file"][::std::mem::offset_of!(_jl_module_t, file) - 32usize];
20132014
["Offset of field: _jl_module_t::line"][::std::mem::offset_of!(_jl_module_t, line) - 40usize];
2015+
["Offset of field: _jl_module_t::usings_backedges"]
2016+
[::std::mem::offset_of!(_jl_module_t, usings_backedges) - 48usize];
20142017
["Offset of field: _jl_module_t::usings"]
2015-
[::std::mem::offset_of!(_jl_module_t, usings) - 48usize];
2018+
[::std::mem::offset_of!(_jl_module_t, usings) - 56usize];
20162019
["Offset of field: _jl_module_t::build_id"]
2017-
[::std::mem::offset_of!(_jl_module_t, build_id) - 304usize];
2018-
["Offset of field: _jl_module_t::uuid"][::std::mem::offset_of!(_jl_module_t, uuid) - 320usize];
2020+
[::std::mem::offset_of!(_jl_module_t, build_id) - 312usize];
2021+
["Offset of field: _jl_module_t::uuid"][::std::mem::offset_of!(_jl_module_t, uuid) - 328usize];
20192022
["Offset of field: _jl_module_t::counter"]
2020-
[::std::mem::offset_of!(_jl_module_t, counter) - 336usize];
2023+
[::std::mem::offset_of!(_jl_module_t, counter) - 344usize];
20212024
["Offset of field: _jl_module_t::nospecialize"]
2022-
[::std::mem::offset_of!(_jl_module_t, nospecialize) - 340usize];
2025+
[::std::mem::offset_of!(_jl_module_t, nospecialize) - 348usize];
20232026
["Offset of field: _jl_module_t::optlevel"]
2024-
[::std::mem::offset_of!(_jl_module_t, optlevel) - 344usize];
2027+
[::std::mem::offset_of!(_jl_module_t, optlevel) - 352usize];
20252028
["Offset of field: _jl_module_t::compile"]
2026-
[::std::mem::offset_of!(_jl_module_t, compile) - 345usize];
2029+
[::std::mem::offset_of!(_jl_module_t, compile) - 353usize];
20272030
["Offset of field: _jl_module_t::infer"]
2028-
[::std::mem::offset_of!(_jl_module_t, infer) - 346usize];
2031+
[::std::mem::offset_of!(_jl_module_t, infer) - 354usize];
20292032
["Offset of field: _jl_module_t::istopmod"]
2030-
[::std::mem::offset_of!(_jl_module_t, istopmod) - 347usize];
2033+
[::std::mem::offset_of!(_jl_module_t, istopmod) - 355usize];
20312034
["Offset of field: _jl_module_t::max_methods"]
2032-
[::std::mem::offset_of!(_jl_module_t, max_methods) - 348usize];
2033-
["Offset of field: _jl_module_t::lock"][::std::mem::offset_of!(_jl_module_t, lock) - 352usize];
2034-
["Offset of field: _jl_module_t::hash"][::std::mem::offset_of!(_jl_module_t, hash) - 368usize];
2035+
[::std::mem::offset_of!(_jl_module_t, max_methods) - 356usize];
2036+
["Offset of field: _jl_module_t::lock"][::std::mem::offset_of!(_jl_module_t, lock) - 360usize];
2037+
["Offset of field: _jl_module_t::hash"][::std::mem::offset_of!(_jl_module_t, hash) - 376usize];
20352038
};
20362039
pub type jl_module_t = _jl_module_t;
20372040
#[repr(C)]

0 commit comments

Comments
 (0)