Skip to content

Remove now-unnecessary PthreadWorkerInit #9656

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

Merged
merged 3 commits into from
Oct 17, 2019
Merged

Remove now-unnecessary PthreadWorkerInit #9656

merged 3 commits into from
Oct 17, 2019

Conversation

kripken
Copy link
Member

@kripken kripken commented Oct 17, 2019

That extra complexity is no longer needed after recent simplifications. This ends up making the pthreads and non-pthreads paths more similar too.

This saves 338 bytes, which more than makes up for the slight regression of 77 bytes from #9569.

@kripken kripken requested review from juj and dschuff October 17, 2019 00:06
@@ -23,12 +23,7 @@
// (using makeStaticAlloc)

LibraryManager.library = {
// keep this low in memory, because we flatten arrays with them in them
#if USE_PTHREADS
_impure_ptr: '; if (ENVIRONMENT_IS_PTHREAD) __impure_ptr = PthreadWorkerInit["__impure_ptr"]; else PthreadWorkerInit["__impure_ptr"] = {{{ makeStaticAlloc(4) }}}',
Copy link
Member

Choose a reason for hiding this comment

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

so _impure_ptr is just all in wasm now?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that was some weird JS detail due to how we handled older versions of musl - this particular code has been dead for quite some time.

Copy link
Member Author

Choose a reason for hiding this comment

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

(There is no more impure_ptr in the codebase at all.)

Copy link
Member

@dschuff dschuff left a comment

Choose a reason for hiding this comment

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

\o/

@kripken kripken merged commit 8400f04 into incoming Oct 17, 2019
@delete-merged-branch delete-merged-branch bot deleted the psimp branch October 17, 2019 02:13
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
That extra complexity is no longer needed after recent simplifications.
This ends up making the pthreads and non-pthreads paths more similar
too.

This saves 338 bytes, which more than makes up for the slight regression
of 77 bytes from emscripten-core#9569.
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