diff --git a/forc-pkg/src/pkg.rs b/forc-pkg/src/pkg.rs index ad5d60c7354..908563baf71 100644 --- a/forc-pkg/src/pkg.rs +++ b/forc-pkg/src/pkg.rs @@ -1634,7 +1634,7 @@ pub fn compile( let mut types = vec![]; let json_abi_program = time_expr!( "generate JSON ABI program", - typed_program.kind.generate_json_abi_program(&mut types) + typed_program.generate_json_abi_program(&mut types) ); let storage_slots = typed_program.storage_slots.clone(); @@ -1914,6 +1914,7 @@ pub fn build(plan: &BuildPlan, profile: &BuildProfile) -> anyhow::Result<(Compil let mut json_abi_program = JsonABIProgram { types: vec![], functions: vec![], + logged_types: vec![], }; let mut storage_slots = vec![]; let mut bytecode = vec![]; @@ -1942,6 +1943,9 @@ pub fn build(plan: &BuildPlan, profile: &BuildProfile) -> anyhow::Result<(Compil json_abi_program .functions .extend(compiled.json_abi_program.functions); + json_abi_program + .logged_types + .extend(compiled.json_abi_program.logged_types); storage_slots.extend(compiled.storage_slots); bytecode = compiled.bytecode; tree_type = Some(compiled.tree_type); @@ -2038,6 +2042,10 @@ fn update_all_types(json_abi_program: &mut JsonABIProgram, old_to_new_id: &HashM for decl in json_abi_program.types.iter_mut() { update_json_type_declaration(decl, old_to_new_id); } + + for logged_type in json_abi_program.logged_types.iter_mut() { + update_json_type_application(&mut logged_type.logged_type, old_to_new_id); + } } /// Recursively updates the type IDs used in a `JsonTypeApplication` given a HashMap from old to diff --git a/sway-ast/src/intrinsics.rs b/sway-ast/src/intrinsics.rs index 9429df393e6..26be640d90e 100644 --- a/sway-ast/src/intrinsics.rs +++ b/sway-ast/src/intrinsics.rs @@ -13,6 +13,7 @@ pub enum Intrinsic { StateStoreWord, StateLoadQuad, StateStoreQuad, + Log, } impl fmt::Display for Intrinsic { @@ -29,6 +30,7 @@ impl fmt::Display for Intrinsic { Intrinsic::StateStoreWord => "state_store_word", Intrinsic::StateLoadQuad => "state_load_quad", Intrinsic::StateStoreQuad => "state_store_quad", + Intrinsic::Log => "log", }; write!(f, "{}", s) } @@ -49,6 +51,7 @@ impl Intrinsic { "__state_store_word" => StateStoreWord, "__state_load_quad" => StateLoadQuad, "__state_store_quad" => StateStoreQuad, + "__log" => Log, _ => return None, }) } diff --git a/sway-core/src/asm_generation/from_ir.rs b/sway-core/src/asm_generation/from_ir.rs index 1eac833257b..042cf933607 100644 --- a/sway-core/src/asm_generation/from_ir.rs +++ b/sway-core/src/asm_generation/from_ir.rs @@ -589,6 +589,11 @@ impl<'ir> AsmBuilder<'ir> { warnings, errors ), + Instruction::Log { + log_val, + log_ty, + log_id, + } => self.compile_log(instr_val, log_val, log_ty, log_id), Instruction::Nop => (), Instruction::Phi(_) => (), // Managing the phi value is done in br and cbr compilation. Instruction::ReadRegister(reg) => self.compile_read_register(instr_val, reg), @@ -1532,6 +1537,50 @@ impl<'ir> AsmBuilder<'ir> { ok((), Vec::new(), Vec::new()) } + fn compile_log(&mut self, instr_val: &Value, log_val: &Value, log_ty: &Type, log_id: &Value) { + let owning_span = self.md_mgr.val_to_span(self.context, *instr_val); + let log_val_reg = self.value_to_register(log_val); + let log_id_reg = self.value_to_register(log_id); + + if log_ty.is_copy_type() { + self.bytecode.push(Op { + owning_span, + opcode: Either::Left(VirtualOp::LOG( + log_val_reg, + log_id_reg, + VirtualRegister::Constant(ConstantRegister::Zero), + VirtualRegister::Constant(ConstantRegister::Zero), + )), + comment: "".into(), + }); + } else { + // If the type not a reference type then we use LOGD to log the data. First put the + // size into the data section, then add a LW to get it, then add a LOGD which uses + // it. + let size_reg = self.reg_seqr.next(); + let size_in_bytes = ir_type_size_in_bytes(self.context, log_ty); + let size_data_id = self + .data_section + .insert_data_value(&Literal::U64(size_in_bytes)); + + self.bytecode.push(Op { + opcode: Either::Left(VirtualOp::LWDataId(size_reg.clone(), size_data_id)), + owning_span: owning_span.clone(), + comment: "loading size for LOGD".into(), + }); + self.bytecode.push(Op { + owning_span, + opcode: Either::Left(VirtualOp::LOGD( + VirtualRegister::Constant(ConstantRegister::Zero), + log_id_reg, + log_val_reg, + size_reg, + )), + comment: "".into(), + }); + } + } + fn compile_read_register(&mut self, instr_val: &Value, reg: &sway_ir::Register) { let instr_reg = self.reg_seqr.next(); self.bytecode.push(Op { diff --git a/sway-core/src/ir_generation/function.rs b/sway-core/src/ir_generation/function.rs index c2566bec3ac..f1dc526b0c9 100644 --- a/sway-core/src/ir_generation/function.rs +++ b/sway-core/src/ir_generation/function.rs @@ -609,6 +609,31 @@ impl FnCompiler { _ => unreachable!(), } } + Intrinsic::Log => { + // The log value and the log ID are just Value. + let log_val = self.compile_expression(context, md_mgr, arguments[0].clone())?; + let log_id = convert_literal_to_value( + context, + &Literal::U64(*arguments[0].return_type as u64), + ); + + match log_val.get_stripped_ptr_type(context) { + None => Err(CompileError::Internal( + "Unable to determine type for return statement expression.", + span, + )), + Some(log_ty) => { + let span_md_idx = md_mgr.span_to_md(context, &span); + + // The `log` instruction + Ok(self + .current_block + .ins(context) + .log(log_val, log_ty, log_id) + .add_metadatum(context, span_md_idx)) + } + } + } } } diff --git a/sway-core/src/lib.rs b/sway-core/src/lib.rs index 5dbf92b087d..be73db48ffe 100644 --- a/sway-core/src/lib.rs +++ b/sway-core/src/lib.rs @@ -40,7 +40,7 @@ pub use crate::parse_tree::{ pub use error::{CompileError, CompileResult, CompileWarning}; use sway_types::{ident::Ident, span, Spanned}; -pub use type_system::TypeInfo; +pub use type_system::*; /// Given an input `Arc` and an optional [BuildConfig], parse the input into a [SwayParseTree]. /// @@ -246,7 +246,7 @@ pub fn parsed_to_ast( } = TypedProgram::type_check(parse_program, initial_namespace); warnings.extend(new_warnings); errors.extend(new_errors); - let typed_program = match typed_program_result { + let mut typed_program = match typed_program_result { Some(typed_program) => typed_program, None => { errors = dedup_unsorted(errors); @@ -255,6 +255,20 @@ pub fn parsed_to_ast( } }; + // Collect information about the types used in this program + let types_metadata = typed_program.collect_types_metadata(); + + // Collect all the types of logged values. These are required when generating the JSON ABI. + typed_program.logged_types.extend( + types_metadata + .iter() + .filter_map(|m| match m { + TypeMetadata::LoggedType(type_id) => Some(*type_id), + _ => None, + }) + .collect::>(), + ); + let mut cfa_res = perform_control_flow_analysis(&typed_program); errors.append(&mut cfa_res.errors); @@ -304,6 +318,26 @@ pub fn parsed_to_ast( } }; + // All unresolved types lead to compile errors + let unresolved_types_errors = types_metadata + .iter() + .filter_map(|m| match m { + TypeMetadata::UnresolvedType { + name, + span_override, + } => Some(CompileError::UnableToInferGeneric { + ty: name.as_str().to_string(), + span: span_override.clone().unwrap_or_else(|| name.span()), + }), + _ => None, + }) + .collect::>(); + errors.extend(unresolved_types_errors); + if !errors.is_empty() { + errors = dedup_unsorted(errors); + return CompileAstResult::Failure { errors, warnings }; + } + CompileAstResult::Success { typed_program: Box::new(typed_program_with_storage_slots), warnings, @@ -427,13 +461,6 @@ pub(crate) fn compile_ast_to_ir_to_asm( // errors and then hold as a runtime invariant that none of the types will be unresolved in the // IR phase. - check!( - program.finalize_types(), - return err(warnings, errors), - warnings, - errors - ); - let tree_type = program.kind.tree_type(); let mut ir = match ir_generation::compile_program(program) { Ok(ir) => ir, diff --git a/sway-core/src/semantic_analysis/ast_node/declaration.rs b/sway-core/src/semantic_analysis/ast_node/declaration.rs index cb8f81042b9..16b17e8a2d1 100644 --- a/sway-core/src/semantic_analysis/ast_node/declaration.rs +++ b/sway-core/src/semantic_analysis/ast_node/declaration.rs @@ -133,30 +133,30 @@ impl fmt::Display for TypedDeclaration { } } -impl UnresolvedTypeCheck for TypedDeclaration { +impl CollectTypesMetadata for TypedDeclaration { // this is only run on entry nodes, which must have all well-formed types - fn check_for_unresolved_types(&self) -> Vec { + fn collect_types_metadata(&self) -> Vec { use TypedDeclaration::*; match self { VariableDeclaration(decl) => { - let mut body = decl.body.check_for_unresolved_types(); - body.append(&mut decl.type_ascription.check_for_unresolved_types()); + let mut body = decl.body.collect_types_metadata(); + body.append(&mut decl.type_ascription.collect_types_metadata()); body } FunctionDeclaration(decl) => { - let mut body: Vec = decl + let mut body: Vec = decl .body .contents .iter() - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(); - body.append(&mut decl.return_type.check_for_unresolved_types()); + body.append(&mut decl.return_type.collect_types_metadata()); body.append( &mut decl .type_parameters .iter() .map(|x| &x.type_id) - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(), ); body.append( @@ -164,13 +164,13 @@ impl UnresolvedTypeCheck for TypedDeclaration { .parameters .iter() .map(|x| &x.type_id) - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(), ); body } ConstantDeclaration(TypedConstantDeclaration { value, .. }) => { - value.check_for_unresolved_types() + value.collect_types_metadata() } ErrorRecovery | StorageDeclaration(_) diff --git a/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs b/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs index b3d93e6b3d1..f1cb6c3555a 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs @@ -52,17 +52,24 @@ impl DeterministicallyAborts for TypedIntrinsicFunctionKind { } } -impl UnresolvedTypeCheck for TypedIntrinsicFunctionKind { - fn check_for_unresolved_types(&self) -> Vec { - self.type_arguments +impl CollectTypesMetadata for TypedIntrinsicFunctionKind { + fn collect_types_metadata(&self) -> Vec { + let mut types_metadata = self + .type_arguments .iter() - .flat_map(|targ| targ.type_id.check_for_unresolved_types()) + .flat_map(|targ| targ.type_id.collect_types_metadata()) .chain( self.arguments .iter() - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types), + .flat_map(CollectTypesMetadata::collect_types_metadata), ) - .collect() + .collect::>(); + + if matches!(self.kind, Intrinsic::Log) { + types_metadata.push(TypeMetadata::LoggedType(self.arguments[0].return_type)); + } + + types_metadata } } @@ -497,6 +504,34 @@ impl TypedIntrinsicFunctionKind { let return_type = insert_type(TypeInfo::Tuple(vec![])); (intrinsic_function, return_type) } + Intrinsic::Log => { + if arguments.len() != 1 { + errors.push(CompileError::IntrinsicIncorrectNumArgs { + name: kind.to_string(), + expected: 1, + span, + }); + return err(warnings, errors); + } + let ctx = ctx + .by_ref() + .with_help_text("") + .with_type_annotation(insert_type(TypeInfo::Unknown)); + let exp = check!( + TypedExpression::type_check(ctx, arguments[0].clone()), + return err(warnings, errors), + warnings, + errors + ); + let intrinsic_function = TypedIntrinsicFunctionKind { + kind, + arguments: vec![exp], + type_arguments: vec![], + span, + }; + let return_type = insert_type(TypeInfo::Tuple(vec![])); + (intrinsic_function, return_type) + } }; ok((intrinsic_function, return_type), warnings, errors) } diff --git a/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs b/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs index 9fbe8333fe6..f8115558cef 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/typed_expression.rs @@ -63,10 +63,10 @@ impl fmt::Display for TypedExpression { } } -impl UnresolvedTypeCheck for TypedExpression { - fn check_for_unresolved_types(&self) -> Vec { +impl CollectTypesMetadata for TypedExpression { + fn collect_types_metadata(&self) -> Vec { use TypedExpressionVariant::*; - let mut res = self.return_type.check_for_unresolved_types(); + let mut res = self.return_type.collect_types_metadata(); match &self.expression { FunctionApplication { arguments, @@ -77,7 +77,7 @@ impl UnresolvedTypeCheck for TypedExpression { &mut arguments .iter() .map(|x| &x.1) - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect::>(), ); res.append( @@ -85,7 +85,7 @@ impl UnresolvedTypeCheck for TypedExpression { .body .contents .iter() - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(), ); } @@ -93,7 +93,7 @@ impl UnresolvedTypeCheck for TypedExpression { res.append( &mut fields .iter() - .flat_map(|x| x.check_for_unresolved_types()) + .flat_map(|x| x.collect_types_metadata()) .collect(), ); } @@ -102,7 +102,7 @@ impl UnresolvedTypeCheck for TypedExpression { &mut registers .iter() .filter_map(|x| x.initializer.as_ref()) - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect::>(), ); } @@ -110,32 +110,32 @@ impl UnresolvedTypeCheck for TypedExpression { res.append( &mut fields .iter() - .flat_map(|x| x.value.check_for_unresolved_types()) + .flat_map(|x| x.value.collect_types_metadata()) .collect(), ); } LazyOperator { lhs, rhs, .. } => { - res.append(&mut lhs.check_for_unresolved_types()); - res.append(&mut rhs.check_for_unresolved_types()); + res.append(&mut lhs.collect_types_metadata()); + res.append(&mut rhs.collect_types_metadata()); } Array { contents } => { res.append( &mut contents .iter() - .flat_map(|x| x.check_for_unresolved_types()) + .flat_map(|x| x.collect_types_metadata()) .collect(), ); } ArrayIndex { prefix, index } => { - res.append(&mut prefix.check_for_unresolved_types()); - res.append(&mut index.check_for_unresolved_types()); + res.append(&mut prefix.collect_types_metadata()); + res.append(&mut index.collect_types_metadata()); } CodeBlock(block) => { res.append( &mut block .contents .iter() - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(), ); } @@ -144,10 +144,10 @@ impl UnresolvedTypeCheck for TypedExpression { then, r#else, } => { - res.append(&mut condition.check_for_unresolved_types()); - res.append(&mut then.check_for_unresolved_types()); + res.append(&mut condition.collect_types_metadata()); + res.append(&mut then.collect_types_metadata()); if let Some(r#else) = r#else { - res.append(&mut r#else.check_for_unresolved_types()); + res.append(&mut r#else.collect_types_metadata()); } } StructFieldAccess { @@ -155,16 +155,16 @@ impl UnresolvedTypeCheck for TypedExpression { resolved_type_of_parent, .. } => { - res.append(&mut prefix.check_for_unresolved_types()); - res.append(&mut resolved_type_of_parent.check_for_unresolved_types()); + res.append(&mut prefix.collect_types_metadata()); + res.append(&mut resolved_type_of_parent.collect_types_metadata()); } TupleElemAccess { prefix, resolved_type_of_parent, .. } => { - res.append(&mut prefix.check_for_unresolved_types()); - res.append(&mut resolved_type_of_parent.check_for_unresolved_types()); + res.append(&mut prefix.collect_types_metadata()); + res.append(&mut resolved_type_of_parent.collect_types_metadata()); } EnumInstantiation { enum_decl, @@ -172,43 +172,43 @@ impl UnresolvedTypeCheck for TypedExpression { .. } => { if let Some(contents) = contents { - res.append(&mut contents.check_for_unresolved_types().into_iter().collect()); + res.append(&mut contents.collect_types_metadata().into_iter().collect()); } res.append( &mut enum_decl .variants .iter() - .flat_map(|x| x.type_id.check_for_unresolved_types()) + .flat_map(|x| x.type_id.collect_types_metadata()) .collect(), ); res.append( &mut enum_decl .type_parameters .iter() - .flat_map(|x| x.type_id.check_for_unresolved_types()) + .flat_map(|x| x.type_id.collect_types_metadata()) .collect(), ); } AbiCast { address, .. } => { - res.append(&mut address.check_for_unresolved_types()); + res.append(&mut address.collect_types_metadata()); } IntrinsicFunction(kind) => { - res.append(&mut kind.check_for_unresolved_types()); + res.append(&mut kind.collect_types_metadata()); } EnumTag { exp } => { - res.append(&mut exp.check_for_unresolved_types()); + res.append(&mut exp.collect_types_metadata()); } UnsafeDowncast { exp, variant } => { - res.append(&mut exp.check_for_unresolved_types()); - res.append(&mut variant.type_id.check_for_unresolved_types()); + res.append(&mut exp.collect_types_metadata()); + res.append(&mut variant.type_id.collect_types_metadata()); } WhileLoop { condition, body } => { - res.append(&mut condition.check_for_unresolved_types()); + res.append(&mut condition.collect_types_metadata()); res.append( &mut body .contents .iter() - .flat_map(TypedAstNode::check_for_unresolved_types) + .flat_map(TypedAstNode::collect_types_metadata) .collect(), ); } @@ -223,17 +223,17 @@ impl UnresolvedTypeCheck for TypedExpression { | Continue | FunctionParameter => {} Reassignment(reassignment) => { - res.append(&mut reassignment.rhs.check_for_unresolved_types()) + res.append(&mut reassignment.rhs.collect_types_metadata()) } StorageReassignment(storage_reassignment) => res.extend( storage_reassignment .fields .iter() - .flat_map(|x| x.type_id.check_for_unresolved_types()) + .flat_map(|x| x.type_id.collect_types_metadata()) .chain( storage_reassignment .rhs - .check_for_unresolved_types() + .collect_types_metadata() .into_iter(), ), ), diff --git a/sway-core/src/semantic_analysis/ast_node/mod.rs b/sway-core/src/semantic_analysis/ast_node/mod.rs index a58156d16fe..3e24baa9d9f 100644 --- a/sway-core/src/semantic_analysis/ast_node/mod.rs +++ b/sway-core/src/semantic_analysis/ast_node/mod.rs @@ -40,14 +40,14 @@ pub enum TypedAstNodeContent { SideEffect, } -impl UnresolvedTypeCheck for TypedAstNodeContent { - fn check_for_unresolved_types(&self) -> Vec { +impl CollectTypesMetadata for TypedAstNodeContent { + fn collect_types_metadata(&self) -> Vec { use TypedAstNodeContent::*; match self { - ReturnStatement(stmt) => stmt.expr.check_for_unresolved_types(), - Declaration(decl) => decl.check_for_unresolved_types(), - Expression(expr) => expr.check_for_unresolved_types(), - ImplicitReturnExpression(expr) => expr.check_for_unresolved_types(), + ReturnStatement(stmt) => stmt.expr.collect_types_metadata(), + Declaration(decl) => decl.collect_types_metadata(), + Expression(expr) => expr.collect_types_metadata(), + ImplicitReturnExpression(expr) => expr.collect_types_metadata(), SideEffect => vec![], } } @@ -93,9 +93,9 @@ impl CopyTypes for TypedAstNode { } } -impl UnresolvedTypeCheck for TypedAstNode { - fn check_for_unresolved_types(&self) -> Vec { - self.content.check_for_unresolved_types() +impl CollectTypesMetadata for TypedAstNode { + fn collect_types_metadata(&self) -> Vec { + self.content.collect_types_metadata() } } diff --git a/sway-core/src/semantic_analysis/program.rs b/sway-core/src/semantic_analysis/program.rs index 7b8064ab886..f0f401e331d 100644 --- a/sway-core/src/semantic_analysis/program.rs +++ b/sway-core/src/semantic_analysis/program.rs @@ -15,13 +15,17 @@ use crate::{ }; use fuel_tx::StorageSlot; use sway_ir::{Context, Module}; -use sway_types::{span::Span, Ident, JsonABIProgram, JsonTypeDeclaration, Spanned}; +use sway_types::{ + span::Span, Ident, JsonABIProgram, JsonLoggedType, JsonTypeApplication, JsonTypeDeclaration, + Spanned, +}; #[derive(Debug)] pub struct TypedProgram { pub kind: TypedProgramKind, pub root: TypedModule, pub storage_slots: Vec, + pub logged_types: Vec, } impl TypedProgram { @@ -44,6 +48,7 @@ impl TypedProgram { kind, root, storage_slots: vec![], + logged_types: vec![], }) }) } @@ -214,42 +219,36 @@ impl TypedProgram { } /// Ensures there are no unresolved types or types awaiting resolution in the AST. - pub(crate) fn finalize_types(&self) -> CompileResult<()> { + pub(crate) fn collect_types_metadata(&mut self) -> Vec { // Get all of the entry points for this tree type. For libraries, that's everything // public. For contracts, ABI entries. For scripts and predicates, any function named `main`. - let errors: Vec<_> = match &self.kind { + match &self.kind { TypedProgramKind::Library { .. } => self .root .all_nodes .iter() .filter(|x| x.is_public()) - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(), TypedProgramKind::Script { .. } => self .root .all_nodes .iter() .filter(|x| x.is_main_function(TreeType::Script)) - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(), TypedProgramKind::Predicate { .. } => self .root .all_nodes .iter() .filter(|x| x.is_main_function(TreeType::Predicate)) - .flat_map(UnresolvedTypeCheck::check_for_unresolved_types) + .flat_map(CollectTypesMetadata::collect_types_metadata) .collect(), TypedProgramKind::Contract { abi_entries, .. } => abi_entries .iter() .map(TypedAstNode::from) - .flat_map(|x| x.check_for_unresolved_types()) + .flat_map(|x| x.collect_types_metadata()) .collect(), - }; - - if errors.is_empty() { - ok((), vec![], errors) - } else { - err(vec![], errors) } } @@ -290,6 +289,7 @@ impl TypedProgram { kind: self.kind.clone(), root: self.root.clone(), storage_slots, + logged_types: self.logged_types.clone(), }, warnings, errors, @@ -300,6 +300,7 @@ impl TypedProgram { kind: self.kind.clone(), root: self.root.clone(), storage_slots: vec![], + logged_types: self.logged_types.clone(), }, warnings, errors, @@ -311,12 +312,81 @@ impl TypedProgram { kind: self.kind.clone(), root: self.root.clone(), storage_slots: vec![], + logged_types: self.logged_types.clone(), }, warnings, errors, ), } } + + pub fn generate_json_abi_program( + &self, + types: &mut Vec, + ) -> JsonABIProgram { + match &self.kind { + TypedProgramKind::Contract { abi_entries, .. } => { + let functions = abi_entries + .iter() + .map(|x| x.generate_json_abi_function(types)) + .collect(); + let logged_types = self.generate_json_logged_types(types); + JsonABIProgram { + types: types.to_vec(), + functions, + logged_types, + } + } + TypedProgramKind::Script { main_function, .. } + | TypedProgramKind::Predicate { main_function, .. } => { + let functions = vec![main_function.generate_json_abi_function(types)]; + let logged_types = self.generate_json_logged_types(types); + JsonABIProgram { + types: types.to_vec(), + functions, + logged_types, + } + } + _ => JsonABIProgram { + types: vec![], + functions: vec![], + logged_types: vec![], + }, + } + } + + fn generate_json_logged_types( + &self, + types: &mut Vec, + ) -> Vec { + // A list of all `JsonTypeDeclaration`s needed for the logged types + let logged_types = self + .logged_types + .iter() + .map(|x| JsonTypeDeclaration { + type_id: **x, + type_field: x.get_json_type_str(*x), + components: x.get_json_type_components(types, *x), + type_parameters: x.get_json_type_parameters(types, *x), + }) + .collect::>(); + + // Add the new types to `types` + types.extend(logged_types); + + // Generate the JSON data for the logged types + self.logged_types + .iter() + .map(|x| JsonLoggedType { + log_id: **x, + logged_type: JsonTypeApplication { + name: "".to_string(), + type_id: **x, + type_arguments: x.get_json_type_arguments(types, *x), + }, + }) + .collect() + } } #[derive(Clone, Debug)] @@ -348,36 +418,6 @@ impl TypedProgramKind { TypedProgramKind::Script { .. } => TreeType::Script, } } - - pub fn generate_json_abi_program( - &self, - types: &mut Vec, - ) -> JsonABIProgram { - match self { - TypedProgramKind::Contract { abi_entries, .. } => { - let result = abi_entries - .iter() - .map(|x| x.generate_json_abi_function(types)) - .collect(); - JsonABIProgram { - types: types.to_vec(), - functions: result, - } - } - TypedProgramKind::Script { main_function, .. } - | TypedProgramKind::Predicate { main_function, .. } => { - let result = vec![main_function.generate_json_abi_function(types)]; - JsonABIProgram { - types: types.to_vec(), - functions: result, - } - } - _ => JsonABIProgram { - types: vec![], - functions: vec![], - }, - } - } } fn disallow_impure_functions( diff --git a/sway-core/src/type_system/unresolved_type_check.rs b/sway-core/src/type_system/collect_types_metadata.rs similarity index 61% rename from sway-core/src/type_system/unresolved_type_check.rs rename to sway-core/src/type_system/collect_types_metadata.rs index 773dae104c3..a707ad9f509 100644 --- a/sway-core/src/type_system/unresolved_type_check.rs +++ b/sway-core/src/type_system/collect_types_metadata.rs @@ -3,10 +3,20 @@ //! as the IR assumes all types are well-formed and will throw an ICE (internal compiler error) if //! that is not the case. -use crate::error::*; +use crate::type_system::TypeId; +use sway_types::{span::Span, Ident}; /// If any types contained by this node are unresolved or have yet to be inferred, throw an /// error to signal to the user that more type information is needed. -pub(crate) trait UnresolvedTypeCheck { - fn check_for_unresolved_types(&self) -> Vec; + +pub enum TypeMetadata { + UnresolvedType { + name: Ident, + span_override: Option, + }, + LoggedType(TypeId), +} + +pub(crate) trait CollectTypesMetadata { + fn collect_types_metadata(&self) -> Vec; } diff --git a/sway-core/src/type_system/mod.rs b/sway-core/src/type_system/mod.rs index db50fe12423..bd80f613081 100644 --- a/sway-core/src/type_system/mod.rs +++ b/sway-core/src/type_system/mod.rs @@ -1,3 +1,4 @@ +mod collect_types_metadata; mod copy_types; mod create_type_id; mod integer_bits; @@ -11,8 +12,8 @@ mod type_id; mod type_info; mod type_mapping; mod type_parameter; -mod unresolved_type_check; +pub(crate) use collect_types_metadata::*; pub(crate) use copy_types::*; pub(crate) use create_type_id::*; pub use integer_bits::*; @@ -26,7 +27,6 @@ pub use type_id::*; pub use type_info::*; pub(crate) use type_mapping::*; pub use type_parameter::*; -pub(crate) use unresolved_type_check::*; use crate::error::*; use std::fmt::Debug; diff --git a/sway-core/src/type_system/type_id.rs b/sway-core/src/type_system/type_id.rs index e768c682a17..49a46b4b1c6 100644 --- a/sway-core/src/type_system/type_id.rs +++ b/sway-core/src/type_system/type_id.rs @@ -1,6 +1,6 @@ use super::*; use std::fmt; -use sway_types::{JsonTypeApplication, JsonTypeDeclaration, Span, Spanned}; +use sway_types::{JsonTypeApplication, JsonTypeDeclaration, Span}; /// A identifier to uniquely refer to our type terms #[derive(PartialEq, Eq, Hash, Clone, Copy)] @@ -31,8 +31,8 @@ impl From for TypeId { } } -impl UnresolvedTypeCheck for TypeId { - fn check_for_unresolved_types(&self) -> Vec { +impl CollectTypesMetadata for TypeId { + fn collect_types_metadata(&self) -> Vec { use TypeInfo::*; let span_override = if let TypeInfo::Ref(_, span) = look_up_type_id_raw(*self) { Some(span) @@ -40,9 +40,9 @@ impl UnresolvedTypeCheck for TypeId { None }; match look_up_type_id(*self) { - UnknownGeneric { name } => vec![CompileError::UnableToInferGeneric { - ty: name.as_str().to_string(), - span: span_override.unwrap_or_else(|| name.span()), + UnknownGeneric { name } => vec![TypeMetadata::UnresolvedType { + name, + span_override, }], _ => vec![], } diff --git a/sway-core/src/type_system/type_info.rs b/sway-core/src/type_system/type_info.rs index b22ed2de054..82e2d59f8fd 100644 --- a/sway-core/src/type_system/type_info.rs +++ b/sway-core/src/type_system/type_info.rs @@ -361,7 +361,7 @@ impl TypeInfo { SelfType => "Self".into(), Byte => "byte".into(), B256 => "b256".into(), - Numeric => "numeric".into(), + Numeric => "u64".into(), // u64 is the default Contract => "contract".into(), ErrorRecovery => "unknown due to error".into(), Enum { name, .. } => { diff --git a/sway-core/tests/ir_to_asm/logging.asm b/sway-core/tests/ir_to_asm/logging.asm new file mode 100644 index 00000000000..8e281a15438 --- /dev/null +++ b/sway-core/tests/ir_to_asm/logging.asm @@ -0,0 +1,30 @@ +.program: +ji i4 +noop +DATA_SECTION_OFFSET[0..32] +DATA_SECTION_OFFSET[32..64] +lw $ds $is 1 +add $$ds $$ds $is +move $r2 $sp ; save locals base register +cfei i8 ; allocate 8 bytes for all locals +addi $r0 $r2 i0 ; get offset reg for get_ptr +move $r1 $sp ; save register for temporary stack value +cfei i8 ; allocate 8 bytes for temporary struct +lw $r0 data_0 ; literal instantiation for aggregate field +sw $r1 $r0 i0 ; initialise aggregate field +addi $r0 $r2 i0 ; get store offset +mcpi $r0 $r1 i8 ; store value +lw $r1 data_1 ; literal instantiation +lw $r0 data_2 ; literal instantiation +log $r1 $r0 $zero $zero +addi $r2 $r2 i0 ; get offset reg for get_ptr +lw $r1 data_3 ; literal instantiation +lw $r0 data_4 ; loading size for LOGD +logd $zero $r1 $r2 $r0 +ret $zero ; returning unit as zero +.data: +data_0 .u64 0x01 +data_1 .u64 0x2a +data_2 .u64 0xf891e +data_3 .u64 0xf8923 +data_4 .u64 0x08 diff --git a/sway-core/tests/ir_to_asm/logging.ir b/sway-core/tests/ir_to_asm/logging.ir new file mode 100644 index 00000000000..7bbaec42f0d --- /dev/null +++ b/sway-core/tests/ir_to_asm/logging.ir @@ -0,0 +1,18 @@ +script { + fn main() -> () { + local ptr { u64 } test_enum + + entry: + v0 = get_ptr ptr { u64 } test_enum, ptr { u64 }, 0 + v1 = const { u64 } { u64 1 } + store v1, ptr v0 + v2 = const u64 42 + v3 = const u64 1018142 + log u64 v2, v3 + v4 = get_ptr ptr { u64 } test_enum, ptr { u64 }, 0 + v5 = const u64 1018147 + log { u64 } v4, v5 + v6 = const unit () + ret () v6 + } +} diff --git a/sway-ir/src/error.rs b/sway-ir/src/error.rs index 09d5a207a09..512f3b34194 100644 --- a/sway-ir/src/error.rs +++ b/sway-ir/src/error.rs @@ -55,6 +55,8 @@ pub enum IrError { VerifyStoreToNonPointer, VerifyUntypedValuePassedToFunction, VerifyInvalidGtfIndexType, + VerifyLogId, + VerifyMismatchedLoggedTypes, } impl std::error::Error for IrError {} @@ -292,6 +294,15 @@ impl fmt::Display for IrError { f, "Verification failed: An non-integer value has been passed to a 'gtf' instruction." ), + IrError::VerifyLogId => { + write!(f, "Verification failed: log ID must be an integer.") + } + IrError::VerifyMismatchedLoggedTypes => { + write!( + f, + "Verification failed: log type must match the type of the value being logged." + ) + } } } } diff --git a/sway-ir/src/instruction.rs b/sway-ir/src/instruction.rs index 48a1dd0deec..6fe3e3ec0e9 100644 --- a/sway-ir/src/instruction.rs +++ b/sway-ir/src/instruction.rs @@ -91,6 +91,12 @@ pub enum Instruction { IntToPtr(Value, Type), /// Read a value from a memory pointer. Load(Value), + /// Logs a value along with an identifier. + Log { + log_val: Value, + log_ty: Type, + log_id: Value, + }, /// No-op, handy as a placeholder instruction. Nop, /// Choose a value from a list depending on the preceding block. @@ -191,6 +197,7 @@ impl Instruction { ins.get_type(context).map(|f| f.strip_ptr_type(context)) } }, + Instruction::Log { .. } => Some(Type::Unit), Instruction::ReadRegister(_) => Some(Type::Uint(64)), Instruction::StateLoadWord(_) => Some(Type::Uint(64)), Instruction::Phi(alts) => { @@ -317,6 +324,12 @@ impl Instruction { Instruction::Gtf { index, .. } => replace(index), Instruction::IntToPtr(value, _) => replace(value), Instruction::Load(_) => (), + Instruction::Log { + log_val, log_id, .. + } => { + replace(log_val); + replace(log_id); + } Instruction::Nop => (), Instruction::Phi(pairs) => pairs.iter_mut().for_each(|(_, val)| replace(val)), Instruction::ReadRegister { .. } => (), @@ -348,6 +361,7 @@ impl Instruction { Instruction::AsmBlock(_, _) | Instruction::Call(_, _) | Instruction::ContractCall { .. } + | Instruction::Log { .. } | Instruction::StateLoadQuadWord { .. } | Instruction::StateStoreQuadWord { .. } | Instruction::StateStoreWord { .. } @@ -654,6 +668,21 @@ impl<'a> InstructionInserter<'a> { load_val } + pub fn log(self, log_val: Value, log_ty: Type, log_id: Value) -> Value { + let log_instr_val = Value::new_instruction( + self.context, + Instruction::Log { + log_val, + log_ty, + log_id, + }, + ); + self.context.blocks[self.block.0] + .instructions + .push(log_instr_val); + log_instr_val + } + pub fn nop(self) -> Value { let nop_val = Value::new_instruction(self.context, Instruction::Nop); self.context.blocks[self.block.0].instructions.push(nop_val); diff --git a/sway-ir/src/optimize/dce.rs b/sway-ir/src/optimize/dce.rs index d0a3c04d219..31cdcab2ffa 100644 --- a/sway-ir/src/optimize/dce.rs +++ b/sway-ir/src/optimize/dce.rs @@ -81,6 +81,9 @@ pub fn dce(context: &mut Context, function: &Function) -> Result } => vec![*aggregate, *value], Instruction::IntToPtr(v, _) => vec![*v], Instruction::Load(v) => vec![*v], + Instruction::Log { + log_val, log_id, .. + } => vec![*log_val, *log_id], Instruction::Nop => vec![], Instruction::Phi(ins) => ins.iter().map(|v| v.1).collect(), Instruction::ReadRegister(_) => vec![], diff --git a/sway-ir/src/optimize/inline.rs b/sway-ir/src/optimize/inline.rs index e69ab8a9adb..dc0adf1f9ee 100644 --- a/sway-ir/src/optimize/inline.rs +++ b/sway-ir/src/optimize/inline.rs @@ -400,6 +400,13 @@ fn inline_instruction( new_block.ins(context).int_to_ptr(map_value(value), ty) } Instruction::Load(src_val) => new_block.ins(context).load(map_value(src_val)), + Instruction::Log { + log_val, + log_ty, + log_id, + } => new_block + .ins(context) + .log(map_value(log_val), log_ty, map_value(log_id)), Instruction::Nop => new_block.ins(context).nop(), Instruction::ReadRegister(reg) => new_block.ins(context).read_register(reg), // We convert `ret` to `br post_block` and add the returned value as a phi value. diff --git a/sway-ir/src/parser.rs b/sway-ir/src/parser.rs index 14c71c1ecdb..e5882bf0971 100644 --- a/sway-ir/src/parser.rs +++ b/sway-ir/src/parser.rs @@ -140,6 +140,7 @@ mod ir_builder { / op_insert_value() / op_int_to_ptr() / op_load() + / op_log() / op_nop() / op_phi() / op_read_register() @@ -251,6 +252,11 @@ mod ir_builder { IrAstOperation::Load(src) } + rule op_log() -> IrAstOperation + = "log" _ log_ty:ast_ty() log_val:id() comma() log_id:id() { + IrAstOperation::Log(log_ty, log_val, log_id) + } + rule op_nop() -> IrAstOperation = "nop" _ { IrAstOperation::Nop @@ -612,6 +618,7 @@ mod ir_builder { InsertValue(String, IrAstTy, String, Vec), IntToPtr(String, IrAstTy), Load(String), + Log(IrAstTy, String, String), Nop, Phi(Vec<(String, String)>), ReadRegister(String), @@ -1074,6 +1081,17 @@ mod ir_builder { .ins(context) .load(*val_map.get(&src_name).unwrap()) .add_metadatum(context, opt_metadata), + IrAstOperation::Log(log_ty, log_val, log_id) => { + let log_ty = log_ty.to_ir_type(context); + block + .ins(context) + .log( + *val_map.get(&log_val).unwrap(), + log_ty, + *val_map.get(&log_id).unwrap(), + ) + .add_metadatum(context, opt_metadata) + } IrAstOperation::Nop => block.ins(context).nop(), IrAstOperation::Phi(pairs) => { for (block_name, val_name) in pairs { diff --git a/sway-ir/src/printer.rs b/sway-ir/src/printer.rs index aad6ebe598d..f59bbbb4019 100644 --- a/sway-ir/src/printer.rs +++ b/sway-ir/src/printer.rs @@ -549,6 +549,21 @@ fn instruction_to_doc<'a>( )) .append(md_namer.md_idx_to_doc(context, metadata)), ), + Instruction::Log { + log_val, + log_ty, + log_id, + } => maybe_constant_to_doc(context, md_namer, namer, log_val) + .append(maybe_constant_to_doc(context, md_namer, namer, log_id)) + .append(Doc::line( + Doc::text(format!( + "log {} {}, {}", + log_ty.as_string(context), + namer.name(context, log_val), + namer.name(context, log_id), + )) + .append(md_namer.md_idx_to_doc(context, metadata)), + )), Instruction::Nop => Doc::line( Doc::text(format!("{} = nop", namer.name(context, ins_value))) .append(md_namer.md_idx_to_doc(context, metadata)), diff --git a/sway-ir/src/verify.rs b/sway-ir/src/verify.rs index c14235fa527..fbed3cf785c 100644 --- a/sway-ir/src/verify.rs +++ b/sway-ir/src/verify.rs @@ -182,6 +182,11 @@ impl<'a> InstructionVerifier<'a> { } => self.verify_insert_value(aggregate, ty, value, indices)?, Instruction::IntToPtr(value, ty) => self.verify_int_to_ptr(value, ty)?, Instruction::Load(ptr) => self.verify_load(ptr)?, + Instruction::Log { + log_val, + log_ty, + log_id, + } => self.verify_log(log_val, log_ty, log_id)?, Instruction::Nop => (), Instruction::Phi(pairs) => self.verify_phi(&pairs[..])?, Instruction::ReadRegister(_) => (), @@ -566,6 +571,17 @@ impl<'a> InstructionVerifier<'a> { Ok(()) } } + fn verify_log(&self, log_val: &Value, log_ty: &Type, log_id: &Value) -> Result<(), IrError> { + if !matches!(log_id.get_type(self.context), Some(Type::Uint(64))) { + return Err(IrError::VerifyLogId); + } + + if self.opt_ty_not_eq(&log_val.get_stripped_ptr_type(self.context), &Some(*log_ty)) { + return Err(IrError::VerifyMismatchedLoggedTypes); + } + + Ok(()) + } fn verify_phi(&self, pairs: &[(Block, Value)]) -> Result<(), IrError> { if pairs.is_empty() { diff --git a/sway-lib-std/src/logging.sw b/sway-lib-std/src/logging.sw index 21e6b7529ff..6ec6477bee9 100644 --- a/sway-lib-std/src/logging.sw +++ b/sway-lib-std/src/logging.sw @@ -6,14 +6,5 @@ use ::intrinsics::{is_reference_type, size_of}; /// If the type is a reference type, `log` is used. /// Otherwise `logd` is used.' pub fn log(value: T) { - if !is_reference_type::() { - asm(r1: value) { - log r1 zero zero zero; - } - } else { - let size = size_of::(); - asm(r1: value, r2: size) { - logd zero zero r1 r2; - }; - } + __log::(value); } diff --git a/sway-types/src/lib.rs b/sway-types/src/lib.rs index 6ba0754079f..cfaeaf1277f 100644 --- a/sway-types/src/lib.rs +++ b/sway-types/src/lib.rs @@ -386,6 +386,7 @@ pub struct Property { pub struct JsonABIProgram { pub types: Vec, pub functions: Vec, + pub logged_types: Vec, } #[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] @@ -396,6 +397,13 @@ pub struct JsonABIFunction { pub output: JsonTypeApplication, } +#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct JsonLoggedType { + pub log_id: usize, + pub logged_type: JsonTypeApplication, +} + #[derive(Default, Debug, Clone, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct JsonTypeDeclaration { diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/addrof_intrinsic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/addrof_intrinsic/json_abi_oracle.json index 459d36fd7bb..542c5d96b7c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/addrof_intrinsic/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/addrof_intrinsic/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/json_abi_oracle.json index 459d36fd7bb..542c5d96b7c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/break_and_continue/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/break_and_continue/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/break_and_continue/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/break_and_continue/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/config_time_constants/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/config_time_constants/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/config_time_constants/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/config_time_constants/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_ret/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_ret/json_abi_oracle.json index f4c93715535..d034761a756 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_ret/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_ret/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/json_abi_oracle.json index 8492a99f158..52a422b0ec4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_intrinsic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_intrinsic/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_intrinsic/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_intrinsic/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_type_inference/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_type_inference/json_abi_oracle.json index 459d36fd7bb..542c5d96b7c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_type_inference/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_type_inference/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/gtf_intrinsic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/gtf_intrinsic/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/gtf_intrinsic/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/gtf_intrinsic/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/json_abi_oracle.json index 459d36fd7bb..542c5d96b7c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/json_abi_oracle.json index 459d36fd7bb..542c5d96b7c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/Forc.lock new file mode 100644 index 00000000000..1ece8dee7af --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/Forc.lock @@ -0,0 +1,14 @@ +[[package]] +name = 'core' +source = 'path+from-root-B183794502AF314F' +dependencies = [] + +[[package]] +name = 'logging' +source = 'root' +dependencies = ['std'] + +[[package]] +name = 'std' +source = 'path+from-root-B183794502AF314F' +dependencies = ['core'] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/Forc.toml new file mode 100644 index 00000000000..f175eea4046 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/Forc.toml @@ -0,0 +1,9 @@ +[project] +authors = ["Fuel Labs "] +entry = "main.sw" +implicit-std = false +license = "Apache-2.0" +name = "logging" + +[dependencies] +std = { path = "../../../../../../../sway-lib-std" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/json_abi_oracle.json new file mode 100644 index 00000000000..67e1b7f917e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/json_abi_oracle.json @@ -0,0 +1,188 @@ +{ + "functions": [ + { + "inputs": [], + "name": "main", + "output": { + "name": "", + "type": 3, + "typeArguments": null + } + } + ], + "loggedTypes": [ + { + "logId": 1018194, + "loggedType": { + "name": "", + "type": 2, + "typeArguments": null + } + }, + { + "logId": 1018205, + "loggedType": { + "name": "", + "type": 9, + "typeArguments": null + } + }, + { + "logId": 1018218, + "loggedType": { + "name": "", + "type": 8, + "typeArguments": null + } + }, + { + "logId": 1018230, + "loggedType": { + "name": "", + "type": 7, + "typeArguments": null + } + }, + { + "logId": 1018242, + "loggedType": { + "name": "", + "type": 10, + "typeArguments": null + } + }, + { + "logId": 1018248, + "loggedType": { + "name": "", + "type": 5, + "typeArguments": null + } + }, + { + "logId": 1018254, + "loggedType": { + "name": "", + "type": 1, + "typeArguments": null + } + }, + { + "logId": 1018259, + "loggedType": { + "name": "", + "type": 6, + "typeArguments": null + } + }, + { + "logId": 1018264, + "loggedType": { + "name": "", + "type": 4, + "typeArguments": null + } + } + ], + "types": [ + { + "components": [], + "type": "()", + "typeId": 0, + "typeParameters": null + }, + { + "components": [ + { + "name": "__array_element", + "type": 10, + "typeArguments": null + } + ], + "type": "[_; 3]", + "typeId": 1, + "typeParameters": null + }, + { + "components": null, + "type": "b256", + "typeId": 2, + "typeParameters": null + }, + { + "components": null, + "type": "bool", + "typeId": 3, + "typeParameters": null + }, + { + "components": [ + { + "name": "VariantOne", + "type": 0, + "typeArguments": null + }, + { + "name": "VariantTwo", + "type": 0, + "typeArguments": null + } + ], + "type": "enum TestEnum", + "typeId": 4, + "typeParameters": null + }, + { + "components": null, + "type": "str[4]", + "typeId": 5, + "typeParameters": null + }, + { + "components": [ + { + "name": "field_1", + "type": 3, + "typeArguments": null + }, + { + "name": "field_2", + "type": 2, + "typeArguments": null + }, + { + "name": "field_3", + "type": 9, + "typeArguments": null + } + ], + "type": "struct TestStruct", + "typeId": 6, + "typeParameters": null + }, + { + "components": null, + "type": "u16", + "typeId": 7, + "typeParameters": null + }, + { + "components": null, + "type": "u32", + "typeId": 8, + "typeParameters": null + }, + { + "components": null, + "type": "u64", + "typeId": 9, + "typeParameters": null + }, + { + "components": null, + "type": "u8", + "typeId": 10, + "typeParameters": null + } + ] +} \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/src/main.sw new file mode 100644 index 00000000000..61a2e583c5a --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/src/main.sw @@ -0,0 +1,40 @@ +script; + +fn log(value: T) { + __log::(value); +} + +struct TestStruct { + field_1: bool, + field_2: b256, + field_3: u64, +} + +enum TestEnum { + VariantOne: (), + VariantTwo: (), +} + +fn main() -> bool { + let k: b256 = 0xef86afa9696cf0dc6385e2c407a6e159a1103cefb7e2ae0636fb33d3cb2a9e4a; + let a: str[4] = "Fuel"; + let b: [u8; 3] = [1u8, 2u8, 3u8]; + let test_struct = TestStruct { + field_1: true, + field_2: k, + field_3: 11, + }; + + let test_enum = TestEnum::VariantTwo; + log(k); + log(42); + log(42u32); + log(42u16); + log(42u8); + __log(a); + __log(b); + __log(test_struct); + __log(test_enum); + + true +} diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/logging/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy/json_abi_oracle.json index a3ff1b2144f..83efb2a10d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy/json_abi_oracle.json @@ -16,6 +16,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy_copy/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy_copy/json_abi_oracle.json index b80d21fb652..24e823b1a77 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy_copy/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_copy_copy/json_abi_oracle.json @@ -21,6 +21,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_empty/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_empty/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_empty/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_empty/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_predicate/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_predicate/json_abi_oracle.json index d33e43914fa..43c94abef3b 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_predicate/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_predicate/json_abi_oracle.json @@ -21,6 +21,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref/json_abi_oracle.json index 8f15d049717..8bfe65e4967 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref/json_abi_oracle.json @@ -16,6 +16,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_copy/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_copy/json_abi_oracle.json index 5985488f86f..023e1716de6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_copy/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_copy/json_abi_oracle.json @@ -21,6 +21,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_ref/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_ref/json_abi_oracle.json index e34422c8e1f..1ff7264a230 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_ref/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_ref_ref/json_abi_oracle.json @@ -21,6 +21,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_various_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_various_types/json_abi_oracle.json index cd380f1d171..4d2ae72d3eb 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_various_types/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_args/main_args_various_types/json_abi_oracle.json @@ -16,6 +16,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/json_abi_oracle.json index 459d36fd7bb..542c5d96b7c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_rest/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_rest/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_rest/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_rest/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_struct_destructuring/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_struct_destructuring/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_struct_destructuring/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_struct_destructuring/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/raw_identifiers/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/raw_identifiers/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/raw_identifiers/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/raw_identifiers/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/redundant_return/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/redundant_return/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/redundant_return/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/redundant_return/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_bool/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_bool/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_bool/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_bool/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_call/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_call/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_call/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_call/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/json_abi_oracle.json index 97efeb4970b..6f43a8dc55a 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/json_abi_oracle.json index 92f44871343..517ae37be51 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/json_abi_oracle.json index 2239a31e5b2..71c715d3ea7 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/json_abi_oracle.json index 7ccf6cc87cd..09b4dd4482f 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/json_abi_oracle.json index fd8ec9351f5..8f7b9af53d8 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/json_abi_oracle.json index 1b3d68f90f5..944b97faa16 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_destructuring/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_destructuring/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_destructuring/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_destructuring/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/json_abi_oracle.json index 459d36fd7bb..542c5d96b7c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/json_abi_oracle.json index 9265d8304a0..849712a2677 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/json_abi_oracle.json index 35f14659022..0dabf93a292 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/json_abi_oracle.json index 4992f7691d9..4e179a10ebe 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/json_abi_oracle.json index bbfabb6ed08..8c3df8121d6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/json_abi_oracle.json index 3827c2e115c..5c7987cdbc9 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/json_abi_oracle.json @@ -5,7 +5,57 @@ "name": "main", "output": { "name": "", - "type": 0, + "type": 1, + "typeArguments": null + } + } + ], + "loggedTypes": [ + { + "logId": 1018189, + "loggedType": { + "name": "", + "type": 3, + "typeArguments": null + } + }, + { + "logId": 1018818, + "loggedType": { + "name": "", + "type": 3, + "typeArguments": null + } + }, + { + "logId": 1018926, + "loggedType": { + "name": "", + "type": 3, + "typeArguments": null + } + }, + { + "logId": 1019034, + "loggedType": { + "name": "", + "type": 3, + "typeArguments": null + } + }, + { + "logId": 1019376, + "loggedType": { + "name": "", + "type": 3, + "typeArguments": null + } + }, + { + "logId": 1019712, + "loggedType": { + "name": "", + "type": 2, "typeArguments": null } } @@ -13,9 +63,43 @@ "types": [ { "components": null, - "type": "bool", + "type": "b256", "typeId": 0, "typeParameters": null + }, + { + "components": null, + "type": "bool", + "typeId": 1, + "typeParameters": null + }, + { + "components": [ + { + "name": "val_1", + "type": 1, + "typeArguments": null + }, + { + "name": "val_2", + "type": 0, + "typeArguments": null + }, + { + "name": "val_3", + "type": 3, + "typeArguments": null + } + ], + "type": "struct CustomError", + "typeId": 2, + "typeParameters": null + }, + { + "components": null, + "type": "u64", + "typeId": 3, + "typeParameters": null } ] } \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u256_test/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u256_test/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u256_test/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u256_test/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/json_abi_oracle.json index 3827c2e115c..563d0f990c4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_generic_types/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_generic_types/json_abi_oracle.json index 4f70c16498b..67011e14b75 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_generic_types/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_generic_types/json_abi_oracle.json @@ -68,6 +68,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/json_abi_oracle.json index 728f9771886..6d9a97a076b 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/json_abi_oracle.json @@ -31,6 +31,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/json_abi_oracle.json index 09e91c734bb..2564357d204 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/json_abi_oracle.json @@ -46,6 +46,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/json_abi_oracle.json index b56957a15c9..73fb8384bbc 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/json_abi_oracle.json index 8aa8845f8ac..0fb41738248 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/json_abi_oracle.json @@ -10,6 +10,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/json_abi_oracle.json index 6490faf36f1..ce3153d540d 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/json_abi_oracle.json @@ -115,6 +115,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/json_abi_oracle.json index 37a79247045..1b30f5a0c69 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/json_abi_oracle.json @@ -81,6 +81,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/json_abi_oracle.json index a51517c06db..028f816d8b5 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/json_abi_oracle.json @@ -46,6 +46,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/json_abi_oracle.json index d3381bf0f24..5cb16912aff 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/json_abi_oracle.json @@ -25,6 +25,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": null, diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/json_abi_oracle.json index 0b55499da19..fd83d27a644 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/json_abi_oracle.json @@ -21,6 +21,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/json_abi_oracle.json index a0fd5b0bf25..cdac4df6d0e 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/json_abi_oracle.json @@ -10,12 +10,36 @@ } } ], + "loggedTypes": [ + { + "logId": 1018134, + "loggedType": { + "name": "", + "type": 1, + "typeArguments": null + } + }, + { + "logId": 1018153, + "loggedType": { + "name": "", + "type": 1, + "typeArguments": null + } + } + ], "types": [ { "components": [], "type": "()", "typeId": 0, "typeParameters": null + }, + { + "components": null, + "type": "u64", + "typeId": 1, + "typeParameters": null } ] } \ No newline at end of file diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/json_abi_oracle.json index c3815cadcb6..5711b916a4f 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/json_abi_oracle.json @@ -21,6 +21,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [ diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/json_abi_oracle.json index ef5b714a888..080f3fa6e76 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/json_abi_oracle.json @@ -580,6 +580,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/json_abi_oracle.json b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/json_abi_oracle.json index 607789e7e79..49f5595c16d 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/json_abi_oracle.json +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/json_abi_oracle.json @@ -56,6 +56,7 @@ } } ], + "loggedTypes": [], "types": [ { "components": [], diff --git a/test/src/ir_generation/tests/logging.sw b/test/src/ir_generation/tests/logging.sw new file mode 100644 index 00000000000..d67d47b8e8f --- /dev/null +++ b/test/src/ir_generation/tests/logging.sw @@ -0,0 +1,50 @@ +script; + +struct TestStruct { + field_1: bool, + field_2: b256, + field_3: u64, +} + +enum TestEnum { + VariantOne: (), + VariantTwo: (), +} + +fn main() { + let k: b256 = 0xef86afa9696cf0dc6385e2c407a6e159a1103cefb7e2ae0636fb33d3cb2a9e4a; + let a: str[4] = "Fuel"; + let b: [u8; 3] = [1u8, 2u8, 3u8]; + let test_struct = TestStruct { + field_1: true, + field_2: k, + field_3: 11, + }; + + let test_enum = TestEnum::VariantTwo; + __log(k); + __log(42); + __log(42u32); + __log(42u16); + __log(42u8); + __log(a); + __log(b); + __log(test_struct); + __log(test_enum); +} + +// ::check-ir:: + +// check: script { +// check: fn main() -> () +// check: entry: + +// check: log b256 $VAL, $VAL +// check: log u64 $VAL, $VAL +// check: log u64 $VAL, $VAL +// check: log u64 $VAL, $VAL +// check: log u64 $VAL, $VAL +// check: log string<4> $VAL, $VAL +// check: log [u64; 3] $VAL, $VAL +// check: log { bool, b256, u64 } $VAL, $VAL +// check: log { u64 } $VAL, $VAL