From 2b0b6297792fa1ffd0eb58b28aff228bd0835c4f Mon Sep 17 00:00:00 2001 From: Sean Billig Date: Sun, 20 Jun 2021 12:31:52 -0700 Subject: [PATCH] wip --- analyzer/src/context.rs | 10 +- analyzer/src/namespace/scopes.rs | 14 +- analyzer/src/namespace/types.rs | 30 +++- analyzer/src/traversal/expressions.rs | 15 -- analyzer/src/traversal/types.rs | 7 - compiler/src/lib.rs | 12 +- compiler/src/lowering/context.rs | 144 ++++------------- compiler/src/lowering/mappers/contracts.rs | 25 ++- compiler/src/lowering/mappers/expressions.rs | 146 +++++++++--------- compiler/src/lowering/mappers/module.rs | 70 ++++++--- compiler/src/lowering/mappers/types.rs | 37 +++-- compiler/src/lowering/mod.rs | 5 +- compiler/src/lowering/names.rs | 21 +-- tests/fixtures/lowering/base_tuple_lowered.fe | 56 +++---- tests/src/lowering.rs | 4 +- ...tests__analysis__case_001_erc20_token.snap | 2 - ..._tests__analysis__case_002_guest_book.snap | 2 - ...ler_tests__analysis__case_003_uniswap.snap | 48 ------ ...nalysis__case_004_address_bytes10_map.snap | 2 - ...iler_tests__analysis__case_005_assert.snap | 2 - ..._tests__analysis__case_006_aug_assign.snap | 2 - ..._tests__analysis__case_007_base_tuple.snap | 15 -- ...is__case_008_call_statement_with_args.snap | 2 - ...__case_009_call_statement_with_args_2.snap | 2 - ..._case_010_call_statement_without_args.snap | 2 - ...analysis__case_011_checked_arithmetic.snap | 2 - ...tests__analysis__case_012_constructor.snap | 2 - ...__analysis__case_013_create2_contract.snap | 3 - ...s__analysis__case_014_create_contract.snap | 3 - ...s__case_015_create_contract_from_init.snap | 3 - ...piler_tests__analysis__case_016_empty.snap | 2 - ...iler_tests__analysis__case_017_events.snap | 2 - ..._analysis__case_018_external_contract.snap | 3 - ...nalysis__case_019_for_loop_with_break.snap | 2 - ...ysis__case_020_for_loop_with_continue.snap | 2 - ...__case_021_for_loop_with_static_array.snap | 2 - ...ests__analysis__case_022_if_statement.snap | 2 - ...ts__analysis__case_023_if_statement_2.snap | 2 - ...4_if_statement_with_block_declaration.snap | 2 - ...iler_tests__analysis__case_025_keccak.snap | 2 - ...mpiler_tests__analysis__case_026_math.snap | 2 - ...tests__analysis__case_027_multi_param.snap | 2 - ..._tests__analysis__case_028_nested_map.snap | 2 - ...sts__analysis__case_029_numeric_sizes.snap | 2 - ...ler_tests__analysis__case_030_ownable.snap | 2 - ...alysis__case_031_return_addition_i256.snap | 2 - ...alysis__case_032_return_addition_u128.snap | 2 - ...alysis__case_033_return_addition_u256.snap | 2 - ...ests__analysis__case_034_return_array.snap | 2 - ...ysis__case_035_return_bitwiseand_u128.snap | 2 - ...ysis__case_036_return_bitwiseand_u256.snap | 2 - ...lysis__case_037_return_bitwiseor_u256.snap | 2 - ...ysis__case_038_return_bitwiseshl_u256.snap | 2 - ...ysis__case_039_return_bitwiseshr_i256.snap | 2 - ...ysis__case_040_return_bitwiseshr_u256.snap | 2 - ...ysis__case_041_return_bitwisexor_u256.snap | 2 - ..._analysis__case_042_return_bool_false.snap | 2 - ...alysis__case_043_return_bool_inverted.snap | 2 - ...analysis__case_044_return_bool_op_and.snap | 2 - ..._analysis__case_045_return_bool_op_or.snap | 2 - ...__analysis__case_046_return_bool_true.snap | 2 - ...s__case_047_return_builtin_attributes.snap | 2 - ...alysis__case_048_return_division_i256.snap | 2 - ...alysis__case_049_return_division_u256.snap | 2 - ...analysis__case_050_return_empty_tuple.snap | 2 - ...ts__analysis__case_051_return_eq_u256.snap | 2 - ...ts__analysis__case_052_return_gt_i256.snap | 2 - ...ts__analysis__case_053_return_gt_u256.snap | 2 - ...s__analysis__case_054_return_gte_i256.snap | 2 - ...s__analysis__case_055_return_gte_u256.snap | 2 - ...__analysis__case_056_return_i128_cast.snap | 2 - ...tests__analysis__case_057_return_i256.snap | 2 - ...analysis__case_058_return_identity_u8.snap | 2 - ...nalysis__case_059_return_identity_u16.snap | 2 - ...nalysis__case_060_return_identity_u32.snap | 2 - ...nalysis__case_061_return_identity_u64.snap | 2 - ...alysis__case_062_return_identity_u128.snap | 2 - ...alysis__case_063_return_identity_u256.snap | 2 - ...ts__analysis__case_064_return_lt_i256.snap | 2 - ...ts__analysis__case_065_return_lt_u128.snap | 2 - ...ts__analysis__case_066_return_lt_u256.snap | 2 - ...s__analysis__case_067_return_lte_i256.snap | 2 - ...s__analysis__case_068_return_lte_u256.snap | 2 - ...s__analysis__case_069_return_mod_i256.snap | 2 - ...s__analysis__case_070_return_mod_u256.snap | 2 - ...ts__analysis__case_071_return_msg_sig.snap | 2 - ...__case_072_return_multiplication_i256.snap | 2 - ...__case_073_return_multiplication_u256.snap | 2 - ..._analysis__case_074_return_noteq_u256.snap | 2 - ...s__analysis__case_075_return_pow_i256.snap | 2 - ...s__analysis__case_076_return_pow_u256.snap | 2 - ...sis__case_077_return_subtraction_i256.snap | 2 - ...sis__case_078_return_subtraction_u256.snap | 2 - ...__analysis__case_079_return_u128_cast.snap | 2 - ...tests__analysis__case_080_return_u256.snap | 2 - ...__case_081_return_u256_from_called_fn.snap | 2 - ..._return_u256_from_called_fn_with_args.snap | 2 - ...iler_tests__analysis__case_083_revert.snap | 2 - ...ests__analysis__case_084_self_address.snap | 2 - ..._analysis__case_085_sized_vals_in_sto.snap | 2 - ...ler_tests__analysis__case_086_strings.snap | 2 - ...ler_tests__analysis__case_087_structs.snap | 2 - ...analysis__case_088_ternary_expression.snap | 2 - ...sts__analysis__case_089_two_contracts.snap | 3 - ...r_tests__analysis__case_090_u8_u8_map.snap | 2 - ...tests__analysis__case_091_u16_u16_map.snap | 2 - ...tests__analysis__case_092_u32_u32_map.snap | 2 - ...tests__analysis__case_093_u64_u64_map.snap | 2 - ...sts__analysis__case_094_u128_u128_map.snap | 2 - ...sts__analysis__case_095_u256_u256_map.snap | 2 - ..._tests__analysis__case_096_while_loop.snap | 2 - ...lysis__case_097_while_loop_with_break.snap | 2 - ...sis__case_098_while_loop_with_break_2.snap | 2 - ...is__case_099_while_loop_with_continue.snap | 2 - ...nalysis__case_100_abi_encoding_stress.snap | 2 - ...nalysis__case_101_data_copying_stress.snap | 2 - ...ests__analysis__case_102_tuple_stress.snap | 32 ---- 117 files changed, 261 insertions(+), 633 deletions(-) diff --git a/analyzer/src/context.rs b/analyzer/src/context.rs index e1bc5d7204..d71f1acb1f 100644 --- a/analyzer/src/context.rs +++ b/analyzer/src/context.rs @@ -2,7 +2,7 @@ use crate::builtins::GlobalMethod; use crate::errors::CannotMove; use crate::namespace::events::EventDef; use crate::namespace::scopes::{ContractFunctionDef, ContractScope, ModuleScope, Shared}; -use crate::namespace::types::{Array, Contract, FixedSize, Struct, Tuple, Type}; +use crate::namespace::types::{Contract, FixedSize, Struct, Type}; pub use fe_common::diagnostics::Label; use fe_common::diagnostics::{Diagnostic, Severity}; use fe_common::files::SourceFileId; @@ -53,8 +53,6 @@ pub struct ContractAttributes { /// Events that have been defined by the user. pub events: Vec, /// List expressions that the contract uses - pub list_expressions: BTreeSet, - /// Static strings that the contract defines pub string_literals: BTreeSet, /// Structs that have been defined by the user pub structs: Vec, @@ -121,7 +119,6 @@ impl From> for ContractAttributes { .values() .map(|event| event.to_owned()) .collect::>(), - list_expressions: scope.borrow().list_expressions.clone(), string_literals: scope.borrow().string_defs.clone(), structs, external_contracts, @@ -224,17 +221,12 @@ impl From for FunctionAttributes { pub struct ModuleAttributes { /// Type definitions in a module. pub type_defs: BTreeMap, - /// Tuples that were used inside of a module. - /// - /// BTreeSet is used for ordering, this way items are retrieved in the same order every time. - pub tuples_used: BTreeSet, } impl From> for ModuleAttributes { fn from(scope: Shared) -> Self { Self { type_defs: scope.borrow().type_defs.clone(), - tuples_used: scope.borrow().tuples_used.clone(), } } } diff --git a/analyzer/src/namespace/scopes.rs b/analyzer/src/namespace/scopes.rs index 3aff6cab2c..e5a3f2bc44 100644 --- a/analyzer/src/namespace/scopes.rs +++ b/analyzer/src/namespace/scopes.rs @@ -1,6 +1,6 @@ use crate::errors::AlreadyDefined; use crate::namespace::events::EventDef; -use crate::namespace::types::{Array, FixedSize, Tuple, Type}; +use crate::namespace::types::{FixedSize, Type}; use std::cell::RefCell; use std::collections::btree_map::Entry; use std::collections::{BTreeMap, BTreeSet}; @@ -27,10 +27,6 @@ pub struct ContractFieldDef { pub struct ModuleScope { /// Type definitions in a module. pub type_defs: BTreeMap, - /// Tuples that were used inside of a module. - /// - /// BTreeSet is used for ordering, this way items are retrieved in the same order every time. - pub tuples_used: BTreeSet, } #[derive(Clone, Debug, PartialEq)] @@ -41,7 +37,6 @@ pub struct ContractScope { pub event_defs: BTreeMap, pub field_defs: BTreeMap, pub function_defs: BTreeMap, - pub list_expressions: BTreeSet, pub string_defs: BTreeSet, pub created_contracts: BTreeSet, num_fields: usize, @@ -89,7 +84,6 @@ impl ModuleScope { pub fn new() -> Shared { Rc::new(RefCell::new(ModuleScope { type_defs: BTreeMap::new(), - tuples_used: BTreeSet::new(), })) } @@ -123,7 +117,6 @@ impl ContractScope { string_defs: BTreeSet::new(), interface: vec![], created_contracts: BTreeSet::new(), - list_expressions: BTreeSet::new(), num_fields: 0, })) } @@ -210,11 +203,6 @@ impl ContractScope { pub fn add_created_contract(&mut self, name: &str) { self.created_contracts.insert(name.to_owned()); } - - /// Add the array type of a list expression that was used within the contract. - pub fn add_used_list_expression(&mut self, typ: Array) { - self.list_expressions.insert(typ); - } } impl BlockScope { diff --git a/analyzer/src/namespace/types.rs b/analyzer/src/namespace/types.rs index e123af15e9..1156335cd4 100644 --- a/analyzer/src/namespace/types.rs +++ b/analyzer/src/namespace/types.rs @@ -290,39 +290,57 @@ pub trait TypeDowncast { fn as_int(&self) -> Option; } -impl TypeDowncast for Option<&Type> { +impl TypeDowncast for Type { fn as_array(&self) -> Option<&Array> { match self { - Some(Type::Array(inner)) => Some(inner), + Type::Array(inner) => Some(inner), _ => None, } } fn as_tuple(&self) -> Option<&Tuple> { match self { - Some(Type::Tuple(inner)) => Some(inner), + Type::Tuple(inner) => Some(inner), _ => None, } } fn as_string(&self) -> Option<&FeString> { match self { - Some(Type::String(inner)) => Some(inner), + Type::String(inner) => Some(inner), _ => None, } } fn as_map(&self) -> Option<&Map> { match self { - Some(Type::Map(inner)) => Some(inner), + Type::Map(inner) => Some(inner), _ => None, } } fn as_int(&self) -> Option { match self { - Some(Type::Base(Base::Numeric(int))) => Some(*int), + Type::Base(Base::Numeric(int)) => Some(*int), _ => None, } } } +impl TypeDowncast for Option<&Type> { + fn as_array(&self) -> Option<&Array> { + self.and_then(|t| t.as_array()) + } + fn as_tuple(&self) -> Option<&Tuple> { + self.and_then(|t| t.as_tuple()) + } + fn as_string(&self) -> Option<&FeString> { + self.and_then(|t| t.as_string()) + } + fn as_map(&self) -> Option<&Map> { + self.and_then(|t| t.as_map()) + } + fn as_int(&self) -> Option { + self.and_then(|t| t.as_int()) + } +} + impl From for Type { fn from(value: FixedSize) -> Self { match value { diff --git a/analyzer/src/traversal/expressions.rs b/analyzer/src/traversal/expressions.rs index 03f5ad75af..ccd59058a3 100644 --- a/analyzer/src/traversal/expressions.rs +++ b/analyzer/src/traversal/expressions.rs @@ -126,13 +126,6 @@ pub fn expr_list( size: elts.len(), inner: inner_type, }; - - scope - .borrow() - .contract_scope() - .borrow_mut() - .add_used_list_expression(array_typ.clone()); - Ok(ExpressionAttributes { typ: Type::Array(array_typ), location: Location::Memory, @@ -245,14 +238,6 @@ fn expr_tuple( let tuple = Tuple { items: Vec1::try_from_vec(tuple_types).expect("tuple is empty"), }; - - scope - .borrow() - .module_scope() - .borrow_mut() - .tuples_used - .insert(tuple.clone()); - Ok(ExpressionAttributes::new( Type::Tuple(tuple), Location::Memory, diff --git a/analyzer/src/traversal/types.rs b/analyzer/src/traversal/types.rs index dd118a95af..f5e1c286f1 100644 --- a/analyzer/src/traversal/types.rs +++ b/analyzer/src/traversal/types.rs @@ -133,13 +133,6 @@ pub fn type_desc( }; context.add_type_desc(desc, typ.clone()); - if let Type::Tuple(tuple) = &typ { - scope - .module_scope() - .borrow_mut() - .tuples_used - .insert(tuple.to_owned()); - } Ok(typ) } diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 4fd99ee8ac..3adbef9edf 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -35,9 +35,9 @@ pub fn compile( } // analyze source code - let mut context = match fe_analyzer::analyze(&fe_module, file_id) { + let analysis = match fe_analyzer::analyze(&fe_module, file_id) { Ok(_) if !errors.is_empty() => return Err(CompileError { errors }), - Ok(context) => context, + Ok(analysis) => analysis, Err(err) => { errors.push(ErrorKind::Analyzer(err)); return Err(CompileError { errors }); @@ -45,17 +45,17 @@ pub fn compile( }; // build abi - let json_abis = abi::build(&context, &fe_module)?; + let json_abis = abi::build(&analysis, &fe_module)?; // lower the AST - let lowered_fe_module = lowering::lower(fe_module.clone()); + let lowered_fe_module = lowering::lower(&analysis, fe_module.clone()); // analyze the lowered AST - let context = + let analysis = fe_analyzer::analyze(&lowered_fe_module, file_id).expect("failed to analyze lowered AST"); // compile to yul - let yul_contracts = yul::compile(&context, &lowered_fe_module); + let yul_contracts = yul::compile(&analysis, &lowered_fe_module); // compile to bytecode if required #[cfg(feature = "solc-backend")] diff --git a/compiler/src/lowering/context.rs b/compiler/src/lowering/context.rs index da3ef619f8..768f5517a7 100644 --- a/compiler/src/lowering/context.rs +++ b/compiler/src/lowering/context.rs @@ -1,22 +1,28 @@ use fe_analyzer::context::Context as AnalyzerContext; -use fe_analyzer::namespace::types::Array; -use fe_parser::ast::{GenericArg, TypeDesc}; +use fe_analyzer::namespace::types::{Array, Tuple}; use indexmap::IndexMap; -use std::hash::{Hash, Hasher}; +use std::collections::BTreeSet; -#[derive(Default)] pub struct ModuleContext<'a> { - analyzer_context: &'a AnalyzerContext, + pub analysis: &'a AnalyzerContext, /// Tuples that were used inside of a module, /// and the generated name of the resulting struct. - tuple_structs: IndexMap, + tuple_structs: IndexMap, /// Holds fresh id for [`ModuleContext::make_unique_name`] fresh_id: u64, } -impl ModuleContext<'_> { +impl<'a> ModuleContext<'a> { + pub fn new(analysis: &'a AnalyzerContext) -> Self { + Self { + analysis, + tuple_structs: IndexMap::new(), + fresh_id: 0, + } + } + /// Makes a unique name from the given name, keeping it as readable as possible. pub fn make_unique_name(&mut self, name: &str) -> String { let id = self.fresh_id; @@ -24,16 +30,22 @@ impl ModuleContext<'_> { format!("${}_{}", name, id) } - pub fn tuple_struct_name(&mut self, tuple: TypeDesc) -> &str { - let entry = self.tuple_structs.entry(TupleTypeDesc(tuple)); + /// Returns generated struct name for tuple. + pub fn add_tuple(&mut self, tuple: Tuple) -> &str { + let entry = self.tuple_structs.entry(tuple.clone()); let index = entry.index(); - entry.or_insert_with(|| format!("__tuple_{}", index)) + entry.or_insert_with(|| format!("__Tuple{}", index)) } - pub fn iter_tuples(&self) -> impl Iterator { + // Panics if the given tuple hasn't been added via [`add_tuple`] + pub fn tuple_struct_name(&self, tuple: &Tuple) -> &str { self.tuple_structs - .iter() - .map(|(typ, name)| (&typ.0, name.as_str())) + .get(tuple) + .expect("tuple not added to context") + } + + pub fn iter_tuples(&self) -> impl Iterator { + self.tuple_structs.iter().map(|(typ, _name)| typ) } } @@ -41,108 +53,14 @@ impl ModuleContext<'_> { pub struct Context<'a, 'b> { pub module: &'a mut ModuleContext<'b>, /// List expressions that the contract uses - array_literals: IndexMap, -} - -impl Context<'_, '_> { - pub fn array_literal_function(typ: Array) -> String { - let name = list_expr_generator_fn_name(&typ); - self.array_literals.insert(typ); - name - } -} - -struct TupleTypeDesc(TypeDesc); - -impl PartialEq for TupleTypeDesc { - fn eq(&self, other: &TupleTypeDesc) -> bool { - types_equal(&self.0, &other.0) - } + pub list_expressions: BTreeSet, } -impl Eq for TupleTypeDesc {} -impl Hash for TupleTypeDesc { - fn hash(&self, state: &mut H) { - hash_type_desc(&self.0, state) - } -} - -fn types_equal(left: &TypeDesc, right: &TypeDesc) -> bool { - use TypeDesc::*; - match (left, right) { - (Unit, Unit) => true, - (Base { base: lname }, Base { base: rname }) => lname == rname, - ( - Array { - typ: ltyp, - dimension: ldim, - }, - Array { - typ: rtyp, - dimension: rdim, - }, - ) => ldim == rdim && types_equal(<yp.kind, &rtyp.kind), - (Tuple { items: left }, Tuple { items: right }) => { - left.len() == right.len() - && left - .iter() - .zip(right.iter()) - .all(|(lnode, rnode)| types_equal(&lnode.kind, &rnode.kind)) - } - ( - Generic { - base: lbase, - args: largs, - }, - Generic { - base: rbase, - args: rargs, - }, - ) => { - lbase.kind == rbase.kind - && largs.kind.len() == rargs.kind.len() - && largs - .kind - .iter() - .zip(rargs.kind.iter()) - .all(|(left, right)| match (left, right) { - (GenericArg::Int(l), GenericArg::Int(r)) => l.kind == r.kind, - (GenericArg::TypeDesc(l), GenericArg::TypeDesc(r)) => &l.kind == &r.kind, - _ => false, - }) - } - _ => false, - } -} - -fn hash_type_desc(typ: &TypeDesc, state: &mut impl Hasher) { - use TypeDesc::*; - match typ { - Unit => state.write_u8(0), - Base { base } => { - state.write_u8(1); - base.hash(state); - } - Array { typ, dimension } => { - state.write_u8(2); - hash_type_desc(&typ.kind, state); - state.write_usize(*dimension); - } - Tuple { items } => { - state.write_u8(3); - for item in items { - hash_type_desc(&item.kind, state); - } - } - Generic { base, args } => { - state.write_u8(4); - base.kind.hash(state); - for arg in &args.kind { - match arg { - GenericArg::Int(node) => state.write_usize(node.kind), - GenericArg::TypeDesc(node) => hash_type_desc(&node.kind, state), - } - } +impl<'a, 'b> Context<'a, 'b> { + pub fn new(module: &'a mut ModuleContext<'b>) -> Self { + Self { + module, + list_expressions: BTreeSet::new(), } } } diff --git a/compiler/src/lowering/mappers/contracts.rs b/compiler/src/lowering/mappers/contracts.rs index 398d931e80..e05e6e490e 100644 --- a/compiler/src/lowering/mappers/contracts.rs +++ b/compiler/src/lowering/mappers/contracts.rs @@ -9,6 +9,12 @@ use fe_parser::node::Node; /// Lowers a contract definition. pub fn contract_def(context: &mut Context, stmt: Node) -> Node { let fe::Contract { name, fields, body } = stmt.kind; + + let lowered_fields = fields + .into_iter() + .map(|field| contract_field(context, field)) + .collect(); + let lowered_body = body .into_iter() .map(|stmt| match stmt { @@ -19,24 +25,17 @@ pub fn contract_def(context: &mut Context, stmt: Node) -> Node>(); - - // let lowered_body = [lowered_body, func_defs_from_list_expr].concat(); - - let lowered_fields = fields - .into_iter() - .map(|field| contract_field(context, field)) - .collect(); + let func_defs_from_list_expr = context + .list_expressions + .iter() + .map(|expr| fe::ContractStmt::Function(list_expr_to_fn_def(expr).into_node())) + .collect::>(); Node::new( fe::Contract { name, fields: lowered_fields, - body: lowered_body, + body: [lowered_body, func_defs_from_list_expr].concat(), }, stmt.span, ) diff --git a/compiler/src/lowering/mappers/expressions.rs b/compiler/src/lowering/mappers/expressions.rs index cb370c3c8f..1ab4870d90 100644 --- a/compiler/src/lowering/mappers/expressions.rs +++ b/compiler/src/lowering/mappers/expressions.rs @@ -1,8 +1,8 @@ use crate::lowering::context::Context; -use crate::lowering::names::{list_expr_generator_fn_name, tuple_struct_name}; +use crate::lowering::names::list_expr_generator_fn_name; use crate::lowering::utils::ZeroSpanNode; use fe_analyzer::builtins::Object; -use fe_analyzer::namespace::types::Type; +use fe_analyzer::namespace::types::{Type, TypeDowncast}; use fe_parser::ast as fe; use fe_parser::node::Node; @@ -102,74 +102,82 @@ pub fn call_args( } fn expr_tuple(context: &mut Context, exp: Node) -> fe::Expr { - todo!() - // let attributes = context.get_expression(&exp).expect("missing attributes"); - - // if let Type::Tuple(tuple) = &attributes.typ { - // let name = tuple_struct_name(tuple); - - // if let fe::Expr::Tuple { elts } = exp.kind { - // // map the tuple args to named args - // let args = Node::new( - // elts.into_iter() - // .enumerate() - // .map(|(index, elt)| { - // Node::new( - // fe::CallArg { - // label: Some(Node::new(format!("item{}", index), elt.span)), - // value: elt.clone(), - // }, - // elt.span, - // ) - // }) - // .collect(), - // exp.span, - // ); - - // // create type constructor call for the lowered tuple - // return fe::Expr::Call { - // func: Box::new(Node::new(name, exp.span)), - // generic_args: None, - // args, - // }; - // } - // } - - // unreachable!() + let typ = context + .module + .analysis + .get_expression(&exp) + .expect("missing attributes") + .typ + .as_tuple() + .expect("expected tuple type"); + + let name = context.module.add_tuple(typ.clone()); + let elts = match exp.kind { + fe::Expr::Tuple { elts } => elts, + _ => unreachable!(), + }; + + // map the tuple args to named args + let args = Node::new( + elts.into_iter() + .enumerate() + .map(|(index, elt)| { + Node::new( + fe::CallArg { + label: Some(Node::new(format!("item{}", index), elt.span)), + value: elt.clone(), + }, + elt.span, + ) + }) + .collect(), + exp.span, + ); + + // create type constructor call for the lowered tuple + return fe::Expr::Call { + func: Box::new(Node::new(fe::Expr::Name(name.to_string()), exp.span)), + generic_args: None, + args, + }; } fn expr_list(context: &mut Context, exp: Node) -> fe::Expr { - todo!() - // let attributes = context.get_expression(&exp).expect("missing attributes"); - - // if let Type::Array(array) = &attributes.typ { - // let fn_name = list_expr_generator_fn_name(array); - - // if let fe::Expr::List { elts } = exp.kind { - // let args = elts - // .into_iter() - // .map(|list_val| { - // fe::CallArg { - // label: None, - // value: list_val, - // } - // .into_node() - // }) - // .collect::>() - // .into_node(); - - // // Turn List Expression into a function call - // return fe::Expr::Call { - // func: fe::Expr::Attribute { - // value: fe::Expr::Name(Object::Self_.to_string()).into_boxed_node(), - // attr: fn_name.into_node(), - // } - // .into_boxed_node(), - // generic_args: None, - // args, - // }; - // } - // } - - // unreachable!() + let attributes = context + .module + .analysis + .get_expression(&exp) + .expect("missing attributes"); + + if let Type::Array(array) = &attributes.typ { + context.list_expressions.insert(array.clone()); + let fn_name = list_expr_generator_fn_name(array); + + if let fe::Expr::List { elts } = exp.kind { + let args = elts + .into_iter() + .map(|list_val| { + fe::CallArg { + label: None, + value: list_val, + } + .into_node() + }) + .collect::>() + .into_node(); + + // Turn List Expression into a function call + return fe::Expr::Call { + func: fe::Expr::Attribute { + value: fe::Expr::Name(Object::Self_.to_string()).into_boxed_node(), + attr: fn_name.into_node(), + } + .into_boxed_node(), + generic_args: None, + args, + }; + } + } + + unreachable!() } diff --git a/compiler/src/lowering/mappers/module.rs b/compiler/src/lowering/mappers/module.rs index e2f31867be..beac0577da 100644 --- a/compiler/src/lowering/mappers/module.rs +++ b/compiler/src/lowering/mappers/module.rs @@ -1,11 +1,15 @@ use crate::lowering::context::{Context, ModuleContext}; use crate::lowering::mappers::contracts; +use crate::lowering::names; +use crate::lowering::utils::ZeroSpanNode; +use fe_analyzer::context::Context as AnalyzerContext; +use fe_analyzer::namespace::types::{Base, FixedSize, Tuple}; use fe_parser::ast as fe; use fe_parser::node::{Node, Span}; /// Lowers a module. -pub fn module(module: fe::Module) -> fe::Module { - let mut module_context = ModuleContext::default(); +pub fn module(analysis: &AnalyzerContext, module: fe::Module) -> fe::Module { + let mut module_context = ModuleContext::new(analysis); let lowered_body = module .body @@ -16,9 +20,7 @@ pub fn module(module: fe::Module) -> fe::Module { fe::ModuleStmt::Struct(_) => stmt, fe::ModuleStmt::Import(_) => stmt, fe::ModuleStmt::Contract(inner) => { - let mut context = Context { - module: &mut module_context, - }; + let mut context = Context::new(&mut module_context); fe::ModuleStmt::Contract(contracts::contract_def(&mut context, inner)) } }) @@ -26,8 +28,11 @@ pub fn module(module: fe::Module) -> fe::Module { let struct_defs_from_tuples = module_context .iter_tuples() - .map(|(desc, name)| { - fe::ModuleStmt::Struct(Node::new(build_tuple_struct(desc, name), Span::zero())) + .map(|typ| { + fe::ModuleStmt::Struct(Node::new( + build_tuple_struct(&module_context, typ), + Span::zero(), + )) }) .collect::>(); @@ -36,35 +41,64 @@ pub fn module(module: fe::Module) -> fe::Module { } } -fn build_tuple_struct(typ: &fe::TypeDesc, name: &str) -> fe::Struct { - let items = match typ { - fe::TypeDesc::Tuple { items } => items, - _ => unreachable!(), - }; - - let fields = items +fn build_tuple_struct(module: &ModuleContext, tuple: &Tuple) -> fe::Struct { + let fields = tuple + .items .iter() .enumerate() - .map(|(index, type_desc)| { + .map(|(index, typ)| { Node::new( - build_struct_field(format!("item{}", index), &type_desc.kind), + build_struct_field(format!("item{}", index), build_type_desc(module, typ)), Span::zero(), ) }) .collect(); + let name = module.tuple_struct_name(tuple); fe::Struct { name: Node::new(name.to_string(), Span::zero()), fields, } } -fn build_struct_field(name: String, type_desc: &fe::TypeDesc) -> fe::Field { +fn build_struct_field(name: String, type_desc: fe::TypeDesc) -> fe::Field { fe::Field { is_pub: false, is_const: false, name: Node::new(name, Span::zero()), - typ: Node::new(type_desc.clone(), Span::zero()), + typ: Node::new(type_desc, Span::zero()), value: None, } } + +fn build_type_desc(module: &ModuleContext, typ: &FixedSize) -> fe::TypeDesc { + match typ { + FixedSize::Base(Base::Unit) => fe::TypeDesc::Unit, + FixedSize::Base(base) => fe::TypeDesc::Base { + base: names::base_type_name(base), + }, + FixedSize::Array(array) => fe::TypeDesc::Array { + dimension: array.size, + typ: build_type_desc(module, &array.inner.into()).into_boxed_node(), + }, + FixedSize::Tuple(tuple) => fe::TypeDesc::Base { + base: module.tuple_struct_name(&tuple).to_string(), + }, + FixedSize::String(string) => fe::TypeDesc::Generic { + base: Node::new("String".to_string(), Span::zero()), + args: Node::new( + vec![fe::GenericArg::Int(Node::new( + string.max_size, + Span::zero(), + ))], + Span::zero(), + ), + }, + FixedSize::Contract(contract) => fe::TypeDesc::Base { + base: contract.name.clone(), + }, + FixedSize::Struct(strukt) => fe::TypeDesc::Base { + base: strukt.name.clone(), + }, + } +} diff --git a/compiler/src/lowering/mappers/types.rs b/compiler/src/lowering/mappers/types.rs index d73aaaef95..b2853eef35 100644 --- a/compiler/src/lowering/mappers/types.rs +++ b/compiler/src/lowering/mappers/types.rs @@ -1,7 +1,6 @@ use crate::lowering::context::Context; -use crate::lowering::names; -use fe_common::Spanned; -use fe_parser::ast::{GenericArg, TypeDesc, Vec1}; +use fe_analyzer::namespace::types::TypeDowncast; +use fe_parser::ast::{GenericArg, TypeDesc}; use fe_parser::node::Node; pub fn type_desc(context: &mut Context, desc: Node) -> Node { @@ -9,18 +8,26 @@ pub fn type_desc(context: &mut Context, desc: Node) -> Node TypeDesc::Unit | TypeDesc::Base { .. } => desc, TypeDesc::Tuple { items } => { - // For nested tuples, we first lower the item types, - // then lower the resulting parent tuple. - let lowered_items = Vec1::try_from_vec( - items - .into_iter() - .map(|desc| type_desc(context, desc)) - .collect(), - ) - .expect("tuple has no items"); - let struct_name = context.module.tuple_struct_name(TypeDesc::Tuple { - items: lowered_items, - }); + let typ = context + .module + .analysis + .get_type_desc(desc.id) + .expect("missing type desc type") + .as_tuple() + .expect("expected tuple type"); + + // (u8, (u8, u8)) should become + // struct __Tuple1: + // item0: u8 + // item1: u8 + // struct __Tuple2: + // item0: u8 + // item1: __Tuple1 + + for item in items.into_iter() { + type_desc(context, item); + } + let struct_name = context.module.add_tuple(typ.clone()); Node::new( TypeDesc::Base { base: struct_name.into(), diff --git a/compiler/src/lowering/mod.rs b/compiler/src/lowering/mod.rs index 83add24a21..1e4c7fcc68 100644 --- a/compiler/src/lowering/mod.rs +++ b/compiler/src/lowering/mod.rs @@ -1,6 +1,7 @@ //! Fe Lowering. use crate::types::FeModuleAst; +use fe_analyzer::context::Context as AnalyzerContext; mod context; mod mappers; @@ -8,6 +9,6 @@ mod names; mod utils; /// Lowers the Fe source AST to a Fe HIR AST. -pub fn lower(module: FeModuleAst) -> FeModuleAst { - mappers::module::module(module) +pub fn lower(analysis: &AnalyzerContext, module: FeModuleAst) -> FeModuleAst { + mappers::module::module(analysis, module) } diff --git a/compiler/src/lowering/names.rs b/compiler/src/lowering/names.rs index d9cee09876..0a19b368dd 100644 --- a/compiler/src/lowering/names.rs +++ b/compiler/src/lowering/names.rs @@ -1,5 +1,5 @@ use crate::lowering::utils::ZeroSpanNode; -use fe_analyzer::namespace::types::{Array, Base, FixedSize, Integer, SafeNames, Tuple}; +use fe_analyzer::namespace::types::{Array, Base, FixedSize, Integer, SafeNames}; use fe_parser::ast as fe; /// The name of a lowered list expression generator function. @@ -7,23 +7,6 @@ pub fn list_expr_generator_fn_name(list_expr_type: &Array) -> String { format!("list_expr_{}", list_expr_type.lower_snake()) } -/// The name of a lowered tuple struct definition. -pub fn tuple_struct_string(tuple: &Tuple) -> String { - tuple.lower_snake() -} - -/// The type description of a lowered tuple struct. -pub fn tuple_struct_type_desc(tuple: &Tuple) -> fe::TypeDesc { - fe::TypeDesc::Base { - base: tuple_struct_string(tuple), - } -} - -/// The name of a lowered tuple struct definition as an expression. -pub fn tuple_struct_name(tuple: &Tuple) -> fe::Expr { - fe::Expr::Name(tuple_struct_string(tuple)) -} - /// Maps a FixedSize type to its type description. pub fn fixed_size_type_desc(typ: &FixedSize) -> fe::TypeDesc { match typ { @@ -42,7 +25,7 @@ pub fn fixed_size_type_desc(typ: &FixedSize) -> fe::TypeDesc { } } -fn base_type_name(typ: &Base) -> String { +pub fn base_type_name(typ: &Base) -> String { match typ { Base::Numeric(number) => match number { Integer::U256 => "u256", diff --git a/tests/fixtures/lowering/base_tuple_lowered.fe b/tests/fixtures/lowering/base_tuple_lowered.fe index 0847645c7b..867c670d15 100644 --- a/tests/fixtures/lowering/base_tuple_lowered.fe +++ b/tests/fixtures/lowering/base_tuple_lowered.fe @@ -1,26 +1,26 @@ -struct tuple_u256_bool: +struct __Tuple0: + item0: bool + item1: address + +struct __Tuple1: + item0: bool + item1: bool + +struct __Tuple2: + item0: address + item1: address + +struct __Tuple3: item0: u256 item1: bool -struct tuple_u256_bool_u8_address: +struct __Tuple4: item0: u256 item1: bool item2: u8 item3: address -struct tuple_bool_bool: - item0: bool - item1: bool - -struct tuple_bool_address: - item0: bool - item1: address - -struct tuple_address_address: - item0: address - item1: address - -struct tuple_address_address_u16_i32_bool: +struct __Tuple5: item0: address item1: address item2: u16 @@ -28,17 +28,17 @@ struct tuple_address_address_u16_i32_bool: item4: bool contract Foo: - my_tuple_field: tuple_bool_address + my_tuple_field: __Tuple0 event MyEvent: - my_tuple: tuple_bool_bool - my_other_tuple: tuple_address_address + my_tuple: __Tuple1 + my_other_tuple: __Tuple2 - pub def bar(my_num: u256, my_bool: bool) -> tuple_u256_bool: - return tuple_u256_bool(item0=my_num, item1=my_bool) + pub def bar(my_num: u256, my_bool: bool) -> __Tuple3: + return __Tuple3(item0=my_num, item1=my_bool) - pub def baz() -> tuple_u256_bool_u8_address: - return tuple_u256_bool_u8_address( + pub def baz() -> __Tuple4: + return __Tuple4( item0=999999, item1=false, item2=u8(42), @@ -46,7 +46,7 @@ contract Foo: ) pub def bing() -> (): - foo: tuple_address_address_u16_i32_bool = tuple_address_address_u16_i32_bool( + foo: __Tuple5 = __Tuple5( item0=address(0), item1=address(0), item2=u16(0), @@ -56,9 +56,9 @@ contract Foo: return () pub def bop( - my_tuple1: tuple_u256_bool, - my_tuple2: tuple_u256_bool_u8_address, - my_tuple3: tuple_address_address_u16_i32_bool + my_tuple1: __Tuple3, + my_tuple2: __Tuple4, + my_tuple3: __Tuple5, ) -> (): pass return () @@ -66,7 +66,7 @@ contract Foo: pub def food() -> (): emit MyEvent( - my_tuple=tuple_bool_bool(item0=false, item1=true), - my_other_tuple=tuple_address_address(item0=address(0), item1=address(1)) + my_tuple=__Tuple1(item0=false, item1=true), + my_other_tuple=__Tuple2(item0=address(0), item1=address(1)) ) return () diff --git a/tests/src/lowering.rs b/tests/src/lowering.rs index 131a17571e..cc54e1b351 100644 --- a/tests/src/lowering.rs +++ b/tests/src/lowering.rs @@ -38,8 +38,8 @@ fn parse_file(src: &str, id: SourceFileId, files: &FileStore) -> fe::Module { } fn replace_spans(input: String) -> String { - let span_re = Regex::new(r"span: Span\(\n\s*start: \d+,\n\s*end: \d+.\n\s*\),").unwrap(); - span_re.replace_all(&input, "[span omitted]").to_string() + let span_re = Regex::new(r"\n *span: Span\(\n\s*start: \d+,\n\s*end: \d+.\n\s*\),").unwrap(); + span_re.replace_all(&input, "").to_string() } #[rstest( diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_001_erc20_token.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_001_erc20_token.snap index a6045821bb..6ae4f6bc98 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_001_erc20_token.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_001_erc20_token.snap @@ -214,7 +214,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -4229,7 +4228,6 @@ note: ], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_002_guest_book.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_002_guest_book.snap index 817ad9f700..55499fa15e 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_002_guest_book.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_002_guest_book.snap @@ -55,7 +55,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -378,7 +377,6 @@ note: indexed_fields: [], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_003_uniswap.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_003_uniswap.snap index 4135eda663..259060c020 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_003_uniswap.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_003_uniswap.snap @@ -406,51 +406,6 @@ ModuleAttributes { }, ), }, - tuples_used: { - Tuple { - items: [ - Base( - Numeric( - U256, - ), - ), - Base( - Numeric( - U256, - ), - ), - ], - }, - Tuple { - items: [ - Base( - Numeric( - U256, - ), - ), - Base( - Numeric( - U256, - ), - ), - Base( - Numeric( - U256, - ), - ), - ], - }, - Tuple { - items: [ - Base( - Address, - ), - Base( - Address, - ), - ], - }, - }, } note: @@ -16335,7 +16290,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ @@ -17187,7 +17141,6 @@ note: ], }, ], - list_expressions: {}, string_literals: { "UniswapV2: FORBIDDEN", "UniswapV2: INSUFFICIENT_INPUT_AMOUNT", @@ -17478,7 +17431,6 @@ note: ], }, ], - list_expressions: {}, string_literals: { "UniswapV2: FORBIDDEN", "UniswapV2: IDENTICAL_ADDRESSES", diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_004_address_bytes10_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_004_address_bytes10_map.snap index 9503fb8923..565b2d3a79 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_004_address_bytes10_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_004_address_bytes10_map.snap @@ -55,7 +55,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -331,7 +330,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_005_assert.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_005_assert.snap index 82c5104524..5433bc4489 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_005_assert.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_005_assert.snap @@ -72,7 +72,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -404,7 +403,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: { "Must be greater than five", }, diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_006_aug_assign.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_006_aug_assign.snap index f884895a10..e0ad1598c3 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_006_aug_assign.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_006_aug_assign.snap @@ -364,7 +364,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -2030,7 +2029,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_007_base_tuple.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_007_base_tuple.snap index 93bbde1c9d..e16bdb0b9a 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_007_base_tuple.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_007_base_tuple.snap @@ -47,20 +47,6 @@ ModuleAttributes { }, ), }, - tuples_used: { - Tuple { - items: [ - Base( - Numeric( - U256, - ), - ), - Base( - Bool, - ), - ], - }, - }, } note: @@ -207,7 +193,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_008_call_statement_with_args.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_008_call_statement_with_args.snap index d30c8b3e40..9d609c2f79 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_008_call_statement_with_args.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_008_call_statement_with_args.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -267,7 +266,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_009_call_statement_with_args_2.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_009_call_statement_with_args_2.snap index cf4b313f3a..57dd855a6d 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_009_call_statement_with_args_2.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_009_call_statement_with_args_2.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -288,7 +287,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_010_call_statement_without_args.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_010_call_statement_without_args.snap index f071810309..06b9e24fa4 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_010_call_statement_without_args.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_010_call_statement_without_args.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -242,7 +241,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_011_checked_arithmetic.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_011_checked_arithmetic.snap index 1376c8d912..368ee27cc2 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_011_checked_arithmetic.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_011_checked_arithmetic.snap @@ -1957,7 +1957,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -9897,7 +9896,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_012_constructor.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_012_constructor.snap index 121f4bfe5c..3fadec41d2 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_012_constructor.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_012_constructor.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -302,7 +301,6 @@ note: }, ), events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_013_create2_contract.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_013_create2_contract.snap index dbf727d51c..13be8e28a6 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_013_create2_contract.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_013_create2_contract.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -242,7 +241,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ @@ -286,7 +284,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_014_create_contract.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_014_create_contract.snap index 00f8cfc8e6..1ec1c05568 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_014_create_contract.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_014_create_contract.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -225,7 +224,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ @@ -268,7 +266,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_015_create_contract_from_init.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_015_create_contract_from_init.snap index d1ff33df34..fc8bcb84fc 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_015_create_contract_from_init.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_015_create_contract_from_init.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -226,7 +225,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ @@ -281,7 +279,6 @@ note: }, ), events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_016_empty.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_016_empty.snap index dd054d03fe..bed8dce4c6 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_016_empty.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_016_empty.snap @@ -12,7 +12,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -26,7 +25,6 @@ note: public_functions: [], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_017_events.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_017_events.snap index 2dde34da0f..15670062a5 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_017_events.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_017_events.snap @@ -81,7 +81,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -782,7 +781,6 @@ note: ], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_018_external_contract.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_018_external_contract.snap index 5832d33b13..7fd22e8c18 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_018_external_contract.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_018_external_contract.snap @@ -160,7 +160,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -1444,7 +1443,6 @@ note: indexed_fields: [], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ @@ -1626,7 +1624,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_019_for_loop_with_break.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_019_for_loop_with_break.snap index 2cfbdfffbb..99dcde1697 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_019_for_loop_with_break.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_019_for_loop_with_break.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -465,7 +464,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_020_for_loop_with_continue.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_020_for_loop_with_continue.snap index 1af90b975c..0a4ab6bf21 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_020_for_loop_with_continue.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_020_for_loop_with_continue.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -631,7 +630,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_021_for_loop_with_static_array.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_021_for_loop_with_static_array.snap index 99d5be5e7a..af6bd2fc16 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_021_for_loop_with_static_array.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_021_for_loop_with_static_array.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -419,7 +418,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_022_if_statement.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_022_if_statement.snap index 323867f378..e6325c5ac6 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_022_if_statement.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_022_if_statement.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -179,7 +178,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_023_if_statement_2.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_023_if_statement_2.snap index a60666b2cb..200fa64608 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_023_if_statement_2.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_023_if_statement_2.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -195,7 +194,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_024_if_statement_with_block_declaration.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_024_if_statement_with_block_declaration.snap index 89d929708b..059a3ec6ee 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_024_if_statement_with_block_declaration.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_024_if_statement_with_block_declaration.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -178,7 +177,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_025_keccak.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_025_keccak.snap index 71b5041988..f5fb311be3 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_025_keccak.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_025_keccak.snap @@ -73,7 +73,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -336,7 +335,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_026_math.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_026_math.snap index 52bdc6c8b0..438126694c 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_026_math.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_026_math.snap @@ -59,7 +59,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -768,7 +767,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_027_multi_param.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_027_multi_param.snap index a81d07c8c3..ddc1aa0951 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_027_multi_param.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_027_multi_param.snap @@ -51,7 +51,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -394,7 +393,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_028_nested_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_028_nested_map.snap index e5aa323e86..42c2701dcb 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_028_nested_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_028_nested_map.snap @@ -117,7 +117,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -807,7 +806,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_029_numeric_sizes.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_029_numeric_sizes.snap index c2ac93ba6f..19b0bb2af5 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_029_numeric_sizes.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_029_numeric_sizes.snap @@ -253,7 +253,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -1809,7 +1808,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_030_ownable.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_030_ownable.snap index cef8d34c75..8759e8ab2d 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_030_ownable.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_030_ownable.snap @@ -44,7 +44,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -619,7 +618,6 @@ note: ], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_031_return_addition_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_031_return_addition_i256.snap index b2890bb5df..91d7399bf1 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_031_return_addition_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_031_return_addition_i256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_032_return_addition_u128.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_032_return_addition_u128.snap index e6ae181f8e..885d2e9dd2 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_032_return_addition_u128.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_032_return_addition_u128.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_033_return_addition_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_033_return_addition_u256.snap index 4315cc1448..c25ebdd88b 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_033_return_addition_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_033_return_addition_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_034_return_array.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_034_return_array.snap index 94b4fb49a1..30c5d8dffc 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_034_return_array.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_034_return_array.snap @@ -35,7 +35,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -208,7 +207,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_035_return_bitwiseand_u128.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_035_return_bitwiseand_u128.snap index 24ff18ac3e..41deac7db4 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_035_return_bitwiseand_u128.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_035_return_bitwiseand_u128.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_036_return_bitwiseand_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_036_return_bitwiseand_u256.snap index ee09dadd43..48e7bae522 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_036_return_bitwiseand_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_036_return_bitwiseand_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_037_return_bitwiseor_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_037_return_bitwiseor_u256.snap index e1284a7a61..c585e5507e 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_037_return_bitwiseor_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_037_return_bitwiseor_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_038_return_bitwiseshl_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_038_return_bitwiseshl_u256.snap index 9c49f3c614..42c4b73666 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_038_return_bitwiseshl_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_038_return_bitwiseshl_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_039_return_bitwiseshr_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_039_return_bitwiseshr_i256.snap index 761acccc11..ad1cecb360 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_039_return_bitwiseshr_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_039_return_bitwiseshr_i256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_040_return_bitwiseshr_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_040_return_bitwiseshr_u256.snap index 305c87ad9d..de4329bb2c 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_040_return_bitwiseshr_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_040_return_bitwiseshr_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_041_return_bitwisexor_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_041_return_bitwisexor_u256.snap index 7b93269381..a4b1a4d670 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_041_return_bitwisexor_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_041_return_bitwisexor_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_042_return_bool_false.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_042_return_bool_false.snap index c0eab52f2f..9b97fe0193 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_042_return_bool_false.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_042_return_bool_false.snap @@ -21,7 +21,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -75,7 +74,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_043_return_bool_inverted.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_043_return_bool_inverted.snap index 731a1e6c98..53ac9b9938 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_043_return_bool_inverted.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_043_return_bool_inverted.snap @@ -28,7 +28,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -110,7 +109,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_044_return_bool_op_and.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_044_return_bool_op_and.snap index 00e49c8f4f..aa6ebf67f0 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_044_return_bool_op_and.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_044_return_bool_op_and.snap @@ -34,7 +34,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -142,7 +141,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_045_return_bool_op_or.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_045_return_bool_op_or.snap index 067fc65d74..96e7a80503 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_045_return_bool_op_or.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_045_return_bool_op_or.snap @@ -34,7 +34,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -142,7 +141,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_046_return_bool_true.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_046_return_bool_true.snap index 7f48116a8c..4ba18ce8bd 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_046_return_bool_true.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_046_return_bool_true.snap @@ -21,7 +21,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -75,7 +74,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_047_return_builtin_attributes.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_047_return_builtin_attributes.snap index cfee6f5e53..a68c76db4e 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_047_return_builtin_attributes.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_047_return_builtin_attributes.snap @@ -97,7 +97,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -495,7 +494,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_048_return_division_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_048_return_division_i256.snap index 735a5f5ba6..c30bae012c 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_048_return_division_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_048_return_division_i256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_049_return_division_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_049_return_division_u256.snap index 396e7fbdbf..895187f498 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_049_return_division_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_049_return_division_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_050_return_empty_tuple.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_050_return_empty_tuple.snap index 569b71b6f4..0c6ee7c8a8 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_050_return_empty_tuple.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_050_return_empty_tuple.snap @@ -61,7 +61,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -253,7 +252,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_051_return_eq_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_051_return_eq_u256.snap index 40c7f53c71..2ac080127c 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_051_return_eq_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_051_return_eq_u256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_052_return_gt_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_052_return_gt_i256.snap index f96d7ad41f..a242f56539 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_052_return_gt_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_052_return_gt_i256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_053_return_gt_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_053_return_gt_u256.snap index 8d969976ae..2a52d1f4d1 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_053_return_gt_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_053_return_gt_u256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_054_return_gte_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_054_return_gte_i256.snap index 8d1244eb1c..47e2e47773 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_054_return_gte_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_054_return_gte_i256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_055_return_gte_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_055_return_gte_u256.snap index 0cdb117ab7..daa6ae7b3d 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_055_return_gte_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_055_return_gte_u256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_056_return_i128_cast.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_056_return_i128_cast.snap index eb192a0662..2bc1167cae 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_056_return_i128_cast.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_056_return_i128_cast.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -115,7 +114,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_057_return_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_057_return_i256.snap index dccbcb7e2c..e349cc7fea 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_057_return_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_057_return_i256.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -99,7 +98,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_058_return_identity_u8.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_058_return_identity_u8.snap index 17f34cf026..8ff16c4125 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_058_return_identity_u8.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_058_return_identity_u8.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -110,7 +109,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_059_return_identity_u16.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_059_return_identity_u16.snap index 9c9f5bc1c3..ba987ec6ff 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_059_return_identity_u16.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_059_return_identity_u16.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -110,7 +109,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_060_return_identity_u32.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_060_return_identity_u32.snap index 8543c37770..a5df60e66d 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_060_return_identity_u32.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_060_return_identity_u32.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -110,7 +109,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_061_return_identity_u64.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_061_return_identity_u64.snap index b2a4b9fb81..cbd4dae451 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_061_return_identity_u64.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_061_return_identity_u64.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -110,7 +109,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_062_return_identity_u128.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_062_return_identity_u128.snap index 0d0e8b98be..b9431f0a81 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_062_return_identity_u128.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_062_return_identity_u128.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -110,7 +109,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_063_return_identity_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_063_return_identity_u256.snap index 54dc283b4d..270b0561d0 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_063_return_identity_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_063_return_identity_u256.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -110,7 +109,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_064_return_lt_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_064_return_lt_i256.snap index 9744899d6e..becb8d6aaf 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_064_return_lt_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_064_return_lt_i256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_065_return_lt_u128.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_065_return_lt_u128.snap index f1abb4de8b..575ce3265a 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_065_return_lt_u128.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_065_return_lt_u128.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_066_return_lt_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_066_return_lt_u256.snap index 38326c6727..173bb6aad7 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_066_return_lt_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_066_return_lt_u256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_067_return_lte_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_067_return_lte_i256.snap index b996daf35e..e00218b112 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_067_return_lte_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_067_return_lte_i256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_068_return_lte_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_068_return_lte_u256.snap index 39c58b4fed..5096c378c2 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_068_return_lte_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_068_return_lte_u256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_069_return_mod_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_069_return_mod_i256.snap index 61c3ab95b8..dccfcf4654 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_069_return_mod_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_069_return_mod_i256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_070_return_mod_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_070_return_mod_u256.snap index 751e3c1262..5d20ff3b8c 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_070_return_mod_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_070_return_mod_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_071_return_msg_sig.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_071_return_msg_sig.snap index e8bf61545b..10564e5ba0 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_071_return_msg_sig.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_071_return_msg_sig.snap @@ -24,7 +24,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -138,7 +137,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_072_return_multiplication_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_072_return_multiplication_i256.snap index fa05943e95..4164eb62f9 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_072_return_multiplication_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_072_return_multiplication_i256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_073_return_multiplication_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_073_return_multiplication_u256.snap index 5903a0d3cb..f91207e957 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_073_return_multiplication_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_073_return_multiplication_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_074_return_noteq_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_074_return_noteq_u256.snap index 21a335ac50..abc5ac20d9 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_074_return_noteq_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_074_return_noteq_u256.snap @@ -38,7 +38,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -158,7 +157,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_075_return_pow_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_075_return_pow_i256.snap index d16bb764b9..1c01b6d03a 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_075_return_pow_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_075_return_pow_i256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_076_return_pow_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_076_return_pow_u256.snap index 1121d3b2d1..aab4284dea 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_076_return_pow_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_076_return_pow_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_077_return_subtraction_i256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_077_return_subtraction_i256.snap index b6536d7042..3123850f8a 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_077_return_subtraction_i256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_077_return_subtraction_i256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_078_return_subtraction_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_078_return_subtraction_u256.snap index 9cfe9d8529..f1c3ca9aa2 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_078_return_subtraction_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_078_return_subtraction_u256.snap @@ -40,7 +40,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -166,7 +165,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_079_return_u128_cast.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_079_return_u128_cast.snap index 3ab665e3bb..ad32cb1ed9 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_079_return_u128_cast.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_079_return_u128_cast.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -99,7 +98,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_080_return_u256.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_080_return_u256.snap index d75e800b49..68c70d6c3b 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_080_return_u256.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_080_return_u256.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -83,7 +82,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_081_return_u256_from_called_fn.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_081_return_u256_from_called_fn.snap index f6d51edecd..1dce150b05 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_081_return_u256_from_called_fn.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_081_return_u256_from_called_fn.snap @@ -33,7 +33,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -141,7 +140,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_082_return_u256_from_called_fn_with_args.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_082_return_u256_from_called_fn_with_args.snap index 8fb0a9964f..b893c3a38b 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_082_return_u256_from_called_fn_with_args.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_082_return_u256_from_called_fn_with_args.snap @@ -84,7 +84,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -683,7 +682,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_083_revert.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_083_revert.snap index 1a7bf1d5ec..b4fc5eb9b8 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_083_revert.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_083_revert.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -67,7 +66,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_084_self_address.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_084_self_address.snap index 9b61ff56bb..0742da2fb8 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_084_self_address.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_084_self_address.snap @@ -21,7 +21,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -75,7 +74,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_085_sized_vals_in_sto.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_085_sized_vals_in_sto.snap index f9ed85d339..bd11fc32fb 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_085_sized_vals_in_sto.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_085_sized_vals_in_sto.snap @@ -108,7 +108,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -796,7 +795,6 @@ note: indexed_fields: [], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_086_strings.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_086_strings.snap index 888d44bd22..04bb5693c4 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_086_strings.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_086_strings.snap @@ -60,7 +60,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -621,7 +620,6 @@ note: indexed_fields: [], }, ], - list_expressions: {}, string_literals: { "The quick brown fox jumps over the lazy dog", "foo", diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_087_structs.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_087_structs.snap index bc2caa88e4..76fcc9031d 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_087_structs.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_087_structs.snap @@ -89,7 +89,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -4716,7 +4715,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [ Struct { diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_088_ternary_expression.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_088_ternary_expression.snap index 3bbdb5d329..eff4b2e74b 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_088_ternary_expression.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_088_ternary_expression.snap @@ -32,7 +32,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -189,7 +188,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_089_two_contracts.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_089_two_contracts.snap index bdb750f13c..b65678c79d 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_089_two_contracts.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_089_two_contracts.snap @@ -60,7 +60,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -372,7 +371,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ @@ -442,7 +440,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [ diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_090_u8_u8_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_090_u8_u8_map.snap index e916d7ae8f..889489b579 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_090_u8_u8_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_090_u8_u8_map.snap @@ -57,7 +57,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -321,7 +320,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_091_u16_u16_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_091_u16_u16_map.snap index 083c50d266..8a8e849efb 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_091_u16_u16_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_091_u16_u16_map.snap @@ -57,7 +57,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -321,7 +320,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_092_u32_u32_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_092_u32_u32_map.snap index 45d4442b87..4f3a869679 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_092_u32_u32_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_092_u32_u32_map.snap @@ -57,7 +57,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -321,7 +320,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_093_u64_u64_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_093_u64_u64_map.snap index 14b599a061..9b9cdbdf71 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_093_u64_u64_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_093_u64_u64_map.snap @@ -57,7 +57,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -321,7 +320,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_094_u128_u128_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_094_u128_u128_map.snap index 3e6f122178..6e6d3623d3 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_094_u128_u128_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_094_u128_u128_map.snap @@ -57,7 +57,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -321,7 +320,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_095_u256_u256_map.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_095_u256_u256_map.snap index b10e265046..5b862ba97f 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_095_u256_u256_map.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_095_u256_u256_map.snap @@ -57,7 +57,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -321,7 +320,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_096_while_loop.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_096_while_loop.snap index c910f7123c..b6356a7349 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_096_while_loop.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_096_while_loop.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -308,7 +307,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_097_while_loop_with_break.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_097_while_loop_with_break.snap index 2e955f2af7..f7784c76e9 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_097_while_loop_with_break.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_097_while_loop_with_break.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -229,7 +228,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_098_while_loop_with_break_2.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_098_while_loop_with_break_2.snap index ae5dfb151a..34558b1ed8 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_098_while_loop_with_break_2.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_098_while_loop_with_break_2.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -276,7 +275,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_099_while_loop_with_continue.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_099_while_loop_with_continue.snap index bea528cc90..fefd75d116 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_099_while_loop_with_continue.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_099_while_loop_with_continue.snap @@ -23,7 +23,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -368,7 +367,6 @@ note: ], init_function: None, events: [], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_100_abi_encoding_stress.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_100_abi_encoding_stress.snap index 4a40d3b1e0..c13c3321f6 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_100_abi_encoding_stress.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_100_abi_encoding_stress.snap @@ -343,7 +343,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -2405,7 +2404,6 @@ note: indexed_fields: [], }, ], - list_expressions: {}, string_literals: {}, structs: [ Struct { diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_101_data_copying_stress.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_101_data_copying_stress.snap index d57841e12f..3cde5fbeb8 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_101_data_copying_stress.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_101_data_copying_stress.snap @@ -204,7 +204,6 @@ ModuleAttributes { }, ), }, - tuples_used: {}, } note: @@ -2726,7 +2725,6 @@ note: indexed_fields: [], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [], diff --git a/tests/src/snapshots/fe_compiler_tests__analysis__case_102_tuple_stress.snap b/tests/src/snapshots/fe_compiler_tests__analysis__case_102_tuple_stress.snap index 2b10fdc393..52aa3f6ccf 100644 --- a/tests/src/snapshots/fe_compiler_tests__analysis__case_102_tuple_stress.snap +++ b/tests/src/snapshots/fe_compiler_tests__analysis__case_102_tuple_stress.snap @@ -260,37 +260,6 @@ ModuleAttributes { }, ), }, - tuples_used: { - Tuple { - items: [ - Base( - Numeric( - U256, - ), - ), - Base( - Numeric( - I32, - ), - ), - ], - }, - Tuple { - items: [ - Base( - Numeric( - U256, - ), - ), - Base( - Bool, - ), - Base( - Address, - ), - ], - }, - }, } note: @@ -1886,7 +1855,6 @@ note: indexed_fields: [], }, ], - list_expressions: {}, string_literals: {}, structs: [], external_contracts: [],