| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2021-09-23 | codegen.c: need to check `no_peephole()` before constant folding. | Yukihiro "Matz" Matsumoto | |
| 2021-09-23 | codegen.c: separate maximum stack size from `GEN_LIT_ARY_MAX`. | Yukihiro "Matz" Matsumoto | |
| 2021-09-20 | codegen.c (gen_addsub): use `mrb_int_sub_overflow()`. | Yukihiro "Matz" Matsumoto | |
| 2021-09-20 | codegen.c: avoid constant folding `OP_LOADI16` across branch target. | Yukihiro "Matz" Matsumoto | |
| 2021-09-20 | codegen.c: `gen_move` should generate proper `OP_LOADI16`. | Yukihiro "Matz" Matsumoto | |
| 2021-09-20 | codegen.c: rename `loopinfo->acc` to `reg`. | Yukihiro "Matz" Matsumoto | |
| `acc` meant `accumulator` but it is not an accumulator but just a register position. | |||
| 2021-09-20 | codegen.c: check `no_peephole(s)` before `mrb_last_insn(s)`. | Yukihiro "Matz" Matsumoto | |
| 2021-09-20 | codegen.c (mrb_last_insn): no previous instruction on top. | Yukihiro "Matz" Matsumoto | |
| 2021-09-19 | codegen.c: unify `OP_ARYPUSH` and `OP_ARYPUSH_N`. | Yukihiro "Matz" Matsumoto | |
| - `OP_ARYPUSH` now takes operand for the number of pushing elements - the code generator consume the stack no more than `64` for `mruby/c` | |||
| 2021-09-17 | ops.h: add `OP_ARYPUSH_N` instruction. | Yukihiro "Matz" Matsumoto | |
| Add n elements at once. Reduces instructions for huge array initialization. In addition, `gen_value` function in `codegen.c` was refactored and clarified. | |||
| 2021-09-10 | codegen.c: fixed `gen_setxv` bug with taking assignment value; fix #5550 | Yukihiro "Matz" Matsumoto | |
| 2021-09-10 | codegen.c: `gen_move` refactoring. | Yukihiro "Matz" Matsumoto | |
| 2021-09-10 | ops.h: add `OP_SYMBOL` instruction. | Yukihiro "Matz" Matsumoto | |
| It generates a symbol by interning from the pool string. | |||
| 2021-09-10 | fixup! codegen.c: resurrect `s->lastpc` to reduce `iseq` scans. | Yukihiro "Matz" Matsumoto | |
| 2021-09-10 | codegen.c: resurrect `s->lastpc` to reduce `iseq` scans. | Yukihiro "Matz" Matsumoto | |
| When parsing scripts frequent scans could cost too much. | |||
| 2021-09-07 | codegen.c: improve exception handling in `generate_code`. | Yukihiro "Matz" Matsumoto | |
| - remove `mrb_jmpbuf` from `codegen_scope` - unify exception handling of `mrb_state` and `codegen_scope` | |||
| 2021-09-05 | codegen.c: avoid integer overflow. | Yukihiro "Matz" Matsumoto | |
| 2021-08-21 | Organize the include of header files | dearblue | |
| - `#include <math.h>` is done in `mruby.h`. Eliminate the need to worry about the `MRB_NO_FLOAT` macro. - Include mruby header files before standard header files. If the standard header file is already placed before `mruby.h`, the standard header file added in the future tends to be placed before `mruby.h`. This change should some reduce the chances of macros that must be defined becoming undefined in C++ or including problematic header files in a particular mruby build configuration. | |||
| 2021-08-13 | codegen.c: fixed a bug in `mrb_decode_insn()`. | Yukihiro "Matz" Matsumoto | |
| 2021-08-13 | codegen.c: add a comment that notice `rewind_pc` calling convention. | Yukihiro "Matz" Matsumoto | |
| `rewind_pc` should not be called when `s->pc` is `0` (top). | |||
| 2021-08-13 | codegen.c: refactor `mrb_last_insn()`. | Yukihiro "Matz" Matsumoto | |
| Last commit made `mrb_decode_insn()` to take `NULL` as `pc`. | |||
| 2021-08-13 | codegen.c: `mrb_prev_pc` can return `NULL` at the top of `iseq`. | Yukihiro "Matz" Matsumoto | |
| 2021-08-11 | codegen.c: avoid signedness warning of int comparison. | Yukihiro "Matz" Matsumoto | |
| 2021-08-11 | codegen.c: avoid cross initialization of `mrb_insn_data`. | Yukihiro "Matz" Matsumoto | |
| 2021-08-11 | codegen.c: more peephole optimization. | Yukihiro "Matz" Matsumoto | |
| `a=10; a+=1` to generate: ``` 1 000 OP_LOADI R1 11 ; R1:a ``` instead of: ``` 1 000 OP_LOADI R1 10 ; R1:a 1 003 OP_MOVE R2 R1 ; R1:a 1 006 OP_ADDI R2 1 1 009 OP_MOVE R1 R2 ; R1:a ``` | |||
| 2021-08-07 | codegen.c: need to push the value when the loop was eliminated. | Yukihiro "Matz" Matsumoto | |
| 2021-08-06 | codegen.c: `-9223372036854775808 % -1` overflows 64 bit integer. | Yukihiro "Matz" Matsumoto | |
| 2021-08-05 | codegen.c: remove code duplication from `NODE_ARRAY`. | Yukihiro "Matz" Matsumoto | |
| 2021-08-04 | codegen.c: detect integer overflow in division. | Yukihiro "Matz" Matsumoto | |
| `MRB_INT_MIN / -1` overflows. | |||
| 2021-08-03 | codegen.c: check zero division before constant folding. | Yukihiro "Matz" Matsumoto | |
| 2021-08-03 | codegen.c: avoid division by zero in constant folding. | Yukihiro "Matz" Matsumoto | |
| 2021-08-02 | codegen.c: allow constant folding for negative integer modulo. | Yukihiro "Matz" Matsumoto | |
| 2021-08-02 | codegen.c: refactor `readint()` to read `MRB_INT_MIN`. | Yukihiro "Matz" Matsumoto | |
| 2021-08-02 | codegen.c: fix a bug in bit shift constant folding. | Yukihiro "Matz" Matsumoto | |
| 2021-08-02 | codegen.c: refactor unary operator optimization. | Yukihiro "Matz" Matsumoto | |
| 2021-08-02 | codegen.c: constant folding binary operators, <<, >>, %, &, |, ^. | Yukihiro "Matz" Matsumoto | |
| 2021-08-01 | codegen.c: eliminate loop if condition is constant. | Yukihiro "Matz" Matsumoto | |
| For example, `while false; ...; end` should be removed. | |||
| 2021-08-01 | codegen.c: peephole optimize OP_JMPxxx. | Yukihiro "Matz" Matsumoto | |
| 2021-07-31 | codegen.c: allow constant folding for mul / div. | Yukihiro "Matz" Matsumoto | |
| 2021-07-31 | codegen.c: `mrb_prev_pc()` to take previous instruction position. | Yukihiro "Matz" Matsumoto | |
| It rescans `s->iseq` so that peephole optimizer can take multiple previous instructions for constant folding, etc. | |||
| 2021-07-29 | codegen.c: order instructions in natural order for loops. | Yukihiro "Matz" Matsumoto | |
| `while` and `until` generates in `cond` `jmpif` `body` `jmp` order. It used to be in `jmp` `body` `cond` `jmpif` order. | |||
| 2021-07-28 | codegen.c: labels should be `uint32_t`. | Yukihiro "Matz" Matsumoto | |
| 2021-07-28 | codegen.c: fix `loopinfo` structure members. | Yukihiro "Matz" Matsumoto | |
| - `pc0`: `next` destination - `pc1`: `redo` destination (renamed from `pc2`) - `pc3`: `break` destination (renamed from `pc3`) old `pc1` was unused so removed. | |||
| 2021-07-28 | codegen.c: removed bytecode when the value of `while` is not used. | Yukihiro "Matz" Matsumoto | |
| 2021-07-28 | codegen.c: fixed a bug when value is taken from `while` and `until`. | Yukihiro "Matz" Matsumoto | |
| ```ruby p ((while true; p 1; break; end)) ``` should print `1 nil` but was `1`. | |||
| 2021-07-25 | Remove redundant include headers. | Yukihiro "Matz" Matsumoto | |
| - stdlib.h - stddef.h - stdint.h - stdarg.h - limits.h - float.h | |||
| 2021-07-23 | codegen.c: fixed a bug in `OP_LOADI32` peephole optimization. | Yukihiro "Matz" Matsumoto | |
| 2021-07-22 | codegen.c: `get_int_operand()` to support `OP_LOADL` (int in pool). | Yukihiro "Matz" Matsumoto | |
| 2021-07-22 | codegen.c: add constant folding for unary numeric operators (+, -, ~). | Yukihiro "Matz" Matsumoto | |
| 2021-07-22 | codegen.c: compare symbol names directly avoiding string conversion. | Yukihiro "Matz" Matsumoto | |
