-
Notifications
You must be signed in to change notification settings - Fork 824
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
feat(types) Remove dependency to cranelift-entity
#2195
Conversation
Don't be afraid, everything is cool. `cranelift-entity` is nice, but we are limited by it. We want to go further for some features. Those features are very likely to be refused by Cranelift because it's out of their scope. This patch basically copies the code from `cranelift-entity` inside `wasmer-types`. The code has been modified to fit in our own “`no_std`” strategy. The code will be modified deeper in upcoming patches and most of the entities are likely to radically change. The goal of this patch is strictly to not break our code while porting the new code.
bors try |
tryBuild failed: |
bors try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
👍 on the attributions. I'm in favor of being explicit about where the code came from and what the license is
} | ||
|
||
/// Get the element at `k` if it exists. | ||
#[inline(always)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit odd to see these on SecondaryMap
and not on PrimaryMap
but 🤷 . I find it easy to believe that these should always be inlined and that Rust probably also agrees and doesn't need to be told.
Though I think the #[inline]
attributes do matter for cross-crate inlining without LTO? With LTO they don't matter, but without LTO they do. At least that's what I remember, not super confident in that memory though.
Anyways, no action needed here. Just pointing it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That's part of the rewrite I want to do later. Let's keep the same code for the moment, and let's optimize later as planned :-). Thanks for pointing that out!
tryBuild failed: |
Note: on the attributions we should follow our current structure. Which is:
|
bors r+ |
Description
Don't be afraid, everything is cool.
cranelift-entity
is nice, but we are limited by it. We want to gofurther for some features. Those features are very likely to be
refused by Cranelift because it's out of their scope.
This patch basically copies the code from
cranelift-entity
insidewasmer-types
. The code has been modified to fit in our own“
no_std
” strategy. The code will be modified deeper in upcomingpatches and most of the entities are likely to radically change. The
goal of this patch is strictly to not break our code while porting the
new code.
Review
ATTRIBUTIONS.md
file?