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

ruby-changes:58489

From: John <ko1@a...>
Date: Tue, 29 Oct 2019 12:08:00 +0900 (JST)
Subject: [ruby-changes:58489] b86e5c9fec (master): Clang can also use C call cache

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

From b86e5c9fec9d9ea0f9c70d9b20456680607399b3 Mon Sep 17 00:00:00 2001
From: John Hawthorn <john@h...>
Date: Mon, 28 Oct 2019 17:24:07 -0700
Subject: Clang can also use C call cache

Previously this was restricted to only gcc because of the
GCC_VERSION_SINCE check (which explicitly excludes clang).

GCC 3.3.0 is quite old so I feel relatively safe assuming that all
reasonable versions of clang support this.

diff --git a/internal.h b/internal.h
index 53091e2..c296a99 100644
--- a/internal.h
+++ b/internal.h
@@ -2388,7 +2388,7 @@ struct rb_call_data { https://github.com/ruby/ruby/blob/trunk/internal.h#L2388
     struct rb_call_info ci;
 };
 VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*)
-#if GCC_VERSION_SINCE(3, 3, 0) && defined(__OPTIMIZE__)
+#if (defined(__clang__) || GCC_VERSION_SINCE(3, 3, 0)) && defined(__OPTIMIZE__)
 __attribute__((__visibility__("default"), __nonnull__(1)))
 # define rb_funcallv(recv, mid, argc, argv) \
     __extension__({ \
-- 
cgit v0.10.2


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

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