• dearblue's avatar
    Unified `pc` and `err` of `mrb_callinfo` · ced89c25
    dearblue authored
    This enhances self-containment.
    
    - Changed the `mrb_callinfo::pc` field to point to itself.
      Previously it indicated the return destination of the previous call level.
      `mrb_callinfo::pc` will now hold the address to its own `proc->body.irep->iseq`.
    - Removed `mrb_callinfo::err` field.
      This is because `mrb_callinfo::pc - 1` is semantically the same as the previous `err`.
    - The `pc0` and `pc_save` variables in `mrb_vm_exec()` are no longer needed and have been deleted.
    - It removes the argument because `cipush()` doesn't need to save the previous `pc`.
    ced89c25
vm.c 76.5 KB