Stream: git-wasmtime

Topic: wasmtime / PR #2451 Implement the module linking alias se...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 25 2020 at 16:58):

alexcrichton opened PR #2451 from alias-section to main:

This commit is intended to do almost everything necessary for processing
the alias section of module linking. Most of this is internal
refactoring, the highlights being:

Otherwise most of the changes here largely fell out from these two
design points. Aliases are recorded as initializers in this scheme.
Copying around type information and/or just knowing type information
during compilation is also pretty easy since everything is just a
pointer into a TypeTables and we don't have to actually copy any types
themselves. Lots of various refactorings were necessary to accomodate
these changes.

Tests are hoped to cover a breadth of functionality here, but not
necessarily a depth. There's still one more piece of the module linking
proposal missing which is exporting instances/modules, which will come
in a future PR.

It's also worth nothing that there's one large TODO which isn't
implemented in this change that I plan on opening an issue for.
With module linking when a set of modules comes back from compilation
each modules has all the trampolines for the entire set of modules. This
is quite a lot of duplicate trampolines across module-linking modules.
We'll want to refactor this at some point to instead have only one set
of trampolines per set of module linking modules and have them shared
from there. I figured it was best to separate out this change, however,
since it's purely related to resource usage, and doesn't impact
non-module-linking modules at all.

cc #2094

view this post on Zulip Wasmtime GitHub notifications bot (Nov 25 2020 at 18:20):

alexcrichton updated PR #2451 from alias-section to main:

This commit is intended to do almost everything necessary for processing
the alias section of module linking. Most of this is internal
refactoring, the highlights being:

Otherwise most of the changes here largely fell out from these two
design points. Aliases are recorded as initializers in this scheme.
Copying around type information and/or just knowing type information
during compilation is also pretty easy since everything is just a
pointer into a TypeTables and we don't have to actually copy any types
themselves. Lots of various refactorings were necessary to accomodate
these changes.

Tests are hoped to cover a breadth of functionality here, but not
necessarily a depth. There's still one more piece of the module linking
proposal missing which is exporting instances/modules, which will come
in a future PR.

It's also worth nothing that there's one large TODO which isn't
implemented in this change that I plan on opening an issue for.
With module linking when a set of modules comes back from compilation
each modules has all the trampolines for the entire set of modules. This
is quite a lot of duplicate trampolines across module-linking modules.
We'll want to refactor this at some point to instead have only one set
of trampolines per set of module linking modules and have them shared
from there. I figured it was best to separate out this change, however,
since it's purely related to resource usage, and doesn't impact
non-module-linking modules at all.

cc #2094

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 21:10):

alexcrichton updated PR #2451 from alias-section to main:

This commit is intended to do almost everything necessary for processing
the alias section of module linking. Most of this is internal
refactoring, the highlights being:

Otherwise most of the changes here largely fell out from these two
design points. Aliases are recorded as initializers in this scheme.
Copying around type information and/or just knowing type information
during compilation is also pretty easy since everything is just a
pointer into a TypeTables and we don't have to actually copy any types
themselves. Lots of various refactorings were necessary to accomodate
these changes.

Tests are hoped to cover a breadth of functionality here, but not
necessarily a depth. There's still one more piece of the module linking
proposal missing which is exporting instances/modules, which will come
in a future PR.

It's also worth nothing that there's one large TODO which isn't
implemented in this change that I plan on opening an issue for.
With module linking when a set of modules comes back from compilation
each modules has all the trampolines for the entire set of modules. This
is quite a lot of duplicate trampolines across module-linking modules.
We'll want to refactor this at some point to instead have only one set
of trampolines per set of module linking modules and have them shared
from there. I figured it was best to separate out this change, however,
since it's purely related to resource usage, and doesn't impact
non-module-linking modules at all.

cc #2094

view this post on Zulip Wasmtime GitHub notifications bot (Dec 01 2020 at 21:10):

alexcrichton requested peterhuene for a review on PR #2451.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 20:18):

alexcrichton updated PR #2451 from alias-section to main:

