diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2024-02-17 21:03:38 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2024-02-17 21:28:58 +0100 |
commit | 5aff58e5ed8f634e0b20892452bde484db93039b (patch) | |
tree | 64900b511f0dbee5f61fb9e3e19c1ee8274f166a /gcc/d/expr.cc | |
parent | a71d87431d0c4e04a402ef6566be090c470b2b53 (diff) | |
download | gcc-5aff58e5ed8f634e0b20892452bde484db93039b.zip gcc-5aff58e5ed8f634e0b20892452bde484db93039b.tar.gz gcc-5aff58e5ed8f634e0b20892452bde484db93039b.tar.bz2 |
d: Merge dmd, druntime 9471b25db9, phobos 547886846.
D front-end changes:
- Import dmd v2.107.1-rc.1.
D runtime changes:
- Import druntime v2.107.1-rc.1.
Phobos changes:
- Import phobos v2.107.1-rc.1.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 9471b25db9.
* dmd/VERSION: Bump version to v2.107.1-rc.1.
* Make-lang.in (D_FRONTEND_OBJS): Add d/cxxfrontend.o.
* d-attribs.cc (build_attributes): Update for new front-end interface.
* d-builtins.cc (build_frontend_type): Likewise.
(strip_type_modifiers): Likewise.
(covariant_with_builtin_type_p): Likewise.
* d-codegen.cc (declaration_type): Likewise.
(parameter_type): Likewise.
(build_array_struct_comparison): Likewise.
(void_okay_p): Likewise.
* d-convert.cc (convert_expr): Likewise.
(check_valist_conversion): Likewise.
* d-lang.cc (d_generate_ddoc_file): Likewise.
(d_parse_file): Likewise.
* d-target.cc (TargetCPP::toMangle): Likewise.
(TargetCPP::typeInfoMangle): Likewise.
(TargetCPP::thunkMangle): Likewise.
(TargetCPP::parameterType): Likewise.
* decl.cc (d_mangle_decl): Likewise.
(DeclVisitor::visit): Likewise.
(DeclVisitor::visit (CAsmDeclaration *)): New method.
(get_symbol_decl): Update for new front-end interface.
(layout_class_initializer): Likewise.
* expr.cc (ExprVisitor::visit): Likewise.
* intrinsics.cc (maybe_set_intrinsic): Likewise.
(expand_intrinsic_rotate): Likewise.
* modules.cc (layout_moduleinfo_fields): Likewise.
(layout_moduleinfo): Likewise.
* runtime.cc (get_libcall_type): Likewise.
* typeinfo.cc (make_frontend_typeinfo): Likewise.
(TypeInfoVisitor::visit): Likewise.
(create_typeinfo): Likewise.
* types.cc (same_type_p): Likewise.
(build_ctype): Likewise.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 9471b25db9.
* src/MERGE: Merge upstream phobos 547886846.
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r-- | gcc/d/expr.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index a050588..7fbabbe 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -1178,7 +1178,7 @@ public: { libcall = LIBCALL_AAGETY; ptr = build_address (build_expr (e->e1)); - tinfo = build_typeinfo (e, mutableOf (unSharedOf (tb1))); + tinfo = build_typeinfo (e, dmd::mutableOf (dmd::unSharedOf (tb1))); } else { @@ -1188,7 +1188,7 @@ public: } /* Index the associative array. */ - tree result = build_libcall (libcall, e->type->pointerTo (), 4, + tree result = build_libcall (libcall, dmd::pointerTo (e->type), 4, ptr, tinfo, size_int (tb1->nextOf ()->size ()), build_address (key)); @@ -1253,7 +1253,8 @@ public: else { /* Generate `array.ptr[index]'. */ - tree ptr = convert_expr (array, tb1, tb1->nextOf ()->pointerTo ()); + tree ptr = convert_expr (array, tb1, + dmd::pointerTo (tb1->nextOf ())); ptr = void_okay_p (ptr); this->result_ = indirect_ref (TREE_TYPE (TREE_TYPE (ptr)), build_pointer_index (ptr, index)); @@ -1328,7 +1329,7 @@ public: /* Get the data pointer and length for static and dynamic arrays. */ tree array = d_save_expr (build_expr (e->e1)); - tree ptr = convert_expr (array, tb1, tb1->nextOf ()->pointerTo ()); + tree ptr = convert_expr (array, tb1, dmd::pointerTo (tb1->nextOf ())); tree length = NULL_TREE; /* Our array is already a SAVE_EXPR if necessary, so we don't make length @@ -1994,7 +1995,7 @@ public: void visit (TypeidExp *e) final override { - if (Type *tid = isType (e->obj)) + if (Type *tid = dmd::isType (e->obj)) { tree ti = build_typeinfo (e, tid); @@ -2004,7 +2005,7 @@ public: this->result_ = build_nop (build_ctype (e->type), ti); } - else if (Expression *tid = isExpression (e->obj)) + else if (Expression *tid = dmd::isExpression (e->obj)) { Type *type = tid->type->toBasetype (); assert (type->ty == TY::Tclass); @@ -2136,7 +2137,8 @@ public: else { var->inuse++; - init = build_expr (initializerToExpression (var->_init), true); + Expression *vinit = dmd::initializerToExpression (var->_init); + init = build_expr (vinit, true); var->inuse--; } } @@ -2170,7 +2172,7 @@ public: { /* Generate a slice for non-zero initialized aggregates, otherwise create an empty array. */ - gcc_assert (e->type == constOf (Type::tvoid->arrayOf ())); + gcc_assert (e->type == dmd::constOf (Type::tvoid->arrayOf ())); tree type = build_ctype (e->type); tree length = size_int (sd->dsym->structsize); @@ -2682,7 +2684,7 @@ public: { /* Allocate space on the memory managed heap. */ tree mem = build_libcall (LIBCALL_ARRAYLITERALTX, - etype->pointerTo (), 2, + dmd::pointerTo (etype), 2, build_typeinfo (e, etype->arrayOf ()), size_int (e->elements->length)); mem = d_save_expr (mem); @@ -2718,7 +2720,7 @@ public: } /* Want the mutable type for typeinfo reference. */ - Type *tb = mutableOf (e->type->toBasetype ()); + Type *tb = dmd::mutableOf (e->type->toBasetype ()); /* Handle empty assoc array literals. */ TypeAArray *ta = tb->isTypeAArray (); |