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

What's the roadmap for Garbage Collection? #44

Open
PoignardAzur opened this issue Nov 5, 2018 · 13 comments
Open

What's the roadmap for Garbage Collection? #44

PoignardAzur opened this issue Nov 5, 2018 · 13 comments

Comments

@PoignardAzur
Copy link

@PoignardAzur PoignardAzur commented Nov 5, 2018

The activity for this proposal has slowed down quite a bit since August, and the current MVP implementation is full of TODOs. I'm sure work on the proposal is still ongoing, and I don't know what the priorities of the Wasm team are, but I'm really excited by the GC proposal and what it would mean for Wasm adoption.

How can we contribute? Could we get a general roadmap for what needs to be done before the GC proposal is implemented? Is there some area where the community could be helpful?

I would ordinarily look at existing repository issues for starting points, but most of the issues here seem to be inactive; mostly old questions and people proposing alternate schemes.

@chicoxyzzy

This comment has been minimized.

Copy link
Contributor

@chicoxyzzy chicoxyzzy commented Nov 6, 2018

Updated after @lars-t-hansen's comment.

Note: probably there can be inaccuracies in answer below


@PoignardAzur There is Reference Types proposal which is came out of GC and Host Bindings proposals and provides a way to reference host objects inside wasm. Reference Types doesn't imply GC in wasm (GC is necessary only if host references are GC'ed) but they are the basis for GC proposal. Reference Types are on phase 3 of WebAssembly W3C Process.
You can use these links to track status of Reference Types and GC:

Also there are some open questions in GC proposal (which is on phase 1):

  • for integration with JS hosts, nominal typing in JS Typed Objects vs structural typing in wasm should be solved, also nullability, etc (see #45)
  • for all hosts these issues should be solved
  • Typed Objects proposal for ECMAScript needs update based on WebAssembly requirements
@lars-t-hansen

This comment has been minimized.

Copy link

@lars-t-hansen lars-t-hansen commented Nov 7, 2018

@chicoxyzzy, the spidermonkey links in your post are incorrect. Reftypes are in progress (metabugs for milestone 1, milestone 2) but are absolutely not finished, nor is the reftypes spec completely finished either, there are plenty of open issues and more are coming. The implementation of GC is in progress, but the link you reference above (under Reference Types) is to an initial prototype implementation of some partial ideas, and we are at least many months away from finishing this feature.

@chicoxyzzy

This comment has been minimized.

Copy link
Contributor

@chicoxyzzy chicoxyzzy commented Nov 7, 2018

@lars-t-hansen thank you for your corrections! I updated my comment.

@tschneidereit

This comment has been minimized.

Copy link
Member

@tschneidereit tschneidereit commented Nov 7, 2018

Typed Objects proposal for ECMAScript is inactive and needs a huge update based on WebAssembly requirements

It's not really inactive, but I should update all the places to reflect that.

@chicoxyzzy

This comment has been minimized.

Copy link
Contributor

@chicoxyzzy chicoxyzzy commented Nov 7, 2018

It's not really inactive, but I should update all the places to reflect that.

Thanks. Fixed

@PoignardAzur

This comment has been minimized.

Copy link
Author

@PoignardAzur PoignardAzur commented Nov 8, 2018

@chicoxyzzy Thank you for your answer.

Even with the information you've given here, the advancement of Wasm GC still feels somewhat vague. It woud probably be helpful to post some of this in the README or the overview.

Some questions that I still have:

  • What portion of the "GC" proposal does the "Reference types" proposal cover? The GC proposal goes in some detail about what kinds of data structures references would be able to access, and how they'd access these structures. The proposal says that references should exist, but how would these references be created, written to and read from?

  • What is the roadmap for Reference Types, and how can community members contribute to it? I presume a large part of the development (eg updating the Wasm compilers on each browser) will be mostly in-house for Morilla, Google and Microsoft, but are aspects of the RT proposal that could benefit from community contributions?

  • @tschneidereit What is the status of the "Typed Objects" proposal? Same questions as above, really. And how necessary are ES Typed Objects to Webasm GC, given that the GC proposal already spells out its own type system?

@PoignardAzur

This comment has been minimized.

Copy link
Author

@PoignardAzur PoignardAzur commented Nov 8, 2018

@lars-t-hansen Interesting. Correct me if I'm wrong, but is the Mozilla team currently developing the "GC" proposal independently of the progression of "Reference Types" and "Types Object", hence why you're implementing aggregate types?

Or am I misunderstanding these links?

@lars-t-hansen

This comment has been minimized.

Copy link

@lars-t-hansen lars-t-hansen commented Nov 8, 2018

@PoignardAzur, The reftypes proposal is not intended to require the GC proposal nor anything like typed objects for JS, and we are indeed developing reftypes semi-independently from the other proposals. (Of course in Firefox, reftypes will be backed by a garbage collector and will be able to handle JS objects, but there are other embeddings where this is not interesting or necessary.)

@chicoxyzzy

This comment has been minimized.

Copy link
Contributor

@chicoxyzzy chicoxyzzy commented Nov 8, 2018

There is discussion in proposals repo about tracking implementation status of proposals WebAssembly/proposals#21

@PoignardAzur

This comment has been minimized.

Copy link
Author

@PoignardAzur PoignardAzur commented Nov 8, 2018

@lars-t-hansen That seems a little contradictory with the current MVP specification, which says its language is

Based on reference types proposal, which introduces type anyref etc.

I think it would be a lot easier for volunteers to provide help (both in writing down specs and implementing solutions) if there was a written consensus on what is done, what is to be done, and what needs to be agreed on.

Right now it seems that the GC and Reftypes blueprints (eg spec+implem) reside in large part in the minds of Mozilla and Google engineers, which is obviously not ideal. People can't e.g. contribute to the spec if they don't know what's the official spec and what's outdated. Same thing for contributing code.

@chicoxyzzy

This comment has been minimized.

Copy link
Contributor

@chicoxyzzy chicoxyzzy commented Nov 8, 2018

@PoignardAzur you can join WebAssembly W3C Community Group to participate in CG meetings

@tschneidereit

This comment has been minimized.

Copy link
Member

@tschneidereit tschneidereit commented Nov 8, 2018

* @tschneidereit What is the status of the "Typed Objects" proposal? Same questions as above, really.

@PoignardAzur the proposal is in very early stages—I haven't yet presented it to TC39, so the explainer is pretty much all the information available right now.

And how necessary are ES Typed Objects to Webasm GC, given that the GC proposal already spells out its own type system?

WebAssembly's GC proposal is technically independent from JS Typed Objects, but Typed Objects are the JS reflection of the same objects specified in Wasm GC proposal. Think of it as two different aspects of the same underlying concerns. The reason we need both proposals is that these objects need to be efficiently accessible both from WebAssembly and from JS in order to be maximally useful.

@binji

This comment has been minimized.

Copy link
Member

@binji binji commented Nov 8, 2018

@PoignardAzur you may want to take a look at the notes from the most recent CG meeting at TPAC, as well as the presentations on the reference-types and GC proposals. They don't have all the spec information, but they do have the current status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.