This patch optimizes the performance of the is_reference trait by dispatching
to the new __is_reference built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
(is_reference_v): Likewise.
Signed-off-by: Ken
.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 36ad9814047..bd57488824b 100644
--- a/libstdc++-v3/include
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_function.
* g++.dg/ext/is_function.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 18 ++
1 file changed, 18 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index bd57488824b..674d398c075 100644
--- a/libstdc++-v3/include/std
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __remove_pointer.
* g++.dg/ext/remove_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h
.
* include/bits/stl_algobase.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 155
This patch optimizes the performance of the remove_pointer trait by
dispatching to the new remove_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_pointer): Use __remove_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include
: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 13 +
1 file changed, 13 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 3acd843f2f2..cc466e0f606 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
original implementation.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index cc466e0f606..88171e1a672 100644
. Optimize its
implementation.
(is_pointer_v): Likewise.
Co-authored-by: Jonathan Wakely
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 8
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 44 insertions(+), 8
This patch optimizes the performance of the is_unsigned trait by dispatching
to the new __is_unsigned built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
(is_unsigned_v): Likewise.
Signed-off-by: Ken Matsui
This patch optimizes the performance of the is_signed trait by dispatching to
the new __is_signed built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_signed): Use __is_signed built-in trait.
(is_signed_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
/bits/stl_algobase.h: Use __is_scalar_type instead.
* include/bits/valarray_array.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_unsigned.
* g++.dg/ext/is_unsigned.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf| 1 +
gcc/cp/cp-trait.h| 211 ++-
gcc/cp/semantics.cc
This patch optimizes the performance of the is_scalar trait by dispatching to
the new __is_scalar built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scalar): Use __is_scalar built-in
trait.
(is_scalar_v): Likewise.
Signed-off-by: Ken Matsui
: Likewise.
* include/tr1/cmath: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 184
This patch optimizes the performance of the is_compound trait by dispatching
to the new __is_arithmetic built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_compound): Do not use __not_.
(is_compound_v): Use is_fundamental_v instead.
Signed-off-by: Ken Matsui
rid change
Changes in v11:
* Merged all patches into one patch series
* Rebased on top of trunk
* Unified commit message style
* Used _GLIBCXX_USE_BUILTIN_TRAIT
Ken Matsui (39):
c++: Sort built-in identifiers alphabetically
c-family, c++: Look up built-in
.
(finish_trait_expr): Likewise.
(finish_trait_type): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Sort built-in identifiers
alphabetically.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 68 -
gcc/cp/cp-trait.def
file.
* cp-trait.h: New file.
Signed-off-by: Ken Matsui
---
gcc/c-family/c-common.cc | 12 +-
gcc/c-family/c-common.h | 7 +-
gcc/cp/Make-lang.in | 24
gcc/cp/cp-objcp-common.cc | 6 +-
gcc/cp/cp-trait-head.in | 30 +
gcc/cp/cp-trait.gperf | 74
: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/Make-lang.in | 2 +-
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf| 1 +
gcc/cp/cp-trait.h| 202
This patch optimizes the performance of the is_const trait by dispatching to
the new __is_const built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_const): Use __is_const built-in trait.
(is_const_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_volatile.
* g++.dg/ext/is_volatile.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3
This patch optimizes the performance of the is_volatile trait by dispatching
to the new __is_volatile built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __is_volatile built-in
trait.
(is_volatile_v): Likewise.
Signed-off-by: Ken Matsui
(trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_array.
* g++.dg/ext/is_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp
This patch optimizes the performance of the is_array trait by dispatching to
the new __is_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_array): Use __is_array built-in trait.
(is_array_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
CPTK_IS_UNBOUNDED_ARRAY.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_unbounded_array.
* g++.dg/ext/is_unbounded_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp
This patch optimizes the performance of the is_unbounded_array trait by
dispatching to the new __is_unbounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unbounded_array_v): Use
__is_unbounded_array built-in trait.
Signed-off-by: Ken Matsui
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_bounded_array.
* g++.dg/ext/is_bounded_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_scoped_enum.
* g++.dg/ext/is_scoped_enum.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
This patch optimizes the performance of the is_bounded_array trait by
dispatching to the new __is_bounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_bounded_array_v): Use __is_bounded_array
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc
-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 12
1 file changed, 12 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index d306073a797..7fd29d8d9f2 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
CPTK_IS_MEMBER_POINTER.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_member_pointer.
* g++.dg/ext/is_member_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp
/is_member_function_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 176 +-
gcc/cp
.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 7fd29d8d9f2..d7f89cf7c06 100644
--- a/libstdc++-v3/include
test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 62 ++-
gcc/cp/semantics.cc
.
(is_member_function_pointer_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 16
1 file changed, 16 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index d7f89cf7c06..e1b10240dc2
.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 36ad9814047..bd57488824b 100644
--- a/libstdc++-v3/include
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_function.
* g++.dg/ext/is_function.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
.
(is_member_object_pointer_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index e1b10240dc2..792213ebfe8
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __remove_pointer.
* g++.dg/ext/remove_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h
): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 18 ++
1 file changed, 18 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index bd57488824b..674d398c075 100644
--- a/libstdc++-v3/include/std
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_reference.
* g++.dg/ext/is_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
. Optimize its
implementation.
(is_pointer_v): Likewise.
Co-authored-by: Jonathan Wakely
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 8
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 44 insertions(+), 8
This patch optimizes the performance of the remove_pointer trait by
dispatching to the new remove_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_pointer): Use __remove_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include
: Likewise.
* include/tr1/cmath: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 184
.
* include/bits/stl_algobase.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 155
This patch optimizes the performance of the is_reference trait by dispatching
to the new __is_reference built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
(is_reference_v): Likewise.
Signed-off-by: Ken
original implementation.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index cc466e0f606..88171e1a672 100644
: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 13 +
1 file changed, 13 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 3acd843f2f2..cc466e0f606 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
This patch optimizes the performance of the is_unsigned trait by dispatching
to the new __is_unsigned built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
(is_unsigned_v): Likewise.
Signed-off-by: Ken Matsui
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_unsigned.
* g++.dg/ext/is_unsigned.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf| 1 +
gcc/cp/cp-trait.h| 211 ++-
gcc/cp/semantics.cc
This patch optimizes the performance of the is_signed trait by dispatching to
the new __is_signed built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_signed): Use __is_signed built-in trait.
(is_signed_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
This patch optimizes the performance of the is_compound trait by dispatching
to the new __is_arithmetic built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_compound): Do not use __not_.
(is_compound_v): Use is_fundamental_v instead.
Signed-off-by: Ken Matsui
/bits/stl_algobase.h: Use __is_scalar_type instead.
* include/bits/valarray_array.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp
This patch optimizes the performance of the is_scalar trait by dispatching to
the new __is_scalar built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scalar): Use __is_scalar built-in
trait.
(is_scalar_v): Likewise.
Signed-off-by: Ken Matsui
On Wed, Oct 11, 2023 at 1:09 PM Patrick Palka wrote:
>
> On Tue, 10 Oct 2023, Ken Matsui wrote:
>
> > Since RID_MAX soon reaches 255 and all traits are used approximately once in
> > a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and
> > RID_TRAIT_T
v11:
* Merged all patches into one patch series
* Rebased on top of trunk
* Unified commit message style
* Used _GLIBCXX_USE_BUILTIN_TRAIT
Ken Matsui (39):
c++: Sort built-in traits alphabetically
c-family, c++: Look up built-in traits through gperf
c
.
(finish_trait_expr): Likewise.
(finish_trait_type): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Sort built-in traits alphabetically.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 68 -
gcc/cp/cp-trait.def
and
RID_TRAIT_TYPE empty, which do not have corresponding unique
cannonical spellings.
* cp-trait-head.in: New file.
* cp-trait.gperf: New file.
* cp-trait.h: New file.
Signed-off-by: Ken Matsui
---
gcc/c-family/c-common.cc | 12 +-
gcc/c-family/c
This patch optimizes the performance of the is_const trait by dispatching to
the new __is_const built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_const): Use __is_const built-in trait.
(is_const_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
This patch optimizes the performance of the is_volatile trait by dispatching
to the new __is_volatile built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __is_volatile built-in
trait.
(is_volatile_v): Likewise.
Signed-off-by: Ken Matsui
: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/Make-lang.in | 2 +-
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf| 1 +
gcc/cp/cp-trait.h| 202
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_volatile.
* g++.dg/ext/is_volatile.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_scoped_enum.
* g++.dg/ext/is_scoped_enum.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
/bits/stl_algobase.h: Use __is_scalar_type instead.
* include/bits/valarray_array.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp
This patch optimizes the performance of the is_bounded_array trait by
dispatching to the new __is_bounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_bounded_array_v): Use __is_bounded_array
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc
/is_member_function_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 176 +-
gcc/cp
This patch optimizes the performance of the is_array trait by dispatching to
the new __is_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_array): Use __is_array built-in trait.
(is_array_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
This patch optimizes the performance of the is_unbounded_array trait by
dispatching to the new __is_unbounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unbounded_array_v): Use
__is_unbounded_array built-in trait.
Signed-off-by: Ken Matsui
.
* include/bits/stl_algobase.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 155
This patch optimizes the performance of the is_unsigned trait by dispatching
to the new __is_unsigned built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
(is_unsigned_v): Likewise.
Signed-off-by: Ken Matsui
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_reference.
* g++.dg/ext/is_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 7fd29d8d9f2..d7f89cf7c06 100644
--- a/libstdc++-v3/include
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_bounded_array.
* g++.dg/ext/is_bounded_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
(trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_array.
* g++.dg/ext/is_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp
This patch optimizes the performance of the is_scalar trait by dispatching to
the new __is_scalar built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scalar): Use __is_scalar built-in
trait.
(is_scalar_v): Likewise.
Signed-off-by: Ken Matsui
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_unsigned.
* g++.dg/ext/is_unsigned.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
CPTK_IS_UNBOUNDED_ARRAY.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_unbounded_array.
* g++.dg/ext/is_unbounded_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp
.
(is_member_function_pointer_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 16
1 file changed, 16 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index d7f89cf7c06..e1b10240dc2
test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 62 ++-
gcc/cp/semantics.cc
original implementation.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index cc466e0f606..88171e1a672 100644
-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 12
1 file changed, 12 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index d306073a797..7fd29d8d9f2 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
This patch optimizes the performance of the is_signed trait by dispatching to
the new __is_signed built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_signed): Use __is_signed built-in trait.
(is_signed_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
.
(is_member_object_pointer_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index e1b10240dc2..792213ebfe8
: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 13 +
1 file changed, 13 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 3acd843f2f2..cc466e0f606 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __remove_pointer.
* g++.dg/ext/remove_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h
CPTK_IS_MEMBER_POINTER.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_member_pointer.
* g++.dg/ext/is_member_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp
This patch optimizes the performance of the remove_pointer trait by
dispatching to the new remove_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_pointer): Use __remove_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include
: Likewise.
* include/tr1/cmath: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf | 1 +
gcc/cp/cp-trait.h | 184
.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 36ad9814047..bd57488824b 100644
--- a/libstdc++-v3/include
.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_function.
* g++.dg/ext/is_function.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
. Optimize its
implementation.
(is_pointer_v): Likewise.
Co-authored-by: Jonathan Wakely
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 8
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 44 insertions(+), 8
): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 18 ++
1 file changed, 18 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index bd57488824b..674d398c075 100644
--- a/libstdc++-v3/include/std
This patch optimizes the performance of the is_reference trait by dispatching
to the new __is_reference built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
(is_reference_v): Likewise.
Signed-off-by: Ken
This patch optimizes the performance of the is_compound trait by dispatching
to the new __is_arithmetic built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_compound): Do not use __not_.
(is_compound_v): Use is_fundamental_v instead.
Signed-off-by: Ken Matsui
: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-trait.gperf| 1 +
gcc/cp/cp-trait.h| 211 ++-
gcc/cp/semantics.cc
enum rid change.
Changes in v11:
* Merged all patches into one patch series.
* Rebased on top of trunk.
* Unified commit message style.
* Used _GLIBCXX_USE_BUILTIN_TRAIT.
Ken Matsui (40):
c++: Sort built-in traits alphabetically
c-family, c++: Look up built-in
501 - 600 of 1112 matches
Mail list logo