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

ruby-changes:68914

From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:13:09 +0900 (JST)
Subject: [ruby-changes:68914] a14015e9b5 (master): Report unknown --ujit-* options

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

From a14015e9b5594bde3ee802eb8c39d08d5b8e8249 Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Tue, 26 Jan 2021 16:19:29 -0500
Subject: Report unknown --ujit-* options

---
 ruby.c         | 4 ++++
 ujit_codegen.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/ruby.c b/ruby.c
index 55d5bf090c..b5c705002a 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1041,6 +1041,10 @@ setup_ujit_options(const char *s, struct rb_ujit_options *ujit_opt) https://github.com/ruby/ruby/blob/trunk/ruby.c#L1041
     if (opt_match_noarg(s, l, "stats")) {
         ujit_opt->gen_stats = true;
     }
+    else {
+        rb_raise(rb_eRuntimeError,
+                 "invalid ujit option `%s' (--help will show valid ujit options)", s);
+    }
 }
 
 #if USE_MJIT
diff --git a/ujit_codegen.c b/ujit_codegen.c
index 010e98ae86..bb0b802fc4 100644
--- a/ujit_codegen.c
+++ b/ujit_codegen.c
@@ -180,6 +180,7 @@ ujit_gen_block(ctx_t* ctx, block_t* block) https://github.com/ruby/ruby/blob/trunk/ujit_codegen.c#L180
         }
 
 #if RUBY_DEBUG
+        // Count instructions executed by the JIT
         mov(cb, REG0, const_ptr_opnd((void *)&rb_ujit_exec_insns_count));
         add(cb, mem_opnd(64, REG0, 0), imm_opnd(1));
 #endif
-- 
cgit v1.2.1


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

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