make struct and function public
This commit is contained in:
parent
619b67f7ec
commit
9fab99e31f
@ -82,7 +82,7 @@ impl Section{
|
|||||||
/*
|
/*
|
||||||
* Representation de l'etat de la mémoire (apres execution.... a confirmer), sous forme de sections
|
* Representation de l'etat de la mémoire (apres execution.... a confirmer), sous forme de sections
|
||||||
*/
|
*/
|
||||||
struct Mem_Checker{
|
pub struct Mem_Checker{
|
||||||
pc: usize,
|
pc: usize,
|
||||||
sp: usize,
|
sp: usize,
|
||||||
sections: Vec<Section>,
|
sections: Vec<Section>,
|
||||||
@ -91,7 +91,7 @@ struct Mem_Checker{
|
|||||||
|
|
||||||
impl Mem_Checker{
|
impl Mem_Checker{
|
||||||
|
|
||||||
fn from(path: &String) -> Mem_Checker {
|
pub fn from(path: &String) -> Mem_Checker {
|
||||||
|
|
||||||
let file = fs::File::open("test_file_section.txt").expect("Wrong filename");
|
let file = fs::File::open("test_file_section.txt").expect("Wrong filename");
|
||||||
let reader = io::BufReader::new(file);
|
let reader = io::BufReader::new(file);
|
||||||
@ -151,7 +151,7 @@ impl Mem_Checker{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fill_memory_from_Mem_Checker(m_c: &Mem_Checker, machine: &mut Machine){
|
pub fn fill_memory_from_Mem_Checker(m_c: &Mem_Checker, machine: &mut Machine){
|
||||||
|
|
||||||
machine.sp = m_c.sp;
|
machine.sp = m_c.sp;
|
||||||
machine.pc = m_c.pc as u64;
|
machine.pc = m_c.pc as u64;
|
||||||
|
Loading…
Reference in New Issue
Block a user