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

Extract generated finalizers into generic helper functions. #31569

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

jdm
Copy link
Member

@jdm jdm commented Mar 7, 2024

This is an experiment to demonstrate one way to reduce the complexity of CodegenRust.py. By extracting the inline code generated for certain DOM binding methods that shouldn't be performance sensitive, we trade off the performance impact of a function call against code that is more easily read and modified.

Model for #31570.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes

@sagudev
Copy link
Member

sagudev commented Mar 8, 2024

we trade off the performance impact of a function call against code that is more easily read and modified.

We can hope it gets inlined or we can use #[inline(always)].

@jdm jdm added this pull request to the merge queue Mar 8, 2024
Merged via the queue into main with commit 19f1f2a Mar 8, 2024
10 checks passed
@jdm jdm deleted the extract-finalizer branch March 8, 2024 15:37
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