Page MenuHomePhabricator

[WebAssembly] Move event section before global section
ClosedPublic

Authored by aheejin on Tue, Mar 24, 8:48 PM.

Details

Summary

https://github.com/WebAssembly/exception-handling/issues/98

Also this moves many parts of code to make code align with the section
order, even if they don't affect the output.

Diff Detail

Event Timeline

aheejin created this revision.Tue, Mar 24, 8:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Mar 24, 8:48 PM
aheejin edited the summary of this revision. (Show Details)Tue, Mar 24, 8:53 PM
aheejin updated this revision to Diff 252494.Tue, Mar 24, 9:25 PM
  • clang-format
aheejin marked an inline comment as done.Tue, Mar 24, 9:26 PM
aheejin added inline comments.
llvm/lib/Object/WasmObjectFile.cpp
1653

Hmm, clang-format makes this look ugly, and I think I remember you decided not to format this code intentionally before, but having consistent style throughtout wasm code is also better. WDYT? @tlively

tlively accepted this revision.Wed, Mar 25, 10:53 AM

LGTM!

llvm/lib/Object/WasmObjectFile.cpp
1653

Yeah, I think I did intentionally exclude this code from styling before, but I'd be ok letting clang-format style it now. I think it would look better if we move the inline comments to their own lines.

This revision is now accepted and ready to land.Wed, Mar 25, 10:53 AM
aheejin marked 2 inline comments as done.Wed, Mar 25, 11:16 AM
aheejin added inline comments.
llvm/lib/Object/WasmObjectFile.cpp
1653

Good idea! Done.

aheejin retitled this revision from Move event section before global section to [WebAssembly] Move event section before global section.Wed, Mar 25, 11:18 AM
aheejin updated this revision to Diff 252632.Wed, Mar 25, 11:19 AM
aheejin marked an inline comment as done.

Move inline comments to their own lines

This revision was automatically updated to reflect the committed changes.

I surprised this didn't effect any tests. Are we missing tests?

V8 validation fails without this. I'm not sure if there's a way test v8 validation w/ LLVM unit tests?

Even without running V8 or some other external validator, I agree it's surprising that the change in section order did not cause any tests to change. I guess most of our tests just look at a single section rather than a sequence of sections? And most don't have an events section at all.

Hmm, come to think of it, I can add a test change that cannot run without this change after all. Thanks for suggestions. Done in D76823.