ruby/defs
Nobuyoshi Nakada 49fcd33e13 Introduce a specialize instruction for Array#pack
Instructions for this code:

```ruby
  # frozen_string_literal: true

[a].pack("C")
```

Before this commit:

```
== disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)>
0000 putself                                                          (   3)[Li]
0001 opt_send_without_block                 <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 newarray                               1
0005 putobject                              "C"
0007 opt_send_without_block                 <calldata!mid:pack, argc:1, ARGS_SIMPLE>
0009 leave
```

After this commit:

```
== disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)>
0000 putself                                                          (   3)[Li]
0001 opt_send_without_block                 <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 putobject                              "C"
0005 opt_newarray_send                      2, :pack
0008 leave
```

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2024-05-23 12:11:50 -07:00
..
gmake.mk Revert "Update revision.h if branch unmatch not only revision" 2024-05-09 01:02:59 +09:00
id.def Introduce a specialize instruction for Array#pack 2024-05-23 12:11:50 -07:00
keywords reserved_word: just use gperf 3.1 declaration 2022-09-21 11:44:09 +09:00
known_errors.def [DOC] Add known_errors documents 2024-01-13 11:08:03 +09:00
lex.c.src reserved_word: just use gperf 3.1 declaration 2022-09-21 11:44:09 +09:00
opt_insn_unif.def setdynamic is obsoleted 2016-04-27 07:11:06 +00:00
opt_operand.def * defs/opt_operand.def: Fix typo 2013-12-22 01:11:07 +00:00
separated_version.mk Fixed misspellings 2019-12-20 09:32:42 +09:00
tags.mk Add TAGS rule [ci skip] 2023-02-08 18:00:05 +09:00