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

embind: Use single type object for emval. #20806

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

brendandahl
Copy link
Collaborator

If register_type is used, emval will be registered multiple times for different type id's, but only a single type object is needed on the JS side for all of them.

src/embind/embind.js Outdated Show resolved Hide resolved
src/embind/embind.js Outdated Show resolved Hide resolved
src/embind/embind.js Outdated Show resolved Hide resolved
@brendandahl brendandahl force-pushed the tsgen-reuse-val branch 4 times, most recently from f20db67 to 86556f7 Compare December 5, 2023 23:49
@sbc100
Copy link
Collaborator

sbc100 commented Dec 6, 2023

Sorry, I don't remember why its OK to loose the name here? Is that not useful?

@brendandahl
Copy link
Collaborator Author

Sorry, I don't remember why its OK to loose the name here? Is that not useful?

It will always be emscripten::val for _embind_register_emval, so yeah not very useful.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 6, 2023

Looks like you need to run test_minimal_runtime_code_size_hello_embind_val with --rebase

If register_type is used, emval will be registered multiple times for
different type id's, but only a single type object is needed on the JS side
for all of them.
@brendandahl brendandahl merged commit e6415d6 into emscripten-core:main Jan 18, 2024
27 checks passed
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