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

ruby-changes:61432

From: Nobuyoshi <ko1@a...>
Date: Sun, 31 May 2020 03:19:56 +0900 (JST)
Subject: [ruby-changes:61432] 6dcd10ce56 (master): compile.c: Mark cursor in debug list

https://git.ruby-lang.org/ruby.git/commit/?id=6dcd10ce56

From 6dcd10ce56a9fadc462daab69694480c2d565dfc Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 31 May 2020 03:07:30 +0900
Subject: compile.c: Mark cursor in debug list


diff --git a/compile.c b/compile.c
index de41e4f..24d2561 100644
--- a/compile.c
+++ b/compile.c
@@ -1117,7 +1117,7 @@ APPEND_LIST(ISEQ_ARG_DECLARE LINK_ANCHOR *const anc1, LINK_ANCHOR *const anc2) https://github.com/ruby/ruby/blob/trunk/compile.c#L1117
 
 #if CPDEBUG && 0
 static void
-debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor)
+debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor, LINK_ELEMENT *cur)
 {
     LINK_ELEMENT *list = FIRST_ELEMENT(anchor);
     printf("----\n");
@@ -1130,14 +1130,14 @@ debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor) https://github.com/ruby/ruby/blob/trunk/compile.c#L1130
     }
     printf("----\n");
 
-    dump_disasm_list(anchor->anchor.next);
+    dump_disasm_list_with_cursor(anchor->anchor.next, cur, 0);
     verify_list("debug list", anchor);
 }
 #if CPDEBUG < 0
-#define debug_list(anc) debug_list(iseq, (anc))
+#define debug_list(anc, cur) debug_list(iseq, (anc), (cur))
 #endif
 #else
-#define debug_list(anc) ((void)0)
+#define debug_list(anc, cur) ((void)0)
 #endif
 
 static TRACE *
@@ -2323,7 +2323,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor) https://github.com/ruby/ruby/blob/trunk/compile.c#L2323
 			xfree(generated_iseq);
 			xfree(insns_info);
 			xfree(positions);
-			debug_list(anchor);
+			debug_list(anchor, list);
 			COMPILE_ERROR(iseq, adjust->line_no,
 				      "iseq_set_sequence: adjust bug to %d %d < %d",
 				      label_no, orig_sp, sp);
-- 
cgit v0.10.2


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

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