This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Move event section before global section
ClosedPublic

Authored by aheejin on Mar 24 2020, 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.Mar 24 2020, 8:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2020, 8:48 PM
aheejin edited the summary of this revision. (Show Details)Mar 24 2020, 8:53 PM
aheejin updated this revision to Diff 252494.Mar 24 2020, 9:25 PM
  • clang-format
aheejin marked an inline comment as done.Mar 24 2020, 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.Mar 25 2020, 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.Mar 25 2020, 10:53 AM
aheejin marked 2 inline comments as done.Mar 25 2020, 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.Mar 25 2020, 11:18 AM
aheejin updated this revision to Diff 252632.Mar 25 2020, 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.