Kunshan Wang

Results 273 comments of Kunshan Wang

> The bounds check I'm describing is for the `is_mmtk_object` and `is_in_mmtk_spaces` function(s). Not for `ref_to_address`. Well, in this case bounds check should help. But since MMTk doesn't know the...

> ... asking if an arbitrary address is potentially (and in the case of `is_mmtk_object`: definitely) allocated by MMTk is a simple question that most, if not all, VMs need....

This problem is responsible for some of the CI test timeouts for the Ruby binding. The hanging test case is `TestAutoload#test_autoload_fork`. It forks, and will usually pass. But if GC...

> [`Option` is not FFI-safe (even though it should be)](https://users.rust-lang.org/t/option-is-ffi-safe-or-not/29820). I learnt this the hard way. We can define our own "`Option`" type but then it's annoying to convert between...

> ... It is more natural to a binding developer to already use the type MMTk uses, i.e. `ObjectReference` (or `Option`) in their own API,... If "their own API" is...

> > If "their own API" is in Rust, they can use Option in their API, too. > > That's not FFI then. It's just Rust, which is perfectly fine....

In the preliminary implementation https://github.com/mmtk/mmtk-core/pull/1064, `ObjectReference` has two methods to convert from `Address`: ```rs pub fn from_raw_address(addr: Address) -> Option; pub unsafe fn from_raw_address_unchecked(addr: Address) -> ObjectReference; ``` `from_raw_address_unchecked` is...

> For languages that use a special singleton object to represent its 'NULL' reference, can they use `Some(ObjectReference)` for the singleton object? When they allocate and initialize the object, they...

> This sounds like a pretty confusing definition of `Edge::load()` as a part of public API. What would the comments for `Edge::load()` be? The current doc is: ```rust pub trait...

I see your point. It's probably not a good idea to define the semantics of `Edge::load()` based on tracing. `Scanning::scan_object` is not (only) designed for tracing, and that's part of...