Nick Fitzgerald d5d3e46334 cli-support: Skip generating JS shims for imports when unnecessary
After this change, any import that only takes and returns ABI-safe numbers (signed
integers less than 64 bits and unrestricted floating point numbers) will be a
direct import, and will not have a little JS shim in the middle.

We don't have a great mechanism for testing the generated bindings' contents --
as opposed to its behavior -- but I manually verified that everything here does
the Right Thing and doesn't have a JS shim:

```rust
\#[wasm_bindgen]
extern "C" {
    fn trivial();

    fn incoming_i32() -> i32;
    fn incoming_f32() -> f32;
    fn incoming_f64() -> f64;

    fn outgoing_i32(x: i32);
    fn outgoing_f32(y: f32);
    fn outgoing_f64(z: f64);

    fn many(x: i32, y: f32, z: f64) -> i32;
}
```

Furthermore, I verified that when our support for emitting native `anyref` is
enabled, then we do not have a JS shim for the following import, but if it is
disabled, then we do have a JS shim:

```rust
\#[wasm_bindgen]
extern "C" {
    fn works_when_anyref_support_is_enabled(v: JsValue) -> JsValue;
}
```

Fixes #1636.
2019-07-11 15:44:16 -07:00
..
2019-04-08 10:40:46 -07:00
2019-04-08 10:40:46 -07:00
2019-03-14 08:46:42 -03:00
2019-03-14 08:46:42 -03:00
2018-09-26 08:26:00 -07:00
2019-06-05 07:52:14 -07:00
2019-06-05 07:52:14 -07:00
2018-08-06 11:46:23 -07:00
2018-09-26 08:26:00 -07:00
2018-09-26 08:26:00 -07:00
2018-09-26 08:26:00 -07:00
2018-11-09 08:00:41 -08:00
2018-11-09 08:00:41 -08:00
2019-05-28 09:52:44 -05:00
2019-04-16 10:52:27 -07:00
2018-08-06 10:06:45 -07:00
2018-09-26 08:26:00 -07:00
2018-09-26 08:26:00 -07:00
2018-09-26 08:26:00 -07:00
2019-05-13 08:12:32 -07:00
2019-06-05 07:52:14 -07:00
2019-04-12 08:56:36 -07:00
2019-04-12 08:56:36 -07:00
2018-08-04 22:25:29 -05:00
2018-09-26 08:26:00 -07:00
2018-09-26 08:26:00 -07:00