Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Jan 17, 2024

We already applied such globals to other globals, but can do the same to offsets
of data and element segments.

Suggested in #6220 (comment)

Comment on lines +73 to +75
(drop
(global.get $use-defined)
)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use $use-imported too as a comparison?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, done.

Comment on lines +33 to +34
;; CHECK: (data $dropped "hello, world!")
(data $dropped "hello, world!")
Copy link
Member

Choose a reason for hiding this comment

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

Is this relevant to this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a segment without an offset, so the pass has nothing to do there but also it should not error on it (there is a nullptr for the offset). I added a comment to clarify.

@kripken kripken enabled auto-merge (squash) January 18, 2024 18:48
@kripken kripken merged commit 3049fb8 into WebAssembly:main Jan 18, 2024
@kripken kripken deleted the rume.ginits branch January 18, 2024 19:21
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
…ly#6226)

We already applied such globals to other globals, but can do the same to offsets
of data and element segments.

Suggested in WebAssembly#6220
@gkdn gkdn mentioned this pull request Aug 31, 2024
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