Skip to content
Draft
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
5 changes: 5 additions & 0 deletions mmtk/src/julia_scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ unsafe fn scan_julia_hidden_ptr_n<T>(
// INFO: *_custom() functions are acessors to bitfields that do not use bindgen generated code.
#[inline(always)]
pub unsafe fn scan_julia_object<SV: SlotVisitor<JuliaVMSlot>>(obj: Address, closure: &mut SV) {
if crate::object_model::is_addr_in_immortalspace(obj) {
// immortal space objects do not need to be scanned
return;
}

// get Julia object type
let mut vtag = mmtk_jl_typetagof(obj);
let mut vtag_usize = vtag.as_usize();
Expand Down
5 changes: 5 additions & 0 deletions mmtk/src/object_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ pub fn is_object_in_nonmoving(object: &ObjectReference) -> bool {
&& (*object).to_raw_address().as_usize() < 0xa00_0000_0000
}

#[inline(always)]
pub fn is_addr_in_immortalspace(addr: Address) -> bool {
addr.as_usize() >= 0x400_0000_0000 && addr.as_usize() < 0x600_0000_0000
}

// If an object has its type tag bits set as 'smalltag', but those bits are not recognizable,
// very possibly the object is corrupted. This function asserts this case.
pub fn assert_generic_datatype(obj: Address) {
Expand Down