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

feat(memory) Add the WasmArrayBuffer::grow method #68

Merged
merged 8 commits into from
Jul 9, 2019
Merged

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Jul 8, 2019

This method allows to grow the WebAssembly memory by a number of pages (65kb each).

@Hywan Hywan added 🎉 enhancement New feature or request 🧪 tests I love tests 📦 component-extension About the PHP extension written in C/C++ labels Jul 8, 2019
@Hywan Hywan self-assigned this Jul 8, 2019
@Hywan
Copy link
Contributor Author

Hywan commented Jul 8, 2019

bors try

bors bot added a commit that referenced this pull request Jul 8, 2019
@bors
Copy link
Contributor

bors bot commented Jul 8, 2019

try

Build failed

@Hywan
Copy link
Contributor Author

Hywan commented Jul 9, 2019

bors try

bors bot added a commit that referenced this pull request Jul 9, 2019
@bors
Copy link
Contributor

bors bot commented Jul 9, 2019

try

Build succeeded

@Hywan
Copy link
Contributor Author

Hywan commented Jul 9, 2019

bors r+

bors bot added a commit that referenced this pull request Jul 9, 2019
68: feat(memory) Add the `WasmArrayBuffer::grow` method r=Hywan a=Hywan

This method allows to grow the WebAssembly memory by a number of pages (65kb each).

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
@bors
Copy link
Contributor

bors bot commented Jul 9, 2019

Build succeeded

@bors bors bot merged commit b170545 into master Jul 9, 2019
@bors bors bot deleted the feat-memory-grow branch July 9, 2019 14:29
bors bot added a commit that referenced this pull request Jul 10, 2019
69: feat(instance) Introduce the `wasm_instance` structure r=Hywan a=Hywan

This PR introduces a `wasm_instance` structure. It holds a `wasmer_instance_t` pointer and a `wasmer_exports_t` pointer. Thus, it simplifies the `WasmArrayBuffer` internal structure that also contained a `wasmer_exports_t` pointer (see #68).

It simplifies the code since we don't have to destroy the exports everytime an error happens. Exports need to be destroyed only when the `wasm_instance` _resource_ is destroyed.

It finally avoids an allocation for exports everytime an exported function is invoked.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 component-extension About the PHP extension written in C/C++ 🎉 enhancement New feature or request 🧪 tests I love tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant