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

Investigate Fishy Record Names in Optimizer Core #4947

Open
gzm0 opened this issue Feb 18, 2024 · 2 comments
Open

Investigate Fishy Record Names in Optimizer Core #4947

gzm0 opened this issue Feb 18, 2024 · 2 comments

Comments

@gzm0
Copy link
Contributor

gzm0 commented Feb 18, 2024

Follow-up form here:

/* FIXME How come this lookup requires only the `simpleName`?
* The `recordType` is created at `InlineableClassStructure.recordType`,
* where it uses an allocator. Something fishy is going on here.
* (And no, this is not dead code.)
*/

@gzm0
Copy link
Contributor Author

gzm0 commented Feb 18, 2024

I've been playing around with this and so far, I have not actually managed for the optimizer to produce a Record.

Either, the local def system already resolved everything before even creating a record (this is what happened here: #4946 (comment)) or the optimizer cancelled the inlining.

@sjrd how did you determine the piece of code in question is not dead code? I'm starting to suspect that it only triggers for RuntimeLong (where we have more aggressive class inlining policies).

@sjrd
Copy link
Member

sjrd commented Feb 18, 2024

@sjrd how did you determine the piece of code in question is not dead code? I'm starting to suspect that it only triggers for RuntimeLong (where we have more aggressive class inlining policies).

Replace it by ??? and try testSuite2_12/Test/fastLinkJS. It blows up.

In order for a record to be reified, I believe we need at least an if/else where both branches return an instance of the inline class. Or any other merge point. So that's maybe what we need to add to #4946 (comment)

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

No branches or pull requests

2 participants