Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic message and outdated comments #1191

Merged
merged 1 commit into from
Aug 29, 2024
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
6 changes: 3 additions & 3 deletions src/util/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ impl ObjectReference {
pub fn from_raw_address(addr: Address) -> Option<ObjectReference> {
debug_assert!(
addr.is_aligned_to(Self::ALIGNMENT),
"ObjectReference is required to be word aligned"
"ObjectReference is required to be word aligned. addr: {addr}"
);
NonZeroUsize::new(addr.0).map(ObjectReference)
}
Expand All @@ -539,7 +539,7 @@ impl ObjectReference {
debug_assert!(!addr.is_zero());
debug_assert!(
addr.is_aligned_to(Self::ALIGNMENT),
"ObjectReference is required to be word aligned"
"ObjectReference is required to be word aligned. addr: {addr}"
);
ObjectReference(NonZeroUsize::new_unchecked(addr.0))
}
Expand Down Expand Up @@ -582,7 +582,7 @@ impl ObjectReference {
debug_assert!(!VM::VMObjectModel::UNIFIED_OBJECT_REFERENCE_ADDRESS || addr == obj.to_raw_address(), "The binding claims unified object reference address, but for address {}, the object reference is {}", addr, obj);
debug_assert!(
obj.to_raw_address().is_aligned_to(Self::ALIGNMENT),
"ObjectReference is required to be word aligned"
"ObjectReference is required to be word aligned. addr: {addr}, obj: {obj}"
);
obj
}
Expand Down
2 changes: 0 additions & 2 deletions src/util/metadata/side_metadata/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,6 @@ impl SideMetadataSpec {
let end_meta_addr = address_to_contiguous_meta_address(self, end_addr);
let end_meta_shift = meta_byte_lshift(self, end_addr);

// The result will be set by one of the following closures.
// Use Cell so it doesn't need to be mutably borrowed by the two closures which Rust will complain.
let mut res = None;

let mut visitor = |range: BitByteRange| {
Expand Down
Loading