This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move to upstream wasmtime, refactor globals snapshot #6759
Move to upstream wasmtime, refactor globals snapshot #6759
Changes from 7 commits
4b13669
758fc0a
4885fed
34ab9db
d75daa3
7e8fd19
768f4cc
b5d2229
2b10a5a
6416df1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
TBH I am not sure what we are doing here.
Can't we just iterate over
self.0
and then set the item under the corresponding index fromexports
? It is an iterator, butnth
should work and since it isExactSizeIterator
it should be efficient enough.Alternatively, since a
Global
is essentially ref-counted smart-pointer, we could store it inSavedValue
and avoid accessingexports
at all.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.
What we do here is essentiallly move two pointers over ordered lists together to see when referenced members have equal values. I am not sure that
nth
won't iterate over all iterator every time even forExactSizeIterator
(methods of this trait have nothing about this). Can you provide proof of that? :)Global is not
Sync
/Send
, so I'd avoid saving it anywhere if possible.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.
yeah ok don't think this is worth arguing about. The comments improve the situation as well.
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.
Could you please at least notify us or open an issue in the future if you ignore a test? 🙏