hawkw/seax

Issues with evaluating compiled lambdas

Closed this issue · 2 comments

Currently, the run_lambda_ap and run_nested_lambda top-level integration targets fail with the following messages:

failures:

---- run_lambda_ap stdout ----
    thread 'run_lambda_ap' panicked at '[fatal][LD]: expected pair, found Some(((1u, (2u, nil)), (LD, ((1u, (1u, nil)), (ADD, (RET, nil))))))
', seax_svm/src/lib.rs:137


---- run_nested_lambda stdout ----
    thread 'run_nested_lambda' panicked at '[fatal][LD]: expected pair, found Some(((2u, (1u, nil)), (LD, ((1u, (2u, nil)), (LD, ((1u, (1u, nil)), (SUB, (ADD, (RET, nil)))))))))
', seax_svm/src/lib.rs:137

Found the cause of this problem - the LD instruction expects a pair of the form (SInt.SInt), while the compiler emits pairs of the form (UInt.UInt) (which is more correct, especially since SInt indexing is flagged for removal).

A fix for this is in the pipe.

Fixed, but see #73