-
Notifications
You must be signed in to change notification settings - Fork 39
Weak reference support #145
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
Merged
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
f6b7614
WIP
qinsoon d3f2176
Enqueue reference (slow)
qinsoon a1f0de2
Update mmtk-core, cargo fmt
qinsoon c930704
Merge branch 'master' into weak-ref
qinsoon cb498d9
Update mmtk-core
qinsoon 32c7dda
Implement get_reference_when_copied_to
qinsoon 93998de
Update mmtk-core
qinsoon 8f188ce
Bulk enqueue references
qinsoon d1d810e
Update mmtk-core.
qinsoon 2d0befa
Merge branch 'master' into weak-ref
qinsoon f93adac
Update mmtk-core
qinsoon f2bf3cc
Update mmtk-core
qinsoon af76c62
Update mmtk-core
qinsoon d6afe44
Update mmtk-core
qinsoon f3daa8d
Allow no_reference_types
qinsoon e83dcc3
Merge branch 'master' into weak-ref
qinsoon 1e567c1
Merge branch 'master' into weak-ref
qinsoon e46442e
Add CI tests for weak refs. Update mmtk-core.
qinsoon 9e92b4d
Fix slice use in FFI. Update mmtk-core.
qinsoon e042f8e
Merge branch 'master' into weak-ref
qinsoon 0a173e2
Update Cargo.toml
qinsoon 2e33316
Merge branch 'master' into weak-ref
qinsoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ cd $cur | |
./ci-test-assertions.sh | ||
cd $cur | ||
./ci-test-global-alloc-bit.sh | ||
cd $cur | ||
./ci-test-weak-ref.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
use crate::abi::{InstanceRefKlass, Oop}; | ||
use crate::OpenJDK; | ||
use crate::UPCALLS; | ||
use mmtk::util::opaque_pointer::VMWorkerThread; | ||
use mmtk::util::ObjectReference; | ||
use mmtk::vm::ReferenceGlue; | ||
use mmtk::TraceLocal; | ||
|
||
pub struct VMReferenceGlue {} | ||
|
||
impl ReferenceGlue<OpenJDK> for VMReferenceGlue { | ||
fn set_referent(_reff: ObjectReference, _referent: ObjectReference) { | ||
unimplemented!() | ||
fn set_referent(reff: ObjectReference, referent: ObjectReference) { | ||
let oop = Oop::from(reff); | ||
unsafe { InstanceRefKlass::referent_address(oop).store(referent) }; | ||
} | ||
fn get_referent(_object: ObjectReference) -> ObjectReference { | ||
unimplemented!() | ||
fn get_referent(object: ObjectReference) -> ObjectReference { | ||
let oop = Oop::from(object); | ||
unsafe { InstanceRefKlass::referent_address(oop).load::<ObjectReference>() } | ||
} | ||
fn process_reference<T: TraceLocal>( | ||
_trace: &mut T, | ||
_reference: ObjectReference, | ||
_tls: VMWorkerThread, | ||
) -> ObjectReference { | ||
unimplemented!() | ||
fn enqueue_references(references: &[ObjectReference], _tls: VMWorkerThread) { | ||
unsafe { | ||
((*UPCALLS).enqueue_references)(references, references.len()); | ||
qinsoon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.