Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate implementing table.copy and table.init with a memcpy #983

Closed
fitzgen opened this issue Feb 25, 2020 · 1 comment
Closed

Investigate implementing table.copy and table.init with a memcpy #983

fitzgen opened this issue Feb 25, 2020 · 1 comment

Comments

@fitzgen
Copy link
Member

fitzgen commented Feb 25, 2020

#976 (comment)

I originally didn't do this in order to (a) conform with the spec in an obvious way, and (b) because I was unsure if table elements are something we can safely memcpy around, and (c) I wasn't sure that this actually matches the spec's behavior but I think it does.

(Note: we shouldn't literally, actually use memcpy directly. We would use copy_from_slice.)

spec link: https://webassembly.github.io/bulk-memory-operations/core/exec/instructions.html#exec-table-copy

@fitzgen fitzgen changed the title Investigate implementing table.copy with a memcpy Investigate implementing table.copy and table.init with a memcpy Feb 25, 2020
@fitzgen
Copy link
Member Author

fitzgen commented Feb 25, 2020

Note: this also applies to our implementation of table.init.

peterhuene added a commit to peterhuene/wasmtime that referenced this issue Dec 8, 2020
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Dec 8, 2020
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Dec 9, 2020
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Dec 15, 2020
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Dec 16, 2020
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Jan 12, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Jan 22, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Jan 22, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Jan 22, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Jan 27, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Jan 29, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 4, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 4, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 4, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 4, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 11, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 12, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 18, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 19, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Feb 26, 2021
This commit refactors `Table` in the runtime such that it can be created from a
pointer to existing table data.

The current `Vec` backing of the `Table` is considered to be "dynamic" storage.

This will be used for the upcoming pooling allocator where table memory is
managed externally to the instance.

The `table.copy` implementation was improved to use slice primitives for doing
the copying.

Fixes bytecodealliance#983.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant