summaryrefslogtreecommitdiff
path: root/yjit/src
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2023-02-17 13:10:16 -0500
committerMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2023-02-17 13:10:16 -0500
commitc3bae033eb9f2bb199dede052516ec923bcf10cc (patch)
treee37a640012b78e23db5011c5f217fed22dfd2868 /yjit/src
parentbecec0001c8eff1b763bed804e48a9ab71289fdd (diff)
Add asm comment to YJIT's rb_str_empty_p
Diffstat (limited to 'yjit/src')
-rw-r--r--yjit/src/codegen.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index f2294db13f..474a641c64 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -4244,8 +4244,8 @@ fn jit_rb_str_to_s(
false
}
-// Codegen for rb_str_empty()
-fn jit_rb_str_empty(
+// Codegen for rb_str_empty_p()
+fn jit_rb_str_empty_p(
_jit: &mut JITState,
ctx: &mut Context,
asm: &mut Assembler,
@@ -4264,6 +4264,7 @@ fn jit_rb_str_empty(
let recv_opnd = ctx.stack_pop(1);
let out_opnd = ctx.stack_push(Type::UnknownImm);
+ asm.comment("get string length");
let str_len_opnd = Opnd::mem(
(8 * size_of::<std::os::raw::c_long>()) as u8,
asm.load(recv_opnd),
@@ -7874,7 +7875,7 @@ impl CodegenGlobals {
self.yjit_reg_method(rb_cInteger, "===", jit_rb_int_equal);
// rb_str_to_s() methods in string.c
- self.yjit_reg_method(rb_cString, "empty?", jit_rb_str_empty);
+ self.yjit_reg_method(rb_cString, "empty?", jit_rb_str_empty_p);
self.yjit_reg_method(rb_cString, "to_s", jit_rb_str_to_s);
self.yjit_reg_method(rb_cString, "to_str", jit_rb_str_to_s);
self.yjit_reg_method(rb_cString, "bytesize", jit_rb_str_bytesize);