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

[dart2js] Identify required powerset bits #49312

Open
fishythefish opened this issue Jun 22, 2022 · 1 comment
Open

[dart2js] Identify required powerset bits #49312

fishythefish opened this issue Jun 22, 2022 · 1 comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. type-task A well-defined stand-alone task web-dart2js

Comments

@fishythefish
Copy link
Member

The current scaffolding for the powerset domain defines a few bits:

  • true/false/null/other
  • interceptor/not interceptor/null interceptor

We may need to confirm that these bits are still useful and in a usable state. We also need to determine what other bits the powerset domain should support and sort them by priority.

@fishythefish fishythefish added type-task A well-defined stand-alone task web-dart2js area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Jun 22, 2022
@rakudrama
Copy link
Member

For each optimization, the value space can be partitioned into values that allow an optimization, and some sister bits that cover the cases where the optimization does not apply.

We have two hierarchies of 'fake' types so that the type-masks can be used to make distinctions within a natural type. These are will be better expressed as powerset subdomains.

JSArray has fake subclasses to model the varieties of list - each subclass permits some optimization - e.g. fixed-length lists have a .length that can be hoisted.
The powerset domain would include other JSIndexables, including some @Native classes like NodeList.

JSInt has a similar set of partioning subclasses.
JSUInt31 targets bit-operation optimizations.
In addition to small non-negative integers, it would be useful to model -0.0 since the absence of -0.0 from otherwise non-negative values allows lowering to %.

I would take on the JSInt-subclass-replacement domain later than some others since the transfer functions are harder to write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. type-task A well-defined stand-alone task web-dart2js
Projects
None yet
Development

No branches or pull requests

2 participants