Skip to content

Commit 3cf8a54

Browse files
committed
Merge remote-tracking branch 'upstream/master' into stable
2 parents 50748c3 + 1be45dc commit 3cf8a54

29 files changed

+809
-375
lines changed

calendar.dd

Lines changed: 0 additions & 13 deletions
This file was deleted.

changelog/release-schedule.dd

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@ $(D_S $(TITLE),
44

55
$(UL
66
$(LI New release are published every $(I two) months, on the first day of every even month.)
7-
$(LI Two weeks before a new release `master` is merged into `stable` and a first beta is released.)
7+
$(LI One month before a new release `master` is merged into `stable` and a first beta is released.)
88
$(LI Point releases are published unscheduled when important issues or regressions get fixed.)
99
)
1010

11-
$(P The release schedule for 2022 is as follows:)
11+
$(P The release schedule for 2023 is as follows:)
1212

1313
$(DIVC release-schedule,
1414
$(TABLE
15-
$(BETA_RELEASE 2022-02-15, 2.099.0)
16-
$(BETA_RELEASE 2022-03-01, 2.099.0)
17-
$(BETA_RELEASE 2022-04-15, 2.100.0)
18-
$(MINOR_RELEASE 2022-05-01, 2.100.0)
19-
$(BETA_RELEASE 2022-07-15, 2.101.0)
20-
$(MINOR_RELEASE 2022-08-01, 2.101.0)
21-
$(BETA_RELEASE 2022-09-15, 2.102.0)
22-
$(MINOR_RELEASE 2022-10-01, 2.102.0)
23-
$(BETA_RELEASE 2022-11-15, 2.103.0)
24-
$(MINOR_RELEASE 2022-12-01, 2.103.0)
15+
$(BETA_RELEASE 2022-01-01, 2.102.0)
16+
$(MINOR_RELEASE 2022-02-01, 2.102.0)
17+
$(BETA_RELEASE 2022-03-01, 2.103.0)
18+
$(MINOR_RELEASE 2022-04-01, 2.103.0)
19+
$(BETA_RELEASE 2022-05-01, 2.104.0)
20+
$(MINOR_RELEASE 2022-06-01, 2.104.0)
21+
$(BETA_RELEASE 2022-07-01, 2.105.0)
22+
$(MINOR_RELEASE 2022-08-01, 2.105.0)
23+
$(BETA_RELEASE 2022-09-01, 2.106.0)
24+
$(MINOR_RELEASE 2022-10-01, 2.106.0)
25+
$(BETA_RELEASE 2022-11-01, 2.107.0)
26+
$(MINOR_RELEASE 2022-12-01, 2.107.0)
2527
)
2628
)
2729
)

