Date: Tue, 15 Oct 2019 17:41:00 +0000
Thiago Macieira via Std-Proposals:
> Also, don't forget uinptr_t, size_t and ptrdiff_t. You *really* shouldn't use
> a specific bit count when dealing with object sizes and pointers.
>
> That means you don't need uint32_t for counting the elements in an array that
> you declared in your function.
WebAssembly specifies "vec" size as unsigned 32 bit integer so I use
std::uint32_t as size and index of element in WebAssembly vectors.
> int, size_t or ptrdiff_t would be just fine.
int is definitely too short.
> Also, don't forget uinptr_t, size_t and ptrdiff_t. You *really* shouldn't use
> a specific bit count when dealing with object sizes and pointers.
>
> That means you don't need uint32_t for counting the elements in an array that
> you declared in your function.
WebAssembly specifies "vec" size as unsigned 32 bit integer so I use
std::uint32_t as size and index of element in WebAssembly vectors.
> int, size_t or ptrdiff_t would be just fine.
int is definitely too short.
Received on 2019-10-15 12:44:15