Commit Graph

16 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 55348ce0da opcode.md: update instruction table to match current ops.h
Add 13 new opcodes (OP_GETIDX0, OP_MATCHERR, OP_SSEND0,
OP_SEND0, OP_BLKCALL, OP_RETSELF, OP_RETNIL, OP_RETTRUE,
OP_RETFALSE, OP_ADDILV, OP_SUBILV, OP_TDEF, OP_SDEF).
Fix renamed instructions (OP_LOADT -> OP_LOADTRUE, etc.).
Update title and introduction to reflect current state.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-27 17:05:47 +09:00
Yukihiro "Matz" Matsumoto b841bd7439 doc/internal/opcode.md: document OP_GETIDX/OP_SETIDX optimization
Add notes section explaining the optimization behavior:
- Which functions are used for direct access
- When fallback to method dispatch occurs
- Why subclasses can override []/[]=

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-25 18:01:44 +09:00
Yukihiro "Matz" Matsumoto 77e08c9193 ops.h: rename OP_LOADI to OP_LOADI8
OP_LOADI stores an 8 bit integer to a register, so we renamed the
instruction name to describe the behavior more precisely, like
OP_LOADI16 and OP_LOADI32.
2024-12-01 19:16:54 +09:00
dearblue 6291b55bba Add links to documentation in README.md
The documentation table is generated by the `rake doc:update-index` command.
The following conditions must be met for links to be added to the documentation table.

  - The file must be placed under the `doc/` directory
  - The file must have the extension `.md`
  - The file must be written at the top of the file with `<! -- summary: ANY-TEXT -->`
2024-11-10 22:39:14 +09:00
Hoshiumi Arata 35571df7ea Update opcode.md: fix wrong column number 2024-07-23 20:25:22 +09:00
dearblue f4f3a061be Changed the instruction table in opcode.md
- Added the index number corresponding to the instruction code.
  - Omitted trailing `|` from table elements.
    The table elements in GitHub Flavored Markdown can't wrap wherever wanted.
    And trying to align the end of it tends to make the whole thing longer.
2024-06-22 23:21:43 +09:00
Yukihiro "Matz" Matsumoto b3c95f3851 Merge pull request #5863 from dearblue/doc/OP_CALL
Update semantics comment for `OP_CALL`
2022-12-06 14:20:16 +09:00
Yukihiro "Matz" Matsumoto 94b3d48df2 Merge pull request #5862 from dearblue/doc/update-opcode.md
Update `opcode.md` to match the latest implementation
2022-12-06 14:20:03 +09:00
dearblue 32d48a5f0e Escaping pipes in the code of table elements
ref. https://github.github.com/gfm/#example-200
2022-12-03 14:40:30 +09:00
dearblue 478fd615af Update semantics comment for OP_CALL 2022-12-03 14:26:05 +09:00
dearblue 13d8804d88 Update opcode.md to match the latest implementation 2022-12-03 13:59:35 +09:00
dearblue 5e62990748 Add task rake doc:update-opcode.md
Allow to update `doc/internal/opcode.md` file mechanically from `include/mruby/ops.h` file.

At the same time, the `doc/internal/opcode.md` file has been updated.
Consecutive hyphens at the end of the table were removed as they would have created noise as markdown flavours.
2022-11-20 21:58:13 +09:00
fn ⌃ ⌥ 273fcbc347 ops.h: update OP_ARYDUP instruction and rename to OP_ARYSPLAT.
Transforms the value of a splat inside a return statement (similar
to an array). For example, `return *nil` should return `nil.to_a`,
while `return *1` should return `[1]`
2022-10-29 19:54:34 -07:00
John Bampton 696226a60e docs: standardize Markdown lists
Previously for lists we were using both `*` and `-` to start the list items.

This pr changes all lists to use `-`.
2022-10-26 13:09:41 +10:00
John Bampton 7e4eaaa11a Format Markdown tables 2022-03-24 01:00:24 +10:00
Yukihiro "Matz" Matsumoto f69eafc6bd doc/internal/opcode.md: moved from doc/opcode.md 2021-11-20 14:56:59 +09:00