This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Make starting indices calcaulation simpler (NFC)
ClosedPublic

Authored by aheejin on Nov 19 2018, 12:41 AM.

Details

Summary

At the beginning of assignIndexes() function, when FunctionIndex` and
GlobalIndex variables are created, InputFunctions and InputGlobals
vectors are guaranteed to be empty, because those vectors are only
populated in assignIndexes() function. Current code looks like they
are nonempty, so this patch deletes them for better readability.

Diff Detail

Repository
rL LLVM

Event Timeline

aheejin created this revision.Nov 19 2018, 12:41 AM
sbc100 accepted this revision.Nov 19 2018, 12:29 PM

Hmm, I guess at some point in the past InputFunctions and InputGlobals were not empty at the start of this function.

Can you add asserts that they are empty?

This revision is now accepted and ready to land.Nov 19 2018, 12:29 PM
aheejin updated this revision to Diff 174693.Nov 19 2018, 3:20 PM
  • Add assertions
This revision was automatically updated to reflect the committed changes.