Allow C++ enum classes to be marshalled as integers when possible. (#336)
Allow C++ enum classes to be marshalled as integers when possible. (#336)

With C++ enum classes, the size of an enum object can vary depending
on the compiler generation mechanism (choosing the most optimal storage size
to contain all the variants) or a user-defined storage type. In wasm we
can only send int32_t and int64_t. That means, the enums using this
integer width for storage must also work properly. At runtime this works
flawlessly, the functions in wasm can return these values safely and
they are even converted back on the C++ side to their enum
representations, thanks to the code in wasm3 which does a cast an
integer cast. But when it comes to generating the code for function
arguments, the defined data structure is not enough to generalize the
code to allow enum classes even if they are of a proper (allowed) width.

This commit changes the defined data structure to create a data
structure literal for wasm so that it allows enum classes as well as
already defined data types.
wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3