cranelift: Implement table support for runtests#4430
Closed
afonso360 wants to merge 1 commit into
Closed
Conversation
afonso360
commented
Jul 11, 2022
| .flat_map(|entry| match entry { | ||
| RuntestEntry::Heap(heap) => { | ||
| let size: u64 = heap.size.into(); | ||
| [alloc_heap(size), size] |
Contributor
Author
There was a problem hiding this comment.
This is a behaviour change from what we had before.
We used to put the start and end pointers. However it looks like that's not whats expected by the bound mechanism for heaps.
This changes it to pass the size in bytes of the heap.
afonso360
commented
Jul 11, 2022
| RuntestEntry::Table(table) => { | ||
| let entry_size: u64 = table.entry_size.into(); | ||
| let entry_count: u64 = table.entry_count.into(); | ||
| let bytes = entry_size * entry_count; |
Contributor
Author
There was a problem hiding this comment.
This is wrong according to docs/ir.md.
Table bounds should be the number of elements and not the number of bytes.
However nothing works when I change it to that. Probably something to investigate further.
See:
Lines 769 to 770 in 1d319c0
Contributor
Author
|
Closing this in favor of #4433. We don't need special memory for tables, we can just use the current heap mechanism as backing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
👋 Hey,
As a precursor to adding table support to the interpreter this PR adds support for tables to the runtest environment.
This allows run tests to request memory for tables and for it to be provided via
vmctx.