[前][次][番号順一覧][スレッド一覧]

ruby-changes:68952

From: John <ko1@a...>
Date: Thu, 21 Oct 2021 08:19:26 +0900 (JST)
Subject: [ruby-changes:68952] 71560f8804 (master): Add opt_size and opt_length

https://git.ruby-lang.org/ruby.git/commit/?id=71560f8804

From 71560f8804d30509b5d0be6547469b089c63ab9a Mon Sep 17 00:00:00 2001
From: John Hawthorn <john@h...>
Date: Fri, 18 Jun 2021 16:56:39 -0700
Subject: Add opt_size and opt_length

---
 yjit_codegen.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/yjit_codegen.c b/yjit_codegen.c
index c4dae13ff9..68fadfc820 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -1973,6 +1973,18 @@ gen_opt_not(jitstate_t *jit, ctx_t *ctx) https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L1973
     return gen_opt_send_without_block(jit, ctx);
 }
 
+static codegen_status_t
+gen_opt_size(jitstate_t *jit, ctx_t *ctx)
+{
+    return gen_opt_send_without_block(jit, ctx);
+}
+
+static codegen_status_t
+gen_opt_length(jitstate_t *jit, ctx_t *ctx)
+{
+    return gen_opt_send_without_block(jit, ctx);
+}
+
 void
 gen_branchif_branch(codeblock_t* cb, uint8_t* target0, uint8_t* target1, uint8_t shape)
 {
@@ -3372,6 +3384,8 @@ yjit_init_codegen(void) https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L3384
     yjit_reg_op(BIN(opt_str_freeze), gen_opt_str_freeze);
     yjit_reg_op(BIN(opt_str_uminus), gen_opt_str_uminus);
     yjit_reg_op(BIN(opt_not), gen_opt_not);
+    yjit_reg_op(BIN(opt_size), gen_opt_size);
+    yjit_reg_op(BIN(opt_length), gen_opt_length);
     yjit_reg_op(BIN(opt_getinlinecache), gen_opt_getinlinecache);
     yjit_reg_op(BIN(opt_invokebuiltin_delegate), gen_opt_invokebuiltin_delegate);
     yjit_reg_op(BIN(opt_invokebuiltin_delegate_leave), gen_opt_invokebuiltin_delegate);
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]