loader: refactor loader
The loader was refactored to use some better terms and methods, mostly
inspired by the whatwg loader spec. Namely there is now translators
instead of loaders
and registry
instead of moduleMap
. The loader
is also exposed as a builtin, allowing users to make their own loaders
and hook the main loader.
I also found a test that wanted to check for the values of exports being unchanged, but I think thats not really correct, and only succeeded as an edge case, and since it was failing after the refactor I removed it. If this was erroneous please let me know.
I'm going to avoid documenting the whole loader until this gets some backing.
cc @bmeck @guybedford @addaleax
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
loader