ruby-changes:60719
From: Koichi <ko1@a...>
Date: Fri, 10 Apr 2020 14:53:43 +0900 (JST)
Subject: [ruby-changes:60719] 443389effc (master): reduce duplicate include.
https://git.ruby-lang.org/ruby.git/commit/?id=443389effc From 443389effc37308ce1a3c3a840082a344fc6af56 Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Fri, 10 Apr 2020 11:20:35 +0900 Subject: reduce duplicate include. Without this patch, 20k files are opened (openat syscall) because of duplicate includes. This patch reduced it to 3k and build time was reduced compile time of range.o from 15sec -> 3sec on my machine. [Bug #16772] diff --git a/include/ruby/3/anyargs.h b/include/ruby/3/anyargs.h index e2408d7..7c2aa05 100644 --- a/include/ruby/3/anyargs.h +++ b/include/ruby/3/anyargs.h @@ -72,7 +72,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/anyargs.h#L72 #include "ruby/3/attr/weakref.h" #include "ruby/3/cast.h" #include "ruby/3/config.h" -#include "ruby/3/has/attribute.h" #include "ruby/3/intern/class.h" #include "ruby/3/intern/vm.h" #include "ruby/3/method.h" diff --git a/include/ruby/3/arithmetic/int.h b/include/ruby/3/arithmetic/int.h index f6af085..3648516 100644 --- a/include/ruby/3/arithmetic/int.h +++ b/include/ruby/3/arithmetic/int.h @@ -31,7 +31,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/arithmetic/int.h#L31 #include "ruby/3/dllexport.h" #include "ruby/3/special_consts.h" #include "ruby/3/value.h" -#include "ruby/3/warning_push.h" #include "ruby/assert.h" #define RB_INT2NUM rb_int2num_inline diff --git a/include/ruby/3/assume.h b/include/ruby/3/assume.h index 926c17f..cbd0263 100644 --- a/include/ruby/3/assume.h +++ b/include/ruby/3/assume.h @@ -27,7 +27,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/assume.h#L27 #define RUBY3_ASSUME_H #include "ruby/3/config.h" #include "ruby/3/cast.h" -#include "ruby/3/compiler_since.h" #include "ruby/3/has/builtin.h" /** @cond INTERNAL_MACRO */ diff --git a/include/ruby/3/attr/alloc_size.h b/include/ruby/3/attr/alloc_size.h index 1b13e6f..8296e9d 100644 --- a/include/ruby/3/attr/alloc_size.h +++ b/include/ruby/3/attr/alloc_size.h @@ -18,7 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/alloc_size.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_ALLOC_SIZE. */ -#include "ruby/3/has/attribute.h" /** Wraps (or simulates) `__attribute__((alloc_size))` */ #if defined(RUBY3_ATTR_ALLOC_SIZE) diff --git a/include/ruby/3/attr/artificial.h b/include/ruby/3/attr/artificial.h index 7b0acab..5e94a04 100644 --- a/include/ruby/3/attr/artificial.h +++ b/include/ruby/3/attr/artificial.h @@ -32,7 +32,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/artificial.h#L32 * case it gets vital to know where the inlining happened in the callee. * See also https://stackoverflow.com/a/21936099 */ -#include "ruby/3/has/attribute.h" /** Wraps (or simulates) `__attribute__((artificial))` */ #if defined(RUBY3_ATTR_ARTIFICIAL) diff --git a/include/ruby/3/attr/cold.h b/include/ruby/3/attr/cold.h index 6c1093d..27f9276 100644 --- a/include/ruby/3/attr/cold.h +++ b/include/ruby/3/attr/cold.h @@ -19,7 +19,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/cold.h#L19 * @brief Defines #RUBY3_ATTR_COLD. */ #include "ruby/3/compiler_is.h" -#include "ruby/3/has/attribute.h" /** Wraps (or simulates) `__attribute__((cold))` */ #if defined(RUBY3_ATTR_COLD) diff --git a/include/ruby/3/attr/const.h b/include/ruby/3/attr/const.h index 06372db..689889c 100644 --- a/include/ruby/3/attr/const.h +++ b/include/ruby/3/attr/const.h @@ -18,8 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/const.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_CONST. */ -#include "ruby/3/compiler_since.h" -#include "ruby/3/has/attribute.h" #include "ruby/3/has/declspec_attribute.h" /** Wraps (or simulates) `__attribute__((const))` */ diff --git a/include/ruby/3/attr/constexpr.h b/include/ruby/3/attr/constexpr.h index 5c09bce..11842d8 100644 --- a/include/ruby/3/attr/constexpr.h +++ b/include/ruby/3/attr/constexpr.h @@ -20,7 +20,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/constexpr.h#L20 */ #include "ruby/3/has/feature.h" #include "ruby/3/compiler_is.h" -#include "ruby/3/token_paste.h" /** @cond INTERNAL_MACRO*/ #if defined(RUBY3_ATTR_CONSTEXPR) diff --git a/include/ruby/3/attr/deprecated.h b/include/ruby/3/attr/deprecated.h index cea124e..629f7c9 100644 --- a/include/ruby/3/attr/deprecated.h +++ b/include/ruby/3/attr/deprecated.h @@ -18,8 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/deprecated.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_DEPRECATED. */ -#include "ruby/3/compiler_since.h" -#include "ruby/3/has/attribute.h" #include "ruby/3/has/c_attribute.h" #include "ruby/3/has/cpp_attribute.h" #include "ruby/3/has/declspec_attribute.h" diff --git a/include/ruby/3/attr/diagnose_if.h b/include/ruby/3/attr/diagnose_if.h index 88ad81a..a363c4c 100644 --- a/include/ruby/3/attr/diagnose_if.h +++ b/include/ruby/3/attr/diagnose_if.h @@ -18,8 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/diagnose_if.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_DIAGNOSE_IF. */ -#include "ruby/3/has/attribute.h" -#include "ruby/3/warning_push.h" /** Wraps (or simulates) `__attribute__((diagnose_if))` */ #if defined(RUBY3_ATTR_DIAGNOSE_IF) diff --git a/include/ruby/3/attr/enum_extensibility.h b/include/ruby/3/attr/enum_extensibility.h index 2135736..0631057 100644 --- a/include/ruby/3/attr/enum_extensibility.h +++ b/include/ruby/3/attr/enum_extensibility.h @@ -18,7 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/enum_extensibility.h#L18 * extension libraries. They could be written in C++98. * @brief #RUBY3_ATTR_ENUM_EXTENSIBILITY. */ -#include "ruby/3/has/attribute.h" /** Wraps (or simulates) `__attribute__((enum_extensibility))` */ #if defined(RUBY3_ATTR_ENUM_EXTENSIBILITY) diff --git a/include/ruby/3/attr/error.h b/include/ruby/3/attr/error.h index 15d9181..ec9383a 100644 --- a/include/ruby/3/attr/error.h +++ b/include/ruby/3/attr/error.h @@ -18,7 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/error.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_ERROR. */ -#include "ruby/3/has/attribute.h" /** Wraps (or simulates) `__attribute__((error))` */ #if defined(RUBY3_ATTR_ERROR) diff --git a/include/ruby/3/attr/flag_enum.h b/include/ruby/3/attr/flag_enum.h index a026ab5..5e7e998 100644 --- a/include/ruby/3/attr/flag_enum.h +++ b/include/ruby/3/attr/flag_enum.h @@ -19,7 +19,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/flag_enum.h#L19 * @brief Defines #RUBY3_ATTR_FLAG_ENUM. * @see https://clang.llvm.org/docs/AttributeReference.html#flag_enum */ -#include "ruby/3/has/attribute.h" /** Wraps (or simulates) `__attribute__((flag_enum)` */ #if defined(RUBY3_ATTR_FLAG_ENUM) diff --git a/include/ruby/3/attr/forceinline.h b/include/ruby/3/attr/forceinline.h index 47d7d58..6d27923 100644 --- a/include/ruby/3/attr/forceinline.h +++ b/include/ruby/3/attr/forceinline.h @@ -18,8 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/forceinline.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_FORCEINLINE. */ -#include "ruby/3/compiler_since.h" -#include "ruby/3/has/attribute.h" /** * Wraps (or simulates) `__forceinline`. MSVC complains on declarations like diff --git a/include/ruby/3/attr/format.h b/include/ruby/3/attr/format.h index b41094f..de8e2f5 100644 --- a/include/ruby/3/attr/format.h +++ b/include/ruby/3/attr/format.h @@ -18,7 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/format.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_FORMAT. */ -#include "ruby/3/has/attribute.h" /** Wraps (or simulates) `__attribute__((format))` */ #if defined(RUBY3_ATTR_FORMAT) diff --git a/include/ruby/3/attr/maybe_unused.h b/include/ruby/3/attr/maybe_unused.h index 3463dfb..29a8c35 100644 --- a/include/ruby/3/attr/maybe_unused.h +++ b/include/ruby/3/attr/maybe_unused.h @@ -18,7 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/maybe_unused.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_MAYBE_UNUSED. */ -#include "ruby/3/has/attribute.h" #include "ruby/3/has/c_attribute.h" #include "ruby/3/has/cpp_attribute.h" diff --git a/include/ruby/3/attr/nodiscard.h b/include/ruby/3/attr/nodiscard.h index 00ef068..342a1da 100644 --- a/include/ruby/3/attr/nodiscard.h +++ b/include/ruby/3/attr/nodiscard.h @@ -18,7 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/nodiscard.h#L18 * extension libraries. They could be written in C++98. * @brief Defines #RUBY3_ATTR_NODISCARD. */ -#include "ruby/3/has/attribute.h" #include "ruby/3/has/c_attribute.h" #include "ruby/3/has/cpp_attribute.h" diff --git a/include/ruby/3/attr/noexcept.h b/include/ruby/3/attr/noexcept.h index c5db6b3..1bc90de 100644 --- a/include/ruby/3/attr/noexcept.h +++ b/include/ruby/3/attr/noexcept.h @@ -59,7 +59,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/attr/noexcept.h#L59 * Itanium C++ ABI has zero-cost exception handling), but does impact on * generated binary size. This is bad. */ -#include "ruby/3/compiler_since.h" #include "ruby/3/has/feature.h" /** Wraps (or simulates) C++11 `noexcept` */ diff --git a/include/ruby/3/attr/noinline.h b/include/ruby/3/attr/noinline.h index 4700437..4483c4c 100644 --- a/include/ruby/3/attr/noinline.h +++ b/include/ruby/3/attr/noinline.h @@ -18,7 +18,6 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/a (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/