Code gen now handles expecting on validator args in the air stack.
Thus allowing us to use code gen created functions to expect on data types including recursive ones. Some minor tweaks to the air. Added a uplc optimization for later.
This commit is contained in:
@@ -5,7 +5,7 @@ use indexmap::IndexSet;
|
||||
use uplc::{builder::EXPECT_ON_LIST, builtins::DefaultFunction};
|
||||
|
||||
use crate::{
|
||||
ast::{Arg, Span},
|
||||
ast::Span,
|
||||
builtins::{data, list, void},
|
||||
tipo::{Type, ValueConstructor, ValueConstructorVariant},
|
||||
IdGenerator,
|
||||
@@ -701,12 +701,11 @@ impl AirStack {
|
||||
self.merge_child(body_stack);
|
||||
}
|
||||
|
||||
pub fn validator(&mut self, params: Vec<Arg<Arc<Type>>>) {
|
||||
pub fn noop(&mut self) {
|
||||
self.new_scope();
|
||||
|
||||
self.air.push(Air::Validator {
|
||||
self.air.push(Air::NoOp {
|
||||
scope: self.scope.clone(),
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user