Martin Kinkelin
b81c2b5510
Adapt to new array-append frontend lowerings
2022-09-15 21:00:53 +02:00
Nicholas Wilson
f2155c6dd9
Use type gep in initializeArrayLiteral
( #4092 )
2022-09-01 17:14:57 +08:00
Nicholas Wilson
6daf215b3c
Remove getPointeeType
from DtoSetArrayToNull
( #4032 )
2022-08-21 13:15:30 +08:00
Martin Kinkelin
4b1f5516fd
Pass isCfile parameter for all defaultInit() calls, for some extra importC zero-init
...
Fixes dmd-testsuite's runnable/test22994.c.
2022-04-30 19:54:20 +02:00
Martin Kinkelin
4bd8dcd91b
Adapt to new TOK and EXP enum classes
2022-02-16 20:52:07 +01:00
Martin Kinkelin
fab82436dd
Use new druntime hooks _d_arraybounds_{slice,index} for more informative RangeErrors
...
Fixing dmd-testsuite's runnable/testbounds.d.
2021-09-09 17:37:38 +02:00
Martin Kinkelin
a9aafac862
Glue layer: Make all mutable Loc &
params const
2020-12-13 15:01:19 +01:00
Martin Kinkelin
3817ab0595
Upgrade front-end & libs to v2.086.0-beta.1
2019-04-23 22:13:13 +02:00
Martin Kinkelin
39b46d7b69
Replace old-school header guards by #pragma once
2018-10-20 16:19:46 +02:00
Martin Kinkelin
4a23399236
Aim for consistent #includes (order + dir prefix)
...
I surely missed a few.
2018-10-20 16:19:46 +02:00
Martin Kinkelin
f0aba4559f
Fix cat-assign-element issue if rhs affects the lhs length ( #2589 )
...
I.e., this fixes #2588 .
To fix the index of the new array element to be assigned to, I went for
decrementing the new length instead of saving the old length directly
before the druntime call (i.e., after evaluating the rhs expression due
to its potential side effects). The IR seems more intuitive to me this
way - load both new length+ptr directly after the druntime call and then
decrement the length by 1.
2018-02-23 18:51:36 +01:00
Martin
f9575686e1
Get rid of obsolete runtime functions
...
For array comparisons (new) and the _adReverse family.
2018-01-07 05:03:37 +01:00
Johan Engelen
0f2d594ae5
Back off on what we consider as "constant literals": (some) dynamic array literals are not-const because they are expected to be newly allocated. ( #1927 )
...
Resolves #1924
2016-12-20 11:26:25 +01:00
LemonBoy
517f9095a4
Check StructLiteralExp elements in isConstLiteral.
2016-10-17 23:37:04 +02:00
David Nadlinger
03429eb60f
gen: Fix another array literal crash with vectors
2016-02-06 20:57:07 +01:00
Johan Engelen
29ce4012af
dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
...
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +01:00
David Nadlinger
9df487edff
gen/ir: clang-tidy the world
2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615
driver/gen/ir: clang-format the world
...
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
David Nadlinger
c897015f62
Fix misaligned vector variable initializers
...
GitHub: Closes #1092 .
2015-09-26 19:48:54 +02:00
David Nadlinger
ac792497f2
Properly ignore statically known SliceExp bounds
...
GitHub: Fixes #1008 .
2015-08-29 01:34:25 +02:00
Martin
9d5560601a
WIP: fix array construction/assignment wrt. RAII
2015-07-22 01:41:17 +02:00
kai
eadefdc676
The runtime functions for multi-dim arrays have changed.
...
_d_newarraymT and _d_newarraymiT are now named _d_newarraymTX and
_d_newarraymiTX. There is also a change in the signature: instead
of a variable length argumentlist the functions now require an array
of dimensions.
This should fix test runnable/test28.d
2015-04-12 19:59:18 +02:00
kai
45fca1f3b5
Add line number to error message of -nogc switch.
...
This was suggested by bearophile in the news group.
It also changes all Loc objects to be passed by reference.
2014-07-04 07:15:05 +02:00
David Nadlinger
cb341586e3
First merge of 2.064 beta.
...
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.
Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
David Nadlinger
60cdf58168
Combine ArrayLiteralExp::toConstElem and initializeArrayLiteral implementations.
2013-10-09 04:07:46 +02:00
David Nadlinger
44f60199ad
Factored actual literal building code out of ArrayLiteralExp::toElem.
2013-10-09 01:51:45 +02:00
David Nadlinger
c7c1c25f15
DValue: struct->class.
...
This is in line with an incoming upstream change making all
polymorphic structs classes, and also matches common coding
conventions.
2013-06-07 03:20:39 +02:00
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +01:00
David Nadlinger
0a96aea868
Sort includes according to style guidelines:
...
1. Main include corresponding to .cpp file, if any.
2. DMD and LDC includes.
3. LLVM includes.
4. System includes.
Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +01:00
David Nadlinger
9458911839
Added LLVM-style license headers to all our files.
2012-12-16 17:19:14 +01:00
Alexey Prokhin
7431d58702
Rewritten initialization of global variables.
2011-10-25 15:43:49 +04:00
Alexey Prokhin
629f13929e
WIP: port to llvm 3.0
2011-10-25 15:43:39 +04:00
Alexey Prokhin
f3c901af9d
Use _d_arraycatT to append an element to an array instead of reallocating the array
2011-09-10 13:23:47 +04:00
Alexey Prokhin
1c59eed83a
Check for lower slice bound when bounds checking is enabled
2011-01-03 16:50:08 +03:00
Alexey Prokhin
d8115713d2
Fixed initialization of multidimensional static arrays.
2010-12-30 14:04:24 +03:00
Alexey Prokhin
023b55a772
Run postblit constructors for elements of an array.
2010-12-30 14:04:24 +03:00
Alexey Prokhin
e4c3179d43
Different fixes: phobos compiles now
2010-10-28 14:53:01 +04:00
Alexey Prokhin
b1e5993873
Started work on phobos
2010-10-27 18:13:46 +04:00
Alexey Prokhin
4d7a6eda23
Different fixes for d2
2010-10-07 22:35:32 +04:00
Kelly Wilson
b38845e88e
Apply patch from klickverbot. This is his 'proper fix' patch for bug #395 .
2010-03-08 23:37:40 -07:00
Christian Kamm
9cd32549c4
Improve array append performance.
...
Actually use the appropriate runtime function, instead of just
growing the array by one!
2010-02-14 10:11:05 +01:00
Tomas Lindquist Olsen
37cf5a5789
Added Doxygen file.
...
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
2009-04-15 20:06:25 +02:00
Tomas Lindquist Olsen
f46f865375
Removed KDevelop3 project files, CMake can generate them just fine!
...
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
2008-11-29 21:25:43 +01:00
Christian Kamm
30c9af1945
Add _d_newarrayvT and _d_newarraymvT to create arrays without initialization.
...
Adjust DtoNewDynArray to use DtoArrayInit for initialization of new arrays.
Make Type::tvoid->defaultInit() not error.
2008-09-14 10:13:50 +02:00
Christian Kamm
8f14ece3af
Move DtoArrayBoundsCheck from llvmhelpers to arrays.
2008-07-31 19:14:49 +02:00
Christian Kamm
caa61a5523
Error if static array is cast to an array such that oldarraysize % newelemsize != 0.
2008-07-29 12:32:01 +02:00
Christian Kamm
907a03a3be
Give error messages for invalid casts.
...
This required passing Loc information to certain functions.
Fixes nocompile/b/bug_cgcs_354_A/B.
2008-07-26 17:19:16 +02:00
Tomas Lindquist Olsen
ac3744a59d
[svn r329] Cleaned up a bunch of array code for handling special slice cases no
...
longer relevant.
2008-06-28 05:57:16 +02:00
Tomas Lindquist Olsen
599f879149
[svn r316] Fixed array slice assignments like: int[] arr = ...; arr[] = 42;
...
There was problems with most non basic types...
Added an option to premake so we can do: premake --target gnu --no-boehm
to disable the Boehm GC.
2008-06-23 14:48:42 +02:00
Tomas Lindquist Olsen
67dd564222
[svn r307] Fixed: multidimensional new expressions now work. Eg.:
...
auto ma = new int[][] (3,9);
2008-06-21 04:47:14 +02:00