mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
support seamless slice in expects
This commit is contained in:
parent
66fa633fde
commit
5dd0bdebc9
5 changed files with 14 additions and 8 deletions
|
@ -59,7 +59,9 @@ impl ReplAppMemory for ExpectMemory {
|
|||
roc_str.as_str()
|
||||
} else {
|
||||
let offset = self.deref_usize(addr);
|
||||
let length = self.deref_usize(addr + std::mem::size_of::<usize>());
|
||||
let seamless_slice_mask = usize::MAX >> 1;
|
||||
let length =
|
||||
self.deref_usize(addr + std::mem::size_of::<usize>()) & seamless_slice_mask;
|
||||
let _capacity = self.deref_usize(addr + 2 * std::mem::size_of::<usize>());
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue