-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement Q1 2021 Small features release in dart2js #44913
Comments
Of the small features I expect that metadata support is CFE only, @fishythefish @rakudrama - what's your take on how much work will be required in this case? |
I added some tasks for optimizing I think RTI would be affected only by annotations that are somehow reified in the app. |
The semantics require no reification. Whether you want to do so for error message purposes is up to the implementations. |
It's might not be unreasonable to have an optional kernel transform which eliminates all reified uses of typedefs for backends that want to expand them out, assuming that multiple backends might do so. cc @johnniwinther @a-siva @crelier |
Sorry I'm a bit confused. There are two changes involving type parameters:
I was assuming the former are not reified, but that the latter was reified. Is that incorrect? If those are reified, is the dart2js RTI representation general enough to accept them or do we need to extend it? |
Yes, type arguments cf. dart-lang/language#496 need to be reified in order to maintain a type correct heap and support type tests and type casts. I would assume that type arguments on annotations (formerly 'metadata') would have to be reified insofar as the annotation object itself exists at run time (presumably they don't have to exist at run time unless |
@sigmundch There is no restriction in the RTI representation as to which subterms may be generic function types. I'll let @fishythefish comment on whether there are impacts for the Rti-need optimizations. |
Sorry for the noise - I read this too quickly and was thinking about type aliases. Agreed with the above. |
My understanding of our RTI need is still more empirical than theoretical, so I'll need to play around with this feature and run some test suites in order to be sure how it's affected. One possible change is that we'll need to add some more edges to our implicit RTI need graph: if a generic function type Because our RTI need computation builds up a set of type variables to preserve rather than a set to erase, RTI need bugs often result in type variables being spuriously erased (to a top type/ |
Per the linked bug, I believe this is done modulo some post-flag flip cleanup, is that correct? |
For triple shift, I think so, and AFAIK metadata improvements don't require any backend work. I'm mostly concerned about support for generic function types in type arguments - I don't think it'll be a hard change to make, but it'll be easiest if we have a suite of language/co19 tests to validate against. |
What is the status? |
I don't think we have any work on non-function type aliases, and the current test failure seems to be a CFE issue. For triple shift, there are two test failures, but no action to be taken prior to the release. For generic metadata, there are no failures and no implementation work on our end. |
This tracks the dart2js implementation work for this feature. See also this existing issue for triple shift.
cc @sigmundch @rakudrama @franklinyow
The text was updated successfully, but these errors were encountered: