Implement pointer casting.
This commit is contained in:
parent
7069a8c2b7
commit
63ed625313
11 changed files with 256 additions and 88 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue