diff --git a/codegen/masm/src/artifact.rs b/codegen/masm/src/artifact.rs index 0d97ce40d..38a2d3741 100644 --- a/codegen/masm/src/artifact.rs +++ b/codegen/masm/src/artifact.rs @@ -14,7 +14,7 @@ use midenc_session::{ Session, }; -use crate::{lower::NativePtr, masm}; +use crate::{lower::NativePtr, masm, TraceEvent}; pub struct MasmComponent { pub id: builtin::ComponentId, @@ -339,7 +339,13 @@ impl MasmComponent { } // Invoke the program entrypoint + block.push(Op::Inst(Span::new( + span, + Inst::Trace(TraceEvent::FrameStart.as_u32().into()), + ))); block.push(Op::Inst(Span::new(span, Inst::Exec(entrypoint.clone())))); + block + .push(Op::Inst(Span::new(span, Inst::Trace(TraceEvent::FrameEnd.as_u32().into())))); // Truncate the stack to 16 elements on exit let truncate_stack = InvocationTarget::AbsoluteProcedurePath { @@ -376,6 +382,7 @@ impl MasmComponent { // => [num_words, dest_ptr] on operand stack block.push(Op::Inst(Span::new(span, Inst::AdvPush(2.into())))); // => [C, B, A, dest_ptr] on operand stack + block.push(Op::Inst(Span::new(span, Inst::Trace(TraceEvent::FrameStart.as_u32().into())))); block.push(Op::Inst(Span::new( span, Inst::Exec(InvocationTarget::AbsoluteProcedurePath { @@ -383,6 +390,7 @@ impl MasmComponent { path: std_mem, }), ))); + block.push(Op::Inst(Span::new(span, Inst::Trace(TraceEvent::FrameEnd.as_u32().into())))); // Drop C, B, A block.push(Op::Inst(Span::new(span, Inst::DropW))); block.push(Op::Inst(Span::new(span, Inst::DropW))); diff --git a/codegen/masm/src/emit/mod.rs b/codegen/masm/src/emit/mod.rs index 1f0b3f59a..5b5638bb1 100644 --- a/codegen/masm/src/emit/mod.rs +++ b/codegen/masm/src/emit/mod.rs @@ -94,7 +94,10 @@ use miden_assembly::ast::InvokeKind; use midenc_hir::{Immediate, Operation, SourceSpan, Type, ValueRef}; use super::{Operand, OperandStack}; -use crate::masm::{self as masm, Op}; +use crate::{ + masm::{self as masm, Op}, + TraceEvent, +}; /// This structure is used to emit the Miden Assembly ops corresponding to an IR instruction. /// @@ -202,8 +205,11 @@ impl<'a> OpEmitter<'a> { ))); let path = masm::LibraryPath::new(callee.module.as_str()).unwrap(); let target = masm::InvocationTarget::AbsoluteProcedurePath { name, path }; - let inst = masm::Instruction::Exec(target); - self.emit(inst, span); + self.emit(masm::Instruction::Trace(TraceEvent::FrameStart.as_u32().into()), span); + self.emit(masm::Instruction::Nop, span); + self.emit(masm::Instruction::Exec(target), span); + self.emit(masm::Instruction::Trace(TraceEvent::FrameEnd.as_u32().into()), span); + self.emit(masm::Instruction::Nop, span); } /// Emit `op` to the current block diff --git a/codegen/masm/src/emit/primop.rs b/codegen/masm/src/emit/primop.rs index 13beefe27..eca153302 100644 --- a/codegen/masm/src/emit/primop.rs +++ b/codegen/masm/src/emit/primop.rs @@ -4,6 +4,7 @@ use midenc_hir::{ }; use super::{int64, masm, OpEmitter}; +use crate::TraceEvent; impl OpEmitter<'_> { /// Assert that an integer value on the stack has the value 1 @@ -254,7 +255,11 @@ impl OpEmitter<'_> { ) { self.process_call_signature(&callee, signature, span); + self.emit(masm::Instruction::Trace(TraceEvent::FrameStart.as_u32().into()), span); + self.emit(masm::Instruction::Nop, span); self.emit(masm::Instruction::Exec(callee), span); + self.emit(masm::Instruction::Trace(TraceEvent::FrameEnd.as_u32().into()), span); + self.emit(masm::Instruction::Nop, span); } /// Execute the given procedure in a new context. @@ -268,7 +273,11 @@ impl OpEmitter<'_> { ) { self.process_call_signature(&callee, signature, span); + self.emit(masm::Instruction::Trace(TraceEvent::FrameStart.as_u32().into()), span); + self.emit(masm::Instruction::Nop, span); self.emit(masm::Instruction::Call(callee), span); + self.emit(masm::Instruction::Trace(TraceEvent::FrameEnd.as_u32().into()), span); + self.emit(masm::Instruction::Nop, span); } fn process_call_signature( diff --git a/codegen/masm/src/events.rs b/codegen/masm/src/events.rs index d9538ce0d..74cb59763 100644 --- a/codegen/masm/src/events.rs +++ b/codegen/masm/src/events.rs @@ -30,6 +30,16 @@ impl TraceEvent { pub fn is_frame_end(&self) -> bool { matches!(self, Self::FrameEnd) } + + pub fn as_u32(self) -> u32 { + match self { + Self::FrameStart => TRACE_FRAME_START, + Self::FrameEnd => TRACE_FRAME_END, + Self::AssertionFailed(None) => 0, + Self::AssertionFailed(Some(code)) => code.get(), + Self::Unknown(event) => event, + } + } } impl From for TraceEvent { fn from(raw: u32) -> Self { diff --git a/codegen/masm/src/lib.rs b/codegen/masm/src/lib.rs index 2fdaa4e4d..d15414fbd 100644 --- a/codegen/masm/src/lib.rs +++ b/codegen/masm/src/lib.rs @@ -130,5 +130,6 @@ pub fn register_dialect_hooks(context: &midenc_hir::Context) { info.register_operation_trait::(); info.register_operation_trait::(); info.register_operation_trait::(); + info.register_operation_trait::(); }); } diff --git a/codegen/masm/src/lower/component.rs b/codegen/masm/src/lower/component.rs index 6f52d7d13..ae3a8985a 100644 --- a/codegen/masm/src/lower/component.rs +++ b/codegen/masm/src/lower/component.rs @@ -12,7 +12,7 @@ use crate::{ artifact::MasmComponent, emitter::BlockEmitter, linker::{LinkInfo, Linker}, - masm, + masm, TraceEvent, }; /// This trait represents a conversion pass from some HIR entity to a Miden Assembly component. @@ -161,6 +161,10 @@ impl MasmComponentBuilder<'_> { self.init_body.push(masm::Op::Inst(Span::new(span, Inst::PushU32(heap_base)))); let heap_init = masm::ProcedureName::new("heap_init").unwrap(); let memory_intrinsics = masm::LibraryPath::new("intrinsics::mem").unwrap(); + self.init_body.push(Op::Inst(Span::new( + span, + Inst::Trace(TraceEvent::FrameStart.as_u32().into()), + ))); self.init_body.push(Op::Inst(Span::new( span, Inst::Exec(InvocationTarget::AbsoluteProcedurePath { @@ -168,6 +172,8 @@ impl MasmComponentBuilder<'_> { path: memory_intrinsics, }), ))); + self.init_body + .push(Op::Inst(Span::new(span, Inst::Trace(TraceEvent::FrameEnd.as_u32().into())))); // Data segment initialization self.emit_data_segment_initialization(); @@ -307,6 +313,10 @@ impl MasmComponentBuilder<'_> { self.init_body .push(Op::Inst(Span::new(span, Inst::PushU32(rodata.size_in_words() as u32)))); // [num_words, write_ptr, COM, ..] -> [write_ptr'] + self.init_body.push(Op::Inst(Span::new( + span, + Inst::Trace(TraceEvent::FrameStart.as_u32().into()), + ))); self.init_body.push(Op::Inst(Span::new( span, Inst::Exec(InvocationTarget::AbsoluteProcedurePath { @@ -314,6 +324,8 @@ impl MasmComponentBuilder<'_> { path: std_mem.clone(), }), ))); + self.init_body + .push(Op::Inst(Span::new(span, Inst::Trace(TraceEvent::FrameEnd.as_u32().into())))); // drop write_ptr' self.init_body.push(Op::Inst(Span::new(span, Inst::Drop))); } diff --git a/codegen/masm/src/lower/lowering.rs b/codegen/masm/src/lower/lowering.rs index ae78a834c..ef4cd0fb0 100644 --- a/codegen/masm/src/lower/lowering.rs +++ b/codegen/masm/src/lower/lowering.rs @@ -647,6 +647,14 @@ impl HirLowering for hir::AssertEq { } } +impl HirLowering for hir::Breakpoint { + fn emit(&self, emitter: &mut BlockEmitter<'_>) -> Result<(), Report> { + emitter.emit_op(masm::Op::Inst(Span::new(self.span(), masm::Instruction::Breakpoint))); + + Ok(()) + } +} + impl HirLowering for ub::Unreachable { fn emit(&self, emitter: &mut BlockEmitter<'_>) -> Result<(), Report> { // This instruction, if reached, must cause the VM to trap, so we emit an assertion that diff --git a/dialects/hir/src/builders.rs b/dialects/hir/src/builders.rs index 7000545b8..26c106907 100644 --- a/dialects/hir/src/builders.rs +++ b/dialects/hir/src/builders.rs @@ -65,6 +65,14 @@ pub trait HirOpBuilder<'f, B: ?Sized + Builder> { self.assert_eq(lhs, rhs, span) } + fn breakpoint( + &mut self, + span: SourceSpan, + ) -> Result, Report> { + let op_builder = self.builder_mut().create::(span); + op_builder() + } + /// Grow the global heap by `num_pages` pages, in 64kb units. /// /// Returns the previous size (in pages) of the heap, or -1 if the heap could not be grown. diff --git a/dialects/hir/src/lib.rs b/dialects/hir/src/lib.rs index b2e5a0f3b..7cb92023f 100644 --- a/dialects/hir/src/lib.rs +++ b/dialects/hir/src/lib.rs @@ -127,5 +127,6 @@ impl DialectRegistration for HirDialect { info.register_operation::(); info.register_operation::(); info.register_operation::(); + info.register_operation::(); } } diff --git a/dialects/hir/src/ops/primop.rs b/dialects/hir/src/ops/primop.rs index ad89c4108..44a578e01 100644 --- a/dialects/hir/src/ops/primop.rs +++ b/dialects/hir/src/ops/primop.rs @@ -95,3 +95,18 @@ impl EffectOpInterface for MemCpy { ]) } } + +#[operation( + dialect = HirDialect, + implements(MemoryEffectOpInterface) +)] +pub struct Breakpoint {} + +impl EffectOpInterface for Breakpoint { + fn effects(&self) -> EffectIterator { + EffectIterator::from_smallvec(smallvec![ + EffectInstance::new(MemoryEffect::Read), + EffectInstance::new(MemoryEffect::Write), + ]) + } +} diff --git a/frontend/wasm/src/intrinsics/debug.rs b/frontend/wasm/src/intrinsics/debug.rs new file mode 100644 index 000000000..e49e7220b --- /dev/null +++ b/frontend/wasm/src/intrinsics/debug.rs @@ -0,0 +1,33 @@ +use midenc_dialect_hir::HirOpBuilder; +use midenc_hir::{ + dialects::builtin::FunctionRef, + interner::{symbols, Symbol}, + smallvec, Builder, SmallVec, SourceSpan, SymbolNameComponent, ValueRef, +}; + +use crate::{error::WasmResult, module::function_builder_ext::FunctionBuilderExt}; + +pub(crate) const MODULE_ID: &str = "intrinsics::debug"; +pub(crate) const MODULE_PREFIX: &[SymbolNameComponent] = &[ + SymbolNameComponent::Root, + SymbolNameComponent::Component(symbols::Intrinsics), + SymbolNameComponent::Component(symbols::Debug), +]; + +/// Convert a call to a debugging intrinsic function into instruction(s) +pub(crate) fn convert_debug_intrinsics( + function: Symbol, + _function_ref: Option, + args: &[ValueRef], + builder: &mut FunctionBuilderExt<'_, B>, + span: SourceSpan, +) -> WasmResult> { + match function.as_str() { + "break" => { + assert_eq!(args.len(), 0, "{function} takes exactly one argument"); + builder.breakpoint(span)?; + Ok(smallvec![]) + } + _ => panic!("no debug intrinsics found named '{function}'"), + } +} diff --git a/frontend/wasm/src/intrinsics/intrinsic.rs b/frontend/wasm/src/intrinsics/intrinsic.rs index 00ce96566..2835e00bf 100644 --- a/frontend/wasm/src/intrinsics/intrinsic.rs +++ b/frontend/wasm/src/intrinsics/intrinsic.rs @@ -4,7 +4,7 @@ use midenc_hir::{ FunctionType, SymbolNameComponent, SymbolPath, }; -use super::{felt, mem}; +use super::{debug, felt, mem}; /// Error raised when an attempt is made to use or load an unrecognized intrinsic #[derive(Debug, thiserror::Error, Diagnostic)] @@ -18,6 +18,8 @@ pub struct UnknownIntrinsicError(SymbolPath); /// intrinsic up to the point it was encoded in this type. #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum Intrinsic { + /// A debugging intrinsic + Debug(Symbol), /// A memory intrinsic Mem(Symbol), /// A field element intrinsic @@ -56,6 +58,7 @@ impl TryFrom<&SymbolPath> for Intrinsic { .ok_or_else(|| UnknownIntrinsicError(path.clone()))?; match kind { + symbols::Debug => Ok(Self::Debug(function)), symbols::Mem => Ok(Self::Mem(function)), symbols::Felt => Ok(Self::Felt(function)), _ => Err(UnknownIntrinsicError(path.clone())), @@ -75,6 +78,7 @@ impl Intrinsic { /// intrinsic is defined. pub fn module_name(&self) -> Symbol { match self { + Self::Debug(_) => symbols::Debug, Self::Mem(_) => symbols::Mem, Self::Felt(_) => symbols::Felt, } @@ -83,6 +87,7 @@ impl Intrinsic { /// Get a [SymbolPath] corresponding to the module containing this intrinsic pub fn module_path(&self) -> SymbolPath { match self { + Self::Debug(_) => SymbolPath::from_iter(debug::MODULE_PREFIX.iter().copied()), Self::Mem(_) => SymbolPath::from_iter(mem::MODULE_PREFIX.iter().copied()), Self::Felt(_) => SymbolPath::from_iter(felt::MODULE_PREFIX.iter().copied()), } @@ -91,7 +96,7 @@ impl Intrinsic { /// Get the name of the intrinsic function as a [Symbol] pub fn function_name(&self) -> Symbol { match self { - Self::Mem(function) | Self::Felt(function) => *function, + Self::Debug(function) | Self::Mem(function) | Self::Felt(function) => *function, } } @@ -101,6 +106,8 @@ impl Intrinsic { pub fn function_type(&self) -> Option { match self { Self::Mem(function) => mem::function_type(*function), + // All debugging intrinsics are currently implemented as native instructions + Self::Debug(_) => None, // All field element intrinsics are currently implemented as native instructions Self::Felt(_) => None, } @@ -114,7 +121,7 @@ impl Intrinsic { Self::Mem(function) => { mem::function_type(*function).map(IntrinsicsConversionResult::FunctionType) } - Self::Felt(_) => Some(IntrinsicsConversionResult::MidenVmOp), + Self::Debug(_) | Self::Felt(_) => Some(IntrinsicsConversionResult::MidenVmOp), } } } diff --git a/frontend/wasm/src/intrinsics/mod.rs b/frontend/wasm/src/intrinsics/mod.rs index c04e36c87..b1e41c432 100644 --- a/frontend/wasm/src/intrinsics/mod.rs +++ b/frontend/wasm/src/intrinsics/mod.rs @@ -2,6 +2,7 @@ mod intrinsic; pub use self::intrinsic::*; +pub mod debug; pub mod felt; pub mod mem; @@ -21,6 +22,7 @@ fn modules() -> &'static FxHashSet { let mut s = FxHashSet::default(); s.insert(SymbolPath::from_iter(mem::MODULE_PREFIX.iter().copied())); s.insert(SymbolPath::from_iter(felt::MODULE_PREFIX.iter().copied())); + s.insert(SymbolPath::from_iter(debug::MODULE_PREFIX.iter().copied())); s }); &MODULES @@ -35,6 +37,9 @@ pub fn convert_intrinsics_call( span: SourceSpan, ) -> WasmResult> { match intrinsic { + Intrinsic::Debug(function) => { + debug::convert_debug_intrinsics(function, function_ref, args, builder, span) + } Intrinsic::Mem(function) => { mem::convert_mem_intrinsics(function, function_ref, args, builder, span) } diff --git a/frontend/wasm/src/miden_abi/mod.rs b/frontend/wasm/src/miden_abi/mod.rs index 500d21a72..f06c62359 100644 --- a/frontend/wasm/src/miden_abi/mod.rs +++ b/frontend/wasm/src/miden_abi/mod.rs @@ -114,6 +114,8 @@ pub fn recover_imported_masm_module(wasm_module_id: &str) -> Result::alloc + trace.252 + nop end proc.__rustc::__rust_realloc @@ -166,7 +242,11 @@ proc.__rustc::__rust_realloc swap.2 swap.4 swap.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::::alloc + trace.252 + nop push.0 push.0 dup.2 @@ -218,7 +298,11 @@ proc.__rustc::__rust_realloc assertz u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and swap.1 @@ -226,13 +310,21 @@ proc.__rustc::__rust_realloc swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop u32wrapping_add.1 dup.0 dup.4 @@ -247,7 +339,11 @@ export.miden:counter-contract/counter@0.1.0#get-count push.1048576 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967264 push.64 dup.2 @@ -259,8 +355,16 @@ export.miden:counter-contract/counter@0.1.0#get-count swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::wit_bindgen_rt::run_ctors_once + trace.252 + nop push.3735929054 push.0 push.0 @@ -311,7 +415,11 @@ export.miden:counter-contract/counter@0.1.0#get-count swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.1 push.0 push.4 @@ -353,7 +461,11 @@ export.miden:counter-contract/counter@0.1.0#get-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop push.8 dup.3 add @@ -366,7 +478,11 @@ export.miden:counter-contract/counter@0.1.0#get-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop push.32 dup.1 add @@ -379,7 +495,11 @@ export.miden:counter-contract/counter@0.1.0#get-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop dup.2 push.8 dup.1 @@ -389,7 +509,11 @@ export.miden:counter-contract/counter@0.1.0#get-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop push.0 push.32 dup.2 @@ -398,7 +522,11 @@ export.miden:counter-contract/counter@0.1.0#get-count dup.2 swap.2 swap.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::miden_base_sys::bindings::storage::get_map_item + trace.252 + nop push.44 swap.1 add @@ -411,20 +539,32 @@ export.miden:counter-contract/counter@0.1.0#get-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.1048576 movup.2 swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end export.miden:counter-contract/counter@0.1.0#increment-count push.1048576 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967264 push.160 dup.2 @@ -436,8 +576,16 @@ export.miden:counter-contract/counter@0.1.0#increment-count swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::wit_bindgen_rt::run_ctors_once + trace.252 + nop push.3735929054 push.0 push.0 @@ -488,7 +636,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.1 push.0 push.4 @@ -530,7 +682,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop push.8 dup.3 add @@ -543,7 +699,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop push.32 dup.1 add @@ -556,7 +716,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop dup.2 push.8 dup.1 @@ -566,7 +730,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop push.0 push.32 dup.2 @@ -575,7 +743,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count dup.2 swap.2 swap.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::miden_base_sys::bindings::storage::get_map_item + trace.252 + nop push.44 dup.1 add @@ -588,7 +760,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.1 add push.24 @@ -603,7 +779,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop push.120 dup.4 add @@ -616,7 +796,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop push.16 dup.2 add @@ -629,7 +813,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop push.112 dup.4 add @@ -642,7 +830,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop push.8 dup.2 add @@ -655,7 +847,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop push.104 dup.4 add @@ -668,7 +864,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop dup.1 push.8 dup.1 @@ -678,7 +878,11 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_dw + trace.252 + nop push.96 dup.4 add @@ -691,14 +895,22 @@ export.miden:counter-contract/counter@0.1.0#increment-count assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_dw + trace.252 + nop push.128 dup.2 swap.1 u32wrapping_add dup.1 swap.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::>::from + trace.252 + nop push.128 dup.2 swap.1 @@ -712,19 +924,35 @@ export.miden:counter-contract/counter@0.1.0#increment-count movup.5 swap.1 u32wrapping_add + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::miden_base_sys::bindings::storage::set_map_item + trace.252 + nop push.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::miden_base_sys::bindings::account::incr_nonce + trace.252 + nop push.1048576 movup.2 swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end export.cabi_realloc_wit_bindgen_0_28_0 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::wit_bindgen_rt::cabi_realloc + trace.252 + nop end proc.wit_bindgen_rt::cabi_realloc @@ -733,7 +961,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 neq if.true + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::__rustc::__rust_realloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -755,7 +987,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 else swap.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::__rustc::__rust_alloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -803,7 +1039,11 @@ proc.wit_bindgen_rt::run_ctors_once u32assert u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and push.0 @@ -812,7 +1052,11 @@ proc.wit_bindgen_rt::run_ctors_once if.true nop else + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::__wasm_call_ctors + trace.252 + nop push.1 push.1048617 push.0 @@ -822,13 +1066,21 @@ proc.wit_bindgen_rt::run_ctors_once swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end end @@ -858,7 +1110,11 @@ proc.::alloc push.3735929054 else movup.2 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::core::ptr::alignment::Alignment::max + trace.252 + nop push.0 push.2147483648 dup.2 @@ -893,15 +1149,27 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 neq if.true push.0 swap.3 else + trace.240 + nop exec.::intrinsics::mem::heap_base + trace.252 + nop + trace.240 + nop exec.::intrinsics::mem::memory_size + trace.252 + nop dup.4 push.4 dup.1 @@ -919,7 +1187,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.0 swap.3 end @@ -932,7 +1204,11 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 dup.3 push.268435456 @@ -961,7 +1237,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.1 swap.1 movup.2 @@ -983,7 +1263,11 @@ proc.::alloc end proc.miden_base_sys::bindings::account::incr_nonce + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::miden_base_sys::bindings::account::extern_account_incr_nonce + trace.252 + nop end proc.miden_base_sys::bindings::storage::get_map_item @@ -996,7 +1280,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.4 dup.4 add @@ -1009,7 +1297,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.8 dup.5 add @@ -1022,7 +1314,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.12 movup.6 add @@ -1035,7 +1331,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.255 movup.6 swap.1 @@ -1046,7 +1346,11 @@ proc.miden_base_sys::bindings::storage::get_map_item swap.1 swap.4 swap.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::miden_base_sys::bindings::storage::extern_get_storage_map_item + trace.252 + nop end proc.miden_base_sys::bindings::storage::set_map_item @@ -1059,7 +1363,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.4 dup.4 add @@ -1072,7 +1380,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.8 dup.5 add @@ -1085,7 +1397,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.12 movup.6 add @@ -1098,7 +1414,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop dup.6 push.4 dup.1 @@ -1108,7 +1428,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.4 dup.8 add @@ -1121,7 +1445,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.8 dup.9 add @@ -1134,7 +1462,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.12 movup.10 add @@ -1147,7 +1479,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.255 movup.10 swap.1 @@ -1164,7 +1500,11 @@ proc.miden_base_sys::bindings::storage::set_map_item swap.1 swap.8 swap.1 + trace.240 + nop exec.::miden:counter-contract/counter@0.1.0::counter_contract::miden_base_sys::bindings::storage::extern_set_storage_map_item + trace.252 + nop end proc.>::from @@ -1182,7 +1522,11 @@ proc.::alloc + trace.252 + nop end proc.__rustc::__rust_realloc @@ -199,7 +291,11 @@ proc.__rustc::__rust_realloc swap.2 swap.4 swap.1 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::::alloc + trace.252 + nop push.0 push.0 dup.2 @@ -251,7 +347,11 @@ proc.__rustc::__rust_realloc assertz u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and swap.1 @@ -259,13 +359,21 @@ proc.__rustc::__rust_realloc swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop u32wrapping_add.1 dup.0 dup.4 @@ -280,7 +388,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty push.1048576 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967264 push.128 dup.2 @@ -292,8 +404,16 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::wit_bindgen_rt::run_ctors_once + trace.252 + nop push.12 dup.1 add @@ -308,7 +428,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.8 dup.1 add @@ -323,7 +447,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.4 dup.1 add @@ -338,7 +466,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop dup.0 push.4 dup.1 @@ -350,13 +482,21 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.0 push.32 dup.2 swap.1 u32wrapping_add + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::miden_base_sys::bindings::storage::get_item + trace.252 + nop push.44 dup.1 add @@ -369,7 +509,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.40 dup.2 add @@ -382,7 +526,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.36 dup.3 add @@ -395,7 +543,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.32 dup.4 add @@ -408,7 +560,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.0 push.1 movup.8 @@ -469,7 +625,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty u32wrapping_add movup.3 swap.1 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::>::from + trace.252 + nop push.96 dup.1 swap.1 @@ -482,7 +642,11 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty movup.2 swap.3 movdn.2 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::miden_base_sys::bindings::storage::set_map_item + trace.252 + nop end end end @@ -490,14 +654,22 @@ export.miden:storage-example/foo@1.0.0#set-asset-qty push.1048576 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end export.miden:storage-example/foo@1.0.0#get-asset-qty push.1048576 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967264 push.64 dup.2 @@ -509,8 +681,16 @@ export.miden:storage-example/foo@1.0.0#get-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::wit_bindgen_rt::run_ctors_once + trace.252 + nop push.12 dup.1 add @@ -525,7 +705,11 @@ export.miden:storage-example/foo@1.0.0#get-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.8 dup.1 add @@ -540,7 +724,11 @@ export.miden:storage-example/foo@1.0.0#get-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.4 dup.1 add @@ -555,7 +743,11 @@ export.miden:storage-example/foo@1.0.0#get-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop dup.0 push.4 dup.1 @@ -567,7 +759,11 @@ export.miden:storage-example/foo@1.0.0#get-asset-qty swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_felt + trace.252 + nop push.1 push.32 dup.2 @@ -576,7 +772,11 @@ export.miden:storage-example/foo@1.0.0#get-asset-qty dup.2 swap.2 swap.1 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::miden_base_sys::bindings::storage::get_map_item + trace.252 + nop push.44 swap.1 add @@ -589,17 +789,29 @@ export.miden:storage-example/foo@1.0.0#get-asset-qty assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.1048576 movup.2 swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end export.cabi_realloc_wit_bindgen_0_28_0 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::wit_bindgen_rt::cabi_realloc + trace.252 + nop end proc.wit_bindgen_rt::cabi_realloc @@ -608,7 +820,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 neq if.true + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::__rustc::__rust_realloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -630,7 +846,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 else swap.1 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::__rustc::__rust_alloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -678,7 +898,11 @@ proc.wit_bindgen_rt::run_ctors_once u32assert u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and push.0 @@ -687,7 +911,11 @@ proc.wit_bindgen_rt::run_ctors_once if.true nop else + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::__wasm_call_ctors + trace.252 + nop push.1 push.1048617 push.0 @@ -697,13 +925,21 @@ proc.wit_bindgen_rt::run_ctors_once swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end end @@ -733,7 +969,11 @@ proc.::alloc push.3735929054 else movup.2 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::core::ptr::alignment::Alignment::max + trace.252 + nop push.0 push.2147483648 dup.2 @@ -768,15 +1008,27 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 neq if.true push.0 swap.3 else + trace.240 + nop exec.::intrinsics::mem::heap_base + trace.252 + nop + trace.240 + nop exec.::intrinsics::mem::memory_size + trace.252 + nop dup.4 push.4 dup.1 @@ -794,7 +1046,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.0 swap.3 end @@ -807,7 +1063,11 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 dup.3 push.268435456 @@ -836,7 +1096,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.1 swap.1 movup.2 @@ -862,7 +1126,11 @@ proc.miden_base_sys::bindings::storage::get_item movup.2 swap.1 u32and + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::miden_base_sys::bindings::storage::extern_get_storage_item + trace.252 + nop end proc.miden_base_sys::bindings::storage::get_map_item @@ -875,7 +1143,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.4 dup.4 add @@ -888,7 +1160,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.8 dup.5 add @@ -901,7 +1177,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.12 movup.6 add @@ -914,7 +1194,11 @@ proc.miden_base_sys::bindings::storage::get_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.255 movup.6 swap.1 @@ -925,7 +1209,11 @@ proc.miden_base_sys::bindings::storage::get_map_item swap.1 swap.4 swap.1 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::miden_base_sys::bindings::storage::extern_get_storage_map_item + trace.252 + nop end proc.miden_base_sys::bindings::storage::set_map_item @@ -938,7 +1226,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.4 dup.4 add @@ -951,7 +1243,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.8 dup.5 add @@ -964,7 +1260,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.12 movup.6 add @@ -977,7 +1277,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop dup.6 push.4 dup.1 @@ -987,7 +1291,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.4 dup.8 add @@ -1000,7 +1308,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.8 dup.9 add @@ -1013,7 +1325,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.12 movup.10 add @@ -1026,7 +1342,11 @@ proc.miden_base_sys::bindings::storage::set_map_item assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_felt + trace.252 + nop push.255 movup.10 swap.1 @@ -1043,7 +1363,11 @@ proc.miden_base_sys::bindings::storage::set_map_item swap.1 swap.8 swap.1 + trace.240 + nop exec.::miden:storage-example/foo@1.0.0::storage_example::miden_base_sys::bindings::storage::extern_set_storage_map_item + trace.252 + nop end proc.>::from @@ -1061,7 +1385,11 @@ proc.::alloc + trace.252 + nop end proc.__rustc::__rust_realloc @@ -44,7 +56,11 @@ proc.__rustc::__rust_realloc swap.2 swap.4 swap.1 + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::::alloc + trace.252 + nop push.0 push.0 dup.2 @@ -96,7 +112,11 @@ proc.__rustc::__rust_realloc assertz u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and swap.1 @@ -104,13 +124,21 @@ proc.__rustc::__rust_realloc swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop u32wrapping_add.1 dup.0 dup.4 @@ -122,13 +150,21 @@ proc.__rustc::__rust_realloc end export.miden:cross-ctx-account/foo@1.0.0#process-felt + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::wit_bindgen_rt::run_ctors_once + trace.252 + nop push.3 add end export.cabi_realloc_wit_bindgen_0_28_0 + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::wit_bindgen_rt::cabi_realloc + trace.252 + nop end proc.wit_bindgen_rt::cabi_realloc @@ -137,7 +173,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 neq if.true + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::__rustc::__rust_realloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -159,7 +199,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 else swap.1 + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::__rustc::__rust_alloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -207,7 +251,11 @@ proc.wit_bindgen_rt::run_ctors_once u32assert u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and push.0 @@ -216,7 +264,11 @@ proc.wit_bindgen_rt::run_ctors_once if.true nop else + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::__wasm_call_ctors + trace.252 + nop push.1 push.1048617 push.0 @@ -226,13 +278,21 @@ proc.wit_bindgen_rt::run_ctors_once swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end end @@ -262,7 +322,11 @@ proc.::alloc push.3735929054 else movup.2 + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::core::ptr::alignment::Alignment::max + trace.252 + nop push.0 push.2147483648 dup.2 @@ -297,15 +361,27 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 neq if.true push.0 swap.3 else + trace.240 + nop exec.::intrinsics::mem::heap_base + trace.252 + nop + trace.240 + nop exec.::intrinsics::mem::memory_size + trace.252 + nop dup.4 push.4 dup.1 @@ -323,7 +399,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.0 swap.3 end @@ -336,7 +416,11 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 dup.3 push.268435456 @@ -365,7 +449,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.1 swap.1 movup.2 @@ -397,6 +485,10 @@ proc.core::ptr::alignment::Alignment::max end export.cabi_realloc + trace.240 + nop exec.::miden:cross-ctx-account/foo@1.0.0::cross_ctx_account::cabi_realloc_wit_bindgen_0_28_0 + trace.252 + nop end diff --git a/tests/integration/expected/rust_sdk/cross_ctx_note.masm b/tests/integration/expected/rust_sdk/cross_ctx_note.masm index fe51052c1..fdafd31b5 100644 --- a/tests/integration/expected/rust_sdk/cross_ctx_note.masm +++ b/tests/integration/expected/rust_sdk/cross_ctx_note.masm @@ -1,12 +1,18 @@ # mod miden:base/note-script@1.0.0 export.note-script + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::miden:base/note-script@1.0.0#note-script + trace.252 + nop end export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.9021226855565145792 push.4948740029366688057 push.7925211860580638461 @@ -14,7 +20,9 @@ export.init adv.push_mapval push.262144 push.3 + trace.240 exec.::std::mem::pipe_preimage_to_memory + trace.252 drop push.1048576 u32assert @@ -24,7 +32,11 @@ end # mod miden:base/note-script@1.0.0::cross_ctx_note proc.cross_ctx_note::bindings::miden::cross_ctx_account::foo::process_felt::wit_import1 + trace.240 + nop call.::miden:cross-ctx-account/foo@1.0.0::process-felt + trace.252 + nop end proc.__wasm_call_ctors @@ -39,7 +51,11 @@ proc.__rustc::__rust_alloc push.1048616 movup.2 swap.1 + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::::alloc + trace.252 + nop end proc.__rustc::__rust_realloc @@ -48,7 +64,11 @@ proc.__rustc::__rust_realloc swap.2 swap.4 swap.1 + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::::alloc + trace.252 + nop push.0 push.0 dup.2 @@ -100,7 +120,11 @@ proc.__rustc::__rust_realloc assertz u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and swap.1 @@ -108,13 +132,21 @@ proc.__rustc::__rust_realloc swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop u32wrapping_add.1 dup.0 dup.4 @@ -126,15 +158,27 @@ proc.__rustc::__rust_realloc end export.miden:base/note-script@1.0.0#note-script + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::wit_bindgen_rt::run_ctors_once + trace.252 + nop push.7 + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::cross_ctx_note::bindings::miden::cross_ctx_account::foo::process_felt::wit_import1 + trace.252 + nop push.10 assert_eq end export.cabi_realloc_wit_bindgen_0_28_0 + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::wit_bindgen_rt::cabi_realloc + trace.252 + nop end proc.wit_bindgen_rt::cabi_realloc @@ -143,7 +187,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 neq if.true + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::__rustc::__rust_realloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -165,7 +213,11 @@ proc.wit_bindgen_rt::cabi_realloc swap.1 else swap.1 + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::__rustc::__rust_alloc + trace.252 + nop push.0 push.3735929054 movup.2 @@ -213,7 +265,11 @@ proc.wit_bindgen_rt::run_ctors_once u32assert u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and push.0 @@ -222,7 +278,11 @@ proc.wit_bindgen_rt::run_ctors_once if.true nop else + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::__wasm_call_ctors + trace.252 + nop push.1 push.1048621 push.0 @@ -232,13 +292,21 @@ proc.wit_bindgen_rt::run_ctors_once swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end end @@ -268,7 +336,11 @@ proc.::alloc push.3735929054 else movup.2 + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::core::ptr::alignment::Alignment::max + trace.252 + nop push.0 push.2147483648 dup.2 @@ -303,15 +375,27 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 neq if.true push.0 swap.3 else + trace.240 + nop exec.::intrinsics::mem::heap_base + trace.252 + nop + trace.240 + nop exec.::intrinsics::mem::memory_size + trace.252 + nop dup.4 push.4 dup.1 @@ -329,7 +413,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.0 swap.3 end @@ -342,7 +430,11 @@ proc.::alloc assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.0 dup.3 push.268435456 @@ -371,7 +463,11 @@ proc.::alloc swap.1 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop push.1 swap.1 movup.2 @@ -403,6 +499,10 @@ proc.core::ptr::alignment::Alignment::max end export.cabi_realloc + trace.240 + nop exec.::miden:base/note-script@1.0.0::cross_ctx_note::cabi_realloc_wit_bindgen_0_28_0 + trace.252 + nop end diff --git a/tests/integration/expected/shl_i16.masm b/tests/integration/expected/shl_i16.masm index 8f36bd37f..227d1977a 100644 --- a/tests/integration/expected/shl_i16.masm +++ b/tests/integration/expected/shl_i16.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shl_i32.masm b/tests/integration/expected/shl_i32.masm index 27d119bec..3b2e1437b 100644 --- a/tests/integration/expected/shl_i32.masm +++ b/tests/integration/expected/shl_i32.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shl_i64.masm b/tests/integration/expected/shl_i64.masm index 052fdece5..4a76ba813 100644 --- a/tests/integration/expected/shl_i64.masm +++ b/tests/integration/expected/shl_i64.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 @@ -29,6 +31,10 @@ export.entrypoint push.4294967295 u32lte assert + trace.240 + nop exec.::std::math::u64::shl + trace.252 + nop end diff --git a/tests/integration/expected/shl_i8.masm b/tests/integration/expected/shl_i8.masm index 9d605d1a0..87b22dfe9 100644 --- a/tests/integration/expected/shl_i8.masm +++ b/tests/integration/expected/shl_i8.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shl_u16.masm b/tests/integration/expected/shl_u16.masm index 3a99c848f..ff81040de 100644 --- a/tests/integration/expected/shl_u16.masm +++ b/tests/integration/expected/shl_u16.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shl_u32.masm b/tests/integration/expected/shl_u32.masm index 0b3bb55bf..1c8a04b78 100644 --- a/tests/integration/expected/shl_u32.masm +++ b/tests/integration/expected/shl_u32.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shl_u64.masm b/tests/integration/expected/shl_u64.masm index 404a799f1..bc44fe3ee 100644 --- a/tests/integration/expected/shl_u64.masm +++ b/tests/integration/expected/shl_u64.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 @@ -29,6 +31,10 @@ export.entrypoint push.4294967295 u32lte assert + trace.240 + nop exec.::std::math::u64::shl + trace.252 + nop end diff --git a/tests/integration/expected/shl_u8.masm b/tests/integration/expected/shl_u8.masm index 05464f417..097016627 100644 --- a/tests/integration/expected/shl_u8.masm +++ b/tests/integration/expected/shl_u8.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shr_i64.masm b/tests/integration/expected/shr_i64.masm index c17c92c19..2164a159b 100644 --- a/tests/integration/expected/shr_i64.masm +++ b/tests/integration/expected/shr_i64.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 @@ -29,6 +31,10 @@ export.entrypoint push.4294967295 u32lte assert + trace.240 + nop exec.::intrinsics::i64::checked_shr + trace.252 + nop end diff --git a/tests/integration/expected/shr_u16.masm b/tests/integration/expected/shr_u16.masm index ab00d7779..7f91f26d8 100644 --- a/tests/integration/expected/shr_u16.masm +++ b/tests/integration/expected/shr_u16.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shr_u32.masm b/tests/integration/expected/shr_u32.masm index e65336ade..e22bb6534 100644 --- a/tests/integration/expected/shr_u32.masm +++ b/tests/integration/expected/shr_u32.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/shr_u64.masm b/tests/integration/expected/shr_u64.masm index f8733cb21..ffd0fba40 100644 --- a/tests/integration/expected/shr_u64.masm +++ b/tests/integration/expected/shr_u64.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 @@ -31,6 +33,10 @@ export.entrypoint assert movdn.2 movup.2 + trace.240 + nop exec.::std::math::u64::shr + trace.252 + nop end diff --git a/tests/integration/expected/shr_u8.masm b/tests/integration/expected/shr_u8.masm index f7d73f3e2..b2372dd72 100644 --- a/tests/integration/expected/shr_u8.masm +++ b/tests/integration/expected/shr_u8.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/sub_felt.masm b/tests/integration/expected/sub_felt.masm index 9e305697c..b69bc23be 100644 --- a/tests/integration/expected/sub_felt.masm +++ b/tests/integration/expected/sub_felt.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/sub_i16.masm b/tests/integration/expected/sub_i16.masm index d4ee43c03..657256edb 100644 --- a/tests/integration/expected/sub_i16.masm +++ b/tests/integration/expected/sub_i16.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/sub_i32.masm b/tests/integration/expected/sub_i32.masm index 5b1b6a0eb..0d46ddec1 100644 --- a/tests/integration/expected/sub_i32.masm +++ b/tests/integration/expected/sub_i32.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/sub_i64.masm b/tests/integration/expected/sub_i64.masm index 38767a492..89fed0a5a 100644 --- a/tests/integration/expected/sub_i64.masm +++ b/tests/integration/expected/sub_i64.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 @@ -19,6 +21,10 @@ end export.entrypoint movdn.3 movdn.3 + trace.240 + nop exec.::std::math::u64::wrapping_sub + trace.252 + nop end diff --git a/tests/integration/expected/sub_i8.masm b/tests/integration/expected/sub_i8.masm index 2c0ce168a..f14b39816 100644 --- a/tests/integration/expected/sub_i8.masm +++ b/tests/integration/expected/sub_i8.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/sub_u16.masm b/tests/integration/expected/sub_u16.masm index 5c1b9d382..6d71bdf6f 100644 --- a/tests/integration/expected/sub_u16.masm +++ b/tests/integration/expected/sub_u16.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/sub_u32.masm b/tests/integration/expected/sub_u32.masm index a5c9c06d8..a556b2c98 100644 --- a/tests/integration/expected/sub_u32.masm +++ b/tests/integration/expected/sub_u32.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/sub_u64.masm b/tests/integration/expected/sub_u64.masm index 791384450..c3c06eac9 100644 --- a/tests/integration/expected/sub_u64.masm +++ b/tests/integration/expected/sub_u64.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 @@ -19,6 +21,10 @@ end export.entrypoint movdn.3 movdn.3 + trace.240 + nop exec.::std::math::u64::wrapping_sub + trace.252 + nop end diff --git a/tests/integration/expected/sub_u8.masm b/tests/integration/expected/sub_u8.masm index a93f46c8e..408eef7e6 100644 --- a/tests/integration/expected/sub_u8.masm +++ b/tests/integration/expected/sub_u8.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144 diff --git a/tests/integration/expected/types/array.masm b/tests/integration/expected/types/array.masm index cbf685a18..f9efc3cd0 100644 --- a/tests/integration/expected/types/array.masm +++ b/tests/integration/expected/types/array.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.2552035692683956824 push.5323511717551755022 push.6168074652703322390 @@ -10,7 +12,9 @@ export.init adv.push_mapval push.262144 push.3 + trace.240 exec.::std::mem::pipe_preimage_to_memory + trace.252 drop push.1048576 u32assert @@ -54,7 +58,11 @@ export.sum_arr assertz.err=250 u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop movup.2 u32wrapping_add push.4294967295 @@ -109,10 +117,18 @@ end export.__main push.5 push.1048576 + trace.240 + nop exec.::root_ns:root@1.0.0::test_rust_d63291a98b435c53f58385d5782fb46f0b0b78bee8e860843e7223106d66f7d6::sum_arr + trace.252 + nop push.5 push.1048596 + trace.240 + nop exec.::root_ns:root@1.0.0::test_rust_d63291a98b435c53f58385d5782fb46f0b0b78bee8e860843e7223106d66f7d6::sum_arr + trace.252 + nop u32wrapping_add end diff --git a/tests/integration/expected/types/static_mut.masm b/tests/integration/expected/types/static_mut.masm index 08bc37a43..109cae6da 100644 --- a/tests/integration/expected/types/static_mut.masm +++ b/tests/integration/expected/types/static_mut.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.11434542961250426374 push.12905227908764935604 push.12374698099726530180 @@ -10,7 +12,9 @@ export.init adv.push_mapval push.262144 push.1 + trace.240 exec.::std::mem::pipe_preimage_to_memory + trace.252 drop push.1048576 u32assert @@ -32,7 +36,11 @@ export.global_var_update u32assert u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and push.1 @@ -48,17 +56,29 @@ export.global_var_update swap.1 dup.1 dup.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.4294967040 u32and movup.3 u32or movdn.2 + trace.240 + nop exec.::intrinsics::mem::store_sw + trace.252 + nop end export.__main + trace.240 + nop exec.::root_ns:root@1.0.0::test_rust_e6d553fb1c80aef6e5d6f2891701197bedac471cf510bd2495f99889d9543cd4::global_var_update + trace.252 + nop push.3735929054 push.0 push.4294967287 @@ -72,7 +92,11 @@ export.__main u32wrapping_add u32divmod.4 swap.1 + trace.240 + nop exec.::intrinsics::mem::load_sw + trace.252 + nop push.128 u32and movup.2 diff --git a/tests/integration/expected/xor_bool.masm b/tests/integration/expected/xor_bool.masm index 62468cd23..487b81cc6 100644 --- a/tests/integration/expected/xor_bool.masm +++ b/tests/integration/expected/xor_bool.masm @@ -2,7 +2,9 @@ export.init push.2162688 + trace.240 exec.::intrinsics::mem::heap_init + trace.252 push.1048576 u32assert mem_store.262144