Skip to content
Snippets Groups Projects

Draft: Interpreter, Tests, Debug Info, Misc.

Closed Xavier Routh requested to merge debug_info into main
Compare and
49 files
+ 2927
416
Compare changes
  • Side-by-side
  • Inline
Files
49
+ 7
4
use std::collections::HashMap;
use std::{collections::HashMap, marker::PhantomData};
use crate::*;
use crate::*;
@@ -394,9 +394,7 @@ impl<'a> Builder<'a> {
@@ -394,9 +394,7 @@ impl<'a> Builder<'a> {
Index::Position(idx)
Index::Position(idx)
}
}
pub fn create_control_index(&self, idx: usize) -> Index {
Index::Control(idx)
}
pub fn create_function(
pub fn create_function(
&mut self,
&mut self,
@@ -416,6 +414,7 @@ impl<'a> Builder<'a> {
@@ -416,6 +414,7 @@ impl<'a> Builder<'a> {
return_type,
return_type,
nodes: vec![Node::Start],
nodes: vec![Node::Start],
num_dynamic_constants,
num_dynamic_constants,
 
debug_info: None,
});
});
Ok((id, NodeID::new(0)))
Ok((id, NodeID::new(0)))
}
}
@@ -478,6 +477,10 @@ impl NodeBuilder {
@@ -478,6 +477,10 @@ impl NodeBuilder {
};
};
}
}
 
pub fn build_projection(&mut self, control: NodeID, selection: usize) {
 
self.node = Node::Projection { control, selection };
 
}
 
pub fn build_return(&mut self, control: NodeID, data: NodeID) {
pub fn build_return(&mut self, control: NodeID, data: NodeID) {
self.node = Node::Return { control, data };
self.node = Node::Return { control, data };
}
}
Loading