1
Fork 0

Implement pointer casting.

This commit is contained in:
Charles Lew 2021-07-31 22:46:23 +08:00
parent 7069a8c2b7
commit 63ed625313
11 changed files with 256 additions and 88 deletions

View file

@ -5,7 +5,7 @@
use crate::constant::data_id_for_alloc_id;
use crate::prelude::*;
fn vtable_memflags() -> MemFlags {
pub(crate) fn vtable_memflags() -> MemFlags {
let mut flags = MemFlags::trusted(); // A vtable access is always aligned and will never trap.
flags.set_readonly(); // A vtable is always read-only.
flags