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

Fix __wbindgen_object_drop_ref unnecessary bindings #1504

Merged
merged 1 commit into from
May 1, 2019

Conversation

alexcrichton
Copy link
Contributor

This commit fixes an issue where bindings for
__wbindgen_object_drop_ref are generated even if the function isn't
actually used by the final wasm file. This is currently due to the fact
that we run gc passes pretty late in wasm-bindgen and one of the
intrinsics that ended up getting gc'd referenced the
__wbindgen_object_drop_ref intrinsic function.

The fix here is somewhat naive by just updating the intrinsic to not
actually use __wbindgen_object_drop_ref. This may not be a long-term
solution but it should be good enough for now at least.

Closes #1498

This commit fixes an issue where bindings for
`__wbindgen_object_drop_ref` are generated even if the function isn't
actually used by the final wasm file. This is currently due to the fact
that we run gc passes pretty late in wasm-bindgen and one of the
intrinsics that ended up getting gc'd referenced the
`__wbindgen_object_drop_ref` intrinsic function.

The fix here is somewhat naive by just updating the intrinsic to not
actually use `__wbindgen_object_drop_ref`. This may not be a long-term
solution but it should be good enough for now at least.
@alexcrichton alexcrichton merged commit 8174973 into rustwasm:master May 1, 2019
@alexcrichton alexcrichton deleted the fix-drop-ref-showing-up branch May 1, 2019 20:52
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.

Generating binding for __wbindgen_object_drop_ref isn't optimized out
2 participants