From 1aa4e3b942f3772cebfa089fef34ac77f1e98a6a Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 2 Oct 2017 20:34:51 -0700 Subject: [PATCH] Get rid of virtual machine code Gonna implement this differently --- src/main.rs | 22 ---------------------- src/virtual_machine/mod.rs | 9 --------- 2 files changed, 31 deletions(-) delete mode 100644 src/virtual_machine/mod.rs diff --git a/src/main.rs b/src/main.rs index fa14365..d341c5c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,12 +29,8 @@ mod language; use language::{ProgrammingLanguageInterface, EvalOptions, LLVMCodeString}; mod webapp; - mod llvm_wrap; -mod virtual_machine; -use virtual_machine::{run_vm, run_assembler}; - fn main() { let languages: Vec> = vec![ @@ -63,18 +59,6 @@ fn main() { std::process::exit(0); } - if option_matches.opt_present("m") { - let file_name = option_matches.free.get(1); - run_vm(file_name); - std::process::exit(0); - } - - if option_matches.opt_present("a") { - let file_name = option_matches.free.get(1); - run_assembler(file_name); - std::process::exit(0); - } - if option_matches.opt_present("w") { webapp::web_main(); std::process::exit(0); @@ -366,12 +350,6 @@ fn program_options() -> getopts::Options { options.optflag("h", "help", "Show help text"); - options.optflag("m", - "virtual-machine", - "Start up a virtual machine instead of an interpreter"); - options.optflag("a", - "assembler", - "Assemble file into bytecode"); options.optflag("w", "webapp", "Start up web interpreter"); diff --git a/src/virtual_machine/mod.rs b/src/virtual_machine/mod.rs deleted file mode 100644 index a200750..0000000 --- a/src/virtual_machine/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub fn run_vm(file_name: Option<&String>) { - println!("Running in VM mode"); - println!("yy: {:?}", file_name); -} - -pub fn run_assembler(file_name: Option<&String>) { - println!("Assembling file"); - println!("yy: {:?}", file_name); -}