mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
Translate _d_newarray{U,iT,T}
to a single template (#15299)
* druntime: Copy array allocation functions to `core.internal.array.utils` This copies `__setArrayAllocLength()`, `__arrayAlloc()` and moves `__arrayStart()` and `__arrayClearPad()` to `core.internal.array.utils.d`. This is needed because `_d_newarrayT()` calls these functions from `rt.lifetime.d`, but the file cannot be imported from `core.internal.array.creation.d`. Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com> * Translate `_d_newarray{U,iT,T}` to a single template This achieves the following: - Convert `_d_newarray{U,iT,T}` to a single template `_d_newarrayT` that handles arrays of elements that either have an init symbol or are zero-initialised. - Move compiler lowering to the semantic phase - Store lowered expression in `NewExp.lowering` Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com> --------- Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
This commit is contained in:
parent
8c7c9bead5
commit
fcff1b51ba
21 changed files with 510 additions and 57 deletions
|
@ -11,9 +11,9 @@ bytes allocated, allocations, type, function, file:line
|
|||
16 1 char[] D main src/profilegc.d:36
|
||||
16 1 closure profilegc.main.foo src/profilegc.d:45
|
||||
16 1 float D main src/profilegc.d:16
|
||||
16 1 float[] D main src/profilegc.d:17
|
||||
16 1 float D main src/profilegc.d:17
|
||||
16 1 int D main src/profilegc.d:13
|
||||
16 1 int[] D main src/profilegc.d:14
|
||||
16 1 int D main src/profilegc.d:14
|
||||
16 1 int[] D main src/profilegc.d:22
|
||||
16 1 int[] D main src/profilegc.d:37
|
||||
16 1 wchar[] D main src/profilegc.d:35
|
||||
|
|
|
@ -11,9 +11,9 @@ bytes allocated, allocations, type, function, file:line
|
|||
16 1 char[] D main src/profilegc.d:36
|
||||
16 1 closure profilegc.main.foo src/profilegc.d:45
|
||||
16 1 float D main src/profilegc.d:16
|
||||
16 1 float[] D main src/profilegc.d:17
|
||||
16 1 float D main src/profilegc.d:17
|
||||
16 1 int D main src/profilegc.d:13
|
||||
16 1 int[] D main src/profilegc.d:14
|
||||
16 1 int D main src/profilegc.d:14
|
||||
16 1 int[] D main src/profilegc.d:22
|
||||
16 1 int[] D main src/profilegc.d:37
|
||||
16 1 wchar[] D main src/profilegc.d:35
|
||||
|
|
|
@ -11,9 +11,9 @@ bytes allocated, allocations, type, function, file:line
|
|||
16 1 char[] D main src/profilegc.d:36
|
||||
16 1 closure profilegc.main.foo src/profilegc.d:45
|
||||
16 1 float D main src/profilegc.d:16
|
||||
16 1 float[] D main src/profilegc.d:17
|
||||
16 1 float D main src/profilegc.d:17
|
||||
16 1 int D main src/profilegc.d:13
|
||||
16 1 int[] D main src/profilegc.d:14
|
||||
16 1 int D main src/profilegc.d:14
|
||||
16 1 int[] D main src/profilegc.d:22
|
||||
16 1 int[] D main src/profilegc.d:37
|
||||
16 1 wchar[] D main src/profilegc.d:35
|
||||
|
|
|
@ -11,9 +11,9 @@ bytes allocated, allocations, type, function, file:line
|
|||
16 1 char[] D main src/profilegc.d:36
|
||||
16 1 closure profilegc.main.foo src/profilegc.d:45
|
||||
16 1 float D main src/profilegc.d:16
|
||||
16 1 float[] D main src/profilegc.d:17
|
||||
16 1 float D main src/profilegc.d:17
|
||||
16 1 int D main src/profilegc.d:13
|
||||
16 1 int[] D main src/profilegc.d:14
|
||||
16 1 int D main src/profilegc.d:14
|
||||
16 1 int[] D main src/profilegc.d:22
|
||||
16 1 int[] D main src/profilegc.d:37
|
||||
16 1 wchar[] D main src/profilegc.d:35
|
||||
|
|
|
@ -11,9 +11,9 @@ bytes allocated, allocations, type, function, file:line
|
|||
16 1 char[] D main src/profilegc.d:36
|
||||
16 1 closure profilegc.main.foo src/profilegc.d:45
|
||||
16 1 float D main src/profilegc.d:16
|
||||
16 1 float[] D main src/profilegc.d:17
|
||||
16 1 float D main src/profilegc.d:17
|
||||
16 1 int D main src/profilegc.d:13
|
||||
16 1 int[] D main src/profilegc.d:14
|
||||
16 1 int D main src/profilegc.d:14
|
||||
16 1 int[] D main src/profilegc.d:22
|
||||
16 1 int[] D main src/profilegc.d:37
|
||||
16 1 wchar[] D main src/profilegc.d:35
|
||||
|
|
|
@ -11,9 +11,9 @@ bytes allocated, allocations, type, function, file:line
|
|||
16 1 char[] D main src/profilegc.d:36
|
||||
16 1 closure profilegc.main.foo src/profilegc.d:45
|
||||
16 1 float D main src/profilegc.d:16
|
||||
16 1 float[] D main src/profilegc.d:17
|
||||
16 1 float D main src/profilegc.d:17
|
||||
16 1 int D main src/profilegc.d:13
|
||||
16 1 int[] D main src/profilegc.d:14
|
||||
16 1 int D main src/profilegc.d:14
|
||||
16 1 int[] D main src/profilegc.d:22
|
||||
16 1 int[] D main src/profilegc.d:37
|
||||
16 1 wchar[] D main src/profilegc.d:35
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue