fix wasm repl warnings

This commit is contained in:
Anton-4 2024-07-13 18:45:01 +02:00
parent 070d14a5d6
commit 42a366481b
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
2 changed files with 7 additions and 2 deletions

View file

@ -228,6 +228,7 @@ impl<'a> Src64<'a> {
// chunk(s) won't be a cache miss anymore because they'll already be in cache.
//
// We can do further prefetches in the actual tokenization loop.
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
{
// We know capacity >= 64, so this will never wrap.
let last_chunk_offset = capacity - 64;
@ -366,6 +367,7 @@ unsafe fn write_newlines(dest: *mut u8, len: usize) {
}
}
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
#[inline(always)]
fn prefetch_read<T>(non_null_ptr: NonNull<T>, offset: usize) {
// Use inline asm until this is stabilized:
@ -386,8 +388,6 @@ fn prefetch_read<T>(non_null_ptr: NonNull<T>, offset: usize) {
in(reg) non_null_ptr.as_ptr().add(offset)
);
}
// If we're not on x64 or aarch64, just do nothing!
}
#[cfg(test)]