dcompiler.dd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $(H2 $(LNAME2 installation, Installation))
6161
$(MESSAGE_BOX gray, $(B Hint) - The official $(LINK2 $(ROOT_DIR)download.html, installer)
6262
performs these steps automatically.
6363
)
64-
$(P Open a console window (for Windows XP this is done by
64+
$(P Open a console window (for Windows this is done by
6565
clicking on [Start][Command Prompt]).
6666
All the tools are command line tools, which means
6767
they are run from a console window.
@@ -283,6 +283,10 @@ $(H2 $(LNAME2 switches, Compiler Arguments and Switches))
283283
$(TD D source files)
284284
)
285285
$(TR
286+
$(TD $(B .c))
287+
$(TD C source files)
288+
)
289+
$(TR
286290
$(TD $(B .d))
287291
$(TD D source files)
288292
)
@@ -295,6 +299,10 @@ $(H2 $(LNAME2 switches, Compiler Arguments and Switches))
295299
$(TD $(RELATIVE_LINK2 interface-files, D interface files))
296300
)
297301
$(TR
302+
$(TD $(B .i))
303+
$(TD preprocessed C source files)
304+
)
305+
$(TR
298306
$(TD $(B .$(OBJEXT)))
299307
$(TD Object files to link in)
300308
)

dlang.org.ddoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ $(SUBMENU_MANUAL
264264
$(SUBMENU_LINK https://dlang.org/blog, Blog)
265265
$(SUBMENU_LINK $(ROOT_DIR)orgs-using-d.html, Orgs using D)
266266
$(SUBMENU_LINK https://twitter.com/search?q=%23dlang, Twitter)
267-
$(SUBMENU_LINK $(ROOT_DIR)calendar.html, Calendar)
268267
$(SUBMENU_LINK_DIVIDER https://forum.dlang.org, Forums)
269268
$(SUBMENU_LINK irc://irc.libera.chat/d, IRC)
270269
$(SUBMENU_LINK https://discord.gg/bMZk9Q4, Community Discord)
@@ -415,7 +414,7 @@ SEARCH_BOX=
415414
<form method="get" action="https://google.com/search">
416415
<input type="hidden" id="domains" name="domains" value="dlang.org">
417416
<input type="hidden" id="sourceid" name="sourceid" value="google-search">
418-
$(SPANID search-query, <input id="q" name="q" placeholder="Search">)$(SPANID search-dropdown, $(SPANC helper,
417+
$(SPANID search-query, <input id="q" name="q" placeholder="Google Search">)$(SPANID search-dropdown, $(SPANC helper,
419418
<select id="sitesearch" name="sitesearch" size="1">
420419
<option value="dlang.org">Entire Site</option>
421420
<option $(SEARCHDEFAULT_SPEC) value="dlang.org/spec">Language</option>

dpl-docs/views/layout.dt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ html(lang='en-US')
128128
a.expand-toggle(href="#{root_dir}search.html", title="Search")
129129
span Search
130130
#search-box
131-
form(method='get', action='https://google.com/search', autocomplete='off')
131+
form(method='get', action='https://duckduckgo.com/', autocomplete='off')
132132
input#domains(type='hidden', name='domains', value='dlang.org')
133133
|
134134
input#sourceid(type='hidden', name='sourceid', value='google-search')

js/run.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ function wrapIntoMain(code) {
190190
var codeOut = "void main()\n{\n";
191191
// writing to the stdout is probably often used
192192
codeOut += " import std.stdio: write, writeln, writef, writefln;\n ";
193+
codeOut += "#line 1\n";
193194
codeOut += code.split("\n").join("\n ");
194195
codeOut += "\n}";
195196
return codeOut;

js/run_examples.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ function wrapIntoMain(code) {
2222
// dynamically wrap into main if needed
2323
if (code.indexOf("void main") >= 0) {
2424
codeOut = "import " + currentPackage + "; ";
25+
codeOut += "#line 1\n";
2526
codeOut += code;
2627
}
2728
else {
2829
var codeOut = "void main()\n{\n";
2930
codeOut += " import " + currentPackage + ";\n";
3031
// writing to the stdout is probably often used
3132
codeOut += (currentPackage == "std.file") ? " import std.stdio: writeln, writef, writefln;\n " : " import std.stdio: write, writeln, writef, writefln;\n ";
33+
codeOut += "#line 1\n";
3234
codeOut += code.split("\n").join("\n ");
3335
codeOut += "\n}";
3436
}

posix.mak

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ DUB_DIR=../dub
155155

156156
# Auto-cloning missing directories
157157
$(shell [ ! -d $(DMD_DIR) ] && git clone --depth=1 ${GIT_HOME}/dmd $(DMD_DIR))
158-
include $(DMD_DIR)/src/osmodel.mak
158+
include $(DMD_DIR)/compiler/src/osmodel.mak
159159

160160
# External binaries
161161
DMD=$(DMD_DIR)/generated/$(OS)/release/$(MODEL)/dmd
@@ -176,7 +176,7 @@ G=$(GENERATED)
176176
# Last released versions
177177
DMD_LATEST_DIR=$G/dmd-${LATEST}
178178
DMD_LATEST=$(DMD_LATEST_DIR)/generated/$(OS)/release/$(MODEL)/dmd
179-
DRUNTIME_LATEST_DIR=$G/druntime-${LATEST}
179+
DRUNTIME_LATEST_DIR=$G/dmd-${LATEST}/druntime
180180
PHOBOS_LATEST_DIR=$G/phobos-${LATEST}
181181

182182
# stable dub and dmd versions used to build dpl-docs
@@ -322,7 +322,7 @@ SPEC_ROOT=$(addprefix spec/, \
322322
const3 function operatoroverloading template template-mixin contracts \
323323
version traits errors unittest garbage float iasm ddoc \
324324
interfaceToC cpp_interface objc_interface portability entity memory-safe-d \
325-
abi simd betterc importc ob)
325+
abi simd betterc importc ob windows)
326326
SPEC_DD=$(addsuffix .dd,$(SPEC_ROOT))
327327

328328
CHANGELOG_FILES:=$(basename $(subst _pre.dd,.dd,$(wildcard changelog/*.dd)))
@@ -344,7 +344,7 @@ ARTICLE_FILES=$(addprefix articles/, index builtin code_coverage const-faq \
344344
# and .html in the generated HTML. Save for the expansion of
345345
# $(SPEC_ROOT), the list is sorted alphabetically.
346346
PAGES_ROOT=$(SPEC_ROOT) 404 acknowledgements areas-of-d-usage $(ARTICLE_FILES) \
347-
ascii-table bugstats $(CHANGELOG_FILES) calendar community comparison concepts \
347+
ascii-table bugstats $(CHANGELOG_FILES) community comparison concepts \
348348
deprecate dmd dmd-freebsd dmd-linux dmd-osx dmd-windows \
349349
documentation download dstyle forum-template gpg_keys glossary \
350350
howto-promote htod index install \
@@ -414,7 +414,7 @@ ${GENERATED}/${LATEST}.ddoc :
414414

415415
${GENERATED}/modlist-${LATEST}.ddoc : tools/modlist.d ${STABLE_DMD} $(DRUNTIME_LATEST_DIR) $(PHOBOS_LATEST_DIR) $(DMD_LATEST_DIR)
416416
mkdir -p $(dir $@)
417-
$(STABLE_RDMD) $< $(DRUNTIME_LATEST_DIR)/src $(PHOBOS_LATEST_DIR) $(DMD_LATEST_DIR)/src $(MOD_EXCLUDES_LATEST) \
417+
$(STABLE_RDMD) $< $(DRUNTIME_LATEST_DIR)/src $(PHOBOS_LATEST_DIR) $(DMD_LATEST_DIR)/compiler/src $(MOD_EXCLUDES_LATEST) \
418418
$(addprefix --internal=, dmd rt core.internal) \
419419
$(addprefix --dump , object std etc core dmd rt core.internal.array core.internal.util) >$@
420420

@@ -431,10 +431,9 @@ ${GENERATED}/modlist-prerelease.ddoc : tools/modlist.d ${STABLE_DMD} $(DRUNTIME_
431431
$(addprefix --dump , object std etc core dmd rt core.internal.array core.internal.util) >$@
432432

433433
# Run "make -j rebase" for rebasing all dox in parallel!
434-
rebase: rebase-dlang rebase-dmd rebase-druntime rebase-phobos
434+
rebase: rebase-dlang rebase-dmd rebase-phobos
435435
rebase-dlang: ; $(call REBASE,dlang.org)
436436
rebase-dmd: ; cd $(DMD_DIR) && $(call REBASE,dmd)
437-
rebase-druntime: ; cd $(DRUNTIME_DIR) && $(call REBASE,druntime)
438437
rebase-phobos: ; cd $(PHOBOS_DIR) && $(call REBASE,phobos)
439438

440439
clean:
@@ -575,12 +574,16 @@ $G/dblog_latest.ddoc: $G/dblog_latest.xml $(STABLE_DMD) tools/ddoc_xml_extractor
575574
# Git rules
576575
################################################################################
577576

577+
# Druntime is in the DMD repository.
578+
${DRUNTIME_DIR}: ${DMD_DIR}
579+
${DRUNTIME_LATEST_DIR}: ${DMD_LATEST_DIR}
580+
578581
# Clone snapshots of the latest official release of all main D repositories
579582
$G/%-${LATEST} :
580583
git clone -b v${LATEST} --depth=1 ${GIT_HOME}/$(notdir $*) $@
581584

582585
# Clone all main D repositories
583-
${DMD_DIR} ${DRUNTIME_DIR} ${PHOBOS_DIR} ${TOOLS_DIR} ${INSTALLER_DIR} ${DUB_DIR}:
586+
${DMD_DIR} ${PHOBOS_DIR} ${TOOLS_DIR} ${INSTALLER_DIR} ${DUB_DIR}:
584587
git clone ${GIT_HOME}/$(notdir $(@F)) $@
585588

586589
${DMD_DIR}/VERSION : ${DMD_DIR}
@@ -590,11 +593,11 @@ ${DMD_DIR}/VERSION : ${DMD_DIR}
590593
################################################################################
591594

592595
$(DMD) : ${DMD_DIR}
593-
${MAKE} --directory=${DMD_DIR}/src -f posix.mak AUTO_BOOTSTRAP=1
596+
${MAKE} --directory=${DMD_DIR}/compiler/src -f posix.mak AUTO_BOOTSTRAP=1
594597

595598
$(DMD_LATEST) : ${DMD_LATEST_DIR}
596-
${MAKE} --directory=${DMD_LATEST_DIR}/src -f posix.mak AUTO_BOOTSTRAP=1
597-
sed -i -e "s|../druntime/import |../druntime-${LATEST}/import |" -e "s|../phobos |../phobos-${LATEST} |" $@.conf
599+
${MAKE} --directory=${DMD_LATEST_DIR}/compiler/src -f posix.mak AUTO_BOOTSTRAP=1
600+
sed -i -e "s|../druntime/import |../../dmd-${LATEST}/druntime/import |" -e "s|../phobos |../phobos-${LATEST} |" $@.conf
598601

599602
dmd-prerelease : $(STD_DDOC_PRERELEASE) druntime-target $G/changelog/next-version
600603
$(MAKE) AUTO_BOOTSTRAP=1 --directory=$(DMD_DIR) -f posix.mak html $(DDOC_VARS_PRERELEASE_HTML)
@@ -716,21 +719,21 @@ $W/library-prerelease/.htaccess : dpl_prerelease_htaccess
716719

717720
$G/docs-latest.json : ${DMD_LATEST} ${DMD_LATEST_DIR} \
718721
${DRUNTIME_LATEST_DIR} | dpl-docs
719-
find ${DMD_LATEST_DIR}/src -name '*.d' -o -name '*.di' | sort -r | \
722+
find ${DMD_LATEST_DIR}/compiler/src -name '*.d' -o -name '*.di' | sort -r | \
720723
gawk '!n[gensub(/\.di?$$/, "", 1)]++' > $G/.latest-files.txt
721724
find ${DRUNTIME_LATEST_DIR}/src -name '*.d' | \
722725
sed -e /unittest.d/d -e /gcstub/d >> $G/.latest-files.txt
723726
find ${PHOBOS_LATEST_DIR}/etc ${PHOBOS_LATEST_DIR}/std -name '*.d' | \
724727
sed -e /unittest.d/d | sort >> $G/.latest-files.txt
725-
${DMD_LATEST} -J$(DMD_LATEST_DIR)/src/dmd/res -J$(dir $(DMD_LATEST)) -c -o- -version=CoreDdoc \
728+
${DMD_LATEST} -J$(DMD_LATEST_DIR)/compiler/src/dmd/res -J$(dir $(DMD_LATEST)) -c -o- -version=CoreDdoc \
726729
-version=MARS -version=CoreDdoc -version=StdDdoc -Df$G/.latest-dummy.html \
727730
-Xf$@ -I${PHOBOS_LATEST_DIR} @$G/.latest-files.txt
728731
${DPL_DOCS} ${DPL_DOCS_FLAGS} filter $@ --min-protection=Protected \
729732
--only-documented $(MOD_EXCLUDES_LATEST)
730733
rm -f $G/.latest-files.txt $G/.latest-dummy.html
731734

732735
$G/docs-prerelease.json : ${DMD} ${DMD_DIR} ${DRUNTIME_DIR} | dpl-docs
733-
find ${DMD_DIR}/src -name '*.d' -o -name '*.di' | sort -r | \
736+
find ${DMD_DIR}/compiler/src -name '*.d' -o -name '*.di' | sort -r | \
734737
gawk '!n[gensub(/\.di?$$/, "", 1)]++' > $G/.prerelease-files.txt
735738
find ${DRUNTIME_DIR}/src -name '*.d' | \
736739
sed -e /unittest/d >> $G/.prerelease-files.txt

spec/abi.dd

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -957,32 +957,70 @@ $(H2 $(LNAME2 garbage_collection, Garbage Collection))
957957

958958
$(P The interface to this is found in Druntime's $(DRUNTIMESRC core/gc/gcinterface.d).)
959959

960-
$(H2 $(LNAME2 runtime_helper_functions, Runtime Helper Functions))
960+
$(H2 $(LNAME2 ModuleInfo, ModuleInfo Instance))
961961

962-
$(P These are found in Druntime's $(DRUNTIMESRC rt/).)
962+
$(P An instance of $(LINK2 https://dlang.org/phobos/object.html#.ModuleInfo, `ModuleInfo`)
963+
is generated by the compiler and inserted into the object file for every module.
964+
`ModuleInfo` contains information about the module that is useful to the D runtime library:
965+
)
966+
967+
$(UL
968+
$(LI If the module has a static constructor, static destructor, shared static constructor, or shared static destructor.)
969+
$(LI A reference to any unit tests defined by the module.)
970+
$(LI An array of references to any imported modules that have one or more of:
971+
$(OL
972+
$(LI static constructors)
973+
$(LI static destructors)
974+
$(LI shared static constructors)
975+
$(LI shared static destructors)
976+
$(LI unit tests)
977+
$(LI transitive imports of any module that contains one or more of 1..5)
978+
$(LI order independent constructors (currently needed for implementing
979+
$(DDSUBLINK dmd, switch-cov, $(TT -cov))))
980+
)
981+
This enables the runtime to run the unit tests,
982+
the module constructors in a depth-first order,
983+
and the module destructors in the reverse order.
984+
)
985+
986+
$(LI An array of references to `ClassInfo` for each class defined in the module.
987+
$(NOTE this feature may be removed.))
988+
)
989+
990+
$(P `ModuleInfo` is defined in Druntime's $(DRUNTIMESRC object.d), which must match the compiler's output in both the values of flags and layout of fields.)
991+
992+
$(P Modules compiled with $(DDSUBLINK dmd, switch-betterC, $(TT -betterC))
993+
do not have a `ModuleInfo` instance generated, because such modules must work
994+
without the D runtime library.
995+
Similarly, $(DDLINK spec/importc, ImportC, ImportC) modules do not generate a `ModuleInfo`.
996+
)
963997

964-
$(H2 $(LNAME2 module_init_and_fina, Module Initialization and Termination))
998+
$(H3 $(LNAME2 module_init_and_fina, Module Initialization and Termination))
965999

9661000
$(P All the static constructors for a module are aggregated into a
9671001
single function, and a pointer to that function is inserted
968-
into the ctor member of the ModuleInfo instance for that
1002+
into the ctor member of the `ModuleInfo` instance for that
9691003
module.
9701004
)
9711005

9721006
$(P All the static destructors for a module are aggregated into a
9731007
single function, and a pointer to that function is inserted
974-
into the dtor member of the ModuleInfo instance for that
1008+
into the dtor member of the `ModuleInfo` instance for that
9751009
module.
9761010
)
9771011

978-
$(H2 $(LNAME2 unit_testing, Unit Testing))
1012+
$(H3 $(LNAME2 unit_testing, Unit Testing))
9791013

9801014
$(P All the unit tests for a module are aggregated into a
9811015
single function, and a pointer to that function is inserted
982-
into the unitTest member of the ModuleInfo instance for that
1016+
into the unitTest member of the `ModuleInfo` instance for that
9831017
module.
9841018
)
9851019

1020+
$(H2 $(LNAME2 runtime_helper_functions, Runtime Helper Functions))
1021+
1022+
$(P These are found in Druntime's $(DRUNTIMESRC rt/).)
1023+
9861024
$(H2 $(LNAME2 symbolic_debugging, Symbolic Debugging))
9871025

9881026
$(P D has types that are not represented in existing C or C++ debuggers.

0 commit comments

Comments
 (0)