aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime/rt/arrayassign.d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2022-05-27 19:36:06 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2022-05-27 20:19:02 +0200
commit610d789832b57e9ab0158b330865e24b9b699040 (patch)
tree0b42094ea5f69e9fd0257dd578589a60ef6b736a /libphobos/libdruntime/rt/arrayassign.d
parentd822f4bbd714c6595f70cc68888dcebecfb6662d (diff)
downloadgcc-610d789832b57e9ab0158b330865e24b9b699040.zip
gcc-610d789832b57e9ab0158b330865e24b9b699040.tar.gz
gcc-610d789832b57e9ab0158b330865e24b9b699040.tar.bz2
d: Merge upstream dmd 4d07f22f2, druntime f89da313, phobos d46814c86.
D front-end changes: - `scope' semantics are now enforced in `@safe' code on pointers to stack memory, but only as deprecation warnings. - Overriding virtual functions are now marked with the `override' and `final' in the generated headers of `-fdump-c++-spec='. - `-fpreview=fiximmmutableconv` has been added that disallows implicitly converting a return value with indirections to immutable if it determines the result must be unique. D runtime changes: - Posix (excluding Darwin): Switch default GC signals from SIGUSR1/2 to SIGRTMIN/SIGRTMIN+1 Phobos changes: - Import latest bug fixes to mainline. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 4d07f22f2 * d-lang.cc (d_handle_option): Handle OPT_fpreview_fiximmutableconv. * lang.opt (fpreview=fiximmutableconv): New option. * runtime.def (ARRAYAPPENDT): Remove. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime f89da313. * src/MERGE: Merge upstream phobos d46814c86. Signed-off-by: Iain Buclaw <ibuclaw@gdcproject.org>
Diffstat (limited to 'libphobos/libdruntime/rt/arrayassign.d')
-rw-r--r--libphobos/libdruntime/rt/arrayassign.d72
1 files changed, 0 insertions, 72 deletions
diff --git a/libphobos/libdruntime/rt/arrayassign.d b/libphobos/libdruntime/rt/arrayassign.d
index 21d50b0..9a34ec7 100644
--- a/libphobos/libdruntime/rt/arrayassign.d
+++ b/libphobos/libdruntime/rt/arrayassign.d
@@ -163,45 +163,6 @@ extern (C) void[] _d_arrayassign_r(TypeInfo ti, void[] src, void[] dst, void* pt
}
/**
- * Does array initialization (not assignment) from another
- * array of the same element type.
- * ti is the element type.
- */
-extern (C) void[] _d_arrayctor(TypeInfo ti, void[] from, void[] to)
-{
- debug(PRINTF) printf("_d_arrayctor(from = %p,%d, to = %p,%d) size = %d\n", from.ptr, from.length, to.ptr, to.length, ti.tsize);
-
-
- auto element_size = ti.tsize;
-
- enforceRawArraysConformable("initialization", element_size, from, to);
-
- size_t i;
- try
- {
- for (i = 0; i < to.length; i++)
- {
- // Copy construction is defined as bit copy followed by postblit.
- memcpy(to.ptr + i * element_size, from.ptr + i * element_size, element_size);
- ti.postblit(to.ptr + i * element_size);
- }
- }
- catch (Throwable o)
- {
- /* Destroy, in reverse order, what we've constructed so far
- */
- while (i--)
- {
- ti.destroy(to.ptr + i * element_size);
- }
-
- throw o;
- }
- return to;
-}
-
-
-/**
* Do assignment to an array.
* p[0 .. count] = value;
*/
@@ -227,36 +188,3 @@ extern (C) void* _d_arraysetassign(void* p, void* value, int count, TypeInfo ti)
free(ptmp);
return pstart;
}
-
-/**
- * Do construction of an array.
- * ti[count] p = value;
- */
-extern (C) void* _d_arraysetctor(void* p, void* value, int count, TypeInfo ti)
-{
- void* pstart = p;
- auto element_size = ti.tsize;
-
- try
- {
- foreach (i; 0 .. count)
- {
- // Copy construction is defined as bit copy followed by postblit.
- memcpy(p, value, element_size);
- ti.postblit(p);
- p += element_size;
- }
- }
- catch (Throwable o)
- {
- // Destroy, in reverse order, what we've constructed so far
- while (p > pstart)
- {
- p -= element_size;
- ti.destroy(p);
- }
-
- throw o;
- }
- return pstart;
-}