Skip to content

Commit 29dfce4

Browse files
committed
Minor changes to ObjectReference based on the review
1 parent 3aee387 commit 29dfce4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/util/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl Address {
214214

215215
/// Apply an signed offset to the address.
216216
pub const fn offset(self, offset: isize) -> Address {
217-
Address((self.0 as isize).wrapping_add(offset) as usize)
217+
Address(self.0.wrapping_add_signed(offset))
218218
}
219219

220220
/// Bitwise 'and' with a mask.

src/vm/object_model.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ pub trait ObjectModel<VM: VMBinding> {
433433
const VM_WORST_CASE_COPY_EXPANSION: f64 = 1.5;
434434

435435
/// If this is true, the binding guarantees that the object reference's raw address,
436-
/// the in-object address, and the object start is always the same address. To be precise,
436+
/// the in-object address, and the object start are always the same address. To be precise,
437437
/// 1. an object reference's raw address is always equal to the return value of the `ref_to_object_start` method,
438438
/// 2. `IN_OBJECT_ADDRESS_OFFSET` is 0.
439439
///

0 commit comments

Comments
 (0)