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

Remove NULL ObjectReference #84

Merged
merged 2 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
31 changes: 16 additions & 15 deletions mmtk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ log = "*"
# - change branch
# - change repo name
# But other changes including adding/removing whitespaces in commented lines may break the CI.
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "e79e94e744660c486d5471f252ff05c4248bcea9" }
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "6aa75cd72247d12b9568dc321c46feca6572a512" }
# Uncomment the following and fix the path to mmtk-core to build locally
# mmtk = { path = "../repos/mmtk-core" }

Expand Down
3 changes: 2 additions & 1 deletion mmtk/src/object_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ impl ObjectModel<V8> for VMObjectModel {
}

fn address_to_ref(address: Address) -> ObjectReference {
ObjectReference::from_raw_address(address)
debug_assert!(!address.is_zero());
unsafe { ObjectReference::from_raw_address_unchecked(address) }
}

fn dump_object(object: ObjectReference) {
Expand Down
5 changes: 4 additions & 1 deletion mmtk/src/reference_glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ impl ReferenceGlue<V8> for VMReferenceGlue {
fn set_referent(_reff: ObjectReference, _referent: ObjectReference) {
unimplemented!()
}
fn get_referent(_object: ObjectReference) -> ObjectReference {
fn get_referent(_object: ObjectReference) -> Option<ObjectReference> {
unimplemented!()
}
fn enqueue_references(_references: &[ObjectReference], _tls: VMWorkerThread) {
unimplemented!()
}
fn clear_referent(_new_reference: ObjectReference) {
unimplemented!()
}
}
Loading