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

Remove most usage of withStackSave. NFC #21764

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Apr 15, 2024

The remaining usage is all in library_wasmfs.js where it make the code a fair amount more readable to continue to use withStackSave().

See #21763

}
var rtn = __emscripten_run_on_main_thread_js(funcIndex, emAsmAddr, serializedNumCallArgs, args, sync);
stackRestore(sp);
return rtn;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe withStackSave is worth it for convenience in cases like this, to avoid the annoyance of a temp var?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe.. although I think this is the change that actually shows up as a saving in our code size tests.. so I'm tempted to keep it.

Copy link
Member

Choose a reason for hiding this comment

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

If it's shorter that's good enough for me I guess...

The remaining usage is all in library_wasmfs.js where it make the code
a fair amount more readable to continue to use `withStackSave()`
See emscripten-core#21763
}
var rtn = __emscripten_run_on_main_thread_js(funcIndex, emAsmAddr, serializedNumCallArgs, args, sync);
stackRestore(sp);
return rtn;
Copy link
Member

Choose a reason for hiding this comment

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

If it's shorter that's good enough for me I guess...

@sbc100 sbc100 enabled auto-merge (squash) April 15, 2024 23:20
@sbc100 sbc100 merged commit ebc7938 into emscripten-core:main Apr 16, 2024
29 checks passed
@sbc100 sbc100 deleted the withStackSave branch April 16, 2024 03:51
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.

None yet

2 participants