renaming, cleanup, fmt, move "extension module" traits and structs into a separate mod

This commit is contained in:
2020-09-28 13:55:56 +02:00
parent 8222efe6da
commit 79d5aa3cd5
27 changed files with 205 additions and 209 deletions
+24 -24
View File
@@ -1,14 +1,14 @@
#[macro_use]
extern crate log;
use std::time::Duration;
use simple_logger::SimpleLogger;
use crsn::asm::data::literal::Addr;
use crsn::runtime::run_thread::{RunThread, ThreadToken};
use crsn_arith::ArithOps;
use crsn_stacks::StackOps;
use std::time::Duration;
fn main() {
SimpleLogger::new().init().unwrap();
@@ -44,28 +44,28 @@ fn main() {
)
";*/
/* let program = "
(
(main
(j :lbl)
(ld _ arg0)
(fault)
(:lbl)
(call fac 5)
(ld r0 res0)
/* let program = "
(
(main
(j :lbl)
(ld _ arg0)
(fault)
(:lbl)
(call fac 5)
(ld r0 res0)
)
(fac
(cmp arg0 2
(eq? (ret 2)))
(ld r0 arg0)
(dec r0)
(call fac r0)
(ld r0 arg0)
(mul r0 res0)
(ret r0)
)
)
(fac
(cmp arg0 2
(eq? (ret 2)))
(ld r0 arg0)
(dec r0)
(call fac r0)
(ld r0 arg0)
(mul r0 res0)
(ret r0)
)
)
";*/
";*/
let program = "
(
@@ -97,7 +97,7 @@ fn main() {
let mut thread1 = RunThread::new(ThreadToken(0), parsed.clone(), Addr(0), &[]);
thread1.set_speed(Duration::from_millis(250));
let thread2 = RunThread::new(ThreadToken(1), parsed.clone(), Addr(0), &[]);
let _thread2 = RunThread::new(ThreadToken(1), parsed.clone(), Addr(0), &[]);
let a = thread1.start();
//let b = thread2.start();