Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion gcc/testsuite/gdc.test/runnable/foreach5.d
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ auto scoped14653(T, A...)(A args)
Scoped!T result = void;

//emplace!T(result.store[], args);
result.store[] = typeid(T).init[];
result.store[] = typeid(T).initializer[];
result.payload.__ctor(args);

return result;
Expand Down
2 changes: 1 addition & 1 deletion gcc/testsuite/gdc.test/runnable/newdel.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Foo
{ void* p;

printf("Foo.new(sz = %d, x = %d)\n", sz, x);
assert(sz == Foo.classinfo.init.length);
assert(sz == Foo.classinfo.initializer.length);
assert(x == 5);

p = core.stdc.stdlib.malloc(sz);
Expand Down
6 changes: 3 additions & 3 deletions gcc/testsuite/gdc.test/runnable/test12.d
Original file line number Diff line number Diff line change
Expand Up @@ -773,17 +773,17 @@ void test36()
{
A36 a = new A36;

printf("A36.sizeof = %d\n", a.classinfo.init.length);
printf("A36.sizeof = %d\n", a.classinfo.initializer.length);
printf("%d\n", a.s);
printf("%d\n", a.a);
printf("%d\n", a.b);
printf("%d\n", a.c);
printf("%d\n", a.d);

version(D_LP64)
assert(a.classinfo.init.length == 36);
assert(a.classinfo.initializer.length == 36);
else
assert(a.classinfo.init.length == 28);
assert(a.classinfo.initializer.length == 28);
assert(a.s == 1);
assert(a.a == 2);
assert(a.b == 3);
Expand Down
2 changes: 1 addition & 1 deletion gcc/testsuite/gdc.test/runnable/test20.d
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ int y16;
class C16
{
new(size_t size, byte blah){
void* v = (new byte[C16.classinfo.init.length]).ptr;
void* v = (new byte[C16.classinfo.initializer.length]).ptr;
y16 = 1;
assert(blah == 3);
return v;
Expand Down
6 changes: 3 additions & 3 deletions gcc/testsuite/gdc.test/runnable/test42.d
Original file line number Diff line number Diff line change
Expand Up @@ -3667,9 +3667,9 @@ void test220()
mixin T220!(int);

// all print 8
writeln(T220!(int).C.classinfo.init.length);
writeln(C.classinfo.init.length);
writeln(D220.classinfo.init.length);
writeln(T220!(int).C.classinfo.initializer.length);
writeln(C.classinfo.initializer.length);
writeln(D220.classinfo.initializer.length);

auto c = new C; // segfault in _d_newclass
}
Expand Down
6 changes: 3 additions & 3 deletions gcc/testsuite/gdc.test/runnable/test5.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ int main()
{
bar b = new bar();

printf("b.size = x%x\n", b.classinfo.init.length);
printf("bar.size = x%x\n", bar.classinfo.init.length);
assert(b.classinfo.init.length == bar.classinfo.init.length);
printf("b.size = x%x\n", b.classinfo.initializer.length);
printf("bar.size = x%x\n", bar.classinfo.initializer.length);
assert(b.classinfo.initializer.length == bar.classinfo.initializer.length);
abc(b);
return 0;
}
5 changes: 3 additions & 2 deletions gcc/testsuite/gdc.test/runnable/testconst.d
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,9 @@ class C42

void test42()
{
printf("%d\n", C42.classinfo.init.length);
assert(C42.classinfo.init.length == 12 + (void*).sizeof + (void*).sizeof);
printf("%d\n", C42.classinfo.initializer.length);
assert(C42.classinfo.initializer.length == 12 + (void*).sizeof +
(void*).sizeof);
C42 c = new C42;
assert(c.a == 1);
assert(c.b == 2);
Expand Down
3 changes: 2 additions & 1 deletion gcc/testsuite/gdc.test/runnable/testdstress.d
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,8 @@ void test30()
// It will insert one more `delete m` for the scope destruction, and it will be
// called during stack unwinding.
// Instead use bare memory chunk on stack to construct dummy class instance.
void[__traits(classInstanceSize, C30)] payload = typeid(C30).init[];
void[__traits(classInstanceSize, C30)] payload =
typeid(C30).initializer[];
C30 m = cast(C30)payload.ptr;
m.__ctor();

Expand Down
2 changes: 1 addition & 1 deletion gcc/testsuite/gdc.test/runnable/traits.d
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void test13()

auto k = __traits(classInstanceSize, C);
writeln(k);
assert(k == C.classinfo.init.length);
assert(k == C.classinfo.initializer.length);
}

/********************************************************/
Expand Down
4 changes: 2 additions & 2 deletions libphobos/configure
Original file line number Diff line number Diff line change
Expand Up @@ -14855,8 +14855,8 @@ SPEC_PHOBOS_DEPS="$LIBS"


# Libdruntime / phobos soname version
DRUNTIME_SOVERSION="73:2:0"
PHOBOS_SOVERSION="73:2:0"
DRUNTIME_SOVERSION="74:2:0"
PHOBOS_SOVERSION="74:2:0"



Expand Down
4 changes: 2 additions & 2 deletions libphobos/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ AC_SUBST(LIBS)
AC_SUBST(SPEC_PHOBOS_DEPS)

# Libdruntime / phobos soname version
DRUNTIME_SOVERSION="73:2:0"
PHOBOS_SOVERSION="73:2:0"
DRUNTIME_SOVERSION="74:2:0"
PHOBOS_SOVERSION="74:2:0"
AC_SUBST([DRUNTIME_SOVERSION])
AC_SUBST([PHOBOS_SOVERSION])

Expand Down
17 changes: 9 additions & 8 deletions libphobos/libdruntime/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \
rt/obj.d rt/qsort.d rt/sections.d rt/sections_android.d \
rt/sections_elf_shared.d rt/sections_osx.d rt/sections_solaris.d \
rt/sections_win32.d rt/sections_win64.d rt/switch_.d rt/tlsgc.d \
rt/typeinfo/ti_AC.d rt/typeinfo/ti_Acdouble.d rt/typeinfo/ti_Acfloat.d \
rt/typeinfo/ti_Acdouble.d rt/typeinfo/ti_Acfloat.d \
rt/typeinfo/ti_Acreal.d rt/typeinfo/ti_Adouble.d \
rt/typeinfo/ti_Afloat.d rt/typeinfo/ti_Ag.d rt/typeinfo/ti_Aint.d \
rt/typeinfo/ti_Along.d rt/typeinfo/ti_Areal.d rt/typeinfo/ti_Ashort.d \
Expand Down Expand Up @@ -230,13 +230,14 @@ DRUNTIME_DSOURCES_LINUX = core/sys/linux/config.d \
core/sys/linux/errno.d core/sys/linux/execinfo.d \
core/sys/linux/fcntl.d core/sys/linux/ifaddrs.d core/sys/linux/link.d \
core/sys/linux/sched.d core/sys/linux/stdio.d \
core/sys/linux/sys/auxv.d core/sys/linux/sys/inotify.d \
core/sys/linux/sys/mman.d core/sys/linux/sys/netinet/tcp.d \
core/sys/linux/sys/prctl.d core/sys/linux/sys/signalfd.d \
core/sys/linux/sys/socket.d core/sys/linux/sys/sysinfo.d \
core/sys/linux/sys/time.d core/sys/linux/sys/xattr.d \
core/sys/linux/termios.d core/sys/linux/time.d \
core/sys/linux/timerfd.d core/sys/linux/tipc.d core/sys/linux/unistd.d
core/sys/linux/sys/auxv.d core/sys/linux/sys/file.d \
core/sys/linux/sys/inotify.d core/sys/linux/sys/mman.d \
core/sys/linux/sys/netinet/tcp.d core/sys/linux/sys/prctl.d \
core/sys/linux/sys/signalfd.d core/sys/linux/sys/socket.d \
core/sys/linux/sys/sysinfo.d core/sys/linux/sys/time.d \
core/sys/linux/sys/xattr.d core/sys/linux/termios.d \
core/sys/linux/time.d core/sys/linux/timerfd.d core/sys/linux/tipc.d \
core/sys/linux/unistd.d

DRUNTIME_DSOURCES_OPENBSD = core/sys/openbsd/dlfcn.d

Expand Down
84 changes: 43 additions & 41 deletions libphobos/libdruntime/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -174,29 +174,29 @@ am__objects_1 = core/atomic.lo core/attribute.lo core/bitop.lo \
rt/sections_android.lo rt/sections_elf_shared.lo \
rt/sections_osx.lo rt/sections_solaris.lo rt/sections_win32.lo \
rt/sections_win64.lo rt/switch_.lo rt/tlsgc.lo \
rt/typeinfo/ti_AC.lo rt/typeinfo/ti_Acdouble.lo \
rt/typeinfo/ti_Acfloat.lo rt/typeinfo/ti_Acreal.lo \
rt/typeinfo/ti_Adouble.lo rt/typeinfo/ti_Afloat.lo \
rt/typeinfo/ti_Ag.lo rt/typeinfo/ti_Aint.lo \
rt/typeinfo/ti_Along.lo rt/typeinfo/ti_Areal.lo \
rt/typeinfo/ti_Ashort.lo rt/typeinfo/ti_C.lo \
rt/typeinfo/ti_byte.lo rt/typeinfo/ti_cdouble.lo \
rt/typeinfo/ti_cent.lo rt/typeinfo/ti_cfloat.lo \
rt/typeinfo/ti_char.lo rt/typeinfo/ti_creal.lo \
rt/typeinfo/ti_dchar.lo rt/typeinfo/ti_delegate.lo \
rt/typeinfo/ti_double.lo rt/typeinfo/ti_float.lo \
rt/typeinfo/ti_idouble.lo rt/typeinfo/ti_ifloat.lo \
rt/typeinfo/ti_int.lo rt/typeinfo/ti_ireal.lo \
rt/typeinfo/ti_long.lo rt/typeinfo/ti_n.lo \
rt/typeinfo/ti_ptr.lo rt/typeinfo/ti_real.lo \
rt/typeinfo/ti_short.lo rt/typeinfo/ti_ubyte.lo \
rt/typeinfo/ti_ucent.lo rt/typeinfo/ti_uint.lo \
rt/typeinfo/ti_ulong.lo rt/typeinfo/ti_ushort.lo \
rt/typeinfo/ti_void.lo rt/typeinfo/ti_wchar.lo \
rt/util/array.lo rt/util/container/array.lo \
rt/util/container/common.lo rt/util/container/hashtab.lo \
rt/util/container/treap.lo rt/util/hash.lo rt/util/random.lo \
rt/util/typeinfo.lo rt/util/utf.lo
rt/typeinfo/ti_Acdouble.lo rt/typeinfo/ti_Acfloat.lo \
rt/typeinfo/ti_Acreal.lo rt/typeinfo/ti_Adouble.lo \
rt/typeinfo/ti_Afloat.lo rt/typeinfo/ti_Ag.lo \
rt/typeinfo/ti_Aint.lo rt/typeinfo/ti_Along.lo \
rt/typeinfo/ti_Areal.lo rt/typeinfo/ti_Ashort.lo \
rt/typeinfo/ti_C.lo rt/typeinfo/ti_byte.lo \
rt/typeinfo/ti_cdouble.lo rt/typeinfo/ti_cent.lo \
rt/typeinfo/ti_cfloat.lo rt/typeinfo/ti_char.lo \
rt/typeinfo/ti_creal.lo rt/typeinfo/ti_dchar.lo \
rt/typeinfo/ti_delegate.lo rt/typeinfo/ti_double.lo \
rt/typeinfo/ti_float.lo rt/typeinfo/ti_idouble.lo \
rt/typeinfo/ti_ifloat.lo rt/typeinfo/ti_int.lo \
rt/typeinfo/ti_ireal.lo rt/typeinfo/ti_long.lo \
rt/typeinfo/ti_n.lo rt/typeinfo/ti_ptr.lo \
rt/typeinfo/ti_real.lo rt/typeinfo/ti_short.lo \
rt/typeinfo/ti_ubyte.lo rt/typeinfo/ti_ucent.lo \
rt/typeinfo/ti_uint.lo rt/typeinfo/ti_ulong.lo \
rt/typeinfo/ti_ushort.lo rt/typeinfo/ti_void.lo \
rt/typeinfo/ti_wchar.lo rt/util/array.lo \
rt/util/container/array.lo rt/util/container/common.lo \
rt/util/container/hashtab.lo rt/util/container/treap.lo \
rt/util/hash.lo rt/util/random.lo rt/util/typeinfo.lo \
rt/util/utf.lo
am__objects_2 = gc/bits.lo gc/config.lo gc/gcinterface.lo \
gc/impl/conservative/gc.lo gc/impl/manual/gc.lo gc/os.lo \
gc/pooltable.lo gc/proxy.lo
Expand Down Expand Up @@ -264,13 +264,14 @@ am__objects_17 = core/sys/linux/config.lo core/sys/linux/dlfcn.lo \
core/sys/linux/fcntl.lo core/sys/linux/ifaddrs.lo \
core/sys/linux/link.lo core/sys/linux/sched.lo \
core/sys/linux/stdio.lo core/sys/linux/sys/auxv.lo \
core/sys/linux/sys/inotify.lo core/sys/linux/sys/mman.lo \
core/sys/linux/sys/netinet/tcp.lo core/sys/linux/sys/prctl.lo \
core/sys/linux/sys/signalfd.lo core/sys/linux/sys/socket.lo \
core/sys/linux/sys/sysinfo.lo core/sys/linux/sys/time.lo \
core/sys/linux/sys/xattr.lo core/sys/linux/termios.lo \
core/sys/linux/time.lo core/sys/linux/timerfd.lo \
core/sys/linux/tipc.lo core/sys/linux/unistd.lo
core/sys/linux/sys/file.lo core/sys/linux/sys/inotify.lo \
core/sys/linux/sys/mman.lo core/sys/linux/sys/netinet/tcp.lo \
core/sys/linux/sys/prctl.lo core/sys/linux/sys/signalfd.lo \
core/sys/linux/sys/socket.lo core/sys/linux/sys/sysinfo.lo \
core/sys/linux/sys/time.lo core/sys/linux/sys/xattr.lo \
core/sys/linux/termios.lo core/sys/linux/time.lo \
core/sys/linux/timerfd.lo core/sys/linux/tipc.lo \
core/sys/linux/unistd.lo
@DRUNTIME_OS_LINUX_TRUE@am__objects_18 = $(am__objects_17)
am__objects_19 = core/sys/windows/accctrl.lo \
core/sys/windows/aclapi.lo core/sys/windows/aclui.lo \
Expand Down Expand Up @@ -709,7 +710,7 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \
rt/obj.d rt/qsort.d rt/sections.d rt/sections_android.d \
rt/sections_elf_shared.d rt/sections_osx.d rt/sections_solaris.d \
rt/sections_win32.d rt/sections_win64.d rt/switch_.d rt/tlsgc.d \
rt/typeinfo/ti_AC.d rt/typeinfo/ti_Acdouble.d rt/typeinfo/ti_Acfloat.d \
rt/typeinfo/ti_Acdouble.d rt/typeinfo/ti_Acfloat.d \
rt/typeinfo/ti_Acreal.d rt/typeinfo/ti_Adouble.d \
rt/typeinfo/ti_Afloat.d rt/typeinfo/ti_Ag.d rt/typeinfo/ti_Aint.d \
rt/typeinfo/ti_Along.d rt/typeinfo/ti_Areal.d rt/typeinfo/ti_Ashort.d \
Expand Down Expand Up @@ -760,13 +761,14 @@ DRUNTIME_DSOURCES_LINUX = core/sys/linux/config.d \
core/sys/linux/errno.d core/sys/linux/execinfo.d \
core/sys/linux/fcntl.d core/sys/linux/ifaddrs.d core/sys/linux/link.d \
core/sys/linux/sched.d core/sys/linux/stdio.d \
core/sys/linux/sys/auxv.d core/sys/linux/sys/inotify.d \
core/sys/linux/sys/mman.d core/sys/linux/sys/netinet/tcp.d \
core/sys/linux/sys/prctl.d core/sys/linux/sys/signalfd.d \
core/sys/linux/sys/socket.d core/sys/linux/sys/sysinfo.d \
core/sys/linux/sys/time.d core/sys/linux/sys/xattr.d \
core/sys/linux/termios.d core/sys/linux/time.d \
core/sys/linux/timerfd.d core/sys/linux/tipc.d core/sys/linux/unistd.d
core/sys/linux/sys/auxv.d core/sys/linux/sys/file.d \
core/sys/linux/sys/inotify.d core/sys/linux/sys/mman.d \
core/sys/linux/sys/netinet/tcp.d core/sys/linux/sys/prctl.d \
core/sys/linux/sys/signalfd.d core/sys/linux/sys/socket.d \
core/sys/linux/sys/sysinfo.d core/sys/linux/sys/time.d \
core/sys/linux/sys/xattr.d core/sys/linux/termios.d \
core/sys/linux/time.d core/sys/linux/timerfd.d core/sys/linux/tipc.d \
core/sys/linux/unistd.d

DRUNTIME_DSOURCES_OPENBSD = core/sys/openbsd/dlfcn.d
DRUNTIME_DSOURCES_OSX = core/sys/osx/execinfo.d \
Expand Down Expand Up @@ -1091,7 +1093,6 @@ rt/tlsgc.lo: rt/$(am__dirstamp)
rt/typeinfo/$(am__dirstamp):
@$(MKDIR_P) rt/typeinfo
@: > rt/typeinfo/$(am__dirstamp)
rt/typeinfo/ti_AC.lo: rt/typeinfo/$(am__dirstamp)
rt/typeinfo/ti_Acdouble.lo: rt/typeinfo/$(am__dirstamp)
rt/typeinfo/ti_Acfloat.lo: rt/typeinfo/$(am__dirstamp)
rt/typeinfo/ti_Acreal.lo: rt/typeinfo/$(am__dirstamp)
Expand Down Expand Up @@ -1323,6 +1324,7 @@ core/sys/linux/sys/$(am__dirstamp):
@$(MKDIR_P) core/sys/linux/sys
@: > core/sys/linux/sys/$(am__dirstamp)
core/sys/linux/sys/auxv.lo: core/sys/linux/sys/$(am__dirstamp)
core/sys/linux/sys/file.lo: core/sys/linux/sys/$(am__dirstamp)
core/sys/linux/sys/inotify.lo: core/sys/linux/sys/$(am__dirstamp)
core/sys/linux/sys/mman.lo: core/sys/linux/sys/$(am__dirstamp)
core/sys/linux/sys/netinet/$(am__dirstamp):
Expand Down Expand Up @@ -1737,6 +1739,8 @@ mostlyclean-compile:
-rm -f core/sys/linux/stdio.lo
-rm -f core/sys/linux/sys/auxv.$(OBJEXT)
-rm -f core/sys/linux/sys/auxv.lo
-rm -f core/sys/linux/sys/file.$(OBJEXT)
-rm -f core/sys/linux/sys/file.lo
-rm -f core/sys/linux/sys/inotify.$(OBJEXT)
-rm -f core/sys/linux/sys/inotify.lo
-rm -f core/sys/linux/sys/mman.$(OBJEXT)
Expand Down Expand Up @@ -2359,8 +2363,6 @@ mostlyclean-compile:
-rm -f rt/switch_.lo
-rm -f rt/tlsgc.$(OBJEXT)
-rm -f rt/tlsgc.lo
-rm -f rt/typeinfo/ti_AC.$(OBJEXT)
-rm -f rt/typeinfo/ti_AC.lo
-rm -f rt/typeinfo/ti_Acdouble.$(OBJEXT)
-rm -f rt/typeinfo/ti_Acdouble.lo
-rm -f rt/typeinfo/ti_Acfloat.$(OBJEXT)
Expand Down
15 changes: 14 additions & 1 deletion libphobos/libdruntime/core/demangle.d
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,8 @@ private struct Demangle
FuncAttrNothrow
FuncAttrProperty
FuncAttrRef
FuncAttrReturn
FuncAttrScope
FuncAttrTrusted
FuncAttrSafe

Expand Down Expand Up @@ -903,6 +905,9 @@ private struct Demangle
FuncAttrReturn:
Nj

FuncAttrScope:
Nl

Arguments:
Argument
Argument Arguments
Expand Down Expand Up @@ -955,7 +960,7 @@ private struct Demangle
{
// FuncAttrs
breakFuncAttrs:
while( 'N' == front )
while ('N' == front)
{
popFront();
switch( front )
Expand Down Expand Up @@ -1003,6 +1008,10 @@ private struct Demangle
popFront();
put( "return " );
continue;
case 'l': // FuncAttrScope
popFront();
put( "scope " );
continue;
default:
error();
}
Expand Down Expand Up @@ -1963,6 +1972,10 @@ version(unittest)
["_D8link657429__T3fooHVE8link65746Methodi0Z3fooFZi", "int link6574.foo!(0).foo()"],
["_D4test22__T4funcVAyaa3_610a62Z4funcFNaNbNiNfZAya", `pure nothrow @nogc @safe immutable(char)[] test.func!("a\x0ab").func()`],
["_D3foo3barFzkZzi", "cent foo.bar(ucent)"],
["_D5bug145Class3fooMFNlZPv", "scope void* bug14.Class.foo()"],
["_D5bug145Class3barMFNjZPv", "return void* bug14.Class.bar()"],
["_D5bug143fooFMPvZPv", "void* bug14.foo(scope void*)"],
["_D5bug143barFMNkPvZPv", "void* bug14.bar(scope return void*)"],
];

template staticIota(int x)
Expand Down
15 changes: 9 additions & 6 deletions libphobos/libdruntime/core/exception.d
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,10 @@ extern (C)

/* One of these three is called upon an assert() fail.
*/
void _d_assertm(immutable(ModuleInfo)* m, uint line)
void _d_assertp(immutable(char)* file, uint line)
{
onAssertError(m.name, line);
import core.stdc.string : strlen;
onAssertError(file[0 .. strlen(file)], line);
}

void _d_assert_msg(string msg, string file, uint line)
Expand All @@ -642,9 +643,10 @@ extern (C)

/* One of these three is called upon an assert() fail inside of a unittest block
*/
void _d_unittestm(immutable(ModuleInfo)* m, uint line)
void _d_unittestp(immutable(char)* file, uint line)
{
_d_unittest(m.name, line);
import core.stdc.string : strlen;
_d_unittest(file[0 .. strlen(file)], line);
}

void _d_unittest_msg(string msg, string file, uint line)
Expand All @@ -659,9 +661,10 @@ extern (C)

/* Called when an array index is out of bounds
*/
void _d_array_bounds(immutable(ModuleInfo)* m, uint line)
void _d_arrayboundsp(immutable(char*) file, uint line)
{
onRangeError(m.name, line);
import core.stdc.string : strlen;
onRangeError(file[0 .. strlen(file)], line);
}

void _d_arraybounds(string file, uint line)
Expand Down
Loading