diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2024-01-23 11:36:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 19:36:23 +0000 |
commit | 27c1dd8634d34bfe3592151d66b410f28ca749ce (patch) | |
tree | accb9d7f9f44ec2ed2bc791c6bc928b0dd062d28 /kernel.rb | |
parent | 557b69e83b27dafea435719fc3afc2e67e155962 (diff) |
YJIT: Allow inlining ISEQ calls with a block (#9622)
* YJIT: Allow inlining ISEQ calls with a block
* Leave a TODO comment about u16 inline_block
Diffstat (limited to 'kernel.rb')
-rw-r--r-- | kernel.rb | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -87,6 +87,7 @@ module Kernel #++ # def tap + Primitive.attr! :inline_block yield(self) self end @@ -127,6 +128,7 @@ module Kernel # then {|response| JSON.parse(response) } # def then + Primitive.attr! :inline_block unless block_given? return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, rb_obj_size)' end @@ -142,6 +144,7 @@ module Kernel # "my string".yield_self {|s| s.upcase } #=> "MY STRING" # def yield_self + Primitive.attr! :inline_block unless block_given? return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, rb_obj_size)' end @@ -178,6 +181,7 @@ module Kernel # puts enum.next # } #=> :ok def loop + Primitive.attr! :inline_block unless block_given? return enum_for(:loop) { Float::INFINITY } end |