| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
When a global jump occurs, look at the catch handler table to determine where to jump.
In that case, `pc` already shows the following instruction, but since the table shows `begin_offset ... end_offset`, the comparison is done with `begin_offset < pc && pc <= end_offset`.
If there is a corresponding handler, move `pc` to `handler.target_offset` and continue running the VM.
When a global jump across `ensure` is made by `return`, `break`, `next`, `redo` and `retry`, the extended `RBreak` object saves and restores the C-level execution position.
This extended `RBreak` can have tag information, which makes it a pseudo coroutine (the "tag" mimics CRuby).
The implementation of pseudo coroutines by `RBreak` is summarized by `CHECKPOINT_RESTORE ... CHECKPOINT_MAIN ... CHECKPOINT_END` and `throw_tagged_break` / `unwind_ensure` macros.
The restart of processing is branched by `RBREAK_TAG_FOREACH(DISPATCH_CHECKPOINTS)`.
- Not only `rescue` blocks but also `ensure` blocks are now sandwiched between `OP_EXCEPT` and `OP_RAISEIF`.
- Remove the function `ecall()`.
It is no longer necessary to re-enter the VM to perform an "ensure block".
This will resolves #1888.
- Added instruction `OP_JUW` (Jump while UnWind).
It jumps unconditionally like `OP_JMP`, but searches the catch handler table and executes the ensure block.
Since it searches the catch handler table, it is much heavier than `OP_JMP`.
|
|
`OP_PUSHERR`, `OP_POPERR`, `OP_EPUSH` and `OP_EPOP` are removed.
|
|
- `OP_EXCEPT` checks if `mrb->exc` is `NULL`, `MRB_TT_EXCEPTION` or
`MRB_TT_BREAK`.
If `mrb->exc` is `NULL`, it will be replaced with `nil`.
- If `OP_RAISE` is `nil`, it does nothing and the immediately
following instruction is executed (like `OP_NOP`).
Also, in case of `RBreak` object, it moves to the processing for
`break`.
With this change, the instruction name is changed from
`OP_RAISE` to `OP_RAISEIF`.
|
|
- no OP_EXT_ anymore
- OP_LOADI16 in right position
|
|
|
|
The difference of `include/mruby/ops.h` is applied.
- OP_NOP - update semantics
- OP_GETSV - update semantics
- OP_SETSV - update semantics
- OP_GETUPVAR - update prefix
- OP_SETUPVAR - update prefix
- OP_JMPIF - update operands and semantics
- OP_JMPNOT - update operands and semantics
- OP_JMPNIL - add entry
- OP_ONERR - update semantics
- OP_POPERR - update prefix
- OP_EPOP - update prefix
- OP_SENDB - update semantics
- OP_ADD - update prefix and operands
- OP_ADDI - update operands and semantics
- OP_SUB - update prefix and operands
- OP_SUBI - update semantics
- OP_MUL - update prefix and operands
- OP_DIV - update prefix and operands
- OP_EQ - update prefix and operands
- OP_LT - update prefix and operands
- OP_LE - update prefix and operands
- OP_GT - update prefix and operands
- OP_GE - update prefix and operands
- OP_ARYDUP - add entry
- OP_INTERN - add entry
- OP_HASHCAT - add entry
- OP_ERR - update semantics
|
|
|
|
- Add `OP_LOADI16`
- Update keyword argument related ops (e.g. OP_KEY_P, etc.)
- Fix some wrong descriptions
|
|
|
|
|
|
|
|
|
|
|
|
|