Remove an unused opcode
This commit is contained in:
parent
5d4b3e69b9
commit
5fd349f571
|
@ -25,8 +25,8 @@ use crate::{
|
||||||
builder::{
|
builder::{
|
||||||
erase_opaque_type_operations, find_list_clause_or_default_first,
|
erase_opaque_type_operations, find_list_clause_or_default_first,
|
||||||
get_generic_variant_name, get_line_columns_by_span, get_src_code_by_span,
|
get_generic_variant_name, get_line_columns_by_span, get_src_code_by_span,
|
||||||
known_data_to_type, monomorphize, pattern_has_conditions, wrap_as_multi_validator,
|
known_data_to_type, monomorphize, pattern_has_conditions, wrap_validator_condition,
|
||||||
wrap_validator_condition, CodeGenFunction, SpecificClause,
|
CodeGenFunction, SpecificClause,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
line_numbers::LineNumbers,
|
line_numbers::LineNumbers,
|
||||||
|
@ -6035,24 +6035,6 @@ impl<'a> CodeGenerator<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Air::NoOp => None,
|
Air::NoOp => None,
|
||||||
Air::MultiValidator {
|
|
||||||
two_arg_name,
|
|
||||||
three_arg_name,
|
|
||||||
} => {
|
|
||||||
let two_arg = arg_stack.pop().unwrap();
|
|
||||||
|
|
||||||
let three_arg = arg_stack.pop().unwrap();
|
|
||||||
|
|
||||||
let term = wrap_as_multi_validator(
|
|
||||||
three_arg,
|
|
||||||
two_arg,
|
|
||||||
self.tracing,
|
|
||||||
three_arg_name,
|
|
||||||
two_arg_name,
|
|
||||||
);
|
|
||||||
|
|
||||||
Some(term)
|
|
||||||
}
|
|
||||||
Air::SoftCastLet { name, tipo } => {
|
Air::SoftCastLet { name, tipo } => {
|
||||||
let value = arg_stack.pop().unwrap();
|
let value = arg_stack.pop().unwrap();
|
||||||
let then = arg_stack.pop().unwrap();
|
let then = arg_stack.pop().unwrap();
|
||||||
|
|
|
@ -229,8 +229,4 @@ pub enum Air {
|
||||||
NoOp,
|
NoOp,
|
||||||
FieldsEmpty,
|
FieldsEmpty,
|
||||||
ListEmpty,
|
ListEmpty,
|
||||||
MultiValidator {
|
|
||||||
two_arg_name: String,
|
|
||||||
three_arg_name: String,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -410,13 +410,6 @@ pub enum AirTree {
|
||||||
msg: Box<AirTree>,
|
msg: Box<AirTree>,
|
||||||
then: Box<AirTree>,
|
then: Box<AirTree>,
|
||||||
},
|
},
|
||||||
// End Expressions
|
|
||||||
MultiValidator {
|
|
||||||
two_arg_name: String,
|
|
||||||
two_arg: Box<AirTree>,
|
|
||||||
three_arg_name: String,
|
|
||||||
three_arg: Box<AirTree>,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AirTree {
|
impl AirTree {
|
||||||
|
@ -1025,20 +1018,6 @@ impl AirTree {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn multi_validator(
|
|
||||||
two_arg_name: String,
|
|
||||||
two_arg: AirTree,
|
|
||||||
three_arg_name: String,
|
|
||||||
three_arg: AirTree,
|
|
||||||
) -> AirTree {
|
|
||||||
AirTree::MultiValidator {
|
|
||||||
two_arg_name,
|
|
||||||
two_arg: two_arg.into(),
|
|
||||||
three_arg_name,
|
|
||||||
three_arg: three_arg.into(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn expect_on_list2() -> AirTree {
|
pub fn expect_on_list2() -> AirTree {
|
||||||
let inner_expect_on_list = AirTree::local_var(INNER_EXPECT_ON_LIST, Type::void());
|
let inner_expect_on_list = AirTree::local_var(INNER_EXPECT_ON_LIST, Type::void());
|
||||||
|
|
||||||
|
@ -1672,20 +1651,6 @@ impl AirTree {
|
||||||
msg.create_air_vec(air_vec);
|
msg.create_air_vec(air_vec);
|
||||||
then.create_air_vec(air_vec);
|
then.create_air_vec(air_vec);
|
||||||
}
|
}
|
||||||
AirTree::MultiValidator {
|
|
||||||
two_arg,
|
|
||||||
three_arg,
|
|
||||||
two_arg_name,
|
|
||||||
three_arg_name,
|
|
||||||
} => {
|
|
||||||
air_vec.push(Air::MultiValidator {
|
|
||||||
two_arg_name: two_arg_name.clone(),
|
|
||||||
three_arg_name: three_arg_name.clone(),
|
|
||||||
});
|
|
||||||
|
|
||||||
two_arg.create_air_vec(air_vec);
|
|
||||||
three_arg.create_air_vec(air_vec);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1741,7 +1706,6 @@ impl AirTree {
|
||||||
| AirTree::FieldsEmpty { then, .. }
|
| AirTree::FieldsEmpty { then, .. }
|
||||||
| AirTree::ListEmpty { then, .. }
|
| AirTree::ListEmpty { then, .. }
|
||||||
| AirTree::NoOp { then } => then.return_type(),
|
| AirTree::NoOp { then } => then.return_type(),
|
||||||
AirTree::MultiValidator { .. } => Type::void(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1819,8 +1783,7 @@ impl AirTree {
|
||||||
| AirTree::Fn { .. }
|
| AirTree::Fn { .. }
|
||||||
| AirTree::UnOp { .. }
|
| AirTree::UnOp { .. }
|
||||||
| AirTree::WrapClause { .. }
|
| AirTree::WrapClause { .. }
|
||||||
| AirTree::Finally { .. }
|
| AirTree::Finally { .. } => vec![],
|
||||||
| AirTree::MultiValidator { .. } => vec![],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2114,8 +2077,7 @@ impl AirTree {
|
||||||
| AirTree::Constr { .. }
|
| AirTree::Constr { .. }
|
||||||
| AirTree::RecordUpdate { .. }
|
| AirTree::RecordUpdate { .. }
|
||||||
| AirTree::ErrorTerm { .. }
|
| AirTree::ErrorTerm { .. }
|
||||||
| AirTree::Trace { .. }
|
| AirTree::Trace { .. } => {}
|
||||||
| AirTree::MultiValidator { .. } => {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
match self {
|
match self {
|
||||||
|
@ -2567,25 +2529,6 @@ impl AirTree {
|
||||||
} => {
|
} => {
|
||||||
then.do_traverse_tree_with(tree_path, current_depth + 1, Fields::SecondField, with);
|
then.do_traverse_tree_with(tree_path, current_depth + 1, Fields::SecondField, with);
|
||||||
}
|
}
|
||||||
AirTree::MultiValidator {
|
|
||||||
two_arg_name: _,
|
|
||||||
two_arg,
|
|
||||||
three_arg_name: _,
|
|
||||||
three_arg,
|
|
||||||
} => {
|
|
||||||
two_arg.do_traverse_tree_with(
|
|
||||||
tree_path,
|
|
||||||
current_depth + 1,
|
|
||||||
Fields::SecondField,
|
|
||||||
with,
|
|
||||||
);
|
|
||||||
three_arg.do_traverse_tree_with(
|
|
||||||
tree_path,
|
|
||||||
current_depth + 1,
|
|
||||||
Fields::FourthField,
|
|
||||||
with,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
with(self, tree_path);
|
with(self, tree_path);
|
||||||
|
@ -2960,16 +2903,6 @@ impl AirTree {
|
||||||
| AirTree::ErrorTerm { .. } => {
|
| AirTree::ErrorTerm { .. } => {
|
||||||
panic!("A tree node with no children was encountered with a longer tree path.")
|
panic!("A tree node with no children was encountered with a longer tree path.")
|
||||||
}
|
}
|
||||||
AirTree::MultiValidator {
|
|
||||||
two_arg_name: _,
|
|
||||||
two_arg,
|
|
||||||
three_arg_name: _,
|
|
||||||
three_arg,
|
|
||||||
} => match field {
|
|
||||||
Fields::SecondField => two_arg.as_mut().do_find_air_tree_node(tree_path_iter),
|
|
||||||
Fields::FourthField => three_arg.as_mut().do_find_air_tree_node(tree_path_iter),
|
|
||||||
_ => panic!("Tree Path index outside tree children nodes"),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
self
|
self
|
||||||
|
|
Loading…
Reference in New Issue