diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-09 11:25:04 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-11 10:48:18 +0900 |
| commit | b1b9b157f85fe371db706e0c11024681d84e4aba (patch) | |
| tree | af652bb95da9231b44887d1336604f694fae030e /src/codedump.c | |
| parent | 52eb2af7d05c9fe9aa1447c83ae2520bcc3966c6 (diff) | |
| download | mruby-b1b9b157f85fe371db706e0c11024681d84e4aba.tar.gz mruby-b1b9b157f85fe371db706e0c11024681d84e4aba.zip | |
codegen.c: more peephole optimization.
`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
```
Diffstat (limited to 'src/codedump.c')
0 files changed, 0 insertions, 0 deletions
