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

Harness-module-builder: Do not spread potentially big arrays as function parameters #552

Merged
merged 2 commits into from
Aug 31, 2017

Conversation

Cellule
Copy link
Contributor

@Cellule Cellule commented Aug 28, 2017

Some engines have a limit to the number of arguments functions can have and there is no limit to the size of a section.

Some engines have a limit to the number of arguments functions can have and there is no limit to the size of a section.
@Cellule Cellule self-assigned this Aug 28, 2017
@Cellule Cellule requested review from binji and rossberg August 28, 2017 19:11
@Cellule Cellule changed the title Do not spread potentially big arrays as function parameters Harness-module-builder: Do not spread potentially big arrays as function parameters Aug 28, 2017
Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo simplification

content_generator(section);
// Emit section length.
this.emit_u32v(section.length);
// Copy the temporary buffer.
this.push(...section);
for (let i = 0; i < section.length; ++i) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: for (let b of section) this.push(b)

@Cellule Cellule merged commit 4f1d311 into WebAssembly:master Aug 31, 2017
@Cellule Cellule deleted the spread_args branch August 31, 2017 18:12
rossberg added a commit that referenced this pull request Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants