Commit Graph

17 Commits

Author SHA1 Message Date
70480ad29d fix test 2019-04-25 21:21:17 -07:00
a32d2553fc js-sys: add Object.fromEntries 2019-04-25 20:52:29 -07:00
a16b4dd9a4 Optimize shim generation for structural items
This commit removes shims, where possible, for `structural` items.
Instead of generating code that looks like:

    const target = function() { this.foo(); };
    exports.__wbg_thing = function(a) { target.call(getObject(a)); };

we now instead generate:

    exports.__wbg_thing = function(a) { getObject(a).foo(); };

Note that this only applies to `structural` bindings, all default
bindings (as of this commit) are still using imported targets to ensure
that their binding can't change after instantiation.

This change was [detailed in RFC #5][link] as an important optimization
for `structural` bindings to ensure they've got performance parity with
today's non-`structural` default bindings.

[link]: https://rustwasm.github.io/rfcs/005-structural-and-deref.html#why-is-it-ok-to-make-structural-the-default
2018-11-08 13:04:38 -08:00
e3d2ea2628 js-sys: Catch exceptions thrown in Reflect APIs
Proxies passed to Reflect APIs can throw for any of these operations and it is a
bit of a mess.
2018-09-25 14:30:26 -07:00
f7b511588b Add binding for Object.entries() 2018-09-19 21:32:05 +02:00
326e4c0262 Add binding for Object.getPrototypeOf() 2018-09-19 21:10:40 +02:00
76969bd1e3 Add binding for Object.getOwnPropertySymbols() 2018-09-19 20:58:46 +02:00
4e18493fd7 Add binding for Object.getOwnPropertyNames() 2018-09-19 20:43:50 +02:00
2d91fa11b5 Add binding for Object.getOwnPropertyDescriptors() 2018-09-16 23:02:46 +02:00
b005e96fd9 Add binding for Object.getOwnPropertyDescriptor() 2018-09-16 22:55:15 +02:00
191e7dc1fb Add binding for Object.defineProperties() 2018-09-15 22:30:27 +02:00
fe6ad5447e Add binding for Object.defineProperty() 2018-09-12 07:39:39 +02:00
adad606ee3 js-sys: Add bindings for Object.create 2018-08-10 11:49:22 -07:00
4ea1603ddb js-sys: Add bindings to Object.assign 2018-08-10 11:41:58 -07:00
d5b81595ec Remove support for the version attribute
First added in #161 this never ended up panning out, so let's remove the
experimental suport which isn't actually used by anything today and hold off on
any other changes until an RFC happens.
2018-08-06 13:30:28 -05:00
de0ba29abc implements bindings for Object.is (#537)
* implements bindings for Object.is

* adds counterpart test cases for non-equal values
2018-07-22 12:42:10 -05:00
01ff04d85c Port Object tests to wasm 2018-07-20 15:23:56 -07:00