Time interpretation
This commit is contained in:
parent
ffdc54947b
commit
df3e1b027f
@ -4,6 +4,7 @@ use std::env;
|
||||
use std::fs;
|
||||
use std::iter::Peekable;
|
||||
use std::process::exit;
|
||||
use std::time::Instant;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
enum Token
|
||||
@ -212,15 +213,17 @@ fn compile(file_content: &String, intrinsics: &HashMap<&str, (Vec<Datatype>, Vec
|
||||
println!("---Done validating function calls---");
|
||||
typecheck(&operations, &functions, &intrinsics, &arrays, debug)?;
|
||||
println!("---Done typechecking---");
|
||||
let start = Instant::now();
|
||||
println!("---Starting to interpret the program---");
|
||||
let output = if interpret
|
||||
{
|
||||
println!("---Starting to interpret the program---");
|
||||
Some(interpret_program(&operations, &mut Vec::new(), &functions, &mut arrays, &intrinsics, debug)?)
|
||||
}
|
||||
else
|
||||
{
|
||||
None
|
||||
};
|
||||
println!("---Done after {:?}---", start.elapsed());
|
||||
if !interpret
|
||||
{
|
||||
match generate_assembly_linux_x64(&operations, &functions, &intrinsics, &arrays, debug)
|
||||
|
Loading…
Reference in New Issue
Block a user