Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade frontend & libs to v2.104.2 #4440

Merged
merged 211 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
880671a
dcompat.h: Add typedef for d_bool, use it in all C++ headers for fields
ibuclaw Mar 1, 2023
e94befa
Merge remote-tracking branch 'upstream/stable' into merge_stable
ibuclaw Mar 2, 2023
ce555a3
Merge pull request dlang/dmd!14939 from ibuclaw/merge_stable
ibuclaw Mar 2, 2023
0f30ec1
Rename CompileDeclaration to MixinDeclaration (dlang/dmd!14935)
ntrel Mar 2, 2023
28d8356
Rename CompileStatement to MixinStatement (dlang/dmd!14933)
ntrel Mar 2, 2023
9bc2953
merge stable (dlang/dmd!14947)
ibuclaw Mar 3, 2023
74841e5
colorHighlightCode: use ErrorSinkNull instead of gagging (dlang/dmd!1…
WalterBright Mar 3, 2023
4af6384
core.demangle: Document why we're shifting in parseTypeFunction
Geod24 Mar 1, 2023
725f380
demangler: Nest variable deeper to simplify control flow
Geod24 Mar 1, 2023
4c9e16e
core.demangle: Remove shift call from put
Geod24 Mar 2, 2023
d83c37b
core.demangle: Make error functions non-templated
Geod24 Mar 2, 2023
1d363c5
core.demangle: Separate data output in its own struct
Geod24 Mar 2, 2023
8637133
core.demangle: Fold append into put
Geod24 Mar 2, 2023
14b22a5
core.demangle: Replace len with Buffer.length/opDollar
Geod24 Mar 2, 2023
d39e929
core.demangler: Return superfluous assert(0)
Geod24 Mar 2, 2023
00ae887
remove template bloat for CTFE switch string default (dlang/dmd!14941)
WalterBright Mar 3, 2023
645cce4
do not emit switch templates in CTFE (dlang/dmd!14942)
WalterBright Mar 3, 2023
386dd8b
add location for storage class declaration (dlang/dmd!14720)
lucica28 Mar 3, 2023
8d564c6
do not lower if using CTFE (dlang/dmd!14940)
WalterBright Mar 3, 2023
bef3e41
Remove uses of in on extern(C) functions in druntime
Geod24 Mar 3, 2023
e550f44
Trivial: Correct Module.isCoreModule documentation
Geod24 Sep 26, 2022
857b845
add CompileEnv to lexer
WalterBright Mar 5, 2023
75d72d6
cparse.d: remove errors.d and globals.d dependencies
WalterBright Mar 7, 2023
47cee60
ArrayCtor: do not lower if in CTFE (dlang/dmd!14961)
WalterBright Mar 7, 2023
20e0fce
ArrayLengthExp: do not lower it in CTFE (dlang/dmd!14960)
WalterBright Mar 7, 2023
eaef68f
do not lower AssertExp when interpreting (dlang/dmd!14959)
WalterBright Mar 7, 2023
be96ef6
Deprecate 'in ref' to prepare for -preview=in (dlang/dmd!14931)
Geod24 Mar 7, 2023
7c92720
Fix Issue 13577 - More informative error message for refused immutabl…
RazvanN7 Mar 7, 2023
36a4fc3
fix Issue 23727 - ImportC support imaginary real numbers (dlang/dmd!1…
WalterBright Mar 8, 2023
ad262fe
dmd: Deprecate 'in' parameters on non-extern(D,C++) functions (dlang/…
Geod24 Mar 8, 2023
d022a16
parse.d: remove errors.d dependence and some globals (dlang/dmd!14957)
WalterBright Mar 8, 2023
40520e5
Fix 23764 - Message printed twice: Usage of in on parameter
dkorpel Mar 8, 2023
b6a11e1
use template mixin for visiting Initializers (dlang/dmd!14955)
WalterBright Mar 8, 2023
c946a66
array compare: do not lower if CTFE
WalterBright Mar 9, 2023
ca508ed
add Scope.needsCodegen
WalterBright Mar 9, 2023
f9345ad
convert C imaginary numbers to core.stdc.config.c_complex_double (dla…
WalterBright Mar 10, 2023
b060901
move decision on parsing unittests out of Parser (dlang/dmd!14973)
WalterBright Mar 10, 2023
19502d8
recognize if(not __ctfe) (dlang/dmd!14972)
WalterBright Mar 10, 2023
51a2982
lower array cast only if it needs code gen (dlang/dmd!14979)
WalterBright Mar 10, 2023
ccda04b
overlooked another sc.needsCodegen()
WalterBright Mar 11, 2023
fa23aa2
Add test for function attributes on variables (dlang/dmd!14983)
dkorpel Mar 12, 2023
c9fecc0
add _Complex float, _Complex real, and error checking (dlang/dmd!14977)
WalterBright Mar 13, 2023
43e470b
Fix Issue 12118 - Modify immutable data using throw (dlang/dmd!14706)
ntrel Mar 13, 2023
9efbab2
Merge remote-tracking branch 'upstream/stable' into merge_stable
ibuclaw Mar 15, 2023
9c63149
Merge pull request dlang/dmd!14992 from ibuclaw/merge_stable
dlang-bot Mar 16, 2023
f9f87e4
Change globals.fieldwise from bool to FeatureState
atilaneves Mar 17, 2023
0979aca
add operator overloading to core.stdc.config._Complex (dlang/dmd!14984)
WalterBright Mar 18, 2023
36f36e3
[core.atomic] Add example (dlang/dmd!14998)
ntrel Mar 18, 2023
2aa6e95
improve doc for parseAsm() (dlang/dmd!15006)
WalterBright Mar 19, 2023
0591347
simple asm is actually Asm Label (dlang/dmd!15005)
WalterBright Mar 19, 2023
468f182
ImportC: support casting of _Complex
WalterBright Mar 20, 2023
04fbb3e
partial fix Issue 22722 - ImportC: parser doesn’t understand 'asm vol…
ibuclaw Mar 20, 2023
6c29c10
fix buildkite failure (dlang/dmd!15010)
WalterBright Mar 20, 2023
236b6d6
minor improvements to cparseAsm() (dlang/dmd!15011)
WalterBright Mar 21, 2023
22d72f9
Remove `size` field from `Expression` (dlang/dmd!14989)
dkorpel Mar 21, 2023
4a66c59
Change `StringExp.committed` to `bool`
dkorpel Mar 21, 2023
d89884b
Improve inferred `pure` `@nogc` `notrhow` errors (dlang/dmd!14911)
dkorpel Mar 21, 2023
8cdf0d9
Improve layout of Expression classes (dlang/dmd!15014)
dkorpel Mar 21, 2023
3925809
replace Visitor for Statement_toIR() with mixin (dlang/dmd!15013)
WalterBright Mar 21, 2023
34d35ba
split off InlineScanVisitorDsymbol (dlang/dmd!15021)
WalterBright Mar 22, 2023
7ced704
blockexit.d: replace Visitor with mixin (dlang/dmd!15020)
WalterBright Mar 22, 2023
8e3c951
hdrgen.d: replace StatementVisitor with mixin (dlang/dmd!15019)
WalterBright Mar 22, 2023
a0b7cde
move some functions out of Interpreter
WalterBright Mar 22, 2023
87124c4
emit runtime assert error for gcc inline asm (dlang/dmd!15012)
WalterBright Mar 22, 2023
6d73909
Fix issue 14891 - profilgc to stdout not working
WebFreak001 Mar 21, 2023
665451b
Fix Issue 23802 - ImportC: __volatile__ is yet another alias for vola…
drpriver Mar 22, 2023
fb94807
complex.h should compile with FreeBSD now (dlang/dmd!15003)
WalterBright Mar 23, 2023
d161538
fix Issue 23784 - ImportC: __ptr32, __ptr64
WalterBright Mar 24, 2023
a0c1650
fix Issue 23795 - Cannot cast _Complex\!double to _Complex\!float (dl…
WalterBright Mar 24, 2023
e1fd61e
dinterpret.d replace Statement Visitor with mixin part 1 (dlang/dmd!1…
WalterBright Mar 24, 2023
9cb9c91
Fix Issue 23808 - #include <stdlib.h> is not working with importc
Temtaime Mar 24, 2023
aff9868
Update cparse.d
Temtaime Mar 24, 2023
2e087b2
add missing cases to statementToBuffer() (dlang/dmd!15035)
WalterBright Mar 24, 2023
eb8b6c9
fix Issue 23787 - ImportC: __unaligned
WalterBright Mar 25, 2023
65e922a
__FreeBSD__ compiles fenv.h
WalterBright Mar 25, 2023
e168b5d
Add tests
Temtaime Mar 25, 2023
dbf3367
Merge pull request dlang/dmd!15034 from Temtaime/patch-2
dlang-bot Mar 25, 2023
fe277a4
Importc: FreeBSD compiles stdatomic.h (dlang/dmd!15041)
WalterBright Mar 26, 2023
8bc2fdf
ImportC: #include <tgmath.h> on FreeBSD
WalterBright Mar 26, 2023
d7d04d7
fix Issue 23789 - ImportC: __declspec(align(n)) (dlang/dmd!15036)
WalterBright Mar 26, 2023
c792a33
statementsem.d: replace Visitor with mixin (dlang/dmd!15027)
WalterBright Mar 26, 2023
e47fc7f
dinterpret.d: replace Statement Visitor with mixin (dlang/dmd!15026)
WalterBright Mar 27, 2023
2dfeb60
fix Issue 23789 - ImportC: __declspec(align(n)) take 2 (dlang/dmd!15044)
WalterBright Mar 28, 2023
f57109d
fix Issue 23801 - ImportC: enumeration constant does not fit in an in…
WalterBright Mar 28, 2023
d70f5db
ImportC: accept __declspec(thread) and __declspec(naked) (dlang/dmd!1…
WalterBright Mar 29, 2023
0c56f36
Parse UDAs like template arguments (dlang/dmd!14881)
dkorpel Mar 30, 2023
ae7c56d
pull leaf functions out of VisualCPPMangler
WalterBright Mar 30, 2023
1a5d777
sort the traits table (dlang/dmd!15054)
WalterBright Mar 31, 2023
058b472
Fix 17374 - Improve inferred attribute error message (dlang/dmd!15051)
dkorpel Mar 31, 2023
fc156c7
replace Visitor for Types with mixin (dlang/dmd!15056)
WalterBright Mar 31, 2023
7f6ee3e
redo interface to LeftoverVisitor (dlang/dmd!15049)
WalterBright Mar 31, 2023
c99d297
Add a `lowering` field for AssignExp to store potential lowerings (dl…
RazvanN7 Mar 31, 2023
0bfa12f
StructLiteralExp: Reduce class instance size
dkorpel Mar 31, 2023
bc46326
change ESCAPE from flag to bool
WalterBright Mar 31, 2023
73fa0a4
Deduplicate function/template branches in aliasthisOf
dkorpel Mar 31, 2023
4f356ee
Merge remote-tracking branch 'upstream/stable' into merge_stable
ibuclaw Apr 1, 2023
a367b5b
Merge pull request dlang/dmd!15066 from ibuclaw/merge_stable
dlang-bot Apr 1, 2023
65ba57b
cppmangle.d: eliminate many unsafe casts
WalterBright Apr 1, 2023
4cb8433
Don't store recursive alias this type in `UnaExp` (dlang/dmd!15064)
dkorpel Apr 3, 2023
cdc709e
move addDefaultVersionIdentifiers to target (dlang/dmd!15073)
lucica28 Apr 4, 2023
0237469
Remove redundant `opEquals` with `alias this` checks (dlang/dmd!15071)
dkorpel Apr 4, 2023
28b6852
Turn semicolon as empty statement into an error (dlang/dmd!15072)
dkorpel Apr 4, 2023
1337bb4
fix Issue 23014 - importC: static thread-locals do not work (dlang/dm…
WalterBright Apr 4, 2023
404afa8
fix Issue 22559 - ImportC: support gnu case ranges (dlang/dmd!15068)
WalterBright Apr 4, 2023
e0eac03
Fix issue 23822: Check for deprecation before resolving alias on stru…
FeepingCreature Apr 5, 2023
896ea1d
Remove unsafe Expression casts in dtemplate.d (dlang/dmd!15080)
dkorpel Apr 6, 2023
2a98a8e
expressionsem: Remove support for RTL evaluation order (dlang/dmd!15082)
Geod24 Apr 6, 2023
0b74c54
CI: Disable tests so Azure OMF targets pass
dkorpel Apr 6, 2023
bd1440e
expressionsem: Remove redundant dependency to dmd.root.file (dlang/dm…
Geod24 Apr 6, 2023
c434007
Fix issue 11989 -- deprecate TickDuration, it's no longer used anywhe…
schveiguy Apr 7, 2023
9361324
Fix issue 23826: Check for deprecation when passing type member as te…
FeepingCreature Apr 7, 2023
ee88f6c
Fix Issue 18493 - [betterC] Can't use aggregated type with postblit (…
RazvanN7 Apr 8, 2023
674a5e0
Fix Issue 23832 - dmd regression 2.103.0 silent error cannot call dec…
RazvanN7 Apr 8, 2023
3ced001
parse.d: remove more dependencies on globals.d (dlang/dmd!15091)
WalterBright Apr 8, 2023
8c54600
Parser: rewrite constructor in terms of another (dlang/dmd!15090)
WalterBright Apr 8, 2023
9f8ba4c
better missing ; error message (dlang/dmd!15055)
WalterBright Apr 9, 2023
ec1095e
ImportC: support __attribute__((aligned(N))) (dlang/dmd!15047)
WalterBright Apr 9, 2023
b6bcb73
parse.d: remove dependence on globals.d (dlang/dmd!15092)
WalterBright Apr 10, 2023
c278fb1
fix Issue 23509 - ImportC: need statement expressions extension for G…
WalterBright Apr 10, 2023
8f76f8d
fix Issue 23715 - ImportC: No rejection of _Thread_local variables de…
WalterBright Apr 10, 2023
d8cf8cc
ImportC: support dllimport, dllexport, naked attributes (dlang/dmd!15…
WalterBright Apr 12, 2023
4144b2e
ImportC: support noinline (dlang/dmd!15103)
WalterBright Apr 13, 2023
27a035a
ImportC: predefine _NO_CRT_STDIO_INLINE (dlang/dmd!15102)
WalterBright Apr 13, 2023
ec0a2e1
Fix Issue 23836 - Two errors printed for typeof(super) in non-static …
RazvanN7 Apr 13, 2023
4ff0fef
fix Issue 23402 - importc function definitions from includes can caus…
WalterBright Apr 13, 2023
46642cc
ImportC: __attribute((deprecated)) and __declspec(deprecated) (dlang/…
WalterBright Apr 13, 2023
420ccce
Make big structs in gc.d zero initialized (dlang/dmd!15108)
dkorpel Apr 17, 2023
89893be
fix Issue 23427 - ImportC: some bitfield combinations lead to wrong s…
WalterBright Apr 17, 2023
65c2c2f
Fix 21667 - scope parameter causes 'no size because of forward refere…
dkorpel Apr 17, 2023
0af4e7f
Fix Issue 23838 - DMD lexer / parser examples might not compile (dlan…
RazvanN7 Apr 17, 2023
c6c9755
fix Issue 22960 - importC: K&R-style functions assume variadic callin…
WalterBright Apr 19, 2023
670ca7d
fix Issue 23401 - ImportC: add -cpp=filename switch to select C prepr…
WalterBright Apr 19, 2023
b595174
Infer `scope` only on parameters with pointers (dlang/dmd!15116)
dkorpel Apr 19, 2023
93175f8
Fix Issue 20268 - anonymous function parameter mismatch errors don't …
RazvanN7 Apr 20, 2023
bfe8a64
core.internal.string: upgrade conversion functions (dlang/dmd!15123)
WalterBright Apr 25, 2023
dc465cc
fix Issue 23055 - importC: using compound-literal array as pointer in…
WalterBright Apr 25, 2023
093cfa6
Fix Issue 19706 - Attribute inference in struct fails (dlang/dmd!15129)
RazvanN7 Apr 26, 2023
ff9a3fa
fix Issue 23837 - importc fails to link on windows x86 but successes …
WalterBright Apr 26, 2023
b8dc6bb
fix Issue 23862 - with statement should accept an expression with enu…
WalterBright Apr 26, 2023
599b107
Fix Issue 23861 - Compiler segmentation fault with ref and alias this…
RazvanN7 Apr 26, 2023
61b219b
Fix Issue 23846 - Respect the C standard when it comes to string to f…
maxhaton Apr 27, 2023
1370942
ImportC: support __attribute__((always_inline)) (dlang/dmd!15134)
WalterBright Apr 27, 2023
1a9c5ce
ImportC: add __declspec and __attribute__ nothrow (dlang/dmd!15135)
WalterBright Apr 27, 2023
cf556ed
Translate `_d_arraycatnTX` to a template (dlang/dmd!14550)
teodutu Apr 28, 2023
1e0501b
Make core.sync.condition compile with -preview=nosharedaccess (dlang/…
atilaneves Apr 28, 2023
028ac2d
Update compiler/src/dmd/root/port.d
maxhaton Apr 28, 2023
c68f5c6
Fix frontend.h (dlang/dmd!15141)
dkorpel Apr 28, 2023
a4fd236
Correct CRuntime_Microsoft
maxhaton Apr 28, 2023
fe38a3a
Merge pull request dlang/dmd!15139 from maxhaton/macosFixFirstAttempt
dlang-bot Apr 28, 2023
ac9c9f6
Make core.demangle compile with -preview=nosharedacccess
atilaneves Apr 27, 2023
e4c06d3
Move unittest causing cyclic dependency
atilaneves Apr 27, 2023
7c0ab81
Merge pull request dlang/dmd!15136 from atilaneves/core-demangle-nosh…
dlang-bot Apr 28, 2023
b7dfbc7
ImportC: add __attribute__((pure)) (dlang/dmd!15145)
WalterBright Apr 29, 2023
8d6783d
Fix Issue 23863 - typeof rejects AliasSeq!() as argument (dlang/dmd!1…
RazvanN7 Apr 29, 2023
b55f7b0
fix Issue 23866 - ImportC: Multiple __declspecs rejected
WalterBright Apr 30, 2023
5cc78a4
Fix issues 23867 and 23869 - define __builtin_isfinite and __builtin_…
bachmeil Apr 29, 2023
c73d406
refactor SmallBuffer (dlang/dmd!15144)
WalterBright May 1, 2023
f6eb853
Stack direction definition for supported architectures only (dlang/dm…
denizzzka May 1, 2023
d0476e9
Use DotExpFlag type for flag parameter (dlang/dmd!15065)
dkorpel May 1, 2023
f305b54
Fix 19454 - Name collisions with unnamed function parameters
dkorpel May 1, 2023
2e56184
Merge remote-tracking branch 'upstream/stable' into merge_stable
ibuclaw May 1, 2023
423f75f
Merge pull request dlang/dmd!15156 from ibuclaw/merge_stable
ibuclaw May 1, 2023
c632953
Merge remote-tracking branch 'upstream/master' into stable
ibuclaw May 1, 2023
0d100a7
Fix Issue 23874 - -profile=gc segfaults / ICE regression
RazvanN7 May 2, 2023
b15a021
Fix Issue 23873 - [ICE] segfault on imported static if ; else auto x …
RazvanN7 May 3, 2023
27f6e48
fix issues 20737 and 23014 - TLS variables unusable with -betterC/imp…
rainers May 4, 2023
36a7d91
Fix Issue 23882 - ICE (segfault) on nasty alias this code (dlang/dmd…
RazvanN7 May 5, 2023
2055d38
Fix Issue 23874 - -profile=gc segfaults / ICE regression (dlang/dmd!1…
RazvanN7 May 5, 2023
b2952dc
Fix Issue 22760 - Segmentation fault in CppMangleVisitor.template_arg…
RazvanN7 May 5, 2023
dfd17ef
Fix Issue 23905 - Initialization of SumType with opaque enum causes I…
RazvanN7 May 10, 2023
9f617d3
fix Issue 23913 - __traits(getMember) fails for some C symbols (dlang…
WalterBright May 16, 2023
af9e05f
Fix issue 23949 - core.stdc.assert_ for FreeBSD and DragonFlyBSD is i…
May 31, 2023
cdfcbbc
Fix tests race condition for fail_compilation/failcstuff4.{c,i}
kinke Jun 5, 2023
83fe601
Fix 23979 - ICE on failed alias this attempt on pointer expression (d…
dkorpel Jun 10, 2023
84208ad
Fix 23978 - ICE: EscapeBy[] is malloced, but contains GC-allocated ob…
dkorpel Jun 10, 2023
cbaf54d
Fix 23986 - ICE: dip1021 asserts on `typeof(null)` parameter
dkorpel Jun 10, 2023
26f08df
Move lowerings to `_d_array{setassign,assign_{l,r}}` to a `LoweredAss…
teodutu Jun 13, 2023
fb2f281
[stable] Fix compilable/stdcheaders.c for Linux AArch64 (dlang/dmd!15…
kinke Jun 14, 2023
3eba39e
Fix 23982 - segfault when printing scope inference failure (dlang/dmd…
dkorpel Jun 18, 2023
e81136f
Fix Issue 23965 - Disable deprecation checks for DRuntime hooks (dlan…
teodutu Jun 19, 2023
3a5c53a
Fix Issue 22729 - ICE: Invalid array access for invalid interface def…
RazvanN7 Jun 21, 2023
89a0b7a
Fix Issue 21025 - Segfault for function contract -preview=dip1021 (dl…
RazvanN7 Jun 21, 2023
4045835
fix Issue 23768 - ImportC: ICE on nested C initializer (dlang/dmd!15344)
WalterBright Jun 25, 2023
aacb880
Fix Issue 24013 - [REG 2.103.0] address of a __traits(getOverloads) i…
RazvanN7 Jun 27, 2023
33f5291
Fix Issue 23966 - [REG2.102] Cannot use traits(getAttributes) with ov…
RazvanN7 Jul 4, 2023
f77870c
ImportC: Issue 24022 - Error: attribute `__anonymous` is used as a ty…
katyukha Jul 5, 2023
4252540
fix Issue 24026 - ImportC: ICE on nested C initializer 2 (dlang/dmd!1…
WalterBright Jul 5, 2023
0bba0b4
Fix Issue 23890 - "Warning: cannot inline function" in core.lifetime …
CyberShadow Jul 6, 2023
7f73984
Fix regression introduced by dlang/dmd!14985
ibuclaw Jul 10, 2023
2dd4b89
Fix Issues 23951 and 23279 - traits(hasMember) does not follow alias …
RazvanN7 Jul 14, 2023
6ac828a
Merge tag 'dmd-rewrite-v2.104.2' into merge-2.104
kinke Jul 15, 2023
8f3edb5
Bump LDC version / frontend version / Phobos submodule
kinke Jul 15, 2023
1adc890
Fix little upstream C++ header regression
kinke Jul 15, 2023
8151a5f
Merge fixes to get compiler to compile
kinke Jul 15, 2023
a6dc3fa
Adapt to new _d_arraysetlengthT template lowering
kinke Jul 16, 2023
c20e627
druntime: Fix `in` deprecations in LDC-specific modules
kinke Jul 16, 2023
8e60686
Fix DMD-style inline asm label mangling
kinke Jul 16, 2023
67885a8
Adapt to new _d_arraycatnTX template lowering
kinke Jul 16, 2023
292ca6b
druntime: Fix little core.thread regression for non-x86[_64] targets
kinke Jul 16, 2023
9b21079
Support new C variadic kind VarArg.KRvariadic
kinke Jul 16, 2023
53e52cc
Fix initialization of new global.compileEnv
kinke Jul 16, 2023
30bc9c6
Disable new dmd-testsuite tests wrt. unsupported -profile=gc
kinke Jul 16, 2023
49bb2ac
Skip ModuleInfo generation for C files (incl. *.i)
kinke Jul 16, 2023
06580b1
Slightly adapt dmd-testsuite's fail_compilation/fail10968.d for LDC
kinke Jul 16, 2023
a3e12d2
FreeBSD: Restore special cases in dmd-testsuite's compilable/stdchead…
kinke Jul 16, 2023
cfb229b
druntime: Restrict more `pragma(inline, false)` kludges to DMD only
kinke Jul 16, 2023
9212dc4
Disable DMD-specific lexer kludge wrt. C `long double` literals
kinke Jul 22, 2023
b97ae03
Merge remote-tracking branch 'origin/master' into merge-2.104
kinke Jul 23, 2023
0cd7fc0
Packaging: Bump mimalloc and bundled dlang tools & dub
kinke Jul 23, 2023
40df405
[add changelog entry]
kinke Jul 23, 2023
1a1c2a2
Weaken dmd-testsuite's compilable/cattributes.i wrt. unsupported __de…
kinke Jul 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# LDC master

#### Big news
- Frontend, druntime and Phobos are at version [2.104.2](https://dlang.org/changelog/2.104.0.html). (#4440)

#### Platform support

Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ include(GetLinuxDistribution)
#

# Version information
set(LDC_VERSION "1.33.0") # May be overridden by git hash tag
set(LDC_VERSION "1.34.0") # May be overridden by git hash tag
set(DMDFE_MAJOR_VERSION 2)
set(DMDFE_MINOR_VERSION 103)
set(DMDFE_PATCH_VERSION 1)
set(DMDFE_MINOR_VERSION 104)
set(DMDFE_PATCH_VERSION 2)

set(DMD_VERSION ${DMDFE_MAJOR_VERSION}.${DMDFE_MINOR_VERSION}.${DMDFE_PATCH_VERSION})

Expand Down
10 changes: 5 additions & 5 deletions dmd/aggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class AggregateDeclaration : public ScopeDsymbol
Expression *getRTInfo; // pointer to GC info generated by object.RTInfo(this)

Visibility visibility;
bool noDefaultCtor; // no default construction
bool disableNew; // disallow allocations using `new`
d_bool noDefaultCtor; // no default construction
d_bool disableNew; // disallow allocations using `new`
Sizeok sizeok; // set when structsize contains valid data

virtual Scope *newScope(Scope *sc);
Expand Down Expand Up @@ -273,10 +273,10 @@ class ClassDeclaration : public AggregateDeclaration
// their own vtbl[]

TypeInfoClassDeclaration *vclassinfo; // the ClassInfo object for this ClassDeclaration
bool com; // true if this is a COM class (meaning it derives from IUnknown)
bool stack; // true if this is a scope class
d_bool com; // true if this is a COM class (meaning it derives from IUnknown)
d_bool stack; // true if this is a scope class
int cppDtorVtblIndex; // slot reserved for the virtual destructor [extern(C++)]
bool inuse; // to prevent recursive attempts
d_bool inuse; // to prevent recursive attempts

ThreeState isabstract; // if abstract class
Baseok baseok; // set the progress of base classes resolving
Expand Down
24 changes: 19 additions & 5 deletions dmd/aliasthis.d
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extern (C++) final class AliasThis : Dsymbol
* Params:
* sc = context
* e = expression forming the `this`
* gag = if true do not print errors, return null instead
* gag = do not print errors, return `null` instead
* findOnly = don't do further processing like resolving properties,
* i.e. just return plain dotExp() result.
* Returns:
Expand All @@ -93,7 +93,7 @@ Expression resolveAliasThis(Scope* sc, Expression e, bool gag = false, bool find
{
Loc loc = e.loc;
Type tthis = (e.op == EXP.type ? e.type : null);
const flags = DotExpFlag.noAliasThis | (gag ? DotExpFlag.gag : 0);
const flags = cast(DotExpFlag) (DotExpFlag.noAliasThis | (gag * DotExpFlag.gag));
uint olderrors = gag ? global.startGagging() : 0;
e = dotExp(ad.type, sc, e, ad.aliasthis.ident, flags);
if (!e || findOnly)
Expand Down Expand Up @@ -200,15 +200,29 @@ bool checkDeprecatedAliasThis(AliasThis at, const ref Loc loc, Scope* sc)

/**************************************
* Check and set 'att' if 't' is a recursive 'alias this' type
*
* The goal is to prevent endless loops when there is a cycle in the alias this chain.
* Since there is no multiple `alias this`, the chain either ends in a leaf,
* or it loops back on itself as some point.
*
* Example: S0 -> (S1 -> S2 -> S3 -> S1)
*
* `S0` is not a recursive alias this, so this returns `false`, and a rewrite to `S1` can be tried.
* `S1` is a recursive alias this type, but since `att` is initialized to `null`,
* this still returns `false`, but `att1` is set to `S1`.
* A rewrite to `S2` and `S3` can be tried, but when we want to try a rewrite to `S1` again,
* we notice `att == t`, so we're back at the start of the loop, and this returns `true`.
*
* Params:
* att = type reference used to detect recursion
* t = 'alias this' type
* att = type reference used to detect recursion. Should be initialized to `null`.
* t = type of 'alias this' rewrite to attempt
*
* Returns:
* Whether the 'alias this' is recursive or not
* `false` if the rewrite is safe, `true` if it would loop back around
*/
bool isRecursiveAliasThis(ref Type att, Type t)
{
//printf("+isRecursiveAliasThis(att = %s, t = %s)\n", att ? att.toChars() : "null", t.toChars());
auto tb = t.toBasetype();
if (att && tb.equivalent(att))
return true;
Expand Down
2 changes: 1 addition & 1 deletion dmd/apply.d
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public:
{
if (e.stageflags & stageApply)
return;
int old = e.stageflags;
const old = e.stageflags;
e.stageflags |= stageApply;
doCond(e.elements.peekSlice()) || applyTo(e);
e.stageflags = old;
Expand Down
25 changes: 22 additions & 3 deletions dmd/astenums.d
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ enum TY : ubyte
Tmixin,
Tnoreturn,
Ttag,
TMAX
}
enum TMAX = TY.max + 1;

alias Tarray = TY.Tarray;
alias Tsarray = TY.Tsarray;
Expand Down Expand Up @@ -265,7 +265,6 @@ alias Ttraits = TY.Ttraits;
alias Tmixin = TY.Tmixin;
alias Tnoreturn = TY.Tnoreturn;
alias Ttag = TY.Ttag;
alias TMAX = TY.TMAX;

enum TFlags
{
Expand Down Expand Up @@ -328,6 +327,7 @@ enum VarArg : ubyte
variadic = 1, /// (T t, ...) can be C-style (core.stdc.stdarg) or D-style (core.vararg)
typesafe = 2, /// (T t ...) typesafe https://dlang.org/spec/function.html#typesafe_variadic_functions
/// or https://dlang.org/spec/function.html#typesafe_variadic_functions
KRvariadic = 3, /// K+R C style variadics (no function prototype)
}

/*************************
Expand All @@ -339,7 +339,7 @@ enum STMT : ubyte
Error,
Peel,
Exp, DtorExp,
Compile,
Mixin,
Compound, CompoundDeclaration, CompoundAsm,
UnrolledLoop,
Scope,
Expand Down Expand Up @@ -439,3 +439,22 @@ enum FileType : ubyte
ddoc, /// Ddoc documentation file (.dd)
c, /// C source file
}

extern (C++) struct structalign_t
{
private:
ushort value = 0; // unknown
enum STRUCTALIGN_DEFAULT = 1234; // default = match whatever the corresponding C compiler does
bool pack; // use #pragma pack semantics

public:
pure @safe @nogc nothrow:
bool isDefault() const { return value == STRUCTALIGN_DEFAULT; }
void setDefault() { value = STRUCTALIGN_DEFAULT; }
bool isUnknown() const { return value == 0; } // value is not set
void setUnknown() { value = 0; }
void set(uint value) { this.value = cast(ushort)value; }
uint get() const { return value; }
bool isPack() const { return pack; }
void setPack(bool pack) { this.pack = pack; }
}
27 changes: 20 additions & 7 deletions dmd/attrib.d
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ extern (C++) abstract class AttribDeclaration : Dsymbol
this.decl = decl;
}

extern (D) this(const ref Loc loc, Dsymbols* decl)
{
super(loc, null);
this.decl = decl;
}

extern (D) this(const ref Loc loc, Identifier ident, Dsymbols* decl)
{
super(loc, ident);
Expand Down Expand Up @@ -228,6 +234,12 @@ extern (C++) class StorageClassDeclaration : AttribDeclaration
this.stc = stc;
}

extern (D) this(const ref Loc loc, StorageClass stc, Dsymbols* decl)
{
super(loc, decl);
this.stc = stc;
}

override StorageClassDeclaration syntaxCopy(Dsymbol s)
{
assert(!s);
Expand Down Expand Up @@ -1300,7 +1312,8 @@ extern(C++) final class ForwardingAttribDeclaration : AttribDeclaration
* mixin("int x");
* https://dlang.org/spec/module.html#mixin-declaration
*/
extern (C++) final class CompileDeclaration : AttribDeclaration
// Note: was CompileDeclaration
extern (C++) final class MixinDeclaration : AttribDeclaration
{
Expressions* exps;
ScopeDsymbol scopesym;
Expand All @@ -1309,19 +1322,19 @@ extern (C++) final class CompileDeclaration : AttribDeclaration
extern (D) this(const ref Loc loc, Expressions* exps)
{
super(loc, null, null);
//printf("CompileDeclaration(loc = %d)\n", loc.linnum);
//printf("MixinDeclaration(loc = %d)\n", loc.linnum);
this.exps = exps;
}

override CompileDeclaration syntaxCopy(Dsymbol s)
override MixinDeclaration syntaxCopy(Dsymbol s)
{
//printf("CompileDeclaration::syntaxCopy('%s')\n", toChars());
return new CompileDeclaration(loc, Expression.arraySyntaxCopy(exps));
//printf("MixinDeclaration::syntaxCopy('%s')\n", toChars());
return new MixinDeclaration(loc, Expression.arraySyntaxCopy(exps));
}

override void addMember(Scope* sc, ScopeDsymbol sds)
{
//printf("CompileDeclaration::addMember(sc = %p, sds = %p, memnum = %d)\n", sc, sds, memnum);
//printf("MixinDeclaration::addMember(sc = %p, sds = %p, memnum = %d)\n", sc, sds, memnum);
this.scopesym = sds;
}

Expand All @@ -1335,7 +1348,7 @@ extern (C++) final class CompileDeclaration : AttribDeclaration
return "mixin";
}

override inout(CompileDeclaration) isCompileDeclaration() inout
override inout(MixinDeclaration) isMixinDeclaration() inout
{
return this;
}
Expand Down
16 changes: 8 additions & 8 deletions dmd/attrib.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class AlignDeclaration final : public AttribDeclaration
class AnonDeclaration final : public AttribDeclaration
{
public:
bool isunion;
d_bool isunion;
int sem; // 1 if successful semantic()
unsigned anonoffset; // offset of anonymous struct
unsigned anonstructsize; // size of anonymous struct
Expand Down Expand Up @@ -175,8 +175,8 @@ class StaticIfDeclaration final : public ConditionalDeclaration
{
public:
ScopeDsymbol *scopesym;
bool addisdone;
bool onStack;
d_bool addisdone;
d_bool onStack;

StaticIfDeclaration *syntaxCopy(Dsymbol *s) override;
Dsymbols *include(Scope *sc) override;
Expand All @@ -193,8 +193,8 @@ class StaticForeachDeclaration final : public AttribDeclaration
public:
StaticForeach *sfe;
ScopeDsymbol *scopesym;
bool onStack;
bool cached;
d_bool onStack;
d_bool cached;
Dsymbols *cache;

StaticForeachDeclaration *syntaxCopy(Dsymbol *s) override;
Expand All @@ -221,15 +221,15 @@ class ForwardingAttribDeclaration final : public AttribDeclaration

// Mixin declarations

class CompileDeclaration final : public AttribDeclaration
class MixinDeclaration final : public AttribDeclaration
{
public:
Expressions *exps;

ScopeDsymbol *scopesym;
bool compiled;
d_bool compiled;

CompileDeclaration *syntaxCopy(Dsymbol *s) override;
MixinDeclaration *syntaxCopy(Dsymbol *s) override;
void addMember(Scope *sc, ScopeDsymbol *sds) override;
void setScope(Scope *sc) override;
const char *kind() const override;
Expand Down
Loading