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

ruby-changes:70650

From: Nobuyoshi <ko1@a...>
Date: Wed, 29 Dec 2021 14:09:52 +0900 (JST)
Subject: [ruby-changes:70650] 4e4c4fab3c (master): YJIT: Use proper size prefix and conversion where IL32LLP64

https://git.ruby-lang.org/ruby.git/commit/?id=4e4c4fab3c

From 4e4c4fab3c25a056688939ae8e003a049fc401ee Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 29 Dec 2021 14:09:37 +0900
Subject: YJIT: Use proper size prefix and conversion where IL32LLP64

---
 yjit_core.c  | 2 +-
 yjit_iface.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/yjit_core.c b/yjit_core.c
index a3b52971fb3..fbe855d04be 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -1319,7 +1319,7 @@ invalidate_block_version(block_t *block) https://github.com/ruby/ruby/blob/trunk/yjit_core.c#L1319
         regenerate_branch(cb, branch);
 
         if (target_next && branch->end_addr > block->end_addr) {
-            fprintf(stderr, "branch_block_idx=%u block_idx=%u over=%ld block_size=%ld\n",
+            fprintf(stderr, "branch_block_idx=%u block_idx=%u over=%td block_size=%td\n",
                 branch->block->blockid.idx,
                 block->blockid.idx,
                 branch->end_addr - block->end_addr,
diff --git a/yjit_iface.c b/yjit_iface.c
index 9240e3f1c93..339c5cd455a 100644
--- a/yjit_iface.c
+++ b/yjit_iface.c
@@ -1180,7 +1180,8 @@ rb_yjit_call_threshold(void) https://github.com/ruby/ruby/blob/trunk/yjit_iface.c#L1180
     return rb_yjit_opts.call_threshold;
 }
 
-# define PTR2NUM(x)   (LONG2NUM((long)(x)))
+/* assume sizeof(void*) == sizeof(size_t) */
+# define PTR2NUM(x)   (SSIZET2NUM((ssize_t)(x)))
 
 /**
  *  call-seq: block.id -> unique_id
-- 
cgit v1.2.1


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

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