Moonchild
065ef47e65
Issue #1639 - Implement object.fromEntries()
...
Adds a self-hosted implementation of this map->object conversion.
This resolves #1639 .
2020-09-10 21:06:50 +08:00
Roy Tam
312cd43c03
Merge remote-tracking branch 'origin/master' into custom
2020-08-29 08:18:57 +08:00
Moonchild
34db761758
Issue #618 - Simplify module resolve hook to be a function pointer
...
This is an ahead-of time port to try and address #1624 .
This is based on BZ 1461751 and Jon Coppeard's work in it.
2020-08-29 08:08:41 +08:00
Moonchild
976239c8d0
[js] Add some utility functions to get the current JS runtime.
2020-08-29 08:08:38 +08:00
Gaming4JC
f3d348ebd7
Issue #618 - Align error handling for module scripts with the spec - Debug follow up
...
MODULE_STATUS_ERRORED is no more. Replacing with newer API.
Ref: BZ 1420420
2020-08-29 08:07:58 +08:00
Gaming4JC
f600824850
Issue #618 - Lazily initialise module binding maps - Debug follow up
...
The added debug assertion does not work due to missing API.
They were added in BZ 1337491, 1395366, and others, but were primarily used for multi-threading.
This uses our existing non-multithreaded syntax instead, resolving a `no member named` build error.
2020-08-29 08:07:54 +08:00
Moonchild
39050b430e
Issue #618 - Lazily initialise module binding maps
...
Make it so they are not allocated on a background thread in a different zone to
the final module.
Ref: BZ 1372258
2020-08-29 08:07:06 +08:00
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
Roy Tam
16c504ba17
Merge remote-tracking branch 'origin/master' into custom
2020-08-19 16:22:57 +08:00
Moonchild
9b260e75cc
[js] Reinstate precise floating point model for all js sources.
2020-08-19 16:21:44 +08:00
Roy Tam
e682016889
Merge remote-tracking branch 'origin/master' into custom
2020-08-08 07:00:38 +08:00
Moonchild
b52bc1586d
[js] Try to catch bad pointers for GC and bail if not valid.
2020-08-06 10:23:26 +08:00
Roy Tam
61e493cf30
Merge remote-tracking branch 'origin/master' into custom
2020-07-31 08:12:40 +08:00
Moonchild
ecf4aecd21
[js] Don't improve TypeSets containing the magic-args type.
...
JIT optimizations involving the Javascript 'arguments' object could
potentially confuse later optimizations, so we simply disable these
optimizations as a DiD measure.
2020-07-31 08:07:58 +08:00
Jan de Mooij
51d75f257d
[js] Fix Sink to check for non-recoverable operands.
2020-07-31 08:07:52 +08:00
Roy Tam
a4875a589f
Merge remote-tracking branch 'origin/master' into custom
2020-07-11 07:15:30 +08:00
Moonchild
415542eb7c
[js] Get the class pointer from the ObjectGroup in NativeObject::slotSpan
...
This changes NativeObject::slotSpan() to get the class from the object group
rather than getting it from the base shape to avoid a race between
Shape::ensureOwnBaseShape and background sweeping.
2020-07-11 07:02:27 +08:00
Roy Tam
3d5ac98e9d
Merge remote-tracking branch 'origin/master' into custom
2020-07-10 22:22:14 +08:00
Moonchild
db9ccc90e0
[js] Improve readability and control flow of js date string parser.
2020-07-10 22:18:48 +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
c65ca2ca58
Issue #618 - Remove context and heap-idle check
...
For checking if a module is in an error state and what the error is, it
shouldn't matter if we are currently GC-ing or not. So we don't need to check
for it, which removes the requirement to pass in the JS context (needed for
AssertHeapIsIdle's runtime check); this unblocks progress where otherwise we'd
have to figure out what the context is at the module level just to satisfy this
check.
2020-07-10 22:18:01 +08:00
Moonchild
b590ecea12
Issue #618 - Fix JSAPI additions to pass the JS context.
2020-07-10 22:17:55 +08:00
Moonchild
91a79c0ddc
Issue #618 - Match JSAPI names with the changes in 9ca74147225eed305e28c7887f9b2251aeeb0f36
...
Ref: BZ 1388728
2020-07-10 22:17:52 +08:00
Moonchild
5838eded5f
Issue #618 - Add APIs to query module record errors
...
Ref: BZ 1388728
2020-07-10 22:17:48 +08:00
Moonchild
7b30bfee4c
Issue #618 - Update code comments for ModuleInstantiate
2020-07-10 22:17:44 +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
Roy Tam
bd5506d13c
Merge remote-tracking branch 'origin/master' into custom
2020-07-04 07:02:08 +08:00
Moonchild
f85b274e94
Issue #1603 - Part 1: Reorganize ScriptLoader/ScriptElement
...
- Moves scripting parts of DOM into 'dom/script'
- Renames nsScript{Loader/Element} to Script{Loader/Element}
- Adjusts all callers
2020-07-04 07:01:00 +08:00
Roy Tam
0444ab984c
Merge remote-tracking branch 'origin/master' into custom
2020-06-12 22:15:24 +08:00
adeshkp
3fffe4ebda
Issue #1542 - Fix a typo in wasm which was causing build failure on ARM
2020-06-12 22:11:53 +08:00
Roy Tam
5c4cee240f
Merge remote-tracking branch 'origin/master' into custom
2020-06-06 07:27:53 +08:00
wolfbeast
5386cd812b
Issue #1570 - Implement globalThis
...
This resolves #1570
2020-06-06 07:19:04 +08:00
Roy Tam
1a8a524849
Merge remote-tracking branch 'origin/master' into custom
2020-05-23 06:59:40 +08:00
Jiaxun Yang
353356f7ba
Bug 1412030 - [MIPS] Emit wasm memory access information
...
Tag: #1542
2020-05-23 06:55:13 +08:00
Jiaxun Yang
ccced44f81
Bug 1330942 - move MemoryAccessDesc::isUnaligned to the ARM/MIPS platform layer
...
Tag: #1542
2020-05-23 06:55:10 +08:00
Jiaxun Yang
9441c06a56
Bug 1441521 : [MIPS] Optimize comparation with small constants
...
Tag: #1542
2020-05-23 06:55:07 +08:00
Jiaxun Yang
b9ffc2c362
Bug 1430693 - IonMonkey: MIPS: Fix generic NaN for legacy mips (IEEE 754-1985)
...
Tag: #1542
2020-05-23 06:55:04 +08:00
Jiaxun Yang
73011b18fe
Bug 1424978 - IonMonkey: MIPS64: Fix unboxNonDouble for Int32
...
Tag: #1542
2020-05-23 06:55:01 +08:00
Jiaxun Yang
dc7fd7cdfd
Bug 1424978 - IonMonkey: MIPS64: Fix tagValue function
...
Tag: #1542
2020-05-23 06:54:58 +08:00
Jiaxun Yang
7db89b07bd
Bug 1424978 - IonMonkey: MIPS64: Fix boxValue function
...
Tag: #1542
2020-05-23 06:54:55 +08:00
Jiaxun Yang
ded41ae04d
Bug 1390802 - IonMonkey: MIPS64: Fix storeValue function
...
Tag: #1542
2020-05-23 06:54:52 +08:00
Jiaxun Yang
3479a798ea
Bug 1424978 - IonMonkey: MIPS: Fix ma_store_unaligned
...
Tag: #1542
2020-05-23 06:54:48 +08:00
Jiaxun Yang
ac720c2a42
Bug 1424978 - IonMonkey: MIPS: Fix ma_addTestCarry
...
Tag: #1542
2020-05-23 06:54:45 +08:00
Jiaxun Yang
126e1dfed9
Bug 1390459 - mulby3 function implement error on mips platform
...
Tag: #1542
2020-05-23 06:54:43 +08:00
Jiaxun Yang
ce88df74e8
Bug 1271968 - IonMonkey: MIPS: Refactor addMixedJump.
...
Tag: #1542
2020-05-23 06:54:39 +08:00
Jiaxun Yang
79aee6d950
Bug 1271968 - wasm: MIPS: Port mixed jump for wasm.
...
Tag: #1542
2020-05-23 06:54:35 +08:00
Jiaxun Yang
7d346d2f61
Bug 1271968 - IonMonkey: MIPS: Refactor PatchWrite_NearCall.
...
Tag: #1542
2020-05-23 06:54:33 +08:00
Jiaxun Yang
90edf5c5e4
Bug 1271968 - IonMonkey: MIPS: Handle conditional branch in out of line code of mixed jump.
...
Tag: #1542
2020-05-23 06:54:29 +08:00