From d75691877c4a7521a995d2601021fcaf30f65d94 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 13 Feb 2022 20:17:53 +0100 Subject: d: Merge upstream dmd 52844d4b1, druntime dbd0c874, phobos 896b1d0e1. D front-end changes: - Parsing and compiling C code is now possible using `import'. - `throw' statements can now be used as an expression. - Improvements to the D template emission strategy when compiling with `-funittest'. D Runtime changes: - New core.int128 module for implementing intrinsics to support 128-bit integer types. - C bindings for the kernel and C runtime have been better separated to allow compiling for hybrid targets, such as kFreeBSD. Phobos changes: - The std.experimental.checkedint module has been renamed to std.checkedint. gcc/d/ChangeLog: * d-builtins.cc (d_build_builtins_module): Set purity of DECL_PURE_P functions to PURE::const_. * d-gimplify.cc (bit_field_ref): New function. (d_gimplify_modify_expr): Handle implicit casting for assignments to bit-fields. (d_gimplify_unary_expr): New function. (d_gimplify_binary_expr): New function. (d_gimplify_expr): Handle UNARY_CLASS_P and BINARY_CLASS_P. * d-target.cc (Target::_init): Initialize bitFieldStyle. (TargetCPP::parameterType): Update signature. (Target::supportsLinkerDirective): New function. * dmd/MERGE: Merge upstream dmd 52844d4b1. * expr.cc (ExprVisitor::visit (ThrowExp *)): New function. * types.cc (d_build_bitfield_integer_type): New function. (insert_aggregate_bitfield): New function. (layout_aggregate_members): Handle inserting bit-fields into an aggregate type. libphobos/ChangeLog: * Makefile.in: Regenerate. * libdruntime/MERGE: Merge upstream druntime dbd0c874. * libdruntime/Makefile.am (DRUNTIME_CSOURCES): Add core/int128.d. (DRUNTIME_DISOURCES): Add __builtins.di. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 896b1d0e1. * src/Makefile.am (PHOBOS_DSOURCES): Add std/checkedint.d. * src/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add -fall-instantiations to --gdcflags. --- libphobos/libdruntime/rt/dmain2.d | 2 +- libphobos/libdruntime/rt/util/typeinfo.d | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'libphobos/libdruntime/rt') diff --git a/libphobos/libdruntime/rt/dmain2.d b/libphobos/libdruntime/rt/dmain2.d index b363e3f..47b67f1 100644 --- a/libphobos/libdruntime/rt/dmain2.d +++ b/libphobos/libdruntime/rt/dmain2.d @@ -624,7 +624,7 @@ extern (C) void _d_print_throwable(Throwable t) { WSink caption; if (t) - caption.sink(t.classinfo.name); + caption.sink(typeid(t).name); // Avoid static user32.dll dependency for console applications // by loading it dynamically as needed diff --git a/libphobos/libdruntime/rt/util/typeinfo.d b/libphobos/libdruntime/rt/util/typeinfo.d index d06254c..26c24c4 100644 --- a/libphobos/libdruntime/rt/util/typeinfo.d +++ b/libphobos/libdruntime/rt/util/typeinfo.d @@ -367,7 +367,10 @@ detect if we need to override. The overriding initializer should be nonzero. private class TypeInfoArrayGeneric(T, Base = T) : Select!(is(T == Base), TypeInfo_Array, TypeInfoArrayGeneric!Base) { static if (is(T == Base)) - override bool opEquals(Object o) { return TypeInfo.opEquals(o); } + override bool opEquals(const Object o) const @safe nothrow { return TypeInfo.opEquals(cast(const TypeInfo) o); } + + alias opEquals = typeof(super).opEquals; + alias opEquals = TypeInfo.opEquals; override string toString() const { return (T[]).stringof; } -- cgit v1.1