0xPolygonMiden / compiler

Compiler from MidenIR to Miden Assembly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`value v59 not found on operand stack` error in `MoveUpAndSwap` tactic while running the `test_get_inputs` test

greenhat opened this issue · comments

Steps to reproduce:

  • enable test_get_inputs added in #193

Log:

thread 'rust_masm_tests::abi_transform::tx_kernel::test_get_inputs' panicked at codegen/masm/src/codegen/opt/operands/tactics/move_up_and_swap.rs:44:37:
value v59 not found on operand stack
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2d24fe591f30386d6d5fc2bb941c78d7266bf10f/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/2d24fe591f30386d6d5fc2bb941c78d7266bf10f/library/core/src/panicking.rs:72:14
   2: miden_codegen_masm::codegen::opt::operands::tactics::SolutionBuilder::unwrap_current_position
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/opt/operands/tactics/mod.rs:203:21
   3: <miden_codegen_masm::codegen::opt::operands::tactics::move_up_and_swap::MoveUpAndSwap as miden_codegen_masm::codegen::opt::operands::tactics::Tactic>::apply
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/opt/operands/tactics/move_up_and_swap.rs:44:29
   4: miden_codegen_masm::codegen::opt::operands::solver::OperandMovementConstraintSolver::solve
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/opt/operands/solver.rs:173:19
   5: miden_codegen_masm::codegen::opt::operands::solver::OperandMovementConstraintSolver::solve_and_apply
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/opt/operands/solver.rs:268:31
   6: miden_codegen_masm::codegen::emitter::BlockEmitter::schedule_operands
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/emitter.rs:964:17
   7: miden_codegen_masm::codegen::emitter::BlockEmitter::emit_inst
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/emitter.rs:206:9
   8: miden_codegen_masm::codegen::emitter::BlockEmitter::emit
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/emitter.rs:185:48
   9: miden_codegen_masm::codegen::emitter::FunctionEmitter::emit
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/codegen/emitter.rs:156:21
  10: <miden_codegen_masm::convert::ConvertHirToMasm<&miden_hir::function::Function> as miden_hir::pass::conversion::ConversionPass>::convert
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/convert.rs:188:13
  11: <miden_codegen_masm::convert::ConvertHirToMasm<miden_hir::module::Module> as miden_hir::pass::conversion::ConversionPass>::convert
             at /Users/dzadorozhnyi/src/miden-ir/codegen/masm/src/convert.rs:136:33
  12: <midenc_compile::stages::codegen::CodegenStage as midenc_compile::stage::Stage>::run
             at /Users/dzadorozhnyi/src/miden-ir/midenc-compile/src/stages/codegen.rs:36:39
  13: <midenc_compile::stage::Chain<A,B> as midenc_compile::stage::Stage>::run
             at /Users/dzadorozhnyi/src/miden-ir/midenc-compile/src/stage.rs:81:9
  14: midenc_compile::compile_inputs
             at /Users/dzadorozhnyi/src/miden-ir/midenc-compile/src/lib.rs:191:5
  15: midenc_compile::compile_to_memory
             at /Users/dzadorozhnyi/src/miden-ir/midenc-compile/src/lib.rs:170:11
  16: miden_integration_tests::compiler_test::CompilerTest::compile_wasm_to_masm_program
             at ./src/compiler_test.rs:588:15
  17: miden_integration_tests::compiler_test::CompilerTest::ir_masm_program
             at ./src/compiler_test.rs:572:27
  18: miden_integration_tests::compiler_test::CompilerTest::expect_masm
             at ./src/compiler_test.rs:537:23
  19: miden_integration_tests::rust_masm_tests::abi_transform::tx_kernel::test_get_inputs
             at ./src/rust_masm_tests/abi_transform/tx_kernel.rs:14:5
  20: miden_integration_tests::rust_masm_tests::abi_transform::tx_kernel::test_get_inputs::{{closure}}
             at ./src/rust_masm_tests/abi_transform/tx_kernel.rs:7:21
  21: core::ops::function::FnOnce::call_once
             at /rustc/2d24fe591f30386d6d5fc2bb941c78d7266bf10f/library/core/src/ops/function.rs:250:5
  22: core::ops::function::FnOnce::call_once
             at /rustc/2d24fe591f30386d6d5fc2bb941c78d7266bf10f/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.


failures:
    rust_masm_tests::abi_transform::tx_kernel::test_get_inputs

Not relevant since #198 fixes the root issue that lead to this one.