[TS] Split C -> JS function calls based on u32/u64 parameters/return
authorMatt Corallo <git@bluematt.me>
Thu, 30 Jun 2022 04:19:13 +0000 (04:19 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 30 Jun 2022 19:03:29 +0000 (19:03 +0000)
We were calling all C -> JS functions with u32 parameters and
return types. This is fine for all of our pointers, as well as any
smaller types - u32 always gets mapped to a JavaScript `number`, so
its all consistent.

However, for u64 parameters/returns, we map the values to
JavaScript `bigint`s, which are not compatible with `numbers`, and
the correct type is checked at the FFI when returning or when users
ultimately try to use a passed `bigint` as if it were a `number`.

Thus, we have to split the `js_invoke_function` family by the
parameters and return values, using `u` for u32s and `b` for u64s
to do so.


No differences found