Skip to content

[Strings] Erase the strings section after StringLifting #7546

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 4 commits into from
Apr 24, 2025

Conversation

kripken
Copy link
Member

@kripken kripken commented Apr 23, 2025

After we lift the strings section into stringref, we don't need the section any
more, and leaving it around could cause problems with repeated lifting/
lowering operations (which would be very much possible with #7540). In
particular, without erasing it, we'd accumulate such sections over time.

Diff without whitespace is smaller.

@kripken kripken requested a review from tlively April 23, 2025 23:51
json::Value array;
array.parse(copy.data(), json::Value::WTF16);
if (!array.isArray()) {
auto iter = std::find_if(
Copy link
Member

Choose a reason for hiding this comment

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

Unlike most variables holding iterators, this one is live for a nontrivial length of code. Let's give it a name like stringSectionIter so the reader remembers what it is by the time they get down to line 120.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, done.

@kripken kripken merged commit c87a7da into WebAssembly:main Apr 24, 2025
14 checks passed
@kripken kripken deleted the string.section.erase branch April 24, 2025 17:09
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