Skip to content

Simplify create_sending function. NFC #17189

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

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Simplify create_sending function. NFC #17189

merged 1 commit into from
Jun 9, 2022

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jun 9, 2022

Rather than mangling all symbols and then trying to unmangle them
again, just mangle the ones that actually need mangling.

This allows the complete removal of the unmangling function.

@sbc100 sbc100 requested a review from kripken June 9, 2022 17:40
@sbc100 sbc100 force-pushed the simplify_create_sending branch from 0a7e6e2 to 0679afd Compare June 9, 2022 17:53
add_send_items(name, asmjs_mangle(name))
for name in metadata['globalImports']:
# globalImports can currently overlap with declares, in the case of dynamic linking
add_send_items(name, asmjs_mangle(name), ignore_dups=settings.RELOCATABLE)
Copy link
Member

Choose a reason for hiding this comment

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

Before this PR we didn't have this check on RELOCATABLE, why is it needed now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Before this PR we were allowing duplication of the mangled names because we were doing send_items = set(invoke_funcs + declares + externs)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So this change actually increases the strictness a little

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if we even need this check TBH

Copy link
Member

Choose a reason for hiding this comment

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

I see, makes sense.

Rather than mangling all symbols and then trying to unmangle them
again, just mangle the ones that actually need mangling.

This allows the complete removal of the unmangling function.
@sbc100 sbc100 force-pushed the simplify_create_sending branch from 0679afd to e996294 Compare June 9, 2022 17:55
@sbc100 sbc100 enabled auto-merge (squash) June 9, 2022 18:17
@sbc100 sbc100 requested a review from kripken June 9, 2022 20:56
@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 9, 2022

PTAL, I have another change that requires this one: #17153

@sbc100 sbc100 merged commit 06e68ea into main Jun 9, 2022
@sbc100 sbc100 deleted the simplify_create_sending branch June 9, 2022 23:10
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.

2 participants