0xPolygonMiden / miden-vm

STARK-based virtual machine
MIT License
630 stars 161 forks source link

Compilation failure due to missing name should report the user readable name #1265

Open hackaugusto opened 8 months ago

hackaugusto commented 8 months ago

The call instructions currently only carry the procedure id, and not its name. This makes the error messages very cryptic, for situations like the following:

proc.example
    syscall.wrong_name
end

The error message will be something like:

KernelProcNotFound(ProcedureId([120, 199, 130, 12, 225, 34, 213, 30, 69, 109, 206, 77, 106, 134, 11, 37, 238, 43, 225, 0]))

It should give the wrong_name instead.

hackaugusto commented 8 months ago

@bitwalker I think you're working on the VM's compiler, so I won't try to fix this.

bitwalker commented 8 months ago

This is actually one of the things I've fixed haha

hackaugusto commented 8 months ago

@bitwalker great to know :) will save me a lot of time in the future. Thanks!

hackaugusto commented 8 months ago

@bitwalker one thing that I forgot. Can we also get the original span? As in, original source file, lineno, and col?