]> git.lizzy.rs Git - rust.git/blob - src/intptrcast.rs
Implement intptrcast methods
[rust.git] / src / intptrcast.rs
1 use std::cell::RefCell;
2
3 use rustc::mir::interpret::AllocId;
4
5 pub type MemoryState = RefCell<GlobalState>;
6
7 #[derive(Clone, Debug)]
8 pub struct GlobalState {
9     pub vec: Vec<(u64, AllocId)>,
10     pub addr: u64,
11 }
12
13 impl Default for GlobalState {
14     fn default() -> Self {
15         GlobalState {
16             vec: Vec::default(),
17             addr: 2u64.pow(16)
18         }
19     }
20 }