Remove redundant GC allocation for _d_newarraymTX.dims (#21051)

This commit is contained in:
Dennis 2025-03-21 23:36:00 +01:00 committed by GitHub
parent 8d7c4d6227
commit 649223bff5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 2 additions and 18 deletions

View file

@ -505,7 +505,7 @@ version (D_ProfileGC)
* Returns:
* newly allocated array
*/
Tarr _d_newarraymTX(Tarr : U[], T, U)(size_t[] dims, bool isShared=false) @trusted
Tarr _d_newarraymTX(Tarr : U[], T, U)(scope size_t[] dims, bool isShared=false) @trusted
{
debug(PRINTF) printf("_d_newarraymTX(dims.length = %zd)\n", dims.length);
@ -602,7 +602,7 @@ version (D_ProfileGC)
/**
* TraceGC wrapper around $(REF _d_newarraymT, core,internal,array,construction).
*/
Tarr _d_newarraymTXTrace(Tarr : U[], T, U)(size_t[] dims, bool isShared=false, string file = __FILE__, int line = __LINE__, string funcname = __FUNCTION__) @trusted
Tarr _d_newarraymTXTrace(Tarr : U[], T, U)(scope size_t[] dims, bool isShared=false, string file = __FILE__, int line = __LINE__, string funcname = __FUNCTION__) @trusted
{
version (D_TypeInfo)
{

View file

@ -14,8 +14,6 @@ bytes allocated, allocations, type, function, file:line
16 1 float profilegc.main src/profilegc.d:17
16 1 int profilegc.main src/profilegc.d:13
16 1 int profilegc.main src/profilegc.d:14
16 1 uint[] profilegc.main src/profilegc.d:15
16 1 uint[] profilegc.main src/profilegc.d:18
16 1 int[] profilegc.main src/profilegc.d:22
16 1 int[] profilegc.main src/profilegc.d:37
16 1 wchar[] profilegc.main src/profilegc.d:35

View file

@ -6,8 +6,6 @@ bytes allocated, allocations, type, function, file:line
48 1 float[] profilegc.main src/profilegc.d:42
48 1 int[] profilegc.main src/profilegc.d:41
32 1 C profilegc.main src/profilegc.d:12
32 1 ulong[] profilegc.main src/profilegc.d:15
32 1 ulong[] profilegc.main src/profilegc.d:18
32 1 void[] profilegc.main src/profilegc.d:55
16 1 char[] profilegc.main src/profilegc.d:34
16 1 char[] profilegc.main src/profilegc.d:36

View file

@ -16,6 +16,4 @@ bytes allocated, allocations, type, function, file:line
16 1 int profilegc.main src/profilegc.d:14
16 1 int[] profilegc.main src/profilegc.d:22
16 1 int[] profilegc.main src/profilegc.d:37
16 1 uint[] profilegc.main src/profilegc.d:15
16 1 uint[] profilegc.main src/profilegc.d:18
16 1 wchar[] profilegc.main src/profilegc.d:35

View file

@ -6,8 +6,6 @@ bytes allocated, allocations, type, function, file:line
48 1 float[] profilegc.main src/profilegc.d:42
48 1 int[] profilegc.main src/profilegc.d:41
32 1 C profilegc.main src/profilegc.d:12
32 1 ulong[] profilegc.main src/profilegc.d:15
32 1 ulong[] profilegc.main src/profilegc.d:18
32 1 void[] profilegc.main src/profilegc.d:55
16 1 char[] profilegc.main src/profilegc.d:34
16 1 char[] profilegc.main src/profilegc.d:36

View file

@ -14,8 +14,6 @@ bytes allocated, allocations, type, function, file:line
16 1 float profilegc.main src/profilegc.d:17
16 1 int profilegc.main src/profilegc.d:13
16 1 int profilegc.main src/profilegc.d:14
16 1 uint[] profilegc.main src/profilegc.d:15
16 1 uint[] profilegc.main src/profilegc.d:18
16 1 int[] profilegc.main src/profilegc.d:22
16 1 int[] profilegc.main src/profilegc.d:37
16 1 wchar[] profilegc.main src/profilegc.d:35

View file

@ -6,8 +6,6 @@ bytes allocated, allocations, type, function, file:line
48 1 float[] profilegc.main src/profilegc.d:42
48 1 int[] profilegc.main src/profilegc.d:41
32 1 C profilegc.main src/profilegc.d:12
32 1 ulong[] profilegc.main src/profilegc.d:15
32 1 ulong[] profilegc.main src/profilegc.d:18
32 1 void[] profilegc.main src/profilegc.d:55
16 1 char[] profilegc.main src/profilegc.d:34
16 1 char[] profilegc.main src/profilegc.d:36

View file

@ -16,6 +16,4 @@ bytes allocated, allocations, type, function, file:line
16 1 int profilegc.main src\profilegc.d:14
16 1 int[] profilegc.main src\profilegc.d:22
16 1 int[] profilegc.main src\profilegc.d:37
16 1 uint[] profilegc.main src\profilegc.d:15
16 1 uint[] profilegc.main src\profilegc.d:18
16 1 wchar[] profilegc.main src\profilegc.d:35

View file

@ -6,8 +6,6 @@ bytes allocated, allocations, type, function, file:line
48 1 float[] profilegc.main src\profilegc.d:42
48 1 int[] profilegc.main src\profilegc.d:41
32 1 C profilegc.main src\profilegc.d:12
32 1 ulong[] profilegc.main src\profilegc.d:15
32 1 ulong[] profilegc.main src\profilegc.d:18
32 1 void[] profilegc.main src\profilegc.d:55
16 1 char[] profilegc.main src\profilegc.d:34
16 1 char[] profilegc.main src\profilegc.d:36