Move instruction handlers to a separate directory

This makes it a bit more clear which files are used for handling
instructions, and which ones just provide basic
structures/functions/etc.
parent 0619de82
Pipeline #170966584 passed with stages
in 63 minutes and 12 seconds
......@@ -214,7 +214,7 @@ impl Worker<RcProcess> for ProcessWorker {
#[cfg(test)]
mod tests {
use super::*;
use crate::vm::process;
use crate::vm::instructions::process;
use crate::vm::test::setup;
fn worker(machine: Machine) -> ProcessWorker {
......
pub mod array;
pub mod block;
pub mod byte_array;
pub mod env;
pub mod ffi;
pub mod float;
pub mod general;
pub mod hasher;
pub mod integer;
pub mod io;
pub mod module;
pub mod object;
pub mod process;
pub mod random;
pub mod socket;
pub mod string;
pub mod time;
......@@ -4,7 +4,7 @@ use crate::object_value;
use crate::process::RcProcess;
use crate::runtime_error::RuntimeError;
use crate::socket::Socket;
use crate::vm::io;
use crate::vm::instructions::io;
use crate::vm::state::RcState;
macro_rules! allocate_bool {
......
......@@ -13,25 +13,25 @@ use crate::runtime_error::RuntimeError;
use crate::runtime_panic;
use crate::scheduler::join_list::JoinList;
use crate::scheduler::process_worker::ProcessWorker;
use crate::vm::array;
use crate::vm::block;
use crate::vm::byte_array;
use crate::vm::env;
use crate::vm::ffi;
use crate::vm::float;
use crate::vm::general;
use crate::vm::hasher;
use crate::vm::instruction::Opcode;
use crate::vm::integer;
use crate::vm::io;
use crate::vm::module;
use crate::vm::object;
use crate::vm::process;
use crate::vm::random;
use crate::vm::socket;
use crate::vm::instructions::array;
use crate::vm::instructions::block;
use crate::vm::instructions::byte_array;
use crate::vm::instructions::env;
use crate::vm::instructions::ffi;
use crate::vm::instructions::float;
use crate::vm::instructions::general;
use crate::vm::instructions::hasher;
use crate::vm::instructions::integer;
use crate::vm::instructions::io;
use crate::vm::instructions::module;
use crate::vm::instructions::object;
use crate::vm::instructions::process;
use crate::vm::instructions::random;
use crate::vm::instructions::socket;
use crate::vm::instructions::string;
use crate::vm::instructions::time;
use crate::vm::state::RcState;
use crate::vm::string;
use crate::vm::time;
use num_bigint::BigInt;
use std::i32;
use std::ops::{Add, Mul, Sub};
......
pub mod array;
pub mod block;
pub mod byte_array;
pub mod env;
pub mod ffi;
pub mod float;
pub mod general;
pub mod hasher;
pub mod instruction;
pub mod integer;
pub mod io;
pub mod instructions;
pub mod machine;
pub mod module;
pub mod object;
pub mod process;
pub mod random;
pub mod socket;
pub mod state;
pub mod string;
pub mod test;
pub mod time;
......@@ -4,8 +4,8 @@ use crate::compiled_code::CompiledCode;
use crate::config::Config;
use crate::process::RcProcess;
use crate::vm::instruction::{Instruction, Opcode};
use crate::vm::instructions::process;
use crate::vm::machine::Machine;
use crate::vm::process;
use crate::vm::state::State;
/// Sets up a VM with a single process.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment