Skip to content

Commit 53d7988

Browse files
authored
Update to mmtk-core PR #838 (#142)
This PR updates mmtk-core to mmtk/mmtk-core#838.
1 parent 5feef6f commit 53d7988

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

mmtk/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"]
2828
# - change branch/rev
2929
# - change repo name
3030
# But other changes including adding/removing whitespaces in commented lines may break the CI.
31-
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "de8bbfe623eee5e915f32870de8f81128df8ad41" }
31+
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "2ec37bde7955304f3e4bc5f7bed3fbfba3833cc0" }
3232
# Uncomment the following to build locally - if you change the path locally, do not commit the change in a PR
3333
# mmtk = { path = "../repos/mmtk-core" }
3434

mmtk/api/mmtk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern void* alloc_slow_largeobject(MMTk_Mutator mutator, size_t size,
2828
size_t align, size_t offset, int allocator);
2929

3030
extern void post_alloc(MMTk_Mutator mutator, void* refer, void* type_refer,
31-
int bytes, int allocator);
31+
size_t bytes, int allocator);
3232

3333
extern bool is_live_object(void* obj);
3434
extern bool is_mapped_object(void* obj);

mmtk/src/api.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub extern "C" fn alloc(
9191
mutator: *mut Mutator<JikesRVM>,
9292
size: usize,
9393
align: usize,
94-
offset: isize,
94+
offset: usize,
9595
allocator: AllocationSemantics,
9696
) -> Address {
9797
memory_manager::alloc::<JikesRVM>(unsafe { &mut *mutator }, size, align, offset, allocator)
@@ -298,7 +298,7 @@ pub extern "C" fn alloc_slow_bump_monotone_immortal(
298298
allocator: *mut c_void,
299299
size: usize,
300300
align: usize,
301-
offset: isize,
301+
offset: usize,
302302
) -> Address {
303303
unsafe { &mut *(allocator as *mut BumpAllocator<JikesRVM>) }.alloc_slow(size, align, offset)
304304
}
@@ -312,7 +312,7 @@ pub extern "C" fn alloc_slow_bump_monotone_copy(
312312
allocator: *mut c_void,
313313
size: usize,
314314
align: usize,
315-
offset: isize,
315+
offset: usize,
316316
) -> Address {
317317
unsafe { &mut *(allocator as *mut BumpAllocator<JikesRVM>) }.alloc_slow(size, align, offset)
318318
}
@@ -322,7 +322,7 @@ pub extern "C" fn alloc_slow_bump_monotone_copy(
322322
_allocator: *mut c_void,
323323
_size: usize,
324324
_align: usize,
325-
_offset: isize,
325+
_offset: usize,
326326
) -> Address {
327327
unimplemented!()
328328
}
@@ -332,7 +332,7 @@ pub extern "C" fn alloc_slow_largeobject(
332332
allocator: *mut c_void,
333333
size: usize,
334334
align: usize,
335-
offset: isize,
335+
offset: usize,
336336
) -> Address {
337337
unsafe { &mut *(allocator as *mut LargeObjectAllocator<JikesRVM>) }
338338
.alloc_slow(size, align, offset)

mmtk/src/object_model.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl VMObjectModel {
6969
}
7070

7171
#[allow(dead_code)]
72-
pub(crate) fn get_align_offset_when_copied(object: ObjectReference) -> isize {
72+
pub(crate) fn get_align_offset_when_copied(object: ObjectReference) -> usize {
7373
trace!("ObjectModel.get_align_offset_when_copied");
7474
let rvm_type = Self::load_rvm_type(object);
7575

@@ -182,7 +182,7 @@ impl ObjectModel<JikesRVM> for VMObjectModel {
182182
}
183183
}
184184

185-
fn get_align_offset_when_copied(object: ObjectReference) -> isize {
185+
fn get_align_offset_when_copied(object: ObjectReference) -> usize {
186186
let rvm_type = Self::load_rvm_type(object);
187187

188188
if Self::is_class(rvm_type) {
@@ -490,33 +490,33 @@ impl VMObjectModel {
490490
}
491491

492492
#[inline(always)]
493-
fn get_offset_for_alignment_array(object: ObjectReference, _rvm_type: Address) -> isize {
493+
fn get_offset_for_alignment_array(object: ObjectReference, _rvm_type: Address) -> usize {
494494
trace!("VMObjectModel.get_offset_for_alignment_array");
495-
let mut offset = OBJECT_REF_OFFSET;
495+
let mut offset = OBJECT_REF_OFFSET as usize;
496496

497497
if ADDRESS_BASED_HASHING && !DYNAMIC_HASH_OFFSET {
498498
let hash_state = unsafe {
499499
(object.to_raw_address() + STATUS_OFFSET).load::<usize>() & HASH_STATE_MASK
500500
};
501501
if hash_state != HASH_STATE_UNHASHED {
502-
offset += HASHCODE_BYTES as isize;
502+
offset += HASHCODE_BYTES;
503503
}
504504
}
505505

506506
offset
507507
}
508508

509509
#[inline(always)]
510-
fn get_offset_for_alignment_class(object: ObjectReference, _rvm_type: Address) -> isize {
510+
fn get_offset_for_alignment_class(object: ObjectReference, _rvm_type: Address) -> usize {
511511
trace!("VMObjectModel.get_offset_for_alignment_class");
512-
let mut offset = SCALAR_HEADER_SIZE as isize;
512+
let mut offset = SCALAR_HEADER_SIZE;
513513

514514
if ADDRESS_BASED_HASHING && !DYNAMIC_HASH_OFFSET {
515515
let hash_state = unsafe {
516516
(object.to_raw_address() + STATUS_OFFSET).load::<usize>() & HASH_STATE_MASK
517517
};
518518
if hash_state != HASH_STATE_UNHASHED {
519-
offset += HASHCODE_BYTES as isize;
519+
offset += HASHCODE_BYTES
520520
}
521521
}
522522

0 commit comments

Comments
 (0)