diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-03-05 01:47:19 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-03-16 17:29:57 +0100 |
commit | 8da8c7d337123b28fdeb539a283d00732118712e (patch) | |
tree | 74096a23b9e2f64a7e25ec1e8d4d3b1d8934842e /libphobos/src/std/exception.d | |
parent | c5e2c3dd6afcf9b152df72b30e205b0180c0afd5 (diff) | |
download | gcc-8da8c7d337123b28fdeb539a283d00732118712e.zip gcc-8da8c7d337123b28fdeb539a283d00732118712e.tar.gz gcc-8da8c7d337123b28fdeb539a283d00732118712e.tar.bz2 |
d: Merge upstream dmd, druntime 4ca4140e58, phobos 454dff14d.
D front-end changes:
- Import dmd v2.103.0-beta.1.
- Using `alias this' for classes has been deprecated.
- The feature `-fpreview=dip25` is now enabled by default.
- The compile-time traits `isVirtualFunction' and
`getVirtualFunctions' have been deprecated.
D runtime changes:
- Import druntime v2.103.0-beta.1.
Phobos changes:
- Import phobos v2.103.0-beta.1.
- Updated unicode grapheme walking updated to conform to Unicode
version 15.
- Improved friendliness of error messages when instantiating
`std.algorithm.iteration.joiner' and
`std.algorithm.sorting.sort' with wrong inputs.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 4ca4140e58.
* dmd/VERSION: Bump version to v2.103.0-beta.1.
* Make-lang.in (D_FRONTEND_OBJS): Add d/errorsink.o.
* d-ctfloat.cc (CTFloat::sprint): Update signature for new front-end
interface.
* d-frontend.cc (getTypeInfoType): Likewise.
* d-lang.cc (d_handle_option): Remove handling of -fpreview=dip25 and
-frevert=dip25.
(d_post_options): Remove enabling of sealed references language
feature when scoped pointers is enabled.
* d-tree.h (create_typeinfo): Update signature.
* decl.cc (DeclVisitor::finish_vtable): Update for new front-end
interface.
(DeclVisitor::visit (VarDeclaration *)): Likewise.
(DeclVisitor::visit (FuncDeclaration *)): Check skipCodegen to see if
front-end explicitly requested not to generate code.
* expr.cc (ExprVisitor::visit (NewExp *)): Update for new front-end
interface.
* lang.opt (fpreview=dip25): Remove.
(frevert=dip25): Remove.
* modules.cc (layout_moduleinfo_fields): Update for new front-end
interface.
(layout_moduleinfo): Likewise.
* runtime.def (NEWCLASS): Remove.
* toir.cc (IRVisitor::visit (IfStatement *)): Don't generate IR for if
statement list when condition is `__ctfe'.
* typeinfo.cc (create_typeinfo): Add generate parameter.
* types.cc (layout_aggregate_members): Update for new front-end
interface.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 4ca4140e58.
* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/factory.d.
* libdruntime/Makefile.in: Regenerate.
* src/MERGE: Merge upstream phobos 454dff14d.
* testsuite/libphobos.hash/test_hash.d: Update test.
* testsuite/libphobos.shared/finalize.d: Update test.
* libdruntime/core/factory.d: New file.
gcc/testsuite/ChangeLog:
* gdc.dg/torture/simd23084.d: New test.
* gdc.dg/torture/simd23085.d: New test.
* gdc.dg/torture/simd23218.d: New test.
Diffstat (limited to 'libphobos/src/std/exception.d')
-rw-r--r-- | libphobos/src/std/exception.d | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/libphobos/src/std/exception.d b/libphobos/src/std/exception.d index b699a8e..6ffc0f7 100644 --- a/libphobos/src/std/exception.d +++ b/libphobos/src/std/exception.d @@ -1069,9 +1069,9 @@ as the language is free to assume objects don't have internal pointers */ bool doesPointTo(S, T, Tdummy=void)(auto ref const S source, ref const T target) @nogc @trusted pure nothrow if (__traits(isRef, source) || isDynamicArray!S || - is(S : U*, U) || is(S == class)) + is(S == U*, U) || is(S == class)) { - static if (is(S : U*, U) || is(S == class) || is(S == interface)) + static if (is(S == U*, U) || is(S == class) || is(S == interface)) { const m = *cast(void**) &source; const b = cast(void*) ⌖ @@ -1115,9 +1115,9 @@ bool doesPointTo(S, T)(auto ref const shared S source, ref const shared T target /// ditto bool mayPointTo(S, T, Tdummy=void)(auto ref const S source, ref const T target) @trusted pure nothrow if (__traits(isRef, source) || isDynamicArray!S || - is(S : U*, U) || is(S == class)) + is(S == U*, U) || is(S == class)) { - static if (is(S : U*, U) || is(S == class) || is(S == interface)) + static if (is(S == U*, U) || is(S == class) || is(S == interface)) { const m = *cast(void**) &source; const b = cast(void*) ⌖ @@ -1533,21 +1533,6 @@ version (StdUnittest) assert( doesPointTo(cast(int*) s, i)); assert(!doesPointTo(cast(int*) s, j)); } -@safe unittest //more alias this opCast -{ - void* p; - class A - { - void* opCast(T)() if (is(T == void*)) - { - return p; - } - alias foo = opCast!(void*); - alias foo this; - } - assert(!doesPointTo(A.init, p)); - assert(!mayPointTo(A.init, p)); -} /+ Returns true if the field at index `i` in ($D T) shares its address with another field. |