Commit graph

636 commits

Author SHA1 Message Date
Matt A. Tobin
b38a250130 Issue #1676 - Part 20: Split vtune sources out of js/src/moz.build 2020-11-06 09:43:32 +08:00
Matt A. Tobin
6da35ffb78 Issue #1676 - Part 19: Split ctypes sources out of js/src/moz.build 2020-11-06 09:43:31 +08:00
Matt A. Tobin
66308991b1 Issue #1676 - Part 18: Move and separate top level sources from vm sources in js/src/moz.build 2020-11-06 09:43:29 +08:00
Matt A. Tobin
fc371224e1 Issue #1676 - Part 17: Put remaining source files which have debug code ifdef'd behind MOZ_DEBUG 2020-11-06 09:43:28 +08:00
Matt A. Tobin
6fa51e7392 Issue #1676 - Part 16: Split WASM sources out of js/src/moz.build
Also puts WasmBinaryIterator.cpp which is debug code ifdef'd behind MOZ_DEBUG
2020-11-06 09:43:27 +08:00
Matt A. Tobin
81d575eff7 Issue #1676 - Part 15: Split threading sources out of js/src/moz.build 2020-11-06 09:43:25 +08:00
Matt A. Tobin
e6a6e0e7fd Issue #1676 - Part 14: Split proxy sources out of js/src/moz.build 2020-11-06 09:43:24 +08:00
Matt A. Tobin
155a0fbe41 Issue #1676 - Part 13: Split perf sources out of js/src/moz.build 2020-11-06 09:43:23 +08:00
Matt A. Tobin
70db4edd43 Issue #1676 - Part 12: Split jit sources out of js/src/moz.build 2020-11-06 09:43:21 +08:00
Matt A. Tobin
96f685e827 Issue #1676 - Part 11: Split irregexp sources out of js/src/moz.build 2020-11-06 09:43:20 +08:00
Matt A. Tobin
25a9cb15e8 Issue #1676 - Part 10: Split gc sources out of js/src/moz.build 2020-11-06 09:43:19 +08:00
Matt A. Tobin
c509fb2251 Issue #1676 - Part 9: Move DIRS down in js/src/moz.build 2020-11-06 09:43:17 +08:00
Matt A. Tobin
69b861a491 Issue #1676 - Part 8: Fix up include for selfhosted.out.h 2020-11-06 09:43:16 +08:00
Matt A. Tobin
f7a8fe807e Issue #1676 - Part 7: Split frontend sources out of js/src/moz.build 2020-11-06 09:43:14 +08:00
Matt A. Tobin
c25769b145 Issue #1676 - Part 6: Split ds sources out of js/src/moz.build 2020-11-06 09:43:13 +08:00
Matt A. Tobin
1f772961f7 Issue #1676 - Part 5: Split devtools sources out of js/src/moz.build 2020-11-06 09:43:12 +08:00
Matt A. Tobin
6c5f461881 Issue #1676 - Part 4: Split builtin sources out of js/src/moz.build 2020-11-06 09:43:10 +08:00
Matt A. Tobin
bf147b821c Issue #80 - De-unify js/src
Three debug sources are producing link warnings and will be solved as Issue #1676 progresses.

This does not include JS Testing sources.
Specifically: js/src/gdb or js/src/jsapi-tests
2020-11-06 09:43:09 +08:00
Matt A. Tobin
55c2ff2df2 Issue #1676 - Part 3: Split DEFINES out of js/src/moz.build 2020-11-06 09:43:08 +08:00
Matt A. Tobin
209c7f2305 Issue #1676 - Part 2: Split CFLAGS and CXXFLAGS directives out of js/src/moz.build 2020-11-06 09:43:06 +08:00
Matt A. Tobin
b69cf124dc Issue #1676 - Part 1: Split MozTesting directives out of js/src/moz.build 2020-11-06 09:43:05 +08:00
Moonchild
3e118e4948 [devtools] More gracefully (than a crash) handle stack capture failures. 2020-11-06 09:42:40 +08:00
Moonchild
9c59990883 Issue #1656 - Part 10: Manual cleanup. 2020-09-25 22:07:01 +08:00
Moonchild
9305760571 Issue #1656 - Part 9: Single-line-comment style. 2020-09-25 22:07:00 +08:00
Moonchild
d5919942ff Issue #1656 - Part 8: Devtools and misc. 2020-09-25 22:06:55 +08:00
Moonchild
dabd32f955 Issue #1656 - Part 7: Nuke vim config lines in JS 2020-09-25 22:04:24 +08:00
Moonchild
0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00
Moonchild
30df895eb2 Issue #1656 - Part 3: Nuke more vim config lines in the tree.
Another S&R run with some smarter matching.
2020-09-25 22:04:17 +08:00
Moonchild
8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00
Moonchild
ef11a4d7e8 Issue #618 - Clear the module map when changing a Document's global and add
release build assertions for mismatching compartments.
2020-09-10 21:07:51 +08:00
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
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
Moonchild
9b260e75cc [js] Reinstate precise floating point model for all js sources. 2020-08-19 16:21:44 +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
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
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
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