Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit c352b15

Browse files
committed
Move rt.backtrace to core.internal.backtrace
This simplifies code and adopt the new pattern for internal modules.
1 parent 99b04d8 commit c352b15

File tree

8 files changed

+21
-22
lines changed

8 files changed

+21
-22
lines changed

mak/COPY

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ COPY=\
5151
$(IMPDIR)\core\internal\array\operations.d \
5252
$(IMPDIR)\core\internal\array\utils.d \
5353
\
54+
$(IMPDIR)\core\internal\backtrace\dwarf.d \
55+
$(IMPDIR)\core\internal\backtrace\elf.d \
56+
$(IMPDIR)\core\internal\backtrace\macho.d \
57+
\
5458
$(IMPDIR)\core\internal\elf\dl.d \
5559
$(IMPDIR)\core\internal\elf\io.d \
5660
\

mak/DOCS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ DOCS=\
8484
$(DOCDIR)\core_internal_execinfo.html \
8585
$(DOCDIR)\core_internal_qsort.html \
8686
\
87+
$(DOCDIR)\core_internal_backtrace_dwarf.html \
88+
$(DOCDIR)\core_internal_backtrace_elf.html \
89+
$(DOCDIR)\core_internal_backtrace_macho.html \
90+
\
8791
$(DOCDIR)\core_internal_container_array.html \
8892
$(DOCDIR)\core_internal_container_common.html \
8993
$(DOCDIR)\core_internal_container_hashtab.html \
@@ -98,10 +102,6 @@ DOCS=\
98102
$(DOCDIR)\rt_arrayassign.html \
99103
$(DOCDIR)\rt_arraycat.html \
100104
\
101-
$(DOCDIR)\rt_backtrace_dwarf.html \
102-
$(DOCDIR)\rt_backtrace_elf.html \
103-
$(DOCDIR)\rt_backtrace_macho.html \
104-
\
105105
$(DOCDIR)\rt_cast_.html \
106106
$(DOCDIR)\rt_cmath2.html \
107107
$(DOCDIR)\rt_config.html \

mak/SRCS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ SRCS=\
5151
src\core\internal\array\operations.d \
5252
src\core\internal\array\utils.d \
5353
\
54+
src\core\internal\backtrace\dwarf.d \
55+
src\core\internal\backtrace\elf.d \
56+
src\core\internal\backtrace\macho.d \
57+
\
5458
src\core\internal\container\array.d \
5559
src\core\internal\container\common.d \
5660
src\core\internal\container\hashtab.d \
@@ -540,10 +544,6 @@ SRCS=\
540544
src\rt\tracegc.d \
541545
src\rt\unwind.d \
542546
\
543-
src\rt\backtrace\dwarf.d \
544-
src\rt\backtrace\elf.d \
545-
src\rt\backtrace\macho.d \
546-
\
547547
src\rt\util\typeinfo.d \
548548
src\rt\util\utility.d \
549549
\

posix.mak

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ $(DOCDIR)/core_gc_%.html : src/core/gc/%.d $(DMD)
159159
$(DOCDIR)/core_internal_%.html : src/core/internal/%.d $(DMD)
160160
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<
161161

162+
$(DOCDIR)/core_internal_backtrace_%.html : src/core/internal/backtrace/%.d $(DMD)
163+
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<
164+
162165
$(DOCDIR)/core_internal_container_%.html : src/core/internal/container/%.d $(DMD)
163166
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<
164167

@@ -192,9 +195,6 @@ $(DOCDIR)/core_thread_%.html : src/core/thread/%.d $(DMD)
192195
$(DOCDIR)/rt_%.html : src/rt/%.d $(DMD)
193196
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<
194197

195-
$(DOCDIR)/rt_backtrace_%.html : src/rt/backtrace/%.d $(DMD)
196-
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<
197-
198198
$(DOCDIR)/rt_typeinfo_%.html : src/rt/typeinfo/%.d $(DMD)
199199
$(DMD) $(DDOCFLAGS) -Df$@ project.ddoc $(DOCFMT) $<
200200

src/rt/backtrace/dwarf.d renamed to src/core/internal/backtrace/dwarf.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* Source: $(DRUNTIMESRC rt/backtrace/dwarf.d)
4848
*/
4949

50-
module rt.backtrace.dwarf;
50+
module core.internal.backtrace.dwarf;
5151

5252
import core.internal.execinfo;
5353
import core.internal.string;
@@ -64,9 +64,9 @@ else version (WatchOS)
6464
version = Darwin;
6565

6666
version (Darwin)
67-
import rt.backtrace.macho;
67+
import core.internal.backtrace.macho;
6868
else
69-
import rt.backtrace.elf;
69+
import core.internal.backtrace.elf;
7070

7171
import core.internal.container.array;
7272
import core.stdc.string : strlen, memcpy;

src/rt/backtrace/elf.d renamed to src/core/internal/backtrace/elf.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Source: $(DRUNTIMESRC rt/backtrace/elf.d)
1010
*/
1111

12-
module rt.backtrace.elf;
12+
module core.internal.backtrace.elf;
1313

1414
version (linux)
1515
{

src/rt/backtrace/macho.d renamed to src/core/internal/backtrace/macho.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Authors: Jacob Carlborg
77
* Source: $(DRUNTIMESRC rt/backtrace/macho.d)
88
*/
9-
module rt.backtrace.macho;
9+
module core.internal.backtrace.macho;
1010

1111
version (OSX)
1212
version = Darwin;

src/core/runtime.d

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -816,12 +816,7 @@ static if (hasExecinfo) private class DefaultTraceInfo : Throwable.TraceInfo
816816

817817
static if (enableDwarf)
818818
{
819-
import core.internal.traits : externDFunc;
820-
821-
alias traceHandlerOpApplyImpl = externDFunc!(
822-
"rt.backtrace.dwarf.traceHandlerOpApplyImpl",
823-
int function(const(void*)[], scope int delegate(ref size_t, ref const(char[])))
824-
);
819+
import core.internal.backtrace.dwarf;
825820

826821
if (numframes >= FIRSTFRAME)
827822
{

0 commit comments

Comments
 (0)