Clean up
This commit is contained in:
parent
820ead0c02
commit
1155b5fff8
@ -43,7 +43,7 @@ use std::io::{self, Write};
|
||||
|
||||
use colored::{ColoredString, Colorize};
|
||||
|
||||
use crate::{Chunk, Local, Type};
|
||||
use crate::{Chunk, Local};
|
||||
|
||||
const INSTRUCTION_COLUMNS: [(&str, usize); 4] =
|
||||
[("i", 5), ("POSITION", 12), ("OPERATION", 17), ("INFO", 41)];
|
||||
|
@ -27,7 +27,7 @@ use std::sync::Arc;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{ConcreteValue, DustString, Function, FunctionType, Instruction, Span, Value};
|
||||
use crate::{ConcreteValue, DustString, Function, FunctionType, Instruction, Span};
|
||||
|
||||
/// Representation of a Dust program or function.
|
||||
///
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::ops::Range;
|
||||
|
||||
use crate::{ConcreteValue, Value, vm::Thread};
|
||||
use crate::vm::Thread;
|
||||
|
||||
pub fn to_string(thread: &mut Thread, destination: usize, argument_range: Range<usize>) {
|
||||
pub fn to_string(_thread: &mut Thread, _destination: usize, _argument_range: Range<usize>) {
|
||||
todo!()
|
||||
}
|
||||
|
@ -1,13 +1,8 @@
|
||||
use std::{
|
||||
ops::Range,
|
||||
thread::{Builder, JoinHandle},
|
||||
};
|
||||
use std::{ops::Range, thread::JoinHandle};
|
||||
|
||||
use tracing::{Level, info, span};
|
||||
use crate::vm::Thread;
|
||||
|
||||
use crate::{DustString, vm::Thread};
|
||||
|
||||
fn start_thread(thread: &mut Thread, argument_range: Range<usize>) -> JoinHandle<()> {
|
||||
fn start_thread(_thread: &mut Thread, _argument_range: Range<usize>) -> JoinHandle<()> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
|
@ -68,11 +68,11 @@ pub const RUNNER_LOGIC_TABLE: [RunnerLogic; 23] = [
|
||||
r#return,
|
||||
];
|
||||
|
||||
pub fn point(instruction: InstructionFields, thread: &mut Thread) {}
|
||||
pub fn point(_: InstructionFields, thread: &mut Thread) {}
|
||||
|
||||
pub fn close(instruction: InstructionFields, thread: &mut Thread) {}
|
||||
pub fn close(_: InstructionFields, thread: &mut Thread) {}
|
||||
|
||||
pub fn load_boolean(instruction: InstructionFields, thread: &mut Thread) {}
|
||||
pub fn load_boolean(_: InstructionFields, _: &mut Thread) {}
|
||||
|
||||
pub fn load_constant(instruction: InstructionFields, thread: &mut Thread) {
|
||||
let destination = instruction.a_field as usize;
|
||||
@ -97,15 +97,19 @@ pub fn load_constant(instruction: InstructionFields, thread: &mut Thread) {
|
||||
let constant = *thread.get_constant(constant_index).as_integer().unwrap();
|
||||
let register = Register::Value(constant);
|
||||
|
||||
thread.set_integer_register(destination as usize, register);
|
||||
thread.set_integer_register(destination, register);
|
||||
}
|
||||
TypeCode::STRING => {
|
||||
let register = Register::Pointer(Pointer::Constant(constant_index));
|
||||
|
||||
thread.set_string_register(destination as usize, register);
|
||||
thread.set_string_register(destination, register);
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
|
||||
if jump_next {
|
||||
thread.current_frame_mut().ip += 1;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn load_list(instruction: InstructionFields, thread: &mut Thread) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user