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

ruby-changes:64306

From: Koichi <ko1@a...>
Date: Sat, 19 Dec 2020 04:33:31 +0900 (JST)
Subject: [ruby-changes:64306] 04d62e6f62 (master): fix method cache debug tool

https://git.ruby-lang.org/ruby.git/commit/?id=04d62e6f62

From 04d62e6f6202684c57f2fcf71bbfcb891cd4ddd9 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Sat, 19 Dec 2020 04:29:58 +0900
Subject: fix method cache debug tool


diff --git a/vm.c b/vm.c
index c618b79..ee28a2d 100644
--- a/vm.c
+++ b/vm.c
@@ -3595,7 +3595,6 @@ Init_VM(void) https://github.com/ruby/ruby/blob/trunk/vm.c#L3595
     rb_define_singleton_method(rb_cRubyVM, "SDR", sdr, 0);
     rb_define_singleton_method(rb_cRubyVM, "NSDR", nsdr, 0);
     rb_define_singleton_method(rb_cRubyVM, "mtbl", vm_mtbl, 2);
-    rb_define_singleton_method(rb_cRubyVM, "mtbl", vm_mtbl, 2);
     rb_define_singleton_method(rb_cRubyVM, "mtbl2", vm_mtbl2, 2);
 #else
     (void)sdr;
diff --git a/vm_method.c b/vm_method.c
index f1d6c84..9ee9688 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -25,12 +25,12 @@ static enum rb_id_table_iterator_result https://github.com/ruby/ruby/blob/trunk/vm_method.c#L25
 vm_ccs_dump_i(ID mid, VALUE val, void *data)
 {
     const struct rb_class_cc_entries *ccs = (struct rb_class_cc_entries *)val;
-    fprintf(stderr,     "  | %s (%d) ", rb_id2name(mid), ccs->len);
+    fprintf(stderr,     "  | %s (len:%d) ", rb_id2name(mid), ccs->len);
     rp(ccs->cme);
 
     for (int i=0; i<ccs->len; i++) {
-        fprintf(stderr, "  | [%d] ", i); vm_ci_dump(ccs->entries[i].ci);
-        rp_m(           "  | ", ccs->entries[i].cc);
+        fprintf(stderr, "  | [%d]\t", i); vm_ci_dump(ccs->entries[i].ci);
+        rp_m(           "  |   \t", ccs->entries[i].cc);
     }
 
     return ID_TABLE_CONTINUE;
-- 
cgit v0.10.2


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

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