Commit graph

21 commits

Author SHA1 Message Date
Moonchild
1cfaf06d8f Issue #618 - Use a single slot for the module's environment object.
According to the spec this isn't created until the module is instantiated, but
we create it when we compile the module.
We stored this previously in InitialEnvironmentSlot and copied it to
EnvironmentSlot when it was supposed to be created, but we can just store it in
the latter slot straight away and check the module's status and return null if
it shouldn't exist yet.

This reduces the number of slots needed on a moduleObject to 17.

Re: BZ 1420412 Part 1
We can't implement the second part to further reduce our number of slots,
because it relies on SetProxyReservedSlot which in turn relies on
rearchitecturing JS proxies to make reserved slots dynamic. That's a rabbit hole
we really don't want to fall into.
So, we'll end up being a bit slower because it can't be in-line allocated with
having more than 16 slots, but so be it. I sincerely doubt it will make any
practical difference.
2020-08-29 08:07:03 +08:00
Moonchild
0d874713ef Issue #618 - Align error handling for module scripts with the spec (again)
This updates module implementation to match spec regarding handling of
instantiation errors, after it was changed yet again, this time to not remember
instantiation errors, but instead immediately rethrow applicable ones.

Ref: BZ 1420420
2020-08-29 08:07:00 +08:00
Moonchild
5ff6eca6c9 Issue #618 - Fix typo and remove old function declarations. 2020-07-10 22:18:24 +08:00
Moonchild
9201808e0a Issue #618 - Report source position information (line/column)
Report source position information for module export resolution failures.

Ref: BZ 1362098
2020-07-10 22:18:10 +08:00
Moonchild
c7d195e633 Issue #618 - Align module instantiation/errors with the updated spec.
Store and re-throw module instantiation and evaluation errors.
Ref: BZ 1374239, 1394492
2020-07-10 22:17:41 +08:00
wolfbeast
cfed2447da Revert #1137 - Remove unboxed arrays
- accounting for removal of watch()/unwatch()
- updated for intermediate code changes.
2020-02-27 07:34:50 +08:00
janekptacijarabaci
39a2b217b7 Bug 1341411 - Support circular module dependencies through export* per ES2017 2019-11-11 21:57:55 +08:00
janekptacijarabaci
832b047eea Bug 1339986 - Handle export* when checking for duplicate export 2019-11-11 21:57:52 +08:00
janekptacijarabaci
eaf8fcd215 Bug 1341256 - Fix module namespace object get handler 2019-11-11 21:57:50 +08:00
janekptacijarabaci
b79662ba48 Bug 1340268 - [[HasProperty]] on module namespace object should work even when binding is uninitialized 2019-11-11 21:57:48 +08:00
janekptacijarabaci
184438aa10 Bug 1326453 - Part 4: Return @@toStringTag in [[OwnPropertyKeys]] trap for module namespace objects 2019-11-11 21:55:13 +08:00
janekptacijarabaci
50765b944e Bug 1326453 - Part 3: Don't throw a TypeError when SetPrototypeOf for module namespace objects is called with null 2019-11-11 21:55:10 +08:00
janekptacijarabaci
307c8cb570 Bug 1326453 - Part 2: Change @@toStringTag for module namespace objects to non-configurable 2019-11-11 21:55:08 +08:00
janekptacijarabaci
99f20bdc22 Bug 1326453 - Part 1: Remove @@iterator method from module namespace objects per ES2017 2019-11-11 21:55:05 +08:00
janekptacijarabaci
db68ce927e Bug 1320993 - Fix exporting default class expression 2019-11-11 21:48:39 +08:00
Gaming4JC
62eeeb76b5 1320408 - Part 19: Remove JSContext* parameter from ModuleObject::fixEnvironmentsAfterCompartmentMerge. 2019-07-22 19:48:36 +08:00
Gaming4JC
cc8cb910dd 1320408 - Part 14: Change some GlobalObject methods to static method. 2019-07-22 19:48:14 +08:00
wolfbeast
5c15924907 Remove UnboxedArray code part 1 2019-06-19 21:33:59 +08:00
trav90
c5757236c9 Fix incorrect assertions in js/src/builtin/
Prevents GCC 7 build warning spam.
2019-02-15 23:41:15 +08:00
janekptacijarabaci
748c69d7fd Part 1: Implement ES6 function name property semantics
Issue #78
2019-02-15 23:38:44 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00