binaryen
binaryen copied to clipboard
Validate function imports
We validate functions in parallel, but function-parallel passes do not run on imports, so we did not issue a validation error on an import using a disallowed type, for example.
All the changes in visitFunction are just to group all the parts using body to the
end, and putting them behind a check for body.
(diff without whitespace is smaller)
Found using #6310 #6312
function-parallel passes do not run on imports
I wonder where else we are messing this up...