This commit is intended to do almost everything necessary for processing
the alias section of module linking. Most of this is internal
refactoring, the highlights being:

Otherwise most of the changes here largely fell out from these two
design points. Aliases are recorded as initializers in this scheme.
Copying around type information and/or just knowing type information
during compilation is also pretty easy since everything is just a
pointer into a TypeTables and we don't have to actually copy any types
themselves. Lots of various refactorings were necessary to accomodate
these changes.

Tests are hoped to cover a breadth of functionality here, but not
necessarily a depth. There's still one more piece of the module linking
proposal missing which is exporting instances/modules, which will come
in a future PR.

It's also worth nothing that there's one large TODO which isn't
implemented in this change that I plan on opening an issue for.
With module linking when a set of modules comes back from compilation
each modules has all the trampolines for the entire set of modules. This
is quite a lot of duplicate trampolines across module-linking modules.
We'll want to refactor this at some point to instead have only one set
of trampolines per set of module linking modules and have them shared
from there. I figured it was best to separate out this change, however,
since it's purely related to resource usage, and doesn't impact
non-module-linking modules at all.

cc #2094

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:05):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:05):

peterhuene created PR Review Comment:

This TODO sounds issue worthy. Should we file an issue to track it?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:05):

peterhuene created PR Review Comment:

            // are pretty simple, and the only slightly-meaty one is how

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:05):

peterhuene created PR Review Comment:

    ;; module (referencing parent type implicitly)

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:05):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:08):

peterhuene edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:43):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:43):

alexcrichton created PR Review Comment:

Indeed!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:50):

alexcrichton updated PR #2451 from alias-section to main:

This commit is intended to do almost everything necessary for processing
the alias section of module linking. Most of this is internal
refactoring, the highlights being:

Otherwise most of the changes here largely fell out from these two
design points. Aliases are recorded as initializers in this scheme.
Copying around type information and/or just knowing type information
during compilation is also pretty easy since everything is just a
pointer into a TypeTables and we don't have to actually copy any types
themselves. Lots of various refactorings were necessary to accomodate
these changes.

Tests are hoped to cover a breadth of functionality here, but not
necessarily a depth. There's still one more piece of the module linking
proposal missing which is exporting instances/modules, which will come
in a future PR.

It's also worth nothing that there's one large TODO which isn't
implemented in this change that I plan on opening an issue for.
With module linking when a set of modules comes back from compilation
each modules has all the trampolines for the entire set of modules. This
is quite a lot of duplicate trampolines across module-linking modules.
We'll want to refactor this at some point to instead have only one set
of trampolines per set of module linking modules and have them shared
from there. I figured it was best to separate out this change, however,
since it's purely related to resource usage, and doesn't impact
non-module-linking modules at all.

cc #2094

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:51):

alexcrichton updated PR #2451 from alias-section to main:

This commit is intended to do almost everything necessary for processing
the alias section of module linking. Most of this is internal
refactoring, the highlights being:

Otherwise most of the changes here largely fell out from these two
design points. Aliases are recorded as initializers in this scheme.
Copying around type information and/or just knowing type information
during compilation is also pretty easy since everything is just a
pointer into a TypeTables and we don't have to actually copy any types
themselves. Lots of various refactorings were necessary to accomodate
these changes.

Tests are hoped to cover a breadth of functionality here, but not
necessarily a depth. There's still one more piece of the module linking
proposal missing which is exporting instances/modules, which will come
in a future PR.

It's also worth nothing that there's one large TODO which isn't
implemented in this change that I plan on opening an issue for.
With module linking when a set of modules comes back from compilation
each modules has all the trampolines for the entire set of modules. This
is quite a lot of duplicate trampolines across module-linking modules.
We'll want to refactor this at some point to instead have only one set
of trampolines per set of module linking modules and have them shared
from there. I figured it was best to separate out this change, however,
since it's purely related to resource usage, and doesn't impact
non-module-linking modules at all.

cc #2094

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:53):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 23:24):

alexcrichton merged PR #2451.


Last updated: Nov 22 2024 at 16:03 UTC