summaryrefslogtreecommitdiffhomepage
path: root/doc/mruby3.md
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-26 10:34:31 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-11-26 10:34:31 +0900
commit7150c6753933f12a2ba63769fb7b3a44cfcddd3d (patch)
treecddfd89197039d98cac827837e58bd3041d88a2a /doc/mruby3.md
parent6dedd6a940194881c3b66124ff277c4cb14d08bd (diff)
downloadmruby-7150c6753933f12a2ba63769fb7b3a44cfcddd3d.tar.gz
mruby-7150c6753933f12a2ba63769fb7b3a44cfcddd3d.zip
Make `OP_JMP*` operand address to be relative.
Jump target address is `operand (16bit)` + `address of next instruction`. In addition, `ilen` was made `uint32_t` so that `iseq` length limitation of 65536 is removed. Only jump target address should be within signed 16bit (-32768 .. 32767).
Diffstat (limited to 'doc/mruby3.md')
-rw-r--r--doc/mruby3.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/mruby3.md b/doc/mruby3.md
index bc0a74b00..3d9159940 100644
--- a/doc/mruby3.md
+++ b/doc/mruby3.md
@@ -137,6 +137,11 @@ No more operand extention
* `OP_EXT2`
* `OP_EXT3`
+## Changed Instructions
+
+Jump addresses used to be specified by absolute offset from the start of `iseq`. Now they are relative offset from the address of the next instruction.
+
+
## `Random` now use `xoshiro128++`.
For better and faster random number generation.