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

Set empty list/hash on first access #4928

Merged
merged 2 commits into from May 19, 2022
Merged

Set empty list/hash on first access #4928

merged 2 commits into from May 19, 2022

Conversation

lizmat
Copy link
Contributor

@lizmat lizmat commented May 18, 2022

For some reason, the mainline is not run, so the 0 elems branches
would return an nqp::null, which gets upgraded to a Mu, which in
turn causes the exception of #4927

For some reason, the mainline is not run, so the 0 elems branches
would return an nqp::null, which gets upgraded to a Mu, which in
turn causes the exception of #4927
@vrurg
Copy link
Member

vrurg commented May 19, 2022

If replaced with my %EMPTY-HASH; my @EMPTY-LIST then wouldn't it be equivalent but more tidy? Besides, no run-time would be involved whatsoever.

@lizmat
Copy link
Contributor Author

lizmat commented May 19, 2022

I think the whole point was that it should be an NQP list/hash, not a HLL List / Map. In any case, I was changing the code as little as possible.

I tried your change, and it killed my Terminal session while doing a spectest.

Now trying to reproduce now

@niner
Copy link
Collaborator

niner commented May 19, 2022 via email

vrurg++ for the suggestion
@lizmat
Copy link
Contributor Author

lizmat commented May 19, 2022

I'm pretty sure I tried that. In any case, @vrurg's suggestion worked out.

@lizmat lizmat merged commit aaa5615 into master May 19, 2022
@lizmat lizmat deleted the lizmat-4927 branch May 19, 2022 10:57
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.

None yet

3 participants