expr-lang/expr

Fix debugger to show correct name for concat()

Opened this issue · 0 comments

❯ concat(1..2, 3..4)
[1 2 3 4]
❯ opcodes
0  OpPush  <0>  1
1  OpPush  <1>  2
2  OpRange
3  OpPush  <2>  3
4  OpPush  <3>  4
5  OpRange
6  OpPush      <4>  0x10031fca0
7  OpCallSafe  <2>

As we pushed "Safe" function into constants instead of functions.

What we can do:

  1. Add additional param "hash" for addConstant() so we can deduplicate on this hash param.
  2. Add opcode comments to display an arbitrary line as a comment per opcode (replace ".debugInfo").