Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 17, 2024

This change removes the need for runCaller and the calledRun global. Instead we simply set dependenciesFulfilled to run directly each time to return early due to outstanding dependencies.

This also means that we don't need a reentrancy check on doRun since dependenciesFulfilled is only set in the case where doRun didn't actually run.

This both simplifies the code and saves on code size.

@sbc100 sbc100 requested a review from kripken December 17, 2024 06:48
@sbc100 sbc100 force-pushed the simplify_dependenciesFulfilled branch from 0b12546 to 4cf19a9 Compare December 17, 2024 19:23
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Nice!

@sbc100 sbc100 enabled auto-merge (squash) December 17, 2024 20:22
@sbc100 sbc100 force-pushed the simplify_dependenciesFulfilled branch from 4cf19a9 to a291a00 Compare December 17, 2024 20:58
This change removes the need for `runCaller` and the `calledRun` global.
Instead we simply set `dependenciesFulfilled` to `run` directly each
time to return early due to outstanding dependencies.

This also means that we don't need a reentrancy check on `doRun` since
`dependenciesFulfilled` is only set in the case where `doRun` didn't
actually run.

This both simplifies the code and saves on code size.
@sbc100 sbc100 force-pushed the simplify_dependenciesFulfilled branch from a291a00 to 5fd2a66 Compare December 17, 2024 21:01
@sbc100 sbc100 disabled auto-merge December 17, 2024 21:01
@sbc100 sbc100 merged commit 399a077 into emscripten-core:main Dec 17, 2024
1 of 12 checks passed
@sbc100 sbc100 deleted the simplify_dependenciesFulfilled branch December 17, 2024 21:01
hedwigz pushed a commit to hedwigz/emscripten that referenced this pull request Dec 18, 2024
This change removes the need for `runCaller` and the `calledRun` global.
Instead we simply set `dependenciesFulfilled` to `run` directly each
time to return early due to outstanding dependencies.

This also means that we don't need a reentrancy check on `doRun` since
`dependenciesFulfilled` is only set in the case where `doRun` didn't
actually run.

This both simplifies the code and saves on code size.
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