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

Update reference types #3084

Merged
merged 32 commits into from
Sep 9, 2020
Merged

Update reference types #3084

merged 32 commits into from
Sep 9, 2020

Conversation

dcodeIO
Copy link
Contributor

@dcodeIO dcodeIO commented Aug 29, 2020

To align with the current state of the reference types proposal:

  • Removes nullref
  • Removes externref and funcref subtyping
  • A Literal of a nullable reference type can now represent null (previously was type nullref)
  • Updates the tests and comments out those tests relying on subtyping, to be enabled again in follow-ups

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Aug 29, 2020

This became larger than expected, but this is what was necessary to make stuff work again. Going to add comments tomorrow :)

src/literal.h Outdated
}
static Literal makeFunc(Name func) { return Literal(func.c_str()); }
static Literal makeExn(ExceptionPackage& package) { return Literal(package); }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First I renamed makeNullref to makeNull for clarity, and then figured that it'd be good to rename all of them because we are not creating types but values.

@tlively tlively requested review from tlively and aheejin and removed request for tlively August 31, 2020 06:17
@tlively
Copy link
Member

tlively commented Aug 31, 2020

@aheejin, I think this overlaps with patches you were working on, but I'm not sure if your work goes further or takes a different approach. Let us know how it makes the most sense to move forward.

@aheejin
Copy link
Member

aheejin commented Aug 31, 2020

Hello. I explicitly asked you that "I started to work on the same patch, but because I didn't want to block you, so if you want another plan or something please let me know". You didn't reply anything to that. I mostly finished (tests have not been updated fully though) my own patch and I was about to upload it.

I'm not sure if this should be the way we cooperate. I think you could've answered my question that you wanted to do this yourself? So that I didn't have to waste my time after all? We don't need to work on the same patch and choose one of them.

I also said I think it'd be good if there is a patch that only updates the reference types up-to-date, and we don't mix it with the ongoing GC implementation, so that the patch is simple and self-contained and well-tested with the fuzzer. This was apparently ignored too, because this patch contains not only reference type changes but all GC stuff. Of course, this was only my opinion and you may disagree, but I really don't understand why you didn't say that then, didn't answer anything that you wanted to implement everything in one patch and also you were gonna do it yourself, and just ignored all my comments.

@aheejin
Copy link
Member

aheejin commented Aug 31, 2020

@aheejin, I think this overlaps with patches you were working on, but I'm not sure if your work goes further or takes a different approach. Let us know how it makes the most sense to move forward.

I don't know. I didn't expect this and I don't think this is a good manner.

He could've said he was gonna implement this himself. I even asked him explicitly. Yeah, I wasted my time, but I can dump my patch, but it is not even easy for me to review this patch without the knowledge of his previous GC patches, because apparently this patch contains not only reference types updates but also GC stuff. I said that the updating patch would be better if it is focused on only reference type updates, and that was my patch's focus, but apparently, that was ignored too. So what should I do? I really don't know. 🤷🏻

@dcodeIO dcodeIO dismissed aheejin’s stale review September 4, 2020 06:07

Dismissing as requested

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size of this change (even if much of it is mechanical) makes it difficult to review. I think splitting out the addition of eqref and i31ref everywhere and focusing on just removing nullref would help.

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Sep 7, 2020

Last commit deletes all the GC prep. If I didn't miss something, this should be reftypes only now.

@dcodeIO dcodeIO changed the title Update basic reference types Update reference types Sep 7, 2020
Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cutting this down! It felt much easier to review.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I think this is ready to go. Let's hold off on merging it until just before you are ready to create the follow-up PR that re-enables the tests, though. We will have a small period of time where we are not testing subtyping, but we can make that period as short as possible.

@tlively
Copy link
Member

tlively commented Sep 7, 2020

Also of course make sure you update the commit title and message to reflect the cut-down functionality :)

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Sep 7, 2020

Thanks! The commit title should be up to date, and I can start looking into --enable-anyref next, as suggested above to get subtyping tests up again before diving into GC and the other types. Would expect the diff there to be rather straight-forward, but ofc uncommenting a lot of tests, while adding a few Type::anyref cases here and there with the only subtyping relationship introduced being reftype <: anyref. It's a little hard to start that on current master, though, but I can try to fork it from this PR?

@tlively
Copy link
Member

tlively commented Sep 7, 2020

Yeah I would start a new branch from this PR, then when everything is good locally with that branch, merge this PR, rebase your local branch onto the new master, and make the next PR.

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Sep 8, 2020

PR on top of this one implementing the anyref feature and enabling the commented out tests again: dcodeIO#4

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Sep 9, 2020

Ran the fuzzer for a bit and looks good. Merging, and continuing with the follow up above :)

@dcodeIO dcodeIO merged commit 916ce6f into WebAssembly:master Sep 9, 2020
This was referenced Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants