complete trimdown of listing compilation.
This commit is contained in:
@@ -1235,14 +1235,16 @@ impl MachineState {
|
||||
}
|
||||
|
||||
fn compare_numbers(&mut self, cmp: CompareNumberQT, n1: Number, n2: Number) {
|
||||
let ordering = n1.cmp(&n2);
|
||||
|
||||
self.fail = match cmp {
|
||||
CompareNumberQT::GreaterThan if !(n1.gt(n2)) => true,
|
||||
CompareNumberQT::GreaterThanOrEqual if !(n1.gte(n2)) => true,
|
||||
CompareNumberQT::LessThan if !(n1.lt(n2)) => true,
|
||||
CompareNumberQT::LessThanOrEqual if !(n1.lte(n2)) => true,
|
||||
CompareNumberQT::NotEqual if !(n1.ne(n2)) => true,
|
||||
CompareNumberQT::Equal if !(n1.eq(n2)) => true,
|
||||
_ => false
|
||||
CompareNumberQT::GreaterThan if ordering == Ordering::Greater => false,
|
||||
CompareNumberQT::GreaterThanOrEqual if ordering != Ordering::Less => false,
|
||||
CompareNumberQT::LessThan if ordering == Ordering::Less => false,
|
||||
CompareNumberQT::LessThanOrEqual if ordering != Ordering::Greater => false,
|
||||
CompareNumberQT::NotEqual if ordering != Ordering::Equal => false,
|
||||
CompareNumberQT::Equal if ordering == Ordering::Equal => false,
|
||||
_ => true
|
||||
};
|
||||
|
||||
self.p += 1;
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::rc::Rc;
|
||||
pub struct MachineCodeIndex<'a> {
|
||||
pub code_dir: &'a mut CodeDir,
|
||||
pub op_dir: &'a mut OpDir,
|
||||
pub modules: &'a ModuleDir
|
||||
// pub modules: &'a ModuleDir
|
||||
}
|
||||
|
||||
impl<'a> MachineCodeIndex<'a> {
|
||||
@@ -111,13 +111,14 @@ impl Machine {
|
||||
cached_query: None
|
||||
};
|
||||
|
||||
compile_listing(&mut wam, BUILTINS);
|
||||
wam.use_module_in_toplevel(clause_name!("builtins"));
|
||||
compile_listing(&mut wam, BUILTINS);
|
||||
|
||||
compile_listing(&mut wam, LISTS);
|
||||
compile_listing(&mut wam, CONTROL);
|
||||
compile_listing(&mut wam, QUEUES);
|
||||
|
||||
wam.use_module_in_toplevel(clause_name!("builtins"));
|
||||
|
||||
wam
|
||||
}
|
||||
|
||||
@@ -182,8 +183,8 @@ impl Machine {
|
||||
|
||||
if let Some(mut module) = self.modules.remove(&name) {
|
||||
let result = {
|
||||
let mut indices = machine_code_index!(&mut self.code_dir, &mut self.op_dir,
|
||||
&self.modules);
|
||||
let mut indices = machine_code_index!(&mut self.code_dir, &mut self.op_dir);
|
||||
//&self.modules);
|
||||
indices.use_qualified_module(&mut module, &exports)
|
||||
};
|
||||
|
||||
@@ -200,8 +201,8 @@ impl Machine {
|
||||
|
||||
if let Some(mut module) = self.modules.remove(&name) {
|
||||
let result = {
|
||||
let mut indices = machine_code_index!(&mut self.code_dir, &mut self.op_dir,
|
||||
&self.modules);
|
||||
let mut indices = machine_code_index!(&mut self.code_dir, &mut self.op_dir);
|
||||
//&self.modules);
|
||||
indices.use_module(&mut module)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user