-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Use C/C++ bool type to implement EM_BOOL #22157
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think we should probably do a release containing this change before we land part 2 so that we can separate any possible fallout. |
kripken
approved these changes
Jun 27, 2024
sbc100
force-pushed
the
em_bool_part1
branch
3 times, most recently
from
June 27, 2024 21:13
b4b6a8c
to
019491a
Compare
I had to update a bunch of places where we were accessing these fields (u8 vs u32 access). PTAL. |
I used the following commands to fine and fix all locations in the JS library code that was treating these values as 32 bit:
|
kripken
reviewed
Jun 27, 2024
kripken
reviewed
Jun 27, 2024
This reduces the size of several structs and results in code size savings in some cases. This change is split of from a larger change I have planned to remove the use of EM_BOOL completely: emscripten-core#22155.
I used the following commands to make sure I got all of them this time. $ git grep "^\s*EM_BOOL[^(]*$" system/include/ | awk '{ print $3 }' | sed "s/;//" | sort | uniq > bools.txt $ for bool in `cat bools.txt`; do git grep "make[GS]etValue.*\.$bool\>.*32"; done
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Jul 8, 2024
This was broken by emscripten-core#22157 Fixes: emscripten-core#22197
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Jul 8, 2024
This was broken by emscripten-core#22157 Fixes: emscripten-core#22197
sbc100
added a commit
that referenced
this pull request
Jul 8, 2024
verhovsky
pushed a commit
to verhovsky/emscripten
that referenced
this pull request
Jul 30, 2024
) This was broken by emscripten-core#22157 Fixes: emscripten-core#22197
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Sep 3, 2024
These macros were already updated to expand to the C/C++ `bool` type back in emscripten-core#22157. This is the natural NFC followup to that change.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Oct 1, 2024
These macros were already updated to expand to the C/C++ `bool` type back in emscripten-core#22157. This is the natural NFC followup to that change.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Oct 1, 2024
These macros were already updated to expand to the C/C++ `bool` type back in emscripten-core#22157. This is the natural NFC followup to that change.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Oct 1, 2024
These macros were already updated to expand to the C/C++ `bool` type back in emscripten-core#22157. This is the natural NFC followup to that change.
sbc100
added a commit
that referenced
this pull request
Oct 2, 2024
These macros were already updated to expand to the C/C++ `bool` type back in #22157. This is the natural NFC followup to that change.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reduces the size of several structs and can result in code size savings in some cases. The reason
the code size savings don't show up in trivial examples is (I believe) because this change also increases
the use of HEAP8 (where previously some examples only depended on HEAP32).
This change is split of from a larger change I have planned to remove the use of EM_BOOL completely: #22155.