aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2022-10-29 09:05:54 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2022-10-29 13:02:26 +0200
commit7e7ebe3e350fde90fe49ab41ce3b92a811bb6370 (patch)
treebe7a6dd9ae43a807ff7107d51ed03069a4a336f2 /libphobos
parentcfd85418051e8413e84ae7011cb5cb99cd8e337c (diff)
downloadgcc-7e7ebe3e350fde90fe49ab41ce3b92a811bb6370.zip
gcc-7e7ebe3e350fde90fe49ab41ce3b92a811bb6370.tar.gz
gcc-7e7ebe3e350fde90fe49ab41ce3b92a811bb6370.tar.bz2
d: Merge upstream dmd, druntime e4f8919591, phobos 3ad507b51.
D front-end changes: - Import dmd v2.101.0-beta.1. - Add predefined version `D_Optimized' when compiling with `-O'. - Shortened method syntax (DIP1043) is now enabled by default. - Array literals assigned to `scope' array variables are now allocated on the stack. - Implement `@system' variables (DIP1035), available behind the preview feature flag `-fpreview=systemvariables'. D runtime changes: - Import druntime v2.101.0-beta.1. Phobos changes: - Import phobos v2.101.0-beta.1. - Added `std.typecons.SafeRefCounted', that can be used in `@safe' code with `-fpreview=dip1000'. gcc/d/ChangeLog: * d-attribs.cc (apply_user_attributes): Update for new front-end interface. * d-builtins.cc (d_init_versions): Predefine `D_Optimized' with compiling with optimizations enabled. * d-lang.cc (d_handle_option): Update for new front-end interface. Handle new option `-fpreview=systemvariables'. * dmd/MERGE: Merge upstream dmd e4f8919591. * dmd/VERSION: Bump version to v2.101.0-beta.1. * expr.cc (ExprVisitor::visit (AssignExp *)): Treat construction of static arrays from a call expression as a simple assignment. (ExprVisitor::visit (ArrayLiteralExp *)): Handle array literals with `scope' storage. * gdc.texi: Update documentation of `-fpreview=' options. * lang.opt (fpreview=shortenedmethods): Remove. (fpreview=systemvariables): New option. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime e4f8919591. * src/MERGE: Merge upstream phobos 3ad507b51. gcc/testsuite/ChangeLog: * gdc.dg/simd19630.d: Move tests with errors to ... * gdc.dg/simd19630b.d: ... here. New test. * gdc.dg/simd19630c.d: New test. * gdc.dg/simd_ctfe.d: Removed. * gdc.dg/simd18867.d: New test. * gdc.dg/simd19788.d: New test. * gdc.dg/simd21469.d: New test. * gdc.dg/simd21672.d: New test. * gdc.dg/simd23077.d: New test. * gdc.dg/simd23084.d: New test. * gdc.dg/simd23085.d: New test. * gdc.dg/torture/simd19632.d: New test. * gdc.dg/torture/simd20041.d: New test. * gdc.dg/torture/simd21673.d: New test. * gdc.dg/torture/simd21676.d: New test. * gdc.dg/torture/simd22438.d: New test. * gdc.dg/torture/simd23009.d: New test. * gdc.dg/torture/simd23077.d: New test. * gdc.dg/torture/simd8.d: New test. * gdc.dg/torture/simd9.d: New test. * gdc.dg/torture/simd_prefetch.d: New test.
Diffstat (limited to 'libphobos')
-rw-r--r--libphobos/libdruntime/MERGE2
-rw-r--r--libphobos/libdruntime/core/stdc/fenv.d1
-rw-r--r--libphobos/libdruntime/core/stdc/signal.d1
-rw-r--r--libphobos/libdruntime/core/stdc/stdarg.d1
-rw-r--r--libphobos/libdruntime/core/stdc/stdio.d1
-rw-r--r--libphobos/libdruntime/core/stdc/stdlib.d1
-rw-r--r--libphobos/libdruntime/core/stdc/string.d1
-rw-r--r--libphobos/libdruntime/core/stdc/wchar_.d1
-rw-r--r--libphobos/libdruntime/core/sys/darwin/fcntl.d1
-rw-r--r--libphobos/libdruntime/core/sys/darwin/ifaddrs.d1
-rw-r--r--libphobos/libdruntime/core/sys/elf/package.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/dlfcn.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/elf.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/epoll.d2
-rw-r--r--libphobos/libdruntime/core/sys/linux/err.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/errno.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/execinfo.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/fcntl.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/fs.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/ifaddrs.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/io_uring.d2
-rw-r--r--libphobos/libdruntime/core/sys/linux/link.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/perf_event.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sched.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/stdio.d3
-rw-r--r--libphobos/libdruntime/core/sys/linux/string.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sys/eventfd.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sys/inotify.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sys/mman.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sys/prctl.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sys/signalfd.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sys/sysinfo.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/sys/xattr.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/timerfd.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/tipc.d1
-rw-r--r--libphobos/libdruntime/core/sys/linux/unistd.d1
-rw-r--r--libphobos/libdruntime/core/sys/openbsd/sys/mman.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/aio.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/config.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/dirent.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/dlfcn.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/fcntl.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/grp.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/iconv.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/inttypes.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/libgen.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/locale.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/mqueue.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/netdb.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/poll.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/pthread.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/pwd.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sched.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/semaphore.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/setjmp.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/spawn.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/stdio.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/stdlib.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/string.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/strings.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/filio.d1
-rwxr-xr-xlibphobos/libdruntime/core/sys/posix/sys/ioccom.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/ioctl.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/ipc.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/mman.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/msg.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/resource.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/select.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/shm.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/socket.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/stat.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/statvfs.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/time.d1
-rwxr-xr-xlibphobos/libdruntime/core/sys/posix/sys/ttycom.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/types.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/uio.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/un.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/utsname.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/sys/wait.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/syslog.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/termios.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/time.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/ucontext.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/unistd.d1
-rw-r--r--libphobos/libdruntime/core/sys/posix/utime.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/aclapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/aclui.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/basetsd.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/basetyps.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/com.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/comcat.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/commctrl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/commdlg.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/cpl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/cplext.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/custcntl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/dbghelp.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/dbghelp_types.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/dbt.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/dde.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ddeml.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/dhcpcsdk.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/dlgs.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/dll.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/docobj.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/errorrep.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/exdisp.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/httpext.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/imagehlp.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/imm.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/intshcut.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ipexport.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/iphlpapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/iprtrmib.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/iptypes.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lm.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmaccess.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmalert.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmat.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmaudit.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmbrowsr.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmchdev.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmconfig.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmcons.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmerr.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmerrlog.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmmsg.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmremutl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmrepl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmserver.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmshare.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmsname.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmstats.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmsvc.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmuse.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lmwksta.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/lzexpand.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/mapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/mciavi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/mcx.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/mgmtapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/mmsystem.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/msacm.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/mshtml.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/mswsock.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/nb30.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/nddeapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/nspapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ntdef.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ntdll.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ntldap.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ntsecapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ntsecpkg.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/oaidl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/objbase.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/objfwd.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/objidl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/objsafe.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ocidl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/odbcinst.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ole.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ole2.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/oleacc.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/oleauto.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/olectl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/oledlg.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/oleidl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/pbt.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/powrprof.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/prsht.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/psapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/ras.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rasdlg.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/raserror.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rassapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/reason.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/regstr.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/richedit.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/richole.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpc.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpcdce.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpcdce2.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpcdcep.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpcndr.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpcnsi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpcnsip.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/rpcnterr.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/schannel.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/sdkddkver.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/secext.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/security.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/servprov.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/setupapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/shellapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/shldisp.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/shlguid.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/shlobj.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/shlwapi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/snmp.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/sql.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/sqlext.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/sqltypes.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/sqlucode.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/sspi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/stacktrace.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/stat.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/stdc/malloc.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/subauth.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/threadaux.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/tlhelp32.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/tmschema.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/unknwn.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/uuid.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/vfw.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/w32api.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winbase.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winber.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/wincon.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/wincrypt.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/windef.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/windows.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winerror.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/wingdi.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winhttp.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/wininet.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winioctl.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winldap.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winnetwk.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winnls.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winnt.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winperf.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winreg.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winsock2.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winspool.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winsvc.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winuser.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/winver.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/wtsapi32.d1
-rw-r--r--libphobos/libdruntime/core/sys/windows/wtypes.d1
-rw-r--r--libphobos/libdruntime/rt/dmain2.d2
-rw-r--r--libphobos/src/MERGE2
-rw-r--r--libphobos/src/std/algorithm/iteration.d25
-rw-r--r--libphobos/src/std/algorithm/mutation.d1
-rw-r--r--libphobos/src/std/array.d3
-rw-r--r--libphobos/src/std/ascii.d6
-rw-r--r--libphobos/src/std/base64.d4
-rw-r--r--libphobos/src/std/bitmanip.d98
-rw-r--r--libphobos/src/std/container/binaryheap.d2
-rw-r--r--libphobos/src/std/digest/murmurhash.d10
-rw-r--r--libphobos/src/std/exception.d203
-rw-r--r--libphobos/src/std/experimental/allocator/common.d20
-rw-r--r--libphobos/src/std/file.d55
-rw-r--r--libphobos/src/std/format/internal/write.d40
-rw-r--r--libphobos/src/std/internal/windows/advapi32.d4
-rw-r--r--libphobos/src/std/json.d3
-rw-r--r--libphobos/src/std/net/curl.d2
-rw-r--r--libphobos/src/std/random.d24
-rw-r--r--libphobos/src/std/stdio.d6
-rw-r--r--libphobos/src/std/string.d1
-rw-r--r--libphobos/src/std/traits.d8
-rw-r--r--libphobos/src/std/typecons.d790
-rw-r--r--libphobos/src/std/uni/package.d11
263 files changed, 975 insertions, 590 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
index a4c46f3..2398875 100644
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
-4219ba670ce9ff92f3e874f0f048f2c28134c008
+e4f89195913be1dc638707b1abb24c4f3ae7e0bf
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
index 5242ba9..dbe7daa 100644
--- a/libphobos/libdruntime/core/stdc/fenv.d
+++ b/libphobos/libdruntime/core/stdc/fenv.d
@@ -24,7 +24,6 @@ else version (WatchOS)
version = Darwin;
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/stdc/signal.d b/libphobos/libdruntime/core/stdc/signal.d
index 8d5d845..13c6f9e 100644
--- a/libphobos/libdruntime/core/stdc/signal.d
+++ b/libphobos/libdruntime/core/stdc/signal.d
@@ -15,7 +15,6 @@
module core.stdc.signal;
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/stdc/stdarg.d b/libphobos/libdruntime/core/stdc/stdarg.d
index 646905e..5b79813 100644
--- a/libphobos/libdruntime/core/stdc/stdarg.d
+++ b/libphobos/libdruntime/core/stdc/stdarg.d
@@ -12,7 +12,6 @@
module core.stdc.stdarg;
-@system:
@nogc:
nothrow:
diff --git a/libphobos/libdruntime/core/stdc/stdio.d b/libphobos/libdruntime/core/stdc/stdio.d
index fc98350..ee37da1 100644
--- a/libphobos/libdruntime/core/stdc/stdio.d
+++ b/libphobos/libdruntime/core/stdc/stdio.d
@@ -49,7 +49,6 @@ private
}
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/stdc/stdlib.d b/libphobos/libdruntime/core/stdc/stdlib.d
index 920c311..0b42de8 100644
--- a/libphobos/libdruntime/core/stdc/stdlib.d
+++ b/libphobos/libdruntime/core/stdc/stdlib.d
@@ -31,7 +31,6 @@ version (CRuntime_Glibc)
else {}
extern (C):
-@system:
/* Placed outside `nothrow` and `@nogc` in order to not constrain what the callback does.
*/
diff --git a/libphobos/libdruntime/core/stdc/string.d b/libphobos/libdruntime/core/stdc/string.d
index f15ef85..3591a6d 100644
--- a/libphobos/libdruntime/core/stdc/string.d
+++ b/libphobos/libdruntime/core/stdc/string.d
@@ -30,7 +30,6 @@ else version (CRuntime_UClibc)
version = ReturnStrerrorR;
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/stdc/wchar_.d b/libphobos/libdruntime/core/stdc/wchar_.d
index d087029..fe5fce4 100644
--- a/libphobos/libdruntime/core/stdc/wchar_.d
+++ b/libphobos/libdruntime/core/stdc/wchar_.d
@@ -22,7 +22,6 @@ public import core.stdc.time; // for tm
public import core.stdc.stdint; // for WCHAR_MIN, WCHAR_MAX
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/darwin/fcntl.d b/libphobos/libdruntime/core/sys/darwin/fcntl.d
index 47d895a..413d9c6 100644
--- a/libphobos/libdruntime/core/sys/darwin/fcntl.d
+++ b/libphobos/libdruntime/core/sys/darwin/fcntl.d
@@ -15,6 +15,5 @@ version (Darwin):
extern (C):
nothrow:
@nogc:
-@system:
enum F_FULLFSYNC = 51;
diff --git a/libphobos/libdruntime/core/sys/darwin/ifaddrs.d b/libphobos/libdruntime/core/sys/darwin/ifaddrs.d
index a254036..2e744b0 100644
--- a/libphobos/libdruntime/core/sys/darwin/ifaddrs.d
+++ b/libphobos/libdruntime/core/sys/darwin/ifaddrs.d
@@ -29,7 +29,6 @@ version (Darwin):
extern (C):
nothrow:
@nogc:
-@system:
import core.sys.posix.sys.socket;
diff --git a/libphobos/libdruntime/core/sys/elf/package.d b/libphobos/libdruntime/core/sys/elf/package.d
index 2dcfd20..b120ee5 100644
--- a/libphobos/libdruntime/core/sys/elf/package.d
+++ b/libphobos/libdruntime/core/sys/elf/package.d
@@ -8,7 +8,6 @@ module core.sys.elf;
extern (C):
pure:
nothrow:
-@system:
import core.stdc.stdint;
diff --git a/libphobos/libdruntime/core/sys/linux/dlfcn.d b/libphobos/libdruntime/core/sys/linux/dlfcn.d
index fbb8462..a13bae7 100644
--- a/libphobos/libdruntime/core/sys/linux/dlfcn.d
+++ b/libphobos/libdruntime/core/sys/linux/dlfcn.d
@@ -9,7 +9,6 @@ version (linux):
extern (C):
nothrow:
@nogc:
-@system:
version (ARM) version = ARM_Any;
version (AArch64) version = ARM_Any;
diff --git a/libphobos/libdruntime/core/sys/linux/elf.d b/libphobos/libdruntime/core/sys/linux/elf.d
index 168b936..0486cbe 100644
--- a/libphobos/libdruntime/core/sys/linux/elf.d
+++ b/libphobos/libdruntime/core/sys/linux/elf.d
@@ -9,7 +9,6 @@ version (linux):
extern (C):
pure:
nothrow:
-@system:
import core.stdc.stdint;
public import core.sys.elf;
diff --git a/libphobos/libdruntime/core/sys/linux/epoll.d b/libphobos/libdruntime/core/sys/linux/epoll.d
index f5ff7db..99099b5 100644
--- a/libphobos/libdruntime/core/sys/linux/epoll.d
+++ b/libphobos/libdruntime/core/sys/linux/epoll.d
@@ -13,10 +13,8 @@ version (linux):
import core.sys.posix.signal : sigset_t;
extern (C):
-@system:
@nogc:
nothrow:
-@system:
version (ARM) version = ARM_Any;
version (AArch64) version = ARM_Any;
diff --git a/libphobos/libdruntime/core/sys/linux/err.d b/libphobos/libdruntime/core/sys/linux/err.d
index be5378d..c3752de 100644
--- a/libphobos/libdruntime/core/sys/linux/err.d
+++ b/libphobos/libdruntime/core/sys/linux/err.d
@@ -12,7 +12,6 @@ version (linux):
extern (C):
nothrow:
@nogc:
-@system:
void err(int eval, scope const char* fmt, ...);
void errx(int eval, scope const char* fmt, ...);
diff --git a/libphobos/libdruntime/core/sys/linux/errno.d b/libphobos/libdruntime/core/sys/linux/errno.d
index d7a39ac..74844e7 100644
--- a/libphobos/libdruntime/core/sys/linux/errno.d
+++ b/libphobos/libdruntime/core/sys/linux/errno.d
@@ -8,7 +8,6 @@ module core.sys.linux.errno;
version (linux):
extern (C):
nothrow:
-@system:
public import core.stdc.errno;
import core.sys.linux.config;
diff --git a/libphobos/libdruntime/core/sys/linux/execinfo.d b/libphobos/libdruntime/core/sys/linux/execinfo.d
index 4169ca3..50dc60d 100644
--- a/libphobos/libdruntime/core/sys/linux/execinfo.d
+++ b/libphobos/libdruntime/core/sys/linux/execinfo.d
@@ -10,7 +10,6 @@ module core.sys.linux.execinfo;
version (linux):
extern (C):
nothrow:
-@system:
@nogc:
int backtrace(void** buffer, int size);
diff --git a/libphobos/libdruntime/core/sys/linux/fcntl.d b/libphobos/libdruntime/core/sys/linux/fcntl.d
index 89dc019..d666efe 100644
--- a/libphobos/libdruntime/core/sys/linux/fcntl.d
+++ b/libphobos/libdruntime/core/sys/linux/fcntl.d
@@ -5,7 +5,6 @@ public import core.sys.posix.fcntl;
version (linux):
extern(C):
nothrow:
-@system:
// From linux/falloc.h
/// fallocate(2) params
diff --git a/libphobos/libdruntime/core/sys/linux/fs.d b/libphobos/libdruntime/core/sys/linux/fs.d
index c5525066..ca88567 100644
--- a/libphobos/libdruntime/core/sys/linux/fs.d
+++ b/libphobos/libdruntime/core/sys/linux/fs.d
@@ -18,7 +18,6 @@ public import core.sys.posix.sys.ioctl;
import core.stdc.config : c_ulong, c_long;
extern (C):
-@system:
@nogc:
nothrow:
diff --git a/libphobos/libdruntime/core/sys/linux/ifaddrs.d b/libphobos/libdruntime/core/sys/linux/ifaddrs.d
index 5490e97a..479dfa8 100644
--- a/libphobos/libdruntime/core/sys/linux/ifaddrs.d
+++ b/libphobos/libdruntime/core/sys/linux/ifaddrs.d
@@ -22,7 +22,6 @@ version (linux):
extern (C):
nothrow:
@nogc:
-@system:
struct ifaddrs
{
diff --git a/libphobos/libdruntime/core/sys/linux/io_uring.d b/libphobos/libdruntime/core/sys/linux/io_uring.d
index 5e1a20c..7bafb9f 100644
--- a/libphobos/libdruntime/core/sys/linux/io_uring.d
+++ b/libphobos/libdruntime/core/sys/linux/io_uring.d
@@ -14,10 +14,8 @@ version (linux):
import core.sys.linux.fs : __kernel_rwf_t;
extern (C):
-@system:
@nogc:
nothrow:
-@system:
/**
* IO submission data structure (Submission Queue Entry)
diff --git a/libphobos/libdruntime/core/sys/linux/link.d b/libphobos/libdruntime/core/sys/linux/link.d
index b417ec8..4d7eb1e 100644
--- a/libphobos/libdruntime/core/sys/linux/link.d
+++ b/libphobos/libdruntime/core/sys/linux/link.d
@@ -8,7 +8,6 @@ module core.sys.linux.link;
version (linux):
extern (C):
nothrow:
-@system:
version (ARM) version = ARM_Any;
version (AArch64) version = ARM_Any;
diff --git a/libphobos/libdruntime/core/sys/linux/perf_event.d b/libphobos/libdruntime/core/sys/linux/perf_event.d
index 9e96a7f..b9993a7 100644
--- a/libphobos/libdruntime/core/sys/linux/perf_event.d
+++ b/libphobos/libdruntime/core/sys/linux/perf_event.d
@@ -9,7 +9,6 @@ module core.sys.linux.perf_event;
version (linux) : extern (C):
@nogc:
nothrow:
-@system:
import core.sys.posix.sys.ioctl;
import core.sys.posix.unistd;
diff --git a/libphobos/libdruntime/core/sys/linux/sched.d b/libphobos/libdruntime/core/sys/linux/sched.d
index e828b74..5cd512e 100644
--- a/libphobos/libdruntime/core/sys/linux/sched.d
+++ b/libphobos/libdruntime/core/sys/linux/sched.d
@@ -26,7 +26,6 @@ version (linux):
extern (C):
@nogc:
nothrow:
-@system:
private // helpers
diff --git a/libphobos/libdruntime/core/sys/linux/stdio.d b/libphobos/libdruntime/core/sys/linux/stdio.d
index ab8971b..2d079fd 100644
--- a/libphobos/libdruntime/core/sys/linux/stdio.d
+++ b/libphobos/libdruntime/core/sys/linux/stdio.d
@@ -13,7 +13,6 @@ import core.sys.linux.config : __USE_FILE_OFFSET64;
import core.stdc.stdio : FILE;
import core.stdc.stddef : wchar_t;
-@system:
extern(C) nothrow
{
@@ -29,7 +28,7 @@ extern(C) nothrow
cookie_seek_function_t seek;
cookie_close_function_t close;
}
- FILE* fopencookie(in void* cookie, in char* mode, cookie_io_functions_t io_funcs);
+ FILE* fopencookie(void* cookie, const(char)* mode, cookie_io_functions_t io_funcs);
void setbuffer(FILE *stream, char *buf, size_t size); // note: _DEFAULT_SOURCE
}
diff --git a/libphobos/libdruntime/core/sys/linux/string.d b/libphobos/libdruntime/core/sys/linux/string.d
index 880faa4..a8da398 100644
--- a/libphobos/libdruntime/core/sys/linux/string.d
+++ b/libphobos/libdruntime/core/sys/linux/string.d
@@ -14,7 +14,6 @@ version (linux):
extern (C):
nothrow:
@nogc:
-@system:
static if (_GNU_SOURCE)
{
diff --git a/libphobos/libdruntime/core/sys/linux/sys/eventfd.d b/libphobos/libdruntime/core/sys/linux/sys/eventfd.d
index 0954b3f..a35d714 100644
--- a/libphobos/libdruntime/core/sys/linux/sys/eventfd.d
+++ b/libphobos/libdruntime/core/sys/linux/sys/eventfd.d
@@ -9,7 +9,6 @@ module core.sys.linux.sys.eventfd;
version (linux):
extern (C):
@nogc:
-@system:
nothrow:
version (ARM) version = ARM_Any;
diff --git a/libphobos/libdruntime/core/sys/linux/sys/inotify.d b/libphobos/libdruntime/core/sys/linux/sys/inotify.d
index 11bdc85..c74aaa6 100644
--- a/libphobos/libdruntime/core/sys/linux/sys/inotify.d
+++ b/libphobos/libdruntime/core/sys/linux/sys/inotify.d
@@ -22,7 +22,6 @@ version (DragonFlyBSD) version = LinuxOrCompatible;
version (LinuxOrCompatible):
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/linux/sys/mman.d b/libphobos/libdruntime/core/sys/linux/sys/mman.d
index 649e2af..43a1aec 100644
--- a/libphobos/libdruntime/core/sys/linux/sys/mman.d
+++ b/libphobos/libdruntime/core/sys/linux/sys/mman.d
@@ -8,7 +8,6 @@ module core.sys.linux.sys.mman;
version (linux):
extern (C):
nothrow:
-@system:
@nogc:
version (ARM) version = ARM_Any;
diff --git a/libphobos/libdruntime/core/sys/linux/sys/prctl.d b/libphobos/libdruntime/core/sys/linux/sys/prctl.d
index a732216..363e1e3 100644
--- a/libphobos/libdruntime/core/sys/linux/sys/prctl.d
+++ b/libphobos/libdruntime/core/sys/linux/sys/prctl.d
@@ -8,7 +8,6 @@ module core.sys.linux.sys.prctl;
version (linux):
extern (C):
-@system:
@nogc:
nothrow:
diff --git a/libphobos/libdruntime/core/sys/linux/sys/signalfd.d b/libphobos/libdruntime/core/sys/linux/sys/signalfd.d
index 736b145..8834be4 100644
--- a/libphobos/libdruntime/core/sys/linux/sys/signalfd.d
+++ b/libphobos/libdruntime/core/sys/linux/sys/signalfd.d
@@ -12,7 +12,6 @@ import core.sys.posix.signal;
version (linux):
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/linux/sys/sysinfo.d b/libphobos/libdruntime/core/sys/linux/sys/sysinfo.d
index 0c9ed59..699cd3e 100644
--- a/libphobos/libdruntime/core/sys/linux/sys/sysinfo.d
+++ b/libphobos/libdruntime/core/sys/linux/sys/sysinfo.d
@@ -7,7 +7,6 @@
module core.sys.linux.sys.sysinfo;
version (linux) extern(C) @nogc nothrow:
-@system:
import core.sys.linux.config;
diff --git a/libphobos/libdruntime/core/sys/linux/sys/xattr.d b/libphobos/libdruntime/core/sys/linux/sys/xattr.d
index 6446ff8..8618fc9 100644
--- a/libphobos/libdruntime/core/sys/linux/sys/xattr.d
+++ b/libphobos/libdruntime/core/sys/linux/sys/xattr.d
@@ -11,7 +11,6 @@ import core.sys.posix.sys.types;
version (linux):
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/linux/timerfd.d b/libphobos/libdruntime/core/sys/linux/timerfd.d
index f8a9719..eacc448 100644
--- a/libphobos/libdruntime/core/sys/linux/timerfd.d
+++ b/libphobos/libdruntime/core/sys/linux/timerfd.d
@@ -11,7 +11,6 @@ version (linux):
public import core.sys.posix.time;
extern (C):
-@system:
@nogc:
nothrow:
diff --git a/libphobos/libdruntime/core/sys/linux/tipc.d b/libphobos/libdruntime/core/sys/linux/tipc.d
index 4d5d886..50f90ee 100644
--- a/libphobos/libdruntime/core/sys/linux/tipc.d
+++ b/libphobos/libdruntime/core/sys/linux/tipc.d
@@ -10,7 +10,6 @@ module core.sys.linux.tipc;
version (linux):
extern (C) nothrow @nogc:
-@system:
struct tipc_portid
{
diff --git a/libphobos/libdruntime/core/sys/linux/unistd.d b/libphobos/libdruntime/core/sys/linux/unistd.d
index 4845746..faa226c 100644
--- a/libphobos/libdruntime/core/sys/linux/unistd.d
+++ b/libphobos/libdruntime/core/sys/linux/unistd.d
@@ -5,7 +5,6 @@ public import core.sys.posix.unistd;
version (linux):
extern(C):
nothrow:
-@system:
// Additional seek constants for sparse file handling
// from Linux's unistd.h, stdio.h, and linux/fs.h
diff --git a/libphobos/libdruntime/core/sys/openbsd/sys/mman.d b/libphobos/libdruntime/core/sys/openbsd/sys/mman.d
index 7654834..8a8542a 100644
--- a/libphobos/libdruntime/core/sys/openbsd/sys/mman.d
+++ b/libphobos/libdruntime/core/sys/openbsd/sys/mman.d
@@ -47,5 +47,6 @@ static if (__BSD_VISIBLE)
int madvise(void *, size_t, int);
int minherit(void *, size_t, int);
+ int mimmutable(void *, size_t);
void* mquery(void *, size_t, int, int, int, off_t);
}
diff --git a/libphobos/libdruntime/core/sys/posix/aio.d b/libphobos/libdruntime/core/sys/posix/aio.d
index a76846e..3ea7f6a 100644
--- a/libphobos/libdruntime/core/sys/posix/aio.d
+++ b/libphobos/libdruntime/core/sys/posix/aio.d
@@ -23,7 +23,6 @@ else version (WatchOS)
version (Posix):
extern (C):
-@system:
@nogc:
nothrow:
diff --git a/libphobos/libdruntime/core/sys/posix/config.d b/libphobos/libdruntime/core/sys/posix/config.d
index 7bd0722..ae6752f2 100644
--- a/libphobos/libdruntime/core/sys/posix/config.d
+++ b/libphobos/libdruntime/core/sys/posix/config.d
@@ -19,7 +19,6 @@ public import core.stdc.config;
version (Posix):
extern (C) nothrow @nogc:
-@system:
enum _XOPEN_SOURCE = 600;
enum _POSIX_SOURCE = true;
diff --git a/libphobos/libdruntime/core/sys/posix/dirent.d b/libphobos/libdruntime/core/sys/posix/dirent.d
index bffbc51..c7e8649 100644
--- a/libphobos/libdruntime/core/sys/posix/dirent.d
+++ b/libphobos/libdruntime/core/sys/posix/dirent.d
@@ -31,7 +31,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/dlfcn.d b/libphobos/libdruntime/core/sys/posix/dlfcn.d
index 04a8e8b..5797b8f 100644
--- a/libphobos/libdruntime/core/sys/posix/dlfcn.d
+++ b/libphobos/libdruntime/core/sys/posix/dlfcn.d
@@ -45,7 +45,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// XOpen (XSI)
diff --git a/libphobos/libdruntime/core/sys/posix/fcntl.d b/libphobos/libdruntime/core/sys/posix/fcntl.d
index dc0a183..0a58034 100644
--- a/libphobos/libdruntime/core/sys/posix/fcntl.d
+++ b/libphobos/libdruntime/core/sys/posix/fcntl.d
@@ -49,7 +49,6 @@ extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/grp.d b/libphobos/libdruntime/core/sys/posix/grp.d
index 92dcf34..3a9b993 100644
--- a/libphobos/libdruntime/core/sys/posix/grp.d
+++ b/libphobos/libdruntime/core/sys/posix/grp.d
@@ -30,7 +30,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/iconv.d b/libphobos/libdruntime/core/sys/posix/iconv.d
index cea8987..e588fb8 100644
--- a/libphobos/libdruntime/core/sys/posix/iconv.d
+++ b/libphobos/libdruntime/core/sys/posix/iconv.d
@@ -34,7 +34,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
alias void* iconv_t;
diff --git a/libphobos/libdruntime/core/sys/posix/inttypes.d b/libphobos/libdruntime/core/sys/posix/inttypes.d
index 4bde28f..e0a4473 100644
--- a/libphobos/libdruntime/core/sys/posix/inttypes.d
+++ b/libphobos/libdruntime/core/sys/posix/inttypes.d
@@ -19,7 +19,6 @@ public import core.stdc.inttypes;
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/libgen.d b/libphobos/libdruntime/core/sys/posix/libgen.d
index b90765f..6770cd8 100644
--- a/libphobos/libdruntime/core/sys/posix/libgen.d
+++ b/libphobos/libdruntime/core/sys/posix/libgen.d
@@ -15,7 +15,6 @@
module core.sys.posix.libgen;
@nogc nothrow:
-@system:
extern (C):
version (Posix):
diff --git a/libphobos/libdruntime/core/sys/posix/locale.d b/libphobos/libdruntime/core/sys/posix/locale.d
index 85e2fb6..0864f7c 100644
--- a/libphobos/libdruntime/core/sys/posix/locale.d
+++ b/libphobos/libdruntime/core/sys/posix/locale.d
@@ -12,7 +12,6 @@ module core.sys.posix.locale;
version (Posix):
extern(C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/posix/mqueue.d b/libphobos/libdruntime/core/sys/posix/mqueue.d
index 7085fc4..ac697bf 100644
--- a/libphobos/libdruntime/core/sys/posix/mqueue.d
+++ b/libphobos/libdruntime/core/sys/posix/mqueue.d
@@ -31,7 +31,6 @@ version (Posix):
version (CRuntime_Glibc):
extern (C):
@nogc nothrow:
-@system:
/// Message queue descriptor.
diff --git a/libphobos/libdruntime/core/sys/posix/netdb.d b/libphobos/libdruntime/core/sys/posix/netdb.d
index d1411ea..70a5fe1 100644
--- a/libphobos/libdruntime/core/sys/posix/netdb.d
+++ b/libphobos/libdruntime/core/sys/posix/netdb.d
@@ -33,7 +33,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/poll.d b/libphobos/libdruntime/core/sys/posix/poll.d
index 7c2d570..5901f62 100644
--- a/libphobos/libdruntime/core/sys/posix/poll.d
+++ b/libphobos/libdruntime/core/sys/posix/poll.d
@@ -29,7 +29,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// XOpen (XSI)
diff --git a/libphobos/libdruntime/core/sys/posix/pthread.d b/libphobos/libdruntime/core/sys/posix/pthread.d
index 395ed0f..6c5f1a9 100644
--- a/libphobos/libdruntime/core/sys/posix/pthread.d
+++ b/libphobos/libdruntime/core/sys/posix/pthread.d
@@ -33,7 +33,6 @@ else version (WatchOS)
version (Posix):
extern (C)
nothrow:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/pwd.d b/libphobos/libdruntime/core/sys/posix/pwd.d
index e7ddda7..e2a77de 100644
--- a/libphobos/libdruntime/core/sys/posix/pwd.d
+++ b/libphobos/libdruntime/core/sys/posix/pwd.d
@@ -30,7 +30,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/sched.d b/libphobos/libdruntime/core/sys/posix/sched.d
index 35463d4..f6f0a58 100644
--- a/libphobos/libdruntime/core/sys/posix/sched.d
+++ b/libphobos/libdruntime/core/sys/posix/sched.d
@@ -32,7 +32,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/semaphore.d b/libphobos/libdruntime/core/sys/posix/semaphore.d
index a163e59..d755f86 100644
--- a/libphobos/libdruntime/core/sys/posix/semaphore.d
+++ b/libphobos/libdruntime/core/sys/posix/semaphore.d
@@ -30,7 +30,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/setjmp.d b/libphobos/libdruntime/core/sys/posix/setjmp.d
index 5a15d82..0d43c61 100644
--- a/libphobos/libdruntime/core/sys/posix/setjmp.d
+++ b/libphobos/libdruntime/core/sys/posix/setjmp.d
@@ -19,7 +19,6 @@ import core.sys.posix.signal; // for sigset_t
version (Posix):
extern (C) nothrow @nogc:
-@system:
version (RISCV32) version = RISCV_Any;
version (RISCV64) version = RISCV_Any;
diff --git a/libphobos/libdruntime/core/sys/posix/spawn.d b/libphobos/libdruntime/core/sys/posix/spawn.d
index 2064962..7890533 100644
--- a/libphobos/libdruntime/core/sys/posix/spawn.d
+++ b/libphobos/libdruntime/core/sys/posix/spawn.d
@@ -49,7 +49,6 @@ public import core.sys.posix.sched : sched_param;
extern(C):
@nogc:
nothrow:
-@system:
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t*, int);
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t*, int, int);
diff --git a/libphobos/libdruntime/core/sys/posix/stdio.d b/libphobos/libdruntime/core/sys/posix/stdio.d
index d0d3d60..d379989 100644
--- a/libphobos/libdruntime/core/sys/posix/stdio.d
+++ b/libphobos/libdruntime/core/sys/posix/stdio.d
@@ -32,7 +32,6 @@ extern (C):
nothrow:
@nogc:
-@system:
//
// Required (defined in core.stdc.stdio)
diff --git a/libphobos/libdruntime/core/sys/posix/stdlib.d b/libphobos/libdruntime/core/sys/posix/stdlib.d
index df96a3d..8dd7b68 100644
--- a/libphobos/libdruntime/core/sys/posix/stdlib.d
+++ b/libphobos/libdruntime/core/sys/posix/stdlib.d
@@ -31,7 +31,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required (defined in core.stdc.stdlib)
diff --git a/libphobos/libdruntime/core/sys/posix/string.d b/libphobos/libdruntime/core/sys/posix/string.d
index 79d2562..8c4ea38 100644
--- a/libphobos/libdruntime/core/sys/posix/string.d
+++ b/libphobos/libdruntime/core/sys/posix/string.d
@@ -16,7 +16,6 @@ module core.sys.posix.string;
version (Posix):
extern(C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/posix/strings.d b/libphobos/libdruntime/core/sys/posix/strings.d
index 96fbccc..768a47f 100644
--- a/libphobos/libdruntime/core/sys/posix/strings.d
+++ b/libphobos/libdruntime/core/sys/posix/strings.d
@@ -15,7 +15,6 @@ module core.sys.posix.strings;
version (Posix):
extern(C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/posix/sys/filio.d b/libphobos/libdruntime/core/sys/posix/sys/filio.d
index a8d837c..bedbd6a 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/filio.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/filio.d
@@ -20,7 +20,6 @@ else version (WatchOS)
version (Posix):
nothrow @nogc:
-@system:
version (Darwin)
{
diff --git a/libphobos/libdruntime/core/sys/posix/sys/ioccom.d b/libphobos/libdruntime/core/sys/posix/sys/ioccom.d
index 4a0e96b..3691765 100755
--- a/libphobos/libdruntime/core/sys/posix/sys/ioccom.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/ioccom.d
@@ -18,7 +18,6 @@ else version (WatchOS)
version (Posix):
nothrow @nogc:
-@system:
version (Darwin)
{
diff --git a/libphobos/libdruntime/core/sys/posix/sys/ioctl.d b/libphobos/libdruntime/core/sys/posix/sys/ioctl.d
index 36d1edc..caf3eba 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/ioctl.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/ioctl.d
@@ -29,7 +29,6 @@ else version (WatchOS)
version (Posix):
extern (C) nothrow @nogc:
-@system:
version (linux)
{
diff --git a/libphobos/libdruntime/core/sys/posix/sys/ipc.d b/libphobos/libdruntime/core/sys/posix/sys/ipc.d
index 1718243..32caba9 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/ipc.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/ipc.d
@@ -28,7 +28,6 @@ else version (WatchOS)
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// XOpen (XSI)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
index 430f215..0d3d517 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/mman.d
@@ -45,7 +45,6 @@ version (X86_64) version = X86_Any;
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// Advisory Information (ADV)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/msg.d b/libphobos/libdruntime/core/sys/posix/sys/msg.d
index 4760f2e..208e5c2 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/msg.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/msg.d
@@ -14,7 +14,6 @@ import core.stdc.config;
version (CRuntime_Glibc):
// Some of these may be from linux kernel headers.
extern (C):
-@system:
version (ARM) version = ARM_Any;
version (AArch64) version = ARM_Any;
diff --git a/libphobos/libdruntime/core/sys/posix/sys/resource.d b/libphobos/libdruntime/core/sys/posix/sys/resource.d
index 5ab0174..1f46f03 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/resource.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/resource.d
@@ -23,7 +23,6 @@ else version (WatchOS)
version = Darwin;
nothrow @nogc extern(C):
-@system:
//
// XOpen (XSI)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/select.d b/libphobos/libdruntime/core/sys/posix/sys/select.d
index 925976d..06b0940 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/select.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/select.d
@@ -27,7 +27,6 @@ else version (WatchOS)
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/sys/shm.d b/libphobos/libdruntime/core/sys/posix/sys/shm.d
index d04e792..6ecdc0d 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/shm.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/shm.d
@@ -29,7 +29,6 @@ else version (WatchOS)
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// XOpen (XSI)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/socket.d b/libphobos/libdruntime/core/sys/posix/sys/socket.d
index fc5dc5d..340f3ce 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/socket.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/socket.d
@@ -45,7 +45,6 @@ version (X86_64) version = X86_Any;
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
index 1fb4e44..ecc98cc 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
@@ -35,7 +35,6 @@ version (SPARC64) version = SPARC_Any;
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/sys/statvfs.d b/libphobos/libdruntime/core/sys/posix/sys/statvfs.d
index df9030d..eae0e5c 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/statvfs.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/statvfs.d
@@ -16,7 +16,6 @@ version (Posix):
extern (C) :
nothrow:
@nogc:
-@system:
version (CRuntime_Glibc) {
static if (__WORDSIZE == 32)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/time.d b/libphobos/libdruntime/core/sys/posix/sys/time.d
index 95cf883..b536eed 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/time.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/time.d
@@ -31,7 +31,6 @@ version (linux) public import core.sys.linux.sys.time;
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// XOpen (XSI)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/ttycom.d b/libphobos/libdruntime/core/sys/posix/sys/ttycom.d
index 0cc2d9c..f4c9c58 100755
--- a/libphobos/libdruntime/core/sys/posix/sys/ttycom.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/ttycom.d
@@ -22,7 +22,6 @@ else version (WatchOS)
version (Posix):
nothrow @nogc:
-@system:
version (Darwin)
{
diff --git a/libphobos/libdruntime/core/sys/posix/sys/types.d b/libphobos/libdruntime/core/sys/posix/sys/types.d
index 3e515c4..cd11b0d 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/types.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/types.d
@@ -30,7 +30,6 @@ else version (WatchOS)
version (Posix):
extern (C):
-@system:
//
// bits/typesizes.h -- underlying types for *_t.
diff --git a/libphobos/libdruntime/core/sys/posix/sys/uio.d b/libphobos/libdruntime/core/sys/posix/sys/uio.d
index 2563c6d..e283963 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/uio.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/uio.d
@@ -28,7 +28,6 @@ else version (WatchOS)
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/sys/un.d b/libphobos/libdruntime/core/sys/posix/sys/un.d
index 5030e16..11e98a7 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/un.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/un.d
@@ -25,7 +25,6 @@ else version (WatchOS)
version (Posix):
extern(C):
-@system:
public import core.sys.posix.sys.socket: sa_family_t;
diff --git a/libphobos/libdruntime/core/sys/posix/sys/utsname.d b/libphobos/libdruntime/core/sys/posix/sys/utsname.d
index 0abbf14..5de50ac 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/utsname.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/utsname.d
@@ -16,7 +16,6 @@ version (Posix):
extern(C):
nothrow:
@nogc:
-@system:
version (CRuntime_Glibc)
{
diff --git a/libphobos/libdruntime/core/sys/posix/sys/wait.d b/libphobos/libdruntime/core/sys/posix/sys/wait.d
index 91b9c9e..766a4e0 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/wait.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/wait.d
@@ -30,7 +30,6 @@ else version (WatchOS)
version (Posix):
extern (C) nothrow @nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/syslog.d b/libphobos/libdruntime/core/sys/posix/syslog.d
index cf85664..ba2a4ac 100644
--- a/libphobos/libdruntime/core/sys/posix/syslog.d
+++ b/libphobos/libdruntime/core/sys/posix/syslog.d
@@ -27,7 +27,6 @@ else version (WatchOS)
version (Posix):
extern (C) nothrow @nogc:
-@system:
version (CRuntime_Glibc)
{
diff --git a/libphobos/libdruntime/core/sys/posix/termios.d b/libphobos/libdruntime/core/sys/posix/termios.d
index 357060b..e4a99e6 100644
--- a/libphobos/libdruntime/core/sys/posix/termios.d
+++ b/libphobos/libdruntime/core/sys/posix/termios.d
@@ -31,7 +31,6 @@ extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/posix/time.d b/libphobos/libdruntime/core/sys/posix/time.d
index ff3a3c4..af52002 100644
--- a/libphobos/libdruntime/core/sys/posix/time.d
+++ b/libphobos/libdruntime/core/sys/posix/time.d
@@ -33,7 +33,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required (defined in core.stdc.time)
diff --git a/libphobos/libdruntime/core/sys/posix/ucontext.d b/libphobos/libdruntime/core/sys/posix/ucontext.d
index e8c2f87..512d730 100644
--- a/libphobos/libdruntime/core/sys/posix/ucontext.d
+++ b/libphobos/libdruntime/core/sys/posix/ucontext.d
@@ -22,7 +22,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
version (OSX)
version = Darwin;
diff --git a/libphobos/libdruntime/core/sys/posix/unistd.d b/libphobos/libdruntime/core/sys/posix/unistd.d
index d996556..d1300e1 100644
--- a/libphobos/libdruntime/core/sys/posix/unistd.d
+++ b/libphobos/libdruntime/core/sys/posix/unistd.d
@@ -32,7 +32,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
enum STDIN_FILENO = 0;
enum STDOUT_FILENO = 1;
diff --git a/libphobos/libdruntime/core/sys/posix/utime.d b/libphobos/libdruntime/core/sys/posix/utime.d
index 66aea58..fcec7af 100644
--- a/libphobos/libdruntime/core/sys/posix/utime.d
+++ b/libphobos/libdruntime/core/sys/posix/utime.d
@@ -30,7 +30,6 @@ version (Posix):
extern (C):
nothrow:
@nogc:
-@system:
//
// Required
diff --git a/libphobos/libdruntime/core/sys/windows/aclapi.d b/libphobos/libdruntime/core/sys/windows/aclapi.d
index f145ac2..4905351 100644
--- a/libphobos/libdruntime/core/sys/windows/aclapi.d
+++ b/libphobos/libdruntime/core/sys/windows/aclapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.aclapi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "advapi32");
diff --git a/libphobos/libdruntime/core/sys/windows/aclui.d b/libphobos/libdruntime/core/sys/windows/aclui.d
index c5a2899..08be626 100644
--- a/libphobos/libdruntime/core/sys/windows/aclui.d
+++ b/libphobos/libdruntime/core/sys/windows/aclui.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.aclui;
version (Windows):
-@system:
pragma(lib, "aclui");
import core.sys.windows.w32api;
diff --git a/libphobos/libdruntime/core/sys/windows/basetsd.d b/libphobos/libdruntime/core/sys/windows/basetsd.d
index 0c68902..3c5c35f 100644
--- a/libphobos/libdruntime/core/sys/windows/basetsd.d
+++ b/libphobos/libdruntime/core/sys/windows/basetsd.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.basetsd;
version (Windows):
-@system:
/* This template is used in these modules to declare constant pointer types,
* in order to support both D 1.x and 2.x.
diff --git a/libphobos/libdruntime/core/sys/windows/basetyps.d b/libphobos/libdruntime/core/sys/windows/basetyps.d
index 086e6ab..d90d9f3 100644
--- a/libphobos/libdruntime/core/sys/windows/basetyps.d
+++ b/libphobos/libdruntime/core/sys/windows/basetyps.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.basetyps;
version (Windows):
-@system:
import core.sys.windows.windef, core.sys.windows.basetsd;
diff --git a/libphobos/libdruntime/core/sys/windows/com.d b/libphobos/libdruntime/core/sys/windows/com.d
index 6935dd9..c724f1c 100644
--- a/libphobos/libdruntime/core/sys/windows/com.d
+++ b/libphobos/libdruntime/core/sys/windows/com.d
@@ -1,6 +1,5 @@
module core.sys.windows.com;
version (Windows):
-@system:
pragma(lib,"uuid");
diff --git a/libphobos/libdruntime/core/sys/windows/comcat.d b/libphobos/libdruntime/core/sys/windows/comcat.d
index 3018c64..4cc35f4 100644
--- a/libphobos/libdruntime/core/sys/windows/comcat.d
+++ b/libphobos/libdruntime/core/sys/windows/comcat.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.comcat;
version (Windows):
-@system:
import core.sys.windows.ole2;
import core.sys.windows.basetyps, core.sys.windows.cguid, core.sys.windows.objbase, core.sys.windows.unknwn,
diff --git a/libphobos/libdruntime/core/sys/windows/commctrl.d b/libphobos/libdruntime/core/sys/windows/commctrl.d
index 4bc60b1..dabee56 100644
--- a/libphobos/libdruntime/core/sys/windows/commctrl.d
+++ b/libphobos/libdruntime/core/sys/windows/commctrl.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.commctrl;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "comctl32");
diff --git a/libphobos/libdruntime/core/sys/windows/commdlg.d b/libphobos/libdruntime/core/sys/windows/commdlg.d
index b49d2fb..9be9a9f 100644
--- a/libphobos/libdruntime/core/sys/windows/commdlg.d
+++ b/libphobos/libdruntime/core/sys/windows/commdlg.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.commdlg;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "comdlg32");
diff --git a/libphobos/libdruntime/core/sys/windows/cpl.d b/libphobos/libdruntime/core/sys/windows/cpl.d
index 49ebb20..df98703 100644
--- a/libphobos/libdruntime/core/sys/windows/cpl.d
+++ b/libphobos/libdruntime/core/sys/windows/cpl.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.cpl;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/cplext.d b/libphobos/libdruntime/core/sys/windows/cplext.d
index e13316b..4aff3a9 100644
--- a/libphobos/libdruntime/core/sys/windows/cplext.d
+++ b/libphobos/libdruntime/core/sys/windows/cplext.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.cplext;
version (Windows):
-@system:
enum : uint {
CPLPAGE_MOUSE_BUTTONS = 1,
diff --git a/libphobos/libdruntime/core/sys/windows/custcntl.d b/libphobos/libdruntime/core/sys/windows/custcntl.d
index c736cb3..f9234ac 100644
--- a/libphobos/libdruntime/core/sys/windows/custcntl.d
+++ b/libphobos/libdruntime/core/sys/windows/custcntl.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.custcntl;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/dbghelp.d b/libphobos/libdruntime/core/sys/windows/dbghelp.d
index 96698e8..de14bce 100644
--- a/libphobos/libdruntime/core/sys/windows/dbghelp.d
+++ b/libphobos/libdruntime/core/sys/windows/dbghelp.d
@@ -11,7 +11,6 @@
module core.sys.windows.dbghelp;
version (Windows):
-@system:
import core.sys.windows.winbase /+: FreeLibrary, GetProcAddress, LoadLibraryA+/;
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/dbghelp_types.d b/libphobos/libdruntime/core/sys/windows/dbghelp_types.d
index 64477df..f75f98b 100644
--- a/libphobos/libdruntime/core/sys/windows/dbghelp_types.d
+++ b/libphobos/libdruntime/core/sys/windows/dbghelp_types.d
@@ -11,7 +11,6 @@
module core.sys.windows.dbghelp_types;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/dbt.d b/libphobos/libdruntime/core/sys/windows/dbt.d
index 308c609..41f1c32 100644
--- a/libphobos/libdruntime/core/sys/windows/dbt.d
+++ b/libphobos/libdruntime/core/sys/windows/dbt.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.dbt;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/dde.d b/libphobos/libdruntime/core/sys/windows/dde.d
index bec339c..d9b8bec 100644
--- a/libphobos/libdruntime/core/sys/windows/dde.d
+++ b/libphobos/libdruntime/core/sys/windows/dde.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.dde;
version (Windows):
-@system:
pragma(lib, "user32");
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/ddeml.d b/libphobos/libdruntime/core/sys/windows/ddeml.d
index 22b330c..00bad1d 100644
--- a/libphobos/libdruntime/core/sys/windows/ddeml.d
+++ b/libphobos/libdruntime/core/sys/windows/ddeml.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ddeml;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "user32");
diff --git a/libphobos/libdruntime/core/sys/windows/dhcpcsdk.d b/libphobos/libdruntime/core/sys/windows/dhcpcsdk.d
index 0d3d716..d21169a 100644
--- a/libphobos/libdruntime/core/sys/windows/dhcpcsdk.d
+++ b/libphobos/libdruntime/core/sys/windows/dhcpcsdk.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.dhcpcsdk;
version (Windows):
-@system:
import core.sys.windows.w32api, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/dlgs.d b/libphobos/libdruntime/core/sys/windows/dlgs.d
index 34cab9b..5256862 100644
--- a/libphobos/libdruntime/core/sys/windows/dlgs.d
+++ b/libphobos/libdruntime/core/sys/windows/dlgs.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.dlgs;
version (Windows):
-@system:
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/dll.d b/libphobos/libdruntime/core/sys/windows/dll.d
index d602347..367c1d9 100644
--- a/libphobos/libdruntime/core/sys/windows/dll.d
+++ b/libphobos/libdruntime/core/sys/windows/dll.d
@@ -14,7 +14,6 @@
*/
module core.sys.windows.dll;
version (Windows):
-@system:
import core.sys.windows.winbase;
import core.sys.windows.winnt;
diff --git a/libphobos/libdruntime/core/sys/windows/docobj.d b/libphobos/libdruntime/core/sys/windows/docobj.d
index 4e45693..4abbea3 100644
--- a/libphobos/libdruntime/core/sys/windows/docobj.d
+++ b/libphobos/libdruntime/core/sys/windows/docobj.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.docobj;
version (Windows):
-@system:
import core.sys.windows.basetyps, core.sys.windows.oaidl, core.sys.windows.objidl, core.sys.windows.oleidl,
core.sys.windows.unknwn, core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/errorrep.d b/libphobos/libdruntime/core/sys/windows/errorrep.d
index 63ec8d7..42fad9a 100644
--- a/libphobos/libdruntime/core/sys/windows/errorrep.d
+++ b/libphobos/libdruntime/core/sys/windows/errorrep.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.errorrep;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/exdisp.d b/libphobos/libdruntime/core/sys/windows/exdisp.d
index 8ee3c26..5a9ea98 100644
--- a/libphobos/libdruntime/core/sys/windows/exdisp.d
+++ b/libphobos/libdruntime/core/sys/windows/exdisp.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.exdisp;
version (Windows):
-@system:
import core.sys.windows.docobj, core.sys.windows.oaidl, core.sys.windows.ocidl;
import core.sys.windows.basetyps, core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/httpext.d b/libphobos/libdruntime/core/sys/windows/httpext.d
index 4e07c6a..6973879 100644
--- a/libphobos/libdruntime/core/sys/windows/httpext.d
+++ b/libphobos/libdruntime/core/sys/windows/httpext.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.httpext;
version (Windows):
-@system:
/* Comment from MinGW
httpext.h - Header for ISAPI extensions.
diff --git a/libphobos/libdruntime/core/sys/windows/imagehlp.d b/libphobos/libdruntime/core/sys/windows/imagehlp.d
index ed93746..399c0b2 100644
--- a/libphobos/libdruntime/core/sys/windows/imagehlp.d
+++ b/libphobos/libdruntime/core/sys/windows/imagehlp.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.imagehlp;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/imm.d b/libphobos/libdruntime/core/sys/windows/imm.d
index 128fd56..4ad678c 100644
--- a/libphobos/libdruntime/core/sys/windows/imm.d
+++ b/libphobos/libdruntime/core/sys/windows/imm.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.imm;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "imm32");
diff --git a/libphobos/libdruntime/core/sys/windows/intshcut.d b/libphobos/libdruntime/core/sys/windows/intshcut.d
index eab7a8d..ab662e4 100644
--- a/libphobos/libdruntime/core/sys/windows/intshcut.d
+++ b/libphobos/libdruntime/core/sys/windows/intshcut.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.intshcut;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/ipexport.d b/libphobos/libdruntime/core/sys/windows/ipexport.d
index dbb4a0e..b0a4a01 100644
--- a/libphobos/libdruntime/core/sys/windows/ipexport.d
+++ b/libphobos/libdruntime/core/sys/windows/ipexport.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ipexport;
version (Windows):
-@system:
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/iphlpapi.d b/libphobos/libdruntime/core/sys/windows/iphlpapi.d
index f95e799..4a8e64c 100644
--- a/libphobos/libdruntime/core/sys/windows/iphlpapi.d
+++ b/libphobos/libdruntime/core/sys/windows/iphlpapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.iphlpapi;
version (Windows):
-@system:
import core.sys.windows.ipexport, core.sys.windows.iprtrmib, core.sys.windows.iptypes;
import core.sys.windows.winbase, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/iprtrmib.d b/libphobos/libdruntime/core/sys/windows/iprtrmib.d
index 3db4539..05c31b3 100644
--- a/libphobos/libdruntime/core/sys/windows/iprtrmib.d
+++ b/libphobos/libdruntime/core/sys/windows/iprtrmib.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.iprtrmib;
version (Windows):
-@system:
import core.sys.windows.ipifcons;
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/iptypes.d b/libphobos/libdruntime/core/sys/windows/iptypes.d
index 7cce34b..baaf6ae 100644
--- a/libphobos/libdruntime/core/sys/windows/iptypes.d
+++ b/libphobos/libdruntime/core/sys/windows/iptypes.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.iptypes;
version (Windows):
-@system:
import core.sys.windows.windef;
import core.stdc.time;
diff --git a/libphobos/libdruntime/core/sys/windows/lm.d b/libphobos/libdruntime/core/sys/windows/lm.d
index 3d48856..115925c 100644
--- a/libphobos/libdruntime/core/sys/windows/lm.d
+++ b/libphobos/libdruntime/core/sys/windows/lm.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lm;
version (Windows):
-@system:
/* removed - now supporting only Win2k up
version (WindowsVista) {
diff --git a/libphobos/libdruntime/core/sys/windows/lmaccess.d b/libphobos/libdruntime/core/sys/windows/lmaccess.d
index b23e52e..9791ff6 100644
--- a/libphobos/libdruntime/core/sys/windows/lmaccess.d
+++ b/libphobos/libdruntime/core/sys/windows/lmaccess.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmaccess;
version (Windows):
-@system:
pragma(lib, "netapi32");
/**
diff --git a/libphobos/libdruntime/core/sys/windows/lmalert.d b/libphobos/libdruntime/core/sys/windows/lmalert.d
index 5ddd6d0..ad0c3ca 100644
--- a/libphobos/libdruntime/core/sys/windows/lmalert.d
+++ b/libphobos/libdruntime/core/sys/windows/lmalert.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmalert;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmat.d b/libphobos/libdruntime/core/sys/windows/lmat.d
index 3e1468a..ee1249e 100644
--- a/libphobos/libdruntime/core/sys/windows/lmat.d
+++ b/libphobos/libdruntime/core/sys/windows/lmat.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmat;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmaudit.d b/libphobos/libdruntime/core/sys/windows/lmaudit.d
index f4a7ca2..8db56f1 100644
--- a/libphobos/libdruntime/core/sys/windows/lmaudit.d
+++ b/libphobos/libdruntime/core/sys/windows/lmaudit.d
@@ -9,7 +9,6 @@
// COMMENT: This file may be deprecated.
module core.sys.windows.lmaudit;
version (Windows):
-@system:
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmbrowsr.d b/libphobos/libdruntime/core/sys/windows/lmbrowsr.d
index ea0e0f3..16cc661 100644
--- a/libphobos/libdruntime/core/sys/windows/lmbrowsr.d
+++ b/libphobos/libdruntime/core/sys/windows/lmbrowsr.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmbrowsr;
version (Windows):
-@system:
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmchdev.d b/libphobos/libdruntime/core/sys/windows/lmchdev.d
index 00aaafc..55460e1 100644
--- a/libphobos/libdruntime/core/sys/windows/lmchdev.d
+++ b/libphobos/libdruntime/core/sys/windows/lmchdev.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmchdev;
version (Windows):
-@system:
// COMMENT: This file might be deprecated.
diff --git a/libphobos/libdruntime/core/sys/windows/lmconfig.d b/libphobos/libdruntime/core/sys/windows/lmconfig.d
index 57d3ed9..6652a52 100644
--- a/libphobos/libdruntime/core/sys/windows/lmconfig.d
+++ b/libphobos/libdruntime/core/sys/windows/lmconfig.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmconfig;
version (Windows):
-@system:
// All functions in this file are deprecated!
diff --git a/libphobos/libdruntime/core/sys/windows/lmcons.d b/libphobos/libdruntime/core/sys/windows/lmcons.d
index 69a63df..838748a 100644
--- a/libphobos/libdruntime/core/sys/windows/lmcons.d
+++ b/libphobos/libdruntime/core/sys/windows/lmcons.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmcons;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/lmerr.d b/libphobos/libdruntime/core/sys/windows/lmerr.d
index d50ec49..23f5e59 100644
--- a/libphobos/libdruntime/core/sys/windows/lmerr.d
+++ b/libphobos/libdruntime/core/sys/windows/lmerr.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmerr;
version (Windows):
-@system:
import core.sys.windows.winerror;
diff --git a/libphobos/libdruntime/core/sys/windows/lmerrlog.d b/libphobos/libdruntime/core/sys/windows/lmerrlog.d
index a49b498..effe73a 100644
--- a/libphobos/libdruntime/core/sys/windows/lmerrlog.d
+++ b/libphobos/libdruntime/core/sys/windows/lmerrlog.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmerrlog;
version (Windows):
-@system:
// COMMENT: This appears to be only for Win16. All functions are deprecated.
diff --git a/libphobos/libdruntime/core/sys/windows/lmmsg.d b/libphobos/libdruntime/core/sys/windows/lmmsg.d
index c87f1e0..a3abd60 100644
--- a/libphobos/libdruntime/core/sys/windows/lmmsg.d
+++ b/libphobos/libdruntime/core/sys/windows/lmmsg.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmmsg;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmcons, core.sys.windows.windef, core.sys.windows.w32api;
diff --git a/libphobos/libdruntime/core/sys/windows/lmremutl.d b/libphobos/libdruntime/core/sys/windows/lmremutl.d
index d0f3b41..8c90df7 100644
--- a/libphobos/libdruntime/core/sys/windows/lmremutl.d
+++ b/libphobos/libdruntime/core/sys/windows/lmremutl.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmremutl;
version (Windows):
-@system:
pragma(lib, "netapi32");
// D Conversion Note: DESC_CHAR is defined as TCHAR.
diff --git a/libphobos/libdruntime/core/sys/windows/lmrepl.d b/libphobos/libdruntime/core/sys/windows/lmrepl.d
index 093588c..1563a5e 100644
--- a/libphobos/libdruntime/core/sys/windows/lmrepl.d
+++ b/libphobos/libdruntime/core/sys/windows/lmrepl.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmrepl;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmserver.d b/libphobos/libdruntime/core/sys/windows/lmserver.d
index fad5bc5..5a550bc 100644
--- a/libphobos/libdruntime/core/sys/windows/lmserver.d
+++ b/libphobos/libdruntime/core/sys/windows/lmserver.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmserver;
version (Windows):
-@system:
import core.sys.windows.winsvc;
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmshare.d b/libphobos/libdruntime/core/sys/windows/lmshare.d
index d81080e..bd8eecb 100644
--- a/libphobos/libdruntime/core/sys/windows/lmshare.d
+++ b/libphobos/libdruntime/core/sys/windows/lmshare.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmshare;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmcons;
diff --git a/libphobos/libdruntime/core/sys/windows/lmsname.d b/libphobos/libdruntime/core/sys/windows/lmsname.d
index 09b1b00..a8f4f76 100644
--- a/libphobos/libdruntime/core/sys/windows/lmsname.d
+++ b/libphobos/libdruntime/core/sys/windows/lmsname.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmsname;
version (Windows):
-@system:
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmstats.d b/libphobos/libdruntime/core/sys/windows/lmstats.d
index 4baa390..e83808b 100644
--- a/libphobos/libdruntime/core/sys/windows/lmstats.d
+++ b/libphobos/libdruntime/core/sys/windows/lmstats.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmstats;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/lmsvc.d b/libphobos/libdruntime/core/sys/windows/lmsvc.d
index c0df699..ddea61c 100644
--- a/libphobos/libdruntime/core/sys/windows/lmsvc.d
+++ b/libphobos/libdruntime/core/sys/windows/lmsvc.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmsvc;
version (Windows):
-@system:
// FIXME: Is this file deprecated? All of the functions are only for Win16.
/**
diff --git a/libphobos/libdruntime/core/sys/windows/lmuse.d b/libphobos/libdruntime/core/sys/windows/lmuse.d
index 03e153a..a48d72e 100644
--- a/libphobos/libdruntime/core/sys/windows/lmuse.d
+++ b/libphobos/libdruntime/core/sys/windows/lmuse.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmuse;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmuseflg;
diff --git a/libphobos/libdruntime/core/sys/windows/lmwksta.d b/libphobos/libdruntime/core/sys/windows/lmwksta.d
index cdd3a07..29ddca7 100644
--- a/libphobos/libdruntime/core/sys/windows/lmwksta.d
+++ b/libphobos/libdruntime/core/sys/windows/lmwksta.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lmwksta;
version (Windows):
-@system:
pragma(lib, "netapi32");
import core.sys.windows.lmuseflg;
diff --git a/libphobos/libdruntime/core/sys/windows/lzexpand.d b/libphobos/libdruntime/core/sys/windows/lzexpand.d
index a01489b..6c3bd00 100644
--- a/libphobos/libdruntime/core/sys/windows/lzexpand.d
+++ b/libphobos/libdruntime/core/sys/windows/lzexpand.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.lzexpand;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "lz32");
diff --git a/libphobos/libdruntime/core/sys/windows/mapi.d b/libphobos/libdruntime/core/sys/windows/mapi.d
index 06fd955..8f8eea1 100644
--- a/libphobos/libdruntime/core/sys/windows/mapi.d
+++ b/libphobos/libdruntime/core/sys/windows/mapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.mapi;
version (Windows):
-@system:
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/mciavi.d b/libphobos/libdruntime/core/sys/windows/mciavi.d
index 4e3d14e..08410f5 100644
--- a/libphobos/libdruntime/core/sys/windows/mciavi.d
+++ b/libphobos/libdruntime/core/sys/windows/mciavi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.mciavi;
version (Windows):
-@system:
import core.sys.windows.mmsystem;
diff --git a/libphobos/libdruntime/core/sys/windows/mcx.d b/libphobos/libdruntime/core/sys/windows/mcx.d
index 0322413..5c6ac24 100644
--- a/libphobos/libdruntime/core/sys/windows/mcx.d
+++ b/libphobos/libdruntime/core/sys/windows/mcx.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.mcx;
version (Windows):
-@system:
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/mgmtapi.d b/libphobos/libdruntime/core/sys/windows/mgmtapi.d
index d9fb6b7..8f84eea 100644
--- a/libphobos/libdruntime/core/sys/windows/mgmtapi.d
+++ b/libphobos/libdruntime/core/sys/windows/mgmtapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.mgmtapi;
version (Windows):
-@system:
import core.sys.windows.snmp;
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/mmsystem.d b/libphobos/libdruntime/core/sys/windows/mmsystem.d
index 5c3d920..7e7c34b 100644
--- a/libphobos/libdruntime/core/sys/windows/mmsystem.d
+++ b/libphobos/libdruntime/core/sys/windows/mmsystem.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.mmsystem;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "winmm");
diff --git a/libphobos/libdruntime/core/sys/windows/msacm.d b/libphobos/libdruntime/core/sys/windows/msacm.d
index 4726328..645e40d 100644
--- a/libphobos/libdruntime/core/sys/windows/msacm.d
+++ b/libphobos/libdruntime/core/sys/windows/msacm.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.msacm;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/mshtml.d b/libphobos/libdruntime/core/sys/windows/mshtml.d
index d5cf7cb..d20c4bb 100644
--- a/libphobos/libdruntime/core/sys/windows/mshtml.d
+++ b/libphobos/libdruntime/core/sys/windows/mshtml.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.mshtml;
version (Windows):
-@system:
import core.sys.windows.basetyps, core.sys.windows.oaidl, core.sys.windows.unknwn,
core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/mswsock.d b/libphobos/libdruntime/core/sys/windows/mswsock.d
index 27c0cdb..d8beee4 100644
--- a/libphobos/libdruntime/core/sys/windows/mswsock.d
+++ b/libphobos/libdruntime/core/sys/windows/mswsock.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.mswsock;
version (Windows):
-@system:
import core.sys.windows.winbase, core.sys.windows.windef;
import core.sys.windows.basetyps, core.sys.windows.w32api;
diff --git a/libphobos/libdruntime/core/sys/windows/nb30.d b/libphobos/libdruntime/core/sys/windows/nb30.d
index 8f92edd..cfa57d6 100644
--- a/libphobos/libdruntime/core/sys/windows/nb30.d
+++ b/libphobos/libdruntime/core/sys/windows/nb30.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.nb30;
version (Windows):
-@system:
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/nddeapi.d b/libphobos/libdruntime/core/sys/windows/nddeapi.d
index dc3890c..3efca62 100644
--- a/libphobos/libdruntime/core/sys/windows/nddeapi.d
+++ b/libphobos/libdruntime/core/sys/windows/nddeapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.nddeapi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/nspapi.d b/libphobos/libdruntime/core/sys/windows/nspapi.d
index 79c9fce..bac6526 100644
--- a/libphobos/libdruntime/core/sys/windows/nspapi.d
+++ b/libphobos/libdruntime/core/sys/windows/nspapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.nspapi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/ntdef.d b/libphobos/libdruntime/core/sys/windows/ntdef.d
index 78e60e7..a0213dc 100644
--- a/libphobos/libdruntime/core/sys/windows/ntdef.d
+++ b/libphobos/libdruntime/core/sys/windows/ntdef.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ntdef;
version (Windows):
-@system:
import core.sys.windows.basetsd, core.sys.windows.subauth, core.sys.windows.windef, core.sys.windows.winnt;
diff --git a/libphobos/libdruntime/core/sys/windows/ntdll.d b/libphobos/libdruntime/core/sys/windows/ntdll.d
index 4ac1bcc..28d560c 100644
--- a/libphobos/libdruntime/core/sys/windows/ntdll.d
+++ b/libphobos/libdruntime/core/sys/windows/ntdll.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ntdll;
version (Windows):
-@system:
import core.sys.windows.w32api;
diff --git a/libphobos/libdruntime/core/sys/windows/ntldap.d b/libphobos/libdruntime/core/sys/windows/ntldap.d
index 52cadde..8f9abfe 100644
--- a/libphobos/libdruntime/core/sys/windows/ntldap.d
+++ b/libphobos/libdruntime/core/sys/windows/ntldap.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ntldap;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/ntsecapi.d b/libphobos/libdruntime/core/sys/windows/ntsecapi.d
index 1118057..fbc6b7f 100644
--- a/libphobos/libdruntime/core/sys/windows/ntsecapi.d
+++ b/libphobos/libdruntime/core/sys/windows/ntsecapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ntsecapi;
version (Windows):
-@system:
pragma(lib, "advapi32");
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/ntsecpkg.d b/libphobos/libdruntime/core/sys/windows/ntsecpkg.d
index d8c5e95..56803b0 100644
--- a/libphobos/libdruntime/core/sys/windows/ntsecpkg.d
+++ b/libphobos/libdruntime/core/sys/windows/ntsecpkg.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ntsecpkg;
version (Windows):
-@system:
import core.sys.windows.windef, core.sys.windows.ntsecapi, core.sys.windows.security, core.sys.windows.ntdef, core.sys.windows.sspi;
import core.sys.windows.basetyps : GUID;
diff --git a/libphobos/libdruntime/core/sys/windows/oaidl.d b/libphobos/libdruntime/core/sys/windows/oaidl.d
index 6c93682..cd11061 100644
--- a/libphobos/libdruntime/core/sys/windows/oaidl.d
+++ b/libphobos/libdruntime/core/sys/windows/oaidl.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.oaidl;
version (Windows):
-@system:
import core.sys.windows.basetyps, core.sys.windows.unknwn, core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/objbase.d b/libphobos/libdruntime/core/sys/windows/objbase.d
index bb9e7ea0..350c2b8 100644
--- a/libphobos/libdruntime/core/sys/windows/objbase.d
+++ b/libphobos/libdruntime/core/sys/windows/objbase.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.objbase;
version (Windows):
-@system:
nothrow:
pragma(lib, "ole32");
diff --git a/libphobos/libdruntime/core/sys/windows/objfwd.d b/libphobos/libdruntime/core/sys/windows/objfwd.d
index 89d5cad..076e02e 100644
--- a/libphobos/libdruntime/core/sys/windows/objfwd.d
+++ b/libphobos/libdruntime/core/sys/windows/objfwd.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.objfwd;
version (Windows):
-@system:
import core.sys.windows.objidl;
diff --git a/libphobos/libdruntime/core/sys/windows/objidl.d b/libphobos/libdruntime/core/sys/windows/objidl.d
index 528c58b..aa51840 100644
--- a/libphobos/libdruntime/core/sys/windows/objidl.d
+++ b/libphobos/libdruntime/core/sys/windows/objidl.d
@@ -12,7 +12,6 @@
// # do we need the proxies that are defined in this file?
module core.sys.windows.objidl;
version (Windows):
-@system:
import core.sys.windows.unknwn;
import core.sys.windows.objfwd;
diff --git a/libphobos/libdruntime/core/sys/windows/objsafe.d b/libphobos/libdruntime/core/sys/windows/objsafe.d
index 449a4c3..f7dc445 100644
--- a/libphobos/libdruntime/core/sys/windows/objsafe.d
+++ b/libphobos/libdruntime/core/sys/windows/objsafe.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.objsafe;
version (Windows):
-@system:
import core.sys.windows.basetyps, core.sys.windows.unknwn, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/ocidl.d b/libphobos/libdruntime/core/sys/windows/ocidl.d
index af42bea..9bacbf0 100644
--- a/libphobos/libdruntime/core/sys/windows/ocidl.d
+++ b/libphobos/libdruntime/core/sys/windows/ocidl.d
@@ -10,7 +10,6 @@
*/
module core.sys.windows.ocidl;
version (Windows):
-@system:
import core.sys.windows.ole2, core.sys.windows.oleidl, core.sys.windows.oaidl, core.sys.windows.objfwd,
core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/odbcinst.d b/libphobos/libdruntime/core/sys/windows/odbcinst.d
index b0ca42a..ebacb58 100644
--- a/libphobos/libdruntime/core/sys/windows/odbcinst.d
+++ b/libphobos/libdruntime/core/sys/windows/odbcinst.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.odbcinst;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/ole.d b/libphobos/libdruntime/core/sys/windows/ole.d
index 21218f1..c29ec50 100644
--- a/libphobos/libdruntime/core/sys/windows/ole.d
+++ b/libphobos/libdruntime/core/sys/windows/ole.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.ole;
version (Windows):
-@system:
pragma(lib, "ole32");
import core.sys.windows.windef, core.sys.windows.wingdi, core.sys.windows.uuid;
diff --git a/libphobos/libdruntime/core/sys/windows/ole2.d b/libphobos/libdruntime/core/sys/windows/ole2.d
index 0945fca..3fef058 100644
--- a/libphobos/libdruntime/core/sys/windows/ole2.d
+++ b/libphobos/libdruntime/core/sys/windows/ole2.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.ole2;
version (Windows):
-@system:
pragma(lib, "ole32");
public import core.sys.windows.basetyps, core.sys.windows.objbase, core.sys.windows.oleauto, core.sys.windows.olectlid,
diff --git a/libphobos/libdruntime/core/sys/windows/oleacc.d b/libphobos/libdruntime/core/sys/windows/oleacc.d
index 77137c6..b19855d 100644
--- a/libphobos/libdruntime/core/sys/windows/oleacc.d
+++ b/libphobos/libdruntime/core/sys/windows/oleacc.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.oleacc;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "oleacc");
diff --git a/libphobos/libdruntime/core/sys/windows/oleauto.d b/libphobos/libdruntime/core/sys/windows/oleauto.d
index f8d76e1..1888136 100644
--- a/libphobos/libdruntime/core/sys/windows/oleauto.d
+++ b/libphobos/libdruntime/core/sys/windows/oleauto.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.oleauto;
version (Windows):
-@system:
pragma(lib, "oleaut32");
import core.sys.windows.oaidl;
diff --git a/libphobos/libdruntime/core/sys/windows/olectl.d b/libphobos/libdruntime/core/sys/windows/olectl.d
index f671ce4..df8266b 100644
--- a/libphobos/libdruntime/core/sys/windows/olectl.d
+++ b/libphobos/libdruntime/core/sys/windows/olectl.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.olectl;
version (Windows):
-@system:
// In conversion from MinGW, the following was deleted:
//#define FONTSIZE(n) {n##0000, 0}
diff --git a/libphobos/libdruntime/core/sys/windows/oledlg.d b/libphobos/libdruntime/core/sys/windows/oledlg.d
index f1a0510..f810f6c 100644
--- a/libphobos/libdruntime/core/sys/windows/oledlg.d
+++ b/libphobos/libdruntime/core/sys/windows/oledlg.d
@@ -7,7 +7,6 @@
* Source: $(DRUNTIMESRC core/sys/windows/_oledlg.d)
*/
module core.sys.windows.oledlg;
-@system:
version (Windows):
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/oleidl.d b/libphobos/libdruntime/core/sys/windows/oleidl.d
index 4ef564d..17e1d64 100644
--- a/libphobos/libdruntime/core/sys/windows/oleidl.d
+++ b/libphobos/libdruntime/core/sys/windows/oleidl.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.oleidl;
version (Windows):
-@system:
// DAC: This is defined in ocidl !!
// what is it doing in here?
diff --git a/libphobos/libdruntime/core/sys/windows/pbt.d b/libphobos/libdruntime/core/sys/windows/pbt.d
index 3b65ba5..2689884 100644
--- a/libphobos/libdruntime/core/sys/windows/pbt.d
+++ b/libphobos/libdruntime/core/sys/windows/pbt.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.pbt;
version (Windows):
-@system:
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/powrprof.d b/libphobos/libdruntime/core/sys/windows/powrprof.d
index 275dbea..be4d0aa 100644
--- a/libphobos/libdruntime/core/sys/windows/powrprof.d
+++ b/libphobos/libdruntime/core/sys/windows/powrprof.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.powrprof;
version (Windows):
-@system:
pragma(lib, "powrprof");
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/prsht.d b/libphobos/libdruntime/core/sys/windows/prsht.d
index ba04b57..92596b5 100644
--- a/libphobos/libdruntime/core/sys/windows/prsht.d
+++ b/libphobos/libdruntime/core/sys/windows/prsht.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.prsht;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "comctl32");
diff --git a/libphobos/libdruntime/core/sys/windows/psapi.d b/libphobos/libdruntime/core/sys/windows/psapi.d
index 585f908..968ce6c 100644
--- a/libphobos/libdruntime/core/sys/windows/psapi.d
+++ b/libphobos/libdruntime/core/sys/windows/psapi.d
@@ -13,7 +13,6 @@
module core.sys.windows.psapi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/rapi.d b/libphobos/libdruntime/core/sys/windows/rapi.d
index 086b7a6..2fc6404 100644
--- a/libphobos/libdruntime/core/sys/windows/rapi.d
+++ b/libphobos/libdruntime/core/sys/windows/rapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.rapi;
version (Windows):
-@system:
/* Comment from MinGW
NOTE: This strictly does not belong in the Win32 API since it's
diff --git a/libphobos/libdruntime/core/sys/windows/ras.d b/libphobos/libdruntime/core/sys/windows/ras.d
index 1f66546..cb69686 100644
--- a/libphobos/libdruntime/core/sys/windows/ras.d
+++ b/libphobos/libdruntime/core/sys/windows/ras.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.ras;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "rasapi32");
diff --git a/libphobos/libdruntime/core/sys/windows/rasdlg.d b/libphobos/libdruntime/core/sys/windows/rasdlg.d
index 1add3ae..a980d27 100644
--- a/libphobos/libdruntime/core/sys/windows/rasdlg.d
+++ b/libphobos/libdruntime/core/sys/windows/rasdlg.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.rasdlg;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/raserror.d b/libphobos/libdruntime/core/sys/windows/raserror.d
index c21409b..48a2756 100644
--- a/libphobos/libdruntime/core/sys/windows/raserror.d
+++ b/libphobos/libdruntime/core/sys/windows/raserror.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.raserror;
version (Windows):
-@system:
enum {
SUCCESS = 0,
diff --git a/libphobos/libdruntime/core/sys/windows/rassapi.d b/libphobos/libdruntime/core/sys/windows/rassapi.d
index aed14f1..5244ca4 100644
--- a/libphobos/libdruntime/core/sys/windows/rassapi.d
+++ b/libphobos/libdruntime/core/sys/windows/rassapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.rassapi;
version (Windows):
-@system:
import core.sys.windows.lmcons, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/reason.d b/libphobos/libdruntime/core/sys/windows/reason.d
index 4274efa..e1fb1ca 100644
--- a/libphobos/libdruntime/core/sys/windows/reason.d
+++ b/libphobos/libdruntime/core/sys/windows/reason.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.reason;
version (Windows):
-@system:
import core.sys.windows.w32api, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/regstr.d b/libphobos/libdruntime/core/sys/windows/regstr.d
index 71a86ef..f8851fa 100644
--- a/libphobos/libdruntime/core/sys/windows/regstr.d
+++ b/libphobos/libdruntime/core/sys/windows/regstr.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.regstr;
version (Windows):
-@system:
// TODO: fix possible conflict with shloj. Sort out NEC_98 issue.
diff --git a/libphobos/libdruntime/core/sys/windows/richedit.d b/libphobos/libdruntime/core/sys/windows/richedit.d
index 6760764..0f56fef 100644
--- a/libphobos/libdruntime/core/sys/windows/richedit.d
+++ b/libphobos/libdruntime/core/sys/windows/richedit.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.richedit;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/richole.d b/libphobos/libdruntime/core/sys/windows/richole.d
index 288ef22..0151818 100644
--- a/libphobos/libdruntime/core/sys/windows/richole.d
+++ b/libphobos/libdruntime/core/sys/windows/richole.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.richole;
version (Windows):
-@system:
import core.sys.windows.objfwd, core.sys.windows.objidl, core.sys.windows.ole2, core.sys.windows.unknwn,
core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/rpc.d b/libphobos/libdruntime/core/sys/windows/rpc.d
index a9640ad..b432bc7 100644
--- a/libphobos/libdruntime/core/sys/windows/rpc.d
+++ b/libphobos/libdruntime/core/sys/windows/rpc.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.rpc;
version (Windows):
-@system:
/* Moved to rpcdecp (duplicate definition).
typedef void *I_RPC_HANDLE;
diff --git a/libphobos/libdruntime/core/sys/windows/rpcdce.d b/libphobos/libdruntime/core/sys/windows/rpcdce.d
index 1eccb0d..4f3f3cc 100644
--- a/libphobos/libdruntime/core/sys/windows/rpcdce.d
+++ b/libphobos/libdruntime/core/sys/windows/rpcdce.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.rpcdce;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "Rpcrt4");
diff --git a/libphobos/libdruntime/core/sys/windows/rpcdce2.d b/libphobos/libdruntime/core/sys/windows/rpcdce2.d
index c8223f6..08348c0 100644
--- a/libphobos/libdruntime/core/sys/windows/rpcdce2.d
+++ b/libphobos/libdruntime/core/sys/windows/rpcdce2.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.rpcdce2;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/rpcdcep.d b/libphobos/libdruntime/core/sys/windows/rpcdcep.d
index 1abbb78..cebe981 100644
--- a/libphobos/libdruntime/core/sys/windows/rpcdcep.d
+++ b/libphobos/libdruntime/core/sys/windows/rpcdcep.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.rpcdcep;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/rpcndr.d b/libphobos/libdruntime/core/sys/windows/rpcndr.d
index 6e9722c..127d88b 100644
--- a/libphobos/libdruntime/core/sys/windows/rpcndr.d
+++ b/libphobos/libdruntime/core/sys/windows/rpcndr.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.rpcndr;
version (Windows):
-@system:
pragma(lib, "rpcrt4");
/* Translation notes:
diff --git a/libphobos/libdruntime/core/sys/windows/rpcnsi.d b/libphobos/libdruntime/core/sys/windows/rpcnsi.d
index 608b92c..1294d0d 100644
--- a/libphobos/libdruntime/core/sys/windows/rpcnsi.d
+++ b/libphobos/libdruntime/core/sys/windows/rpcnsi.d
@@ -10,7 +10,6 @@
*/
module core.sys.windows.rpcnsi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "rpcns4");
diff --git a/libphobos/libdruntime/core/sys/windows/rpcnsip.d b/libphobos/libdruntime/core/sys/windows/rpcnsip.d
index 219d7b0..ccf026f 100644
--- a/libphobos/libdruntime/core/sys/windows/rpcnsip.d
+++ b/libphobos/libdruntime/core/sys/windows/rpcnsip.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.rpcnsip;
version (Windows):
-@system:
import core.sys.windows.rpcdce, core.sys.windows.rpcdcep, core.sys.windows.rpcnsi;
diff --git a/libphobos/libdruntime/core/sys/windows/rpcnterr.d b/libphobos/libdruntime/core/sys/windows/rpcnterr.d
index 426077a..bbead74 100644
--- a/libphobos/libdruntime/core/sys/windows/rpcnterr.d
+++ b/libphobos/libdruntime/core/sys/windows/rpcnterr.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.rpcnterr;
version (Windows):
-@system:
import core.sys.windows.winerror;
diff --git a/libphobos/libdruntime/core/sys/windows/schannel.d b/libphobos/libdruntime/core/sys/windows/schannel.d
index 98c5cf8..6ffab30 100644
--- a/libphobos/libdruntime/core/sys/windows/schannel.d
+++ b/libphobos/libdruntime/core/sys/windows/schannel.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.schannel;
version (Windows):
-@system:
import core.sys.windows.wincrypt;
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/sdkddkver.d b/libphobos/libdruntime/core/sys/windows/sdkddkver.d
index 4b5bad5..3f5c01b 100644
--- a/libphobos/libdruntime/core/sys/windows/sdkddkver.d
+++ b/libphobos/libdruntime/core/sys/windows/sdkddkver.d
@@ -9,7 +9,6 @@
module core.sys.windows.sdkddkver;
version (Windows):
-@system:
enum _WIN32_WINNT_NT4 = 0x0400;
enum _WIN32_WINNT_WIN2K = 0x0500;
diff --git a/libphobos/libdruntime/core/sys/windows/secext.d b/libphobos/libdruntime/core/sys/windows/secext.d
index 6b92fcd..ab61536 100644
--- a/libphobos/libdruntime/core/sys/windows/secext.d
+++ b/libphobos/libdruntime/core/sys/windows/secext.d
@@ -9,7 +9,6 @@
// Don't include this file directly, use core.sys.windows.security instead.
module core.sys.windows.secext;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "secur32");
diff --git a/libphobos/libdruntime/core/sys/windows/security.d b/libphobos/libdruntime/core/sys/windows/security.d
index b81abb3..f93dc81 100644
--- a/libphobos/libdruntime/core/sys/windows/security.d
+++ b/libphobos/libdruntime/core/sys/windows/security.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.security;
version (Windows):
-@system:
enum : SECURITY_STATUS
{
diff --git a/libphobos/libdruntime/core/sys/windows/servprov.d b/libphobos/libdruntime/core/sys/windows/servprov.d
index 89ab47c..ae8bef1 100644
--- a/libphobos/libdruntime/core/sys/windows/servprov.d
+++ b/libphobos/libdruntime/core/sys/windows/servprov.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.servprov;
version (Windows):
-@system:
import core.sys.windows.basetyps, core.sys.windows.unknwn, core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/setupapi.d b/libphobos/libdruntime/core/sys/windows/setupapi.d
index 80e8dba..7a052cd 100644
--- a/libphobos/libdruntime/core/sys/windows/setupapi.d
+++ b/libphobos/libdruntime/core/sys/windows/setupapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.setupapi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "setupapi");
diff --git a/libphobos/libdruntime/core/sys/windows/shellapi.d b/libphobos/libdruntime/core/sys/windows/shellapi.d
index f401997..fdd9938 100644
--- a/libphobos/libdruntime/core/sys/windows/shellapi.d
+++ b/libphobos/libdruntime/core/sys/windows/shellapi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.shellapi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "shell32");
diff --git a/libphobos/libdruntime/core/sys/windows/shldisp.d b/libphobos/libdruntime/core/sys/windows/shldisp.d
index ecb0ede..144f907 100644
--- a/libphobos/libdruntime/core/sys/windows/shldisp.d
+++ b/libphobos/libdruntime/core/sys/windows/shldisp.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.shldisp;
version (Windows):
-@system:
import core.sys.windows.unknwn, core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/shlguid.d b/libphobos/libdruntime/core/sys/windows/shlguid.d
index e0c1af1..f4c73ef 100644
--- a/libphobos/libdruntime/core/sys/windows/shlguid.d
+++ b/libphobos/libdruntime/core/sys/windows/shlguid.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.shlguid;
version (Windows):
-@system:
import core.sys.windows.basetyps, core.sys.windows.w32api;
diff --git a/libphobos/libdruntime/core/sys/windows/shlobj.d b/libphobos/libdruntime/core/sys/windows/shlobj.d
index 75ac622..bcd254b 100644
--- a/libphobos/libdruntime/core/sys/windows/shlobj.d
+++ b/libphobos/libdruntime/core/sys/windows/shlobj.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.shlobj;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "shell32");
diff --git a/libphobos/libdruntime/core/sys/windows/shlwapi.d b/libphobos/libdruntime/core/sys/windows/shlwapi.d
index d1a61a3..cfabbad 100644
--- a/libphobos/libdruntime/core/sys/windows/shlwapi.d
+++ b/libphobos/libdruntime/core/sys/windows/shlwapi.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.shlwapi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "shlwapi");
diff --git a/libphobos/libdruntime/core/sys/windows/snmp.d b/libphobos/libdruntime/core/sys/windows/snmp.d
index bf56b28..62c81e1 100644
--- a/libphobos/libdruntime/core/sys/windows/snmp.d
+++ b/libphobos/libdruntime/core/sys/windows/snmp.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.snmp;
version (Windows):
-@system:
import core.sys.windows.basetsd /+: HANDLE+/;
import core.sys.windows.windef /+: BOOL, BYTE, DWORD, INT, LONG, UINT, ULONG+/;
diff --git a/libphobos/libdruntime/core/sys/windows/sql.d b/libphobos/libdruntime/core/sys/windows/sql.d
index 7c8758e..58c6d42 100644
--- a/libphobos/libdruntime/core/sys/windows/sql.d
+++ b/libphobos/libdruntime/core/sys/windows/sql.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.sql;
version (Windows):
-@system:
public import core.sys.windows.sqltypes;
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/sqlext.d b/libphobos/libdruntime/core/sys/windows/sqlext.d
index 2ddff20..8702cda 100644
--- a/libphobos/libdruntime/core/sys/windows/sqlext.d
+++ b/libphobos/libdruntime/core/sys/windows/sqlext.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.sqlext;
version (Windows):
-@system:
/* Conversion notes:
The MinGW file was a horrible mess. All of the #defines were sorted alphabetically,
diff --git a/libphobos/libdruntime/core/sys/windows/sqltypes.d b/libphobos/libdruntime/core/sys/windows/sqltypes.d
index fd77b81..28d5f5d 100644
--- a/libphobos/libdruntime/core/sys/windows/sqltypes.d
+++ b/libphobos/libdruntime/core/sys/windows/sqltypes.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.sqltypes;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/sqlucode.d b/libphobos/libdruntime/core/sys/windows/sqlucode.d
index 85f0d06..d4f03f6 100644
--- a/libphobos/libdruntime/core/sys/windows/sqlucode.d
+++ b/libphobos/libdruntime/core/sys/windows/sqlucode.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.sqlucode;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/sspi.d b/libphobos/libdruntime/core/sys/windows/sspi.d
index 21e982d..3686c6f 100644
--- a/libphobos/libdruntime/core/sys/windows/sspi.d
+++ b/libphobos/libdruntime/core/sys/windows/sspi.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.sspi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/stacktrace.d b/libphobos/libdruntime/core/sys/windows/stacktrace.d
index 7982085..6e5c4cd 100644
--- a/libphobos/libdruntime/core/sys/windows/stacktrace.d
+++ b/libphobos/libdruntime/core/sys/windows/stacktrace.d
@@ -11,7 +11,6 @@
module core.sys.windows.stacktrace;
version (Windows):
-@system:
import core.demangle;
import core.stdc.stdlib;
diff --git a/libphobos/libdruntime/core/sys/windows/stat.d b/libphobos/libdruntime/core/sys/windows/stat.d
index 16f66e1..c87c749 100644
--- a/libphobos/libdruntime/core/sys/windows/stat.d
+++ b/libphobos/libdruntime/core/sys/windows/stat.d
@@ -6,7 +6,6 @@ module core.sys.windows.stat;
version (Windows):
extern (C) nothrow @nogc:
-@system:
import core.sys.windows.stdc.time;
diff --git a/libphobos/libdruntime/core/sys/windows/stdc/malloc.d b/libphobos/libdruntime/core/sys/windows/stdc/malloc.d
index 278c9fe..768102c 100644
--- a/libphobos/libdruntime/core/sys/windows/stdc/malloc.d
+++ b/libphobos/libdruntime/core/sys/windows/stdc/malloc.d
@@ -10,7 +10,6 @@
module core.sys.windows.stdc.malloc;
version (CRuntime_Microsoft):
extern (C):
-@system:
nothrow:
@nogc:
diff --git a/libphobos/libdruntime/core/sys/windows/subauth.d b/libphobos/libdruntime/core/sys/windows/subauth.d
index e0d67ff..a48fb99 100644
--- a/libphobos/libdruntime/core/sys/windows/subauth.d
+++ b/libphobos/libdruntime/core/sys/windows/subauth.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.subauth;
version (Windows):
-@system:
import core.sys.windows.ntdef, core.sys.windows.windef;
diff --git a/libphobos/libdruntime/core/sys/windows/threadaux.d b/libphobos/libdruntime/core/sys/windows/threadaux.d
index 34fda65..92bd1c6 100644
--- a/libphobos/libdruntime/core/sys/windows/threadaux.d
+++ b/libphobos/libdruntime/core/sys/windows/threadaux.d
@@ -14,7 +14,6 @@
*/
module core.sys.windows.threadaux;
version (Windows):
-@system:
import core.sys.windows.basetsd/+ : HANDLE+/;
import core.sys.windows.winbase/+ : CloseHandle, GetCurrentThreadId, GetCurrentProcessId,
diff --git a/libphobos/libdruntime/core/sys/windows/tlhelp32.d b/libphobos/libdruntime/core/sys/windows/tlhelp32.d
index 34ed101..ecbfe38 100644
--- a/libphobos/libdruntime/core/sys/windows/tlhelp32.d
+++ b/libphobos/libdruntime/core/sys/windows/tlhelp32.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.tlhelp32;
version (Windows):
-@system:
pragma(lib, "kernel32");
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/tmschema.d b/libphobos/libdruntime/core/sys/windows/tmschema.d
index b82dc5c..7bca878 100644
--- a/libphobos/libdruntime/core/sys/windows/tmschema.d
+++ b/libphobos/libdruntime/core/sys/windows/tmschema.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.tmschema;
version (Windows):
-@system:
/* BUTTON parts */
enum {
diff --git a/libphobos/libdruntime/core/sys/windows/unknwn.d b/libphobos/libdruntime/core/sys/windows/unknwn.d
index 6db1db8..0b00279 100644
--- a/libphobos/libdruntime/core/sys/windows/unknwn.d
+++ b/libphobos/libdruntime/core/sys/windows/unknwn.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.unknwn;
version (Windows):
-@system:
nothrow:
import core.sys.windows.objfwd, core.sys.windows.windef, core.sys.windows.wtypes;
diff --git a/libphobos/libdruntime/core/sys/windows/uuid.d b/libphobos/libdruntime/core/sys/windows/uuid.d
index 7e8d4b9..d3b979d 100644
--- a/libphobos/libdruntime/core/sys/windows/uuid.d
+++ b/libphobos/libdruntime/core/sys/windows/uuid.d
@@ -1,6 +1,5 @@
module core.sys.windows.uuid;
version (Windows):
-@system:
import core.sys.windows.basetyps;
diff --git a/libphobos/libdruntime/core/sys/windows/vfw.d b/libphobos/libdruntime/core/sys/windows/vfw.d
index c67753a..ebe0ed0 100644
--- a/libphobos/libdruntime/core/sys/windows/vfw.d
+++ b/libphobos/libdruntime/core/sys/windows/vfw.d
@@ -9,7 +9,6 @@
module core.sys.windows.vfw;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "vfw32");
diff --git a/libphobos/libdruntime/core/sys/windows/w32api.d b/libphobos/libdruntime/core/sys/windows/w32api.d
index 2752da1..5a8a59b 100644
--- a/libphobos/libdruntime/core/sys/windows/w32api.d
+++ b/libphobos/libdruntime/core/sys/windows/w32api.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.w32api;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/winbase.d b/libphobos/libdruntime/core/sys/windows/winbase.d
index 1806796..3b571ad 100644
--- a/libphobos/libdruntime/core/sys/windows/winbase.d
+++ b/libphobos/libdruntime/core/sys/windows/winbase.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.winbase;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "kernel32");
diff --git a/libphobos/libdruntime/core/sys/windows/winber.d b/libphobos/libdruntime/core/sys/windows/winber.d
index d6a79cd..b211938 100644
--- a/libphobos/libdruntime/core/sys/windows/winber.d
+++ b/libphobos/libdruntime/core/sys/windows/winber.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winber;
version (Windows):
-@system:
/* Comment from MinGW
winber.h - Header file for the Windows LDAP Basic Encoding Rules API
diff --git a/libphobos/libdruntime/core/sys/windows/wincon.d b/libphobos/libdruntime/core/sys/windows/wincon.d
index a404c5c..a00ba2e3 100644
--- a/libphobos/libdruntime/core/sys/windows/wincon.d
+++ b/libphobos/libdruntime/core/sys/windows/wincon.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.wincon;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "kernel32");
diff --git a/libphobos/libdruntime/core/sys/windows/wincrypt.d b/libphobos/libdruntime/core/sys/windows/wincrypt.d
index d6c617d2..cb52d9e 100644
--- a/libphobos/libdruntime/core/sys/windows/wincrypt.d
+++ b/libphobos/libdruntime/core/sys/windows/wincrypt.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.wincrypt;
version (Windows):
-@system:
pragma(lib, "advapi32");
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/windef.d b/libphobos/libdruntime/core/sys/windows/windef.d
index 31af66a..4e951f3 100644
--- a/libphobos/libdruntime/core/sys/windows/windef.d
+++ b/libphobos/libdruntime/core/sys/windows/windef.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.windef;
version (Windows):
-@system:
public import core.sys.windows.winnt;
import core.sys.windows.w32api;
diff --git a/libphobos/libdruntime/core/sys/windows/windows.d b/libphobos/libdruntime/core/sys/windows/windows.d
index 4a1b02f..a289fb1 100644
--- a/libphobos/libdruntime/core/sys/windows/windows.d
+++ b/libphobos/libdruntime/core/sys/windows/windows.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.windows;
version (Windows):
-@system:
/*
windows.h - main header file for the Win32 API
diff --git a/libphobos/libdruntime/core/sys/windows/winerror.d b/libphobos/libdruntime/core/sys/windows/winerror.d
index a26b05c..865319b 100644
--- a/libphobos/libdruntime/core/sys/windows/winerror.d
+++ b/libphobos/libdruntime/core/sys/windows/winerror.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.winerror;
version (Windows):
-@system:
/* Comments from the Mingw header:
* WAIT_TIMEOUT is also defined in winbase.h
diff --git a/libphobos/libdruntime/core/sys/windows/wingdi.d b/libphobos/libdruntime/core/sys/windows/wingdi.d
index ba45c27..5a4eeaa 100644
--- a/libphobos/libdruntime/core/sys/windows/wingdi.d
+++ b/libphobos/libdruntime/core/sys/windows/wingdi.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.wingdi;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "gdi32");
diff --git a/libphobos/libdruntime/core/sys/windows/winhttp.d b/libphobos/libdruntime/core/sys/windows/winhttp.d
index f665805..63d59cb 100644
--- a/libphobos/libdruntime/core/sys/windows/winhttp.d
+++ b/libphobos/libdruntime/core/sys/windows/winhttp.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.winhttp;
version (Windows):
-@system:
pragma(lib, "winhttp");
// FIXME: Grouping of constants. Windows SDK doesn't make this entirely clear
// FIXME: Verify WINHTTP_STATUS_CALLBACK function declaration works correctly
diff --git a/libphobos/libdruntime/core/sys/windows/wininet.d b/libphobos/libdruntime/core/sys/windows/wininet.d
index f4aa997..328af50 100644
--- a/libphobos/libdruntime/core/sys/windows/wininet.d
+++ b/libphobos/libdruntime/core/sys/windows/wininet.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.wininet;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "wininet");
diff --git a/libphobos/libdruntime/core/sys/windows/winioctl.d b/libphobos/libdruntime/core/sys/windows/winioctl.d
index b91ddda1..f9db05d 100644
--- a/libphobos/libdruntime/core/sys/windows/winioctl.d
+++ b/libphobos/libdruntime/core/sys/windows/winioctl.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winioctl;
version (Windows):
-@system:
// FIXME: check types of some constants
diff --git a/libphobos/libdruntime/core/sys/windows/winldap.d b/libphobos/libdruntime/core/sys/windows/winldap.d
index 0ab11d6..bcdb2b3 100644
--- a/libphobos/libdruntime/core/sys/windows/winldap.d
+++ b/libphobos/libdruntime/core/sys/windows/winldap.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winldap;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/winnetwk.d b/libphobos/libdruntime/core/sys/windows/winnetwk.d
index e0c7551..9bf2e64 100644
--- a/libphobos/libdruntime/core/sys/windows/winnetwk.d
+++ b/libphobos/libdruntime/core/sys/windows/winnetwk.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winnetwk;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "mpr");
diff --git a/libphobos/libdruntime/core/sys/windows/winnls.d b/libphobos/libdruntime/core/sys/windows/winnls.d
index b487a17..f2b5409 100644
--- a/libphobos/libdruntime/core/sys/windows/winnls.d
+++ b/libphobos/libdruntime/core/sys/windows/winnls.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winnls;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "kernel32");
diff --git a/libphobos/libdruntime/core/sys/windows/winnt.d b/libphobos/libdruntime/core/sys/windows/winnt.d
index bf30072..3bd9966 100644
--- a/libphobos/libdruntime/core/sys/windows/winnt.d
+++ b/libphobos/libdruntime/core/sys/windows/winnt.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.winnt;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
diff --git a/libphobos/libdruntime/core/sys/windows/winperf.d b/libphobos/libdruntime/core/sys/windows/winperf.d
index cd31990..77638c8 100644
--- a/libphobos/libdruntime/core/sys/windows/winperf.d
+++ b/libphobos/libdruntime/core/sys/windows/winperf.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.winperf;
version (Windows):
-@system:
import core.sys.windows.windef;
import core.sys.windows.winbase; // for SYSTEMTIME
diff --git a/libphobos/libdruntime/core/sys/windows/winreg.d b/libphobos/libdruntime/core/sys/windows/winreg.d
index c3e5854..6bffe88 100644
--- a/libphobos/libdruntime/core/sys/windows/winreg.d
+++ b/libphobos/libdruntime/core/sys/windows/winreg.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winreg;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "advapi32");
diff --git a/libphobos/libdruntime/core/sys/windows/winsock2.d b/libphobos/libdruntime/core/sys/windows/winsock2.d
index 8a4b1fd..5225645 100644
--- a/libphobos/libdruntime/core/sys/windows/winsock2.d
+++ b/libphobos/libdruntime/core/sys/windows/winsock2.d
@@ -6,7 +6,6 @@
module core.sys.windows.winsock2;
version (Windows):
-@system:
pragma(lib, "ws2_32");
diff --git a/libphobos/libdruntime/core/sys/windows/winspool.d b/libphobos/libdruntime/core/sys/windows/winspool.d
index 2ff621a..12942fb 100644
--- a/libphobos/libdruntime/core/sys/windows/winspool.d
+++ b/libphobos/libdruntime/core/sys/windows/winspool.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.winspool;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "winspool");
diff --git a/libphobos/libdruntime/core/sys/windows/winsvc.d b/libphobos/libdruntime/core/sys/windows/winsvc.d
index 14ab6e4..f7f2fa7 100644
--- a/libphobos/libdruntime/core/sys/windows/winsvc.d
+++ b/libphobos/libdruntime/core/sys/windows/winsvc.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winsvc;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "advapi32");
diff --git a/libphobos/libdruntime/core/sys/windows/winuser.d b/libphobos/libdruntime/core/sys/windows/winuser.d
index 078e061..71cd882 100644
--- a/libphobos/libdruntime/core/sys/windows/winuser.d
+++ b/libphobos/libdruntime/core/sys/windows/winuser.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.winuser;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "user32");
diff --git a/libphobos/libdruntime/core/sys/windows/winver.d b/libphobos/libdruntime/core/sys/windows/winver.d
index 5099c3f..dc3d881 100644
--- a/libphobos/libdruntime/core/sys/windows/winver.d
+++ b/libphobos/libdruntime/core/sys/windows/winver.d
@@ -9,7 +9,6 @@
*/
module core.sys.windows.winver;
version (Windows):
-@system:
import core.sys.windows.w32api;
import core.sys.windows.winbase;
import core.sys.windows.sdkddkver;
diff --git a/libphobos/libdruntime/core/sys/windows/wtsapi32.d b/libphobos/libdruntime/core/sys/windows/wtsapi32.d
index 13576bd..4db697a 100644
--- a/libphobos/libdruntime/core/sys/windows/wtsapi32.d
+++ b/libphobos/libdruntime/core/sys/windows/wtsapi32.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.wtsapi32;
version (Windows):
-@system:
version (ANSI) {} else version = Unicode;
pragma(lib, "wtsapi32");
diff --git a/libphobos/libdruntime/core/sys/windows/wtypes.d b/libphobos/libdruntime/core/sys/windows/wtypes.d
index c27dd3a..0206839 100644
--- a/libphobos/libdruntime/core/sys/windows/wtypes.d
+++ b/libphobos/libdruntime/core/sys/windows/wtypes.d
@@ -8,7 +8,6 @@
*/
module core.sys.windows.wtypes;
version (Windows):
-@system:
import core.sys.windows.rpc, core.sys.windows.rpcndr;
import core.sys.windows.windef;
diff --git a/libphobos/libdruntime/rt/dmain2.d b/libphobos/libdruntime/rt/dmain2.d
index 0739b74..264fdf6 100644
--- a/libphobos/libdruntime/rt/dmain2.d
+++ b/libphobos/libdruntime/rt/dmain2.d
@@ -577,7 +577,7 @@ extern (C) void _d_print_throwable(Throwable t)
{
WCHAR* ptr; size_t len;
- void sink(const scope char[] s) scope nothrow
+ void sink(in char[] s) scope nothrow
{
if (!s.length) return;
int swlen = MultiByteToWideChar(
diff --git a/libphobos/src/MERGE b/libphobos/src/MERGE
index 4d63826..d02f72d 100644
--- a/libphobos/src/MERGE
+++ b/libphobos/src/MERGE
@@ -1,4 +1,4 @@
-88aa69b14f8a28255a0ac7626f6509a13cfdb67a
+3ad507b5125573c5b47736a0913105bfb1249746
The first line of this file holds the git revision number of the last
merge done from the dlang/phobos repository.
diff --git a/libphobos/src/std/algorithm/iteration.d b/libphobos/src/std/algorithm/iteration.d
index 39eff0d..9a365d5 100644
--- a/libphobos/src/std/algorithm/iteration.d
+++ b/libphobos/src/std/algorithm/iteration.d
@@ -7926,7 +7926,13 @@ if (isRandomAccessRange!Range && hasLength!Range)
_indices = iota(size_t(r.length)).array;
_empty = r.length == 0;
}
-
+ private this(size_t[] indices, size_t[] state, Range r, bool empty_)
+ {
+ _indices = indices;
+ _state = state;
+ _r = r;
+ _empty = empty_;
+ }
/// Returns: `true` if the range is empty, `false` otherwise.
@property bool empty() const pure nothrow @safe @nogc
{
@@ -7967,6 +7973,11 @@ if (isRandomAccessRange!Range && hasLength!Range)
next(2);
}
+ /// Returns: an independent copy of the permutations range.
+ auto save()
+ {
+ return typeof(this)(_indices.dup, _state.dup, _r.save, _empty);
+ }
}
///
@@ -7982,3 +7993,15 @@ if (isRandomAccessRange!Range && hasLength!Range)
[1, 2, 0],
[2, 1, 0]]));
}
+
+@safe unittest
+{
+ import std.algorithm.comparison : equal;
+ import std.range : ElementType;
+ import std.array : array;
+ auto p = [1, 2, 3].permutations;
+ auto x = p.save.front;
+ p.popFront;
+ auto y = p.front;
+ assert(x != y);
+}
diff --git a/libphobos/src/std/algorithm/mutation.d b/libphobos/src/std/algorithm/mutation.d
index b0e7707..839183d 100644
--- a/libphobos/src/std/algorithm/mutation.d
+++ b/libphobos/src/std/algorithm/mutation.d
@@ -1943,6 +1943,7 @@ if (Offset.length >= 1 && allSatisfy!(isValidIntegralTuple, Offset))
return removeImpl!s(range, offset);
}
+/// ditto
deprecated("Use of non-integral tuples is deprecated. Use remove(tuple(start, end).")
Range remove
(SwapStrategy s = SwapStrategy.stable, Range, Offset ...)
diff --git a/libphobos/src/std/array.d b/libphobos/src/std/array.d
index f48602e..3e88200 100644
--- a/libphobos/src/std/array.d
+++ b/libphobos/src/std/array.d
@@ -586,7 +586,7 @@ if (isInputRange!Range)
static assert(isMutable!ValueType, "assocArray: value type must be mutable");
ValueType[KeyType] aa;
- foreach (t; r)
+ foreach (ref t; r)
aa[t[0]] = t[1];
return aa;
}
@@ -4676,6 +4676,7 @@ nothrow pure @safe @nogc unittest
assert(a == [0, 1]);
}
+/// ditto
pragma(inline, true) U[n] staticArray(U, T, size_t n)(auto ref T[n] a)
if (!is(T == U) && is(T : U))
{
diff --git a/libphobos/src/std/ascii.d b/libphobos/src/std/ascii.d
index 3b6face..367c981 100644
--- a/libphobos/src/std/ascii.d
+++ b/libphobos/src/std/ascii.d
@@ -187,7 +187,8 @@ else
+/
bool isAlphaNum(dchar c) @safe pure nothrow @nogc
{
- return c <= 'z' && c >= '0' && (c <= '9' || c >= 'a' || (c >= 'A' && c <= 'Z'));
+ const hc = c | 0x20;
+ return ('0' <= c && c <= '9') || ('a' <= hc && hc <= 'z');
}
///
@@ -377,7 +378,8 @@ bool isOctalDigit(dchar c) @safe pure nothrow @nogc
+/
bool isHexDigit(dchar c) @safe pure nothrow @nogc
{
- return c <= 'f' && c >= '0' && (c <= '9' || c >= 'a' || (c >= 'A' && c <= 'F'));
+ const hc = c | 0x20;
+ return ('0' <= c && c <= '9') || ('a' <= hc && hc <= 'f');
}
///
diff --git a/libphobos/src/std/base64.d b/libphobos/src/std/base64.d
index d971dba..2f7213b 100644
--- a/libphobos/src/std/base64.d
+++ b/libphobos/src/std/base64.d
@@ -922,7 +922,7 @@ template Base64Impl(char Map62th, char Map63th, char Padding = '=')
* length $(D_PARAM sourceLength).
*/
@safe
- pure nothrow size_t decodeLength(in size_t sourceLength)
+ pure @nogc nothrow size_t decodeLength(in size_t sourceLength)
{
static if (Padding == NoPadding)
return (sourceLength / 4) * 3 + (sourceLength % 4 < 2 ? 0 : sourceLength % 4 == 2 ? 1 : 2);
@@ -946,7 +946,7 @@ template Base64Impl(char Map62th, char Map63th, char Padding = '=')
// Used in decode contracts. Calculates the actual size the decoded
// result should have, taking into account trailing padding.
@safe
- pure nothrow private size_t realDecodeLength(R)(R source)
+ pure @nogc nothrow private size_t realDecodeLength(R)(R source)
{
auto expect = decodeLength(source.length);
static if (Padding != NoPadding)
diff --git a/libphobos/src/std/bitmanip.d b/libphobos/src/std/bitmanip.d
index de2e0fb..f131257 100644
--- a/libphobos/src/std/bitmanip.d
+++ b/libphobos/src/std/bitmanip.d
@@ -784,48 +784,6 @@ if (is(T == class))
static assert(!__traits(compiles, bar(s)));
}
-/**
- Allows manipulating the fraction, exponent, and sign parts of a
- `float` separately. The definition is:
-
-----
-struct FloatRep
-{
- union
- {
- float value;
- mixin(bitfields!(
- uint, "fraction", 23,
- ubyte, "exponent", 8,
- bool, "sign", 1));
- }
- enum uint bias = 127, fractionBits = 23, exponentBits = 8, signBits = 1;
-}
-----
-*/
-alias FloatRep = FloatingPointRepresentation!float;
-
-/**
- Allows manipulating the fraction, exponent, and sign parts of a
- `double` separately. The definition is:
-
-----
-struct DoubleRep
-{
- union
- {
- double value;
- mixin(bitfields!(
- ulong, "fraction", 52,
- ushort, "exponent", 11,
- bool, "sign", 1));
- }
- enum uint bias = 1023, signBits = 1, fractionBits = 52, exponentBits = 11;
-}
-----
-*/
-alias DoubleRep = FloatingPointRepresentation!double;
-
private struct FloatingPointRepresentation(T)
{
static if (is(T == float))
@@ -851,6 +809,27 @@ private struct FloatingPointRepresentation(T)
}
}
+/**
+ Allows manipulating the fraction, exponent, and sign parts of a
+ `float` separately. The definition is:
+
+----
+struct FloatRep
+{
+ union
+ {
+ float value;
+ mixin(bitfields!(
+ uint, "fraction", 23,
+ ubyte, "exponent", 8,
+ bool, "sign", 1));
+ }
+ enum uint bias = 127, fractionBits = 23, exponentBits = 8, signBits = 1;
+}
+----
+*/
+alias FloatRep = FloatingPointRepresentation!float;
+
///
@safe unittest
{
@@ -899,6 +878,27 @@ private struct FloatingPointRepresentation(T)
assert(rep.sign);
}
+/**
+ Allows manipulating the fraction, exponent, and sign parts of a
+ `double` separately. The definition is:
+
+----
+struct DoubleRep
+{
+ union
+ {
+ double value;
+ mixin(bitfields!(
+ ulong, "fraction", 52,
+ ushort, "exponent", 11,
+ bool, "sign", 1));
+ }
+ enum uint bias = 1023, signBits = 1, fractionBits = 52, exponentBits = 11;
+}
+----
+*/
+alias DoubleRep = FloatingPointRepresentation!double;
+
///
@safe unittest
{
@@ -986,17 +986,17 @@ private:
size_t* _ptr;
enum bitsPerSizeT = size_t.sizeof * 8;
- @property size_t fullWords() const @nogc pure nothrow
+ @property size_t fullWords() const scope @safe @nogc pure nothrow
{
return _len / bitsPerSizeT;
}
// Number of bits after the last full word
- @property size_t endBits() const @nogc pure nothrow
+ @property size_t endBits() const scope @safe @nogc pure nothrow
{
return _len % bitsPerSizeT;
}
// Bit mask to extract the bits after the last full word
- @property size_t endMask() const @nogc pure nothrow
+ @property size_t endMask() const scope @safe @nogc pure nothrow
{
return (size_t(1) << endBits) - 1;
}
@@ -1440,15 +1440,15 @@ public:
/**********************************************
* Counts all the set bits in the `BitArray`
*/
- size_t count() const @nogc pure nothrow
+ size_t count() const scope @safe @nogc pure nothrow
{
if (_ptr)
{
size_t bitCount;
foreach (i; 0 .. fullWords)
- bitCount += countBitsSet(_ptr[i]);
+ bitCount += (() @trusted => countBitsSet(_ptr[i]))();
if (endBits)
- bitCount += countBitsSet(_ptr[fullWords] & endMask);
+ bitCount += (() @trusted => countBitsSet(_ptr[fullWords] & endMask))();
return bitCount;
}
else
@@ -4544,7 +4544,7 @@ if (canSwapEndianness!T && isOutputRange!(R, ubyte))
Counts the number of set bits in the binary representation of `value`.
For signed integers, the sign bit is included in the count.
*/
-private uint countBitsSet(T)(const T value) @nogc pure nothrow
+private uint countBitsSet(T)(const T value)
if (isIntegral!T)
{
static if (T.sizeof == 8)
diff --git a/libphobos/src/std/container/binaryheap.d b/libphobos/src/std/container/binaryheap.d
index e763357..723630c 100644
--- a/libphobos/src/std/container/binaryheap.d
+++ b/libphobos/src/std/container/binaryheap.d
@@ -89,6 +89,8 @@ if (isRandomAccessRange!(Store) || isRandomAccessRange!(typeof(Store.init[])))
Store _store;
size_t _length;
}
+ // TODO: migrate to use the SafeRefCounted. The problem is that some member
+ // functions here become @system with a naive switch.
private RefCounted!(Data, RefCountedAutoInitialize.no) _payload;
// Comparison predicate
private alias comp = binaryFun!(less);
diff --git a/libphobos/src/std/digest/murmurhash.d b/libphobos/src/std/digest/murmurhash.d
index 533db92..b94042f 100644
--- a/libphobos/src/std/digest/murmurhash.d
+++ b/libphobos/src/std/digest/murmurhash.d
@@ -38,11 +38,6 @@ $(BR) $(LINK2 https://en.wikipedia.org/wiki/MurmurHash, Wikipedia)
*/
module std.digest.murmurhash;
-version (X86)
- version = HaveUnalignedLoads;
-else version (X86_64)
- version = HaveUnalignedLoads;
-
///
@safe unittest
{
@@ -97,6 +92,11 @@ else version (X86_64)
assert(hashed == [188, 165, 108, 2]);
}
+version (X86)
+ version = HaveUnalignedLoads;
+else version (X86_64)
+ version = HaveUnalignedLoads;
+
public import std.digest;
@safe:
diff --git a/libphobos/src/std/exception.d b/libphobos/src/std/exception.d
index 94a2e7a..129c05d 100644
--- a/libphobos/src/std/exception.d
+++ b/libphobos/src/std/exception.d
@@ -799,108 +799,107 @@ enum emptyExceptionMsg = "<Empty Exception Message>";
}
/**
- * Casts a mutable array to an immutable array in an idiomatic
- * manner. Technically, `assumeUnique` just inserts a cast,
- * but its name documents assumptions on the part of the
- * caller. `assumeUnique(arr)` should only be called when
- * there are no more active mutable aliases to elements of $(D
- * arr). To strengthen this assumption, `assumeUnique(arr)`
- * also clears `arr` before returning. Essentially $(D
- * assumeUnique(arr)) indicates commitment from the caller that there
- * is no more mutable access to any of `arr`'s elements
- * (transitively), and that all future accesses will be done through
- * the immutable array returned by `assumeUnique`.
- *
- * Typically, `assumeUnique` is used to return arrays from
- * functions that have allocated and built them.
- *
- * Params:
- * array = The array to cast to immutable.
- *
- * Returns: The immutable array.
- *
- * Example:
- *
- * $(RUNNABLE_EXAMPLE
- * ----
- * string letters()
- * {
- * char[] result = new char['z' - 'a' + 1];
- * foreach (i, ref e; result)
- * {
- * e = cast(char)('a' + i);
- * }
- * return assumeUnique(result);
- * }
- * ----
- * )
- *
- * The use in the example above is correct because `result`
- * was private to `letters` and is inaccessible in writing
- * after the function returns. The following example shows an
- * incorrect use of `assumeUnique`.
- *
- * Bad:
- *
- * $(RUNNABLE_EXAMPLE
- * ----
- * private char[] buffer;
- * string letters(char first, char last)
- * {
- * if (first >= last) return null; // fine
- * auto sneaky = buffer;
- * sneaky.length = last - first + 1;
- * foreach (i, ref e; sneaky)
- * {
- * e = cast(char)('a' + i);
- * }
- * return assumeUnique(sneaky); // BAD
- * }
- * ----
- * )
- *
- * The example above wreaks havoc on client code because it is
- * modifying arrays that callers considered immutable. To obtain an
- * immutable array from the writable array `buffer`, replace
- * the last line with:
- *
- * ----
- * return to!(string)(sneaky); // not that sneaky anymore
- * ----
- *
- * The call will duplicate the array appropriately.
- *
- * Note that checking for uniqueness during compilation is
- * possible in certain cases, especially when a function is
- * marked as a pure function. The following example does not
- * need to call assumeUnique because the compiler can infer the
- * uniqueness of the array in the pure function:
- *
- * $(RUNNABLE_EXAMPLE
- * ----
- * string letters() pure
- * {
- * char[] result = new char['z' - 'a' + 1];
- * foreach (i, ref e; result)
- * {
- * e = cast(char)('a' + i);
- * }
- * return result;
- * }
- * ----
- * )
- *
- * For more on infering uniqueness see the $(B unique) and
- * $(B lent) keywords in the
- * $(HTTP www.cs.cmu.edu/~aldrich/papers/aldrich-dissertation.pdf, ArchJava)
- * language.
- *
- * The downside of using `assumeUnique`'s
- * convention-based usage is that at this time there is no
- * formal checking of the correctness of the assumption;
- * on the upside, the idiomatic use of `assumeUnique` is
- * simple and rare enough to be tolerable.
- *
+Casts a mutable array to an immutable array in an idiomatic
+manner. Technically, `assumeUnique` just inserts a cast,
+but its name documents assumptions on the part of the
+caller. `assumeUnique(arr)` should only be called when
+there are no more active mutable aliases to elements of $(D
+arr). To strengthen this assumption, `assumeUnique(arr)`
+also clears `arr` before returning. Essentially $(D
+assumeUnique(arr)) indicates commitment from the caller that there
+is no more mutable access to any of `arr`'s elements
+(transitively), and that all future accesses will be done through
+the immutable array returned by `assumeUnique`.
+
+Typically, `assumeUnique` is used to return arrays from
+functions that have allocated and built them.
+
+Params:
+ array = The array to cast to immutable.
+
+Returns: The immutable array.
+
+Example:
+
+$(RUNNABLE_EXAMPLE
+----
+string letters()
+{
+ char[] result = new char['z' - 'a' + 1];
+ foreach (i, ref e; result)
+ {
+ e = cast(char)('a' + i);
+ }
+ return assumeUnique(result);
+}
+----
+)
+
+The use in the example above is correct because `result`
+was private to `letters` and is inaccessible in writing
+after the function returns. The following example shows an
+incorrect use of `assumeUnique`.
+
+Bad:
+
+$(RUNNABLE_EXAMPLE
+----
+char[] buffer;
+string letters(char first, char last)
+{
+ if (first >= last) return null; // fine
+ auto sneaky = buffer;
+ sneaky.length = last - first + 1;
+ foreach (i, ref e; sneaky)
+ {
+ e = cast(char)('a' + i);
+ }
+ return assumeUnique(sneaky); // BAD
+}
+----
+)
+
+The example above wreaks havoc on client code because it is
+modifying arrays that callers considered immutable. To obtain an
+immutable array from the writable array `buffer`, replace
+the last line with:
+
+----
+return to!(string)(sneaky); // not that sneaky anymore
+----
+
+The call will duplicate the array appropriately.
+
+Note that checking for uniqueness during compilation is
+possible in certain cases, especially when a function is
+marked as a pure function. The following example does not
+need to call `assumeUnique` because the compiler can infer the
+uniqueness of the array in the pure function:
+
+$(RUNNABLE_EXAMPLE
+----
+static string letters() pure
+{
+ char[] result = new char['z' - 'a' + 1];
+ foreach (i, ref e; result)
+ {
+ e = cast(char)('a' + i);
+ }
+ return result;
+}
+----
+)
+
+For more on infering uniqueness see the $(B unique) and
+$(B lent) keywords in the
+$(HTTP www.cs.cmu.edu/~aldrich/papers/aldrich-dissertation.pdf, ArchJava)
+language.
+
+The downside of using `assumeUnique`'s
+convention-based usage is that at this time there is no
+formal checking of the correctness of the assumption;
+on the upside, the idiomatic use of `assumeUnique` is
+simple and rare enough to be tolerable.
*/
immutable(T)[] assumeUnique(T)(T[] array) pure nothrow
{
diff --git a/libphobos/src/std/experimental/allocator/common.d b/libphobos/src/std/experimental/allocator/common.d
index 8acd763..d2efe33 100644
--- a/libphobos/src/std/experimental/allocator/common.d
+++ b/libphobos/src/std/experimental/allocator/common.d
@@ -12,6 +12,26 @@ module std.experimental.allocator.common;
import std.algorithm.comparison, std.traits;
/**
+Is `true` iff `A` is an allocator.
+ */
+enum isAllocator(A) = (is(typeof(A.allocate(size_t.init)) == void[]) && is(typeof(A.alignment) : size_t));
+
+///
+@safe @nogc nothrow pure
+unittest
+{
+ import std.experimental.allocator.building_blocks.null_allocator : NullAllocator;
+ import std.experimental.allocator.mallocator : Mallocator;
+ import std.experimental.allocator.gc_allocator : GCAllocator;
+ import std.experimental.allocator.mmap_allocator : MmapAllocator;
+ static assert(isAllocator!NullAllocator);
+ static assert(isAllocator!Mallocator);
+ static assert(isAllocator!GCAllocator);
+ static assert(isAllocator!MmapAllocator);
+ static assert(!isAllocator!int);
+}
+
+/**
Returns the size in bytes of the state that needs to be allocated to hold an
object of type `T`. `stateSize!T` is zero for `struct`s that are not
nested and have no nonstatic member variables.
diff --git a/libphobos/src/std/file.d b/libphobos/src/std/file.d
index 8957089..8d1b431 100644
--- a/libphobos/src/std/file.d
+++ b/libphobos/src/std/file.d
@@ -4465,9 +4465,10 @@ void rmdirRecurse(ref scope DirEntry de) @safe
}
else
{
- // dirEntries is @system because it uses a DirIterator with a
- // RefCounted variable, but here, no references to the payload is
- // escaped to the outside, so this should be @trusted
+ // dirEntries is @system without DIP1000 because it uses
+ // a DirIterator with a SafeRefCounted variable, but here, no
+ // references to the payload are escaped to the outside, so this should
+ // be @trusted
() @trusted {
// all children, recursively depth-first
foreach (DirEntry e; dirEntries(de.name, SpanMode.depth, false))
@@ -4863,20 +4864,31 @@ private struct DirIteratorImpl
}
}
-struct DirIterator
+// Must be a template, because the destructor is unsafe or safe depending on
+// whether `-preview=dip1000` is in use. Otherwise, linking errors would
+// result.
+struct _DirIterator(bool useDIP1000)
{
-@safe:
+ static assert(useDIP1000 == dip1000Enabled,
+ "Please don't override useDIP1000 to disagree with compiler switch.");
+
private:
- RefCounted!(DirIteratorImpl, RefCountedAutoInitialize.no) impl;
+ SafeRefCounted!(DirIteratorImpl, RefCountedAutoInitialize.no) impl;
+
this(string pathname, SpanMode mode, bool followSymlink) @trusted
{
impl = typeof(impl)(pathname, mode, followSymlink);
}
public:
- @property bool empty() { return impl.empty; }
- @property DirEntry front() { return impl.front; }
- void popFront() { impl.popFront(); }
+ @property bool empty() @trusted { return impl.empty; }
+ @property DirEntry front() @trusted { return impl.front; }
+ void popFront() @trusted { impl.popFront(); }
}
+
+// This has the client code to automatically use and link to the correct
+// template instance
+alias DirIterator = _DirIterator!dip1000Enabled;
+
/++
Returns an $(REF_ALTTEXT input range, isInputRange, std,range,primitives)
of `DirEntry` that lazily iterates a given directory,
@@ -4890,6 +4902,11 @@ public:
operating system / filesystem, and may not follow any particular sorting.
Params:
+ useDIP1000 = used to instantiate this function separately for code with
+ and without -preview=dip1000 compiler switch, because it
+ affects the ABI of this function. Set automatically -
+ don't touch.
+
path = The directory to iterate over.
If empty, the current directory will be iterated.
@@ -4955,9 +4972,13 @@ foreach (d; dFiles)
writeln(d.name);
--------------------
+/
-auto dirEntries(string path, SpanMode mode, bool followSymlink = true)
+
+// For some reason, doing the same alias-to-a-template trick as with DirIterator
+// does not work here.
+auto dirEntries(bool useDIP1000 = dip1000Enabled)
+ (string path, SpanMode mode, bool followSymlink = true)
{
- return DirIterator(path, mode, followSymlink);
+ return _DirIterator!useDIP1000(path, mode, followSymlink);
}
/// Duplicate functionality of D1's `std.file.listdir()`:
@@ -4976,13 +4997,14 @@ auto dirEntries(string path, SpanMode mode, bool followSymlink = true)
.array;
}
- void main(string[] args)
+ // Can be safe only with -preview=dip1000
+ @safe void main(string[] args)
{
import std.stdio;
string[] files = listdir(args[1]);
writefln("%s", files);
- }
+ }
}
@system unittest
@@ -5057,14 +5079,15 @@ auto dirEntries(string path, SpanMode mode, bool followSymlink = true)
}
/// Ditto
-auto dirEntries(string path, string pattern, SpanMode mode,
+auto dirEntries(bool useDIP1000 = dip1000Enabled)
+ (string path, string pattern, SpanMode mode,
bool followSymlink = true)
{
import std.algorithm.iteration : filter;
import std.path : globMatch, baseName;
bool f(DirEntry de) { return globMatch(baseName(de.name), pattern); }
- return filter!f(DirIterator(path, mode, followSymlink));
+ return filter!f(_DirIterator!useDIP1000(path, mode, followSymlink));
}
@safe unittest
@@ -5145,7 +5168,7 @@ auto dirEntries(string path, string pattern, SpanMode mode,
// Make sure that dirEntries does not butcher Unicode file names
// https://issues.dlang.org/show_bug.cgi?id=17962
-@system unittest
+@safe unittest
{
import std.algorithm.comparison : equal;
import std.algorithm.iteration : map;
diff --git a/libphobos/src/std/format/internal/write.d b/libphobos/src/std/format/internal/write.d
index 2fd6ff7..8089cfa 100644
--- a/libphobos/src/std/format/internal/write.d
+++ b/libphobos/src/std/format/internal/write.d
@@ -3017,33 +3017,31 @@ if (is(T == enum))
import std.array : appender;
import std.range.primitives : put;
- if (f.spec == 's')
+ if (f.spec != 's')
+ return formatValueImpl(w, cast(OriginalType!T) val, f);
+
+ static foreach (e; EnumMembers!T)
{
- foreach (i, e; EnumMembers!T)
+ if (val == e)
{
- if (val == e)
- {
- formatValueImpl(w, __traits(allMembers, T)[i], f);
- return;
- }
+ formatValueImpl(w, __traits(identifier, e), f);
+ return;
}
+ }
- auto w2 = appender!string();
+ auto w2 = appender!string();
- // val is not a member of T, output cast(T) rawValue instead.
- put(w2, "cast(");
- put(w2, T.stringof);
- put(w2, ")");
- static assert(!is(OriginalType!T == T), "OriginalType!" ~ T.stringof ~
- "must not be equal to " ~ T.stringof);
+ // val is not a member of T, output cast(T) rawValue instead.
+ put(w2, "cast(");
+ put(w2, T.stringof);
+ put(w2, ")");
+ static assert(!is(OriginalType!T == T), "OriginalType!" ~ T.stringof ~
+ "must not be equal to " ~ T.stringof);
- FormatSpec!Char f2 = f;
- f2.width = 0;
- formatValueImpl(w2, cast(OriginalType!T) val, f2);
- writeAligned(w, w2.data, f);
- return;
- }
- formatValueImpl(w, cast(OriginalType!T) val, f);
+ FormatSpec!Char f2 = f;
+ f2.width = 0;
+ formatValueImpl(w2, cast(OriginalType!T) val, f2);
+ writeAligned(w, w2.data, f);
}
@safe unittest
diff --git a/libphobos/src/std/internal/windows/advapi32.d b/libphobos/src/std/internal/windows/advapi32.d
index 6f999ba..1b26f43 100644
--- a/libphobos/src/std/internal/windows/advapi32.d
+++ b/libphobos/src/std/internal/windows/advapi32.d
@@ -36,7 +36,9 @@ pragma(lib, "advapi32.lib");
HMODULE hAdvapi32 = null;
extern (Windows)
{
- LONG function(in HKEY hkey, in LPCWSTR lpSubKey, in REGSAM samDesired, in DWORD reserved) pRegDeleteKeyExW;
+ LONG function(
+ scope const HKEY hkey, scope const LPCWSTR lpSubKey,
+ scope const REGSAM samDesired, scope const DWORD reserved) pRegDeleteKeyExW;
}
void loadAdvapi32()
diff --git a/libphobos/src/std/json.d b/libphobos/src/std/json.d
index ac397e5..088e77f 100644
--- a/libphobos/src/std/json.d
+++ b/libphobos/src/std/json.d
@@ -678,6 +678,7 @@ struct JSONValue
assert( j["language"].str == "Perl" );
}
+ /// ditto
void opIndexAssign(T)(T arg, size_t i)
{
auto a = this.arrayNoRef;
@@ -754,11 +755,13 @@ struct JSONValue
assert(j["author"].str == "Walter");
}
+ ///
bool opEquals(const JSONValue rhs) const @nogc nothrow pure @safe
{
return opEquals(rhs);
}
+ /// ditto
bool opEquals(ref const JSONValue rhs) const @nogc nothrow pure @trusted
{
// Default doesn't work well since store is a union. Compare only
diff --git a/libphobos/src/std/net/curl.d b/libphobos/src/std/net/curl.d
index 2318279..8745bbd 100644
--- a/libphobos/src/std/net/curl.d
+++ b/libphobos/src/std/net/curl.d
@@ -28,7 +28,7 @@ to your $(B dub.json) file if you are using $(LINK2 http://code.dlang.org, DUB).
Windows x86 note:
A DMD compatible libcurl static library can be downloaded from the dlang.org
-$(LINK2 http://downloads.dlang.org/other/index.html, download archive page).
+$(LINK2 https://downloads.dlang.org/other/index.html, download archive page).
This module is not available for iOS, tvOS or watchOS.
diff --git a/libphobos/src/std/random.d b/libphobos/src/std/random.d
index 70b87dd..9b3c5ed 100644
--- a/libphobos/src/std/random.d
+++ b/libphobos/src/std/random.d
@@ -107,18 +107,6 @@ module std.random;
import std.range.primitives;
import std.traits;
-version (OSX)
- version = Darwin;
-else version (iOS)
- version = Darwin;
-else version (TVOS)
- version = Darwin;
-else version (WatchOS)
- version = Darwin;
-
-version (D_InlineAsm_X86) version = InlineAsm_X86_Any;
-version (D_InlineAsm_X86_64) version = InlineAsm_X86_Any;
-
///
@safe unittest
{
@@ -178,6 +166,18 @@ version (D_InlineAsm_X86_64) version = InlineAsm_X86_Any;
assert([0, 1, 2, 4, 5].randomShuffle(rnd2).equal([4, 2, 5, 0, 1]));
}
+version (OSX)
+ version = Darwin;
+else version (iOS)
+ version = Darwin;
+else version (TVOS)
+ version = Darwin;
+else version (WatchOS)
+ version = Darwin;
+
+version (D_InlineAsm_X86) version = InlineAsm_X86_Any;
+version (D_InlineAsm_X86_64) version = InlineAsm_X86_Any;
+
version (StdUnittest)
{
static import std.meta;
diff --git a/libphobos/src/std/stdio.d b/libphobos/src/std/stdio.d
index cd1a356..ffd6da8 100644
--- a/libphobos/src/std/stdio.d
+++ b/libphobos/src/std/stdio.d
@@ -145,8 +145,8 @@ version (Windows)
// encoded in CP_ACP on Windows instead of UTF-8.
/+ Waiting for druntime pull 299
+/
- extern (C) nothrow @nogc FILE* _wfopen(in wchar* filename, in wchar* mode);
- extern (C) nothrow @nogc FILE* _wfreopen(in wchar* filename, in wchar* mode, FILE* fp);
+ extern (C) nothrow @nogc FILE* _wfopen(scope const wchar* filename, scope const wchar* mode);
+ extern (C) nothrow @nogc FILE* _wfreopen(scope const wchar* filename, scope const wchar* mode, FILE* fp);
import core.sys.windows.basetsd : HANDLE;
}
@@ -5210,7 +5210,7 @@ enum StdFileHandle: string
{
with (StdFileHandle)
assert(_iob == stdin || _iob == stdout || _iob == stderr);
- impl.handle = mixin(_iob);
+ impl.handle = cast() mixin(_iob);
result._p = &impl;
atomicOp!"+="(spinlock, uint.max / 2);
break;
diff --git a/libphobos/src/std/string.d b/libphobos/src/std/string.d
index 7ed24f7..b1063ee 100644
--- a/libphobos/src/std/string.d
+++ b/libphobos/src/std/string.d
@@ -4845,6 +4845,7 @@ if (isForwardRange!Range && isSomeChar!(ElementEncodingType!Range) &&
assert(detabber(" \n\tx", 9).array == " \n x");
}
+/// ditto
auto detabber(Range)(auto ref Range r, size_t tabSize = 8)
if (isConvertibleToString!Range)
{
diff --git a/libphobos/src/std/traits.d b/libphobos/src/std/traits.d
index cc08ea6..1cbff84 100644
--- a/libphobos/src/std/traits.d
+++ b/libphobos/src/std/traits.d
@@ -9136,3 +9136,11 @@ package(std) template DeducedParameterType(T)
{
static assert(is(DeducedParameterType!(inout(int[])) == inout(int)[]));
}
+
+private auto dip1000Test(int x) {return *&x;}
+// We don't use isSafe, because betterC client code needs to instantiate
+// core.internal.array.comparison.__cmp in the client side. isSafe uses
+// __cmp of two strings, so using it would instantate that here instead. That
+// won't do because betterC compilations do not link the Phobos binary in.
+package(std) enum dip1000Enabled
+ = is(typeof(&dip1000Test) : int function(int) @safe);
diff --git a/libphobos/src/std/typecons.d b/libphobos/src/std/typecons.d
index 094628b..231ac93 100644
--- a/libphobos/src/std/typecons.d
+++ b/libphobos/src/std/typecons.d
@@ -22,8 +22,8 @@ $(TR $(TD Flags) $(TD
$(LREF Yes)
))
$(TR $(TD Memory allocation) $(TD
- $(LREF RefCounted)
- $(LREF refCounted)
+ $(LREF SafeRefCounted)
+ $(LREF safeRefCounted)
$(LREF RefCountedAutoInitialize)
$(LREF scoped)
$(LREF Unique)
@@ -2759,6 +2759,9 @@ Nullable!T) object starts in the null state. Assigning it renders it
non-null. Calling `nullify` can nullify it again.
Practically `Nullable!T` stores a `T` and a `bool`.
+
+See also:
+ $(LREF apply), an alternative way to use the payload.
*/
struct Nullable(T)
{
@@ -4178,7 +4181,7 @@ Returns:
See also:
$(HTTPS en.wikipedia.org/wiki/Monad_(functional_programming)#The_Maybe_monad, The `Maybe` monad)
- */
+*/
template apply(alias fun)
{
import std.functional : unaryFun;
@@ -6550,8 +6553,8 @@ package template Bind(alias Template, args1...)
/**
-Options regarding auto-initialization of a `RefCounted` object (see
-the definition of `RefCounted` below).
+Options regarding auto-initialization of a `SafeRefCounted` object (see
+the definition of `SafeRefCounted` below).
*/
enum RefCountedAutoInitialize
{
@@ -6572,6 +6575,27 @@ enum RefCountedAutoInitialize
int a = 42;
}
+ SafeRefCounted!(Foo, RefCountedAutoInitialize.yes) rcAuto;
+ SafeRefCounted!(Foo, RefCountedAutoInitialize.no) rcNoAuto;
+
+ assert(rcAuto.refCountedPayload.a == 42);
+
+ assertThrown!AssertError(rcNoAuto.refCountedPayload);
+ rcNoAuto.refCountedStore.ensureInitialized;
+ assert(rcNoAuto.refCountedPayload.a == 42);
+}
+
+// Same the above but for old RefCounted and not documented
+@system unittest
+{
+ import core.exception : AssertError;
+ import std.exception : assertThrown;
+
+ struct Foo
+ {
+ int a = 42;
+ }
+
RefCounted!(Foo, RefCountedAutoInitialize.yes) rcAuto;
RefCounted!(Foo, RefCountedAutoInitialize.no) rcNoAuto;
@@ -6586,16 +6610,16 @@ enum RefCountedAutoInitialize
Defines a reference-counted object containing a `T` value as
payload.
-An instance of `RefCounted` is a reference to a structure,
+An instance of `SafeRefCounted` is a reference to a structure,
which is referred to as the $(I store), or $(I storage implementation
struct) in this documentation. The store contains a reference count
-and the `T` payload. `RefCounted` uses `malloc` to allocate
-the store. As instances of `RefCounted` are copied or go out of
+and the `T` payload. `SafeRefCounted` uses `malloc` to allocate
+the store. As instances of `SafeRefCounted` are copied or go out of
scope, they will automatically increment or decrement the reference
-count. When the reference count goes down to zero, `RefCounted`
+count. When the reference count goes down to zero, `SafeRefCounted`
will call `destroy` against the payload and call `free` to
deallocate the store. If the `T` payload contains any references
-to GC-allocated memory, then `RefCounted` will add it to the GC memory
+to GC-allocated memory, then `SafeRefCounted` will add it to the GC memory
that is scanned for pointers, and remove it from GC scanning before
`free` is called on the store.
@@ -6607,8 +6631,15 @@ still be valid during the destructor call. This allows the `T` to
deallocate or clean up any non-GC resources immediately after the
reference count has reached zero.
-`RefCounted` is unsafe and should be used with care. No references
-to the payload should be escaped outside the `RefCounted` object.
+Without -preview=dip1000, `SafeRefCounted` is unsafe and should be
+used with care. No references to the payload should be escaped outside
+the `SafeRefCounted` object.
+
+With -preview=dip1000, `SafeRefCounted` is safe if it's payload is accessed only
+with the $(LREF borrow) function. Scope semantics can also prevent accidental
+escaping of `refCountedPayload`, but it's still up to the user to not destroy
+the last counted reference while the payload is in use. Due to that,
+`refCountedPayload` remains accessible only in `@system` code.
The `autoInit` option makes the object ensure the store is
automatically initialized. Leaving $(D autoInit ==
@@ -6621,8 +6652,11 @@ pointer dereference.
If `T.this()` is annotated with `@disable` then `autoInit` must be
`RefCountedAutoInitialize.no` in order to compile.
+
+See_Also:
+ $(LREF RefCounted)
*/
-struct RefCounted(T, RefCountedAutoInitialize autoInit =
+struct SafeRefCounted(T, RefCountedAutoInitialize autoInit =
RefCountedAutoInitialize.yes)
if (!is(T == class) && !(is(T == interface)))
{
@@ -6642,7 +6676,20 @@ if (!is(T == class) && !(is(T == interface)))
import core.memory : GC;
}
- /// `RefCounted` storage implementation.
+ pragma(inline, true) private void checkInit()()
+ if (autoInit == RefCountedAutoInitialize.yes)
+ {
+ _refCounted.ensureInitialized();
+ }
+
+ pragma(inline, true) private void checkInit()() inout
+ if (autoInit == RefCountedAutoInitialize.no)
+ {
+ assert(_refCounted.isInitialized,
+ "Attempted to use an uninitialized payload.");
+ }
+
+ /// `SafeRefCounted` storage implementation.
struct RefCountedStore
{
private struct Impl
@@ -6658,7 +6705,7 @@ if (!is(T == class) && !(is(T == interface)))
import core.lifetime : emplace, forward;
allocateStore();
- version (D_Exceptions) scope(failure) deallocateStore();
+ version (D_Exceptions) scope(failure) () @trusted { deallocateStore(); }();
emplace(&_store._payload, forward!args);
_store._count = 1;
}
@@ -6668,7 +6715,7 @@ if (!is(T == class) && !(is(T == interface)))
import std.algorithm.mutation : moveEmplace;
allocateStore();
- moveEmplace(source, _store._payload);
+ () @trusted { moveEmplace(source, _store._payload); }();
_store._count = 1;
}
@@ -6678,13 +6725,15 @@ if (!is(T == class) && !(is(T == interface)))
static if (enableGCScan)
{
import std.internal.memory : enforceCalloc;
- _store = cast(Impl*) enforceCalloc(1, Impl.sizeof);
- GC.addRange(&_store._payload, T.sizeof);
+ auto ptr = enforceCalloc(1, Impl.sizeof);
+ _store = () @trusted { return cast(Impl*) ptr; }();
+ () @trusted { GC.addRange(&_store._payload, T.sizeof); }();
}
else
{
import std.internal.memory : enforceMalloc;
- _store = cast(Impl*) enforceMalloc(Impl.sizeof);
+ auto ptr = enforceMalloc(Impl.sizeof);
+ _store = () @trusted { return cast(Impl*) ptr; }();
}
}
@@ -6725,6 +6774,7 @@ if (!is(T == class) && !(is(T == interface)))
This function is unavailable if `T.this()` is annotated with
`@disable`.
*/
+ @safe pure nothrow
void ensureInitialized()()
{
// By checking for `@disable this()` and failing early we can
@@ -6763,7 +6813,7 @@ Postcondition: `refCountedStore.isInitialized`
}
/// Ditto
- this(T val)
+ this(return scope T val)
{
_refCounted.move(val);
}
@@ -6786,18 +6836,30 @@ to deallocate the corresponding resource.
*/
~this()
{
+ import std.traits : dip1000Enabled;
+
+ // This prevents the same reference from decrementing the count twice.
+ scope(exit) _refCounted = _refCounted.init;
+
if (!_refCounted.isInitialized) return;
assert(_refCounted._store._count > 0);
- if (--_refCounted._store._count)
- return;
+ if (--_refCounted._store._count) return;
// Done, destroy and deallocate
.destroy(_refCounted._store._payload);
- _refCounted.deallocateStore();
+
+ static if (dip1000Enabled)
+ {
+ () @trusted { _refCounted.deallocateStore(); }();
+ }
+ else _refCounted.deallocateStore();
}
/**
-Assignment operators
- */
+Assignment operators.
+
+Note: You may not assign a new payload to an uninitialized SafeRefCounted, if
+auto initialization is off. Assigning another counted reference is still okay.
+*/
void opAssign(typeof(this) rhs)
{
import std.algorithm.mutation : swap;
@@ -6810,14 +6872,7 @@ Assignment operators
{
import std.algorithm.mutation : move;
- static if (autoInit == RefCountedAutoInitialize.yes)
- {
- _refCounted.ensureInitialized();
- }
- else
- {
- assert(_refCounted.isInitialized);
- }
+ checkInit();
move(rhs, _refCounted._store._payload);
}
@@ -6829,20 +6884,20 @@ Assignment operators
RefCountedAutoInitialize.yes), calls $(D
refCountedStore.ensureInitialized). Otherwise, just issues $(D
assert(refCountedStore.isInitialized)). Used with $(D alias
- refCountedPayload this;), so callers can just use the `RefCounted`
+ refCountedPayload this;), so callers can just use the `SafeRefCounted`
object as a `T`.
$(BLUE The first overload exists only if $(D autoInit == RefCountedAutoInitialize.yes).)
So if $(D autoInit == RefCountedAutoInitialize.no)
or called for a constant or immutable object, then
- `refCountedPayload` will also be qualified as safe and nothrow
+ `refCountedPayload` will also be qualified as nothrow
(but will still assert if not initialized).
*/
- @property @trusted
+ @property @system
ref T refCountedPayload() return;
/// ditto
- @property nothrow @safe pure @nogc
+ @property nothrow @system pure @nogc
ref inout(T) refCountedPayload() inout return;
}
else
@@ -6850,19 +6905,21 @@ Assignment operators
static if (autoInit == RefCountedAutoInitialize.yes)
{
//Can't use inout here because of potential mutation
- @property
+ @property @system
ref T refCountedPayload() return
{
- _refCounted.ensureInitialized();
+ checkInit();
return _refCounted._store._payload;
}
}
-
- @property nothrow @safe pure @nogc
- ref inout(T) refCountedPayload() inout return
+ else
{
- assert(_refCounted.isInitialized, "Attempted to access an uninitialized payload.");
- return _refCounted._store._payload;
+ @property nothrow @system pure @nogc
+ ref inout(T) refCountedPayload() inout return
+ {
+ checkInit();
+ return _refCounted._store._payload;
+ }
}
}
@@ -6898,7 +6955,7 @@ assert(refCountedStore.isInitialized)).
{
// A pair of an `int` and a `size_t` - the latter being the
// reference count - will be dynamically allocated
- auto rc1 = RefCounted!int(5);
+ auto rc1 = SafeRefCounted!int(5);
assert(rc1 == 5);
// No more allocation, add just one extra reference count
auto rc2 = rc1;
@@ -6908,46 +6965,66 @@ assert(refCountedStore.isInitialized)).
// the pair will be freed when rc1 and rc2 go out of scope
}
-pure @system unittest
+// This test can't be betterC because the test extractor won't see the private
+// `initialize` method accessed here
+pure @safe nothrow @nogc unittest
{
- RefCounted!int* p;
- {
- auto rc1 = RefCounted!int(5);
- p = &rc1;
- assert(rc1 == 5);
- assert(rc1._refCounted._store._count == 1);
- auto rc2 = rc1;
- assert(rc1._refCounted._store._count == 2);
- // Reference semantics
- rc2 = 42;
- assert(rc1 == 42);
- rc2 = rc2;
- assert(rc2._refCounted._store._count == 2);
- rc1 = rc2;
- assert(rc1._refCounted._store._count == 2);
- }
- assert(p._refCounted._store == null);
+ auto rc1 = SafeRefCounted!(int, RefCountedAutoInitialize.no)(5);
+ rc1._refCounted.initialize();
+}
- // RefCounted as a member
- struct A
+pure @system unittest
+{
+ foreach (MyRefCounted; AliasSeq!(SafeRefCounted, RefCounted))
{
- RefCounted!int x;
- this(int y)
+ MyRefCounted!int* p;
{
- x._refCounted.initialize(y);
+ auto rc1 = MyRefCounted!int(5);
+ p = &rc1;
+ assert(rc1 == 5);
+ assert(rc1._refCounted._store._count == 1);
+ auto rc2 = rc1;
+ assert(rc1._refCounted._store._count == 2);
+ // Reference semantics
+ rc2 = 42;
+ assert(rc1 == 42);
+ rc2 = rc2;
+ assert(rc2._refCounted._store._count == 2);
+ rc1 = rc2;
+ assert(rc1._refCounted._store._count == 2);
}
- A copy()
+ assert(p._refCounted._store == null);
+
+ // [Safe]RefCounted as a member
+ struct A
{
- auto another = this;
- return another;
+ MyRefCounted!int x;
+ this(int y)
+ {
+ x._refCounted.initialize(y);
+ }
+ A copy()
+ {
+ auto another = this;
+ return another;
+ }
}
- }
- auto a = A(4);
- auto b = a.copy();
- assert(a.x._refCounted._store._count == 2,
- "https://issues.dlang.org/show_bug.cgi?id=4356 still unfixed");
+ auto a = A(4);
+ auto b = a.copy();
+ assert(a.x._refCounted._store._count == 2,
+ "https://issues.dlang.org/show_bug.cgi?id=4356 still unfixed");
+ }
}
+@betterC pure @safe nothrow @nogc unittest
+{
+ import std.algorithm.mutation : swap;
+
+ SafeRefCounted!int p1, p2;
+ swap(p1, p2);
+}
+
+// Same as above but for old RefCounted and not @safe
@betterC pure @system nothrow @nogc unittest
{
import std.algorithm.mutation : swap;
@@ -6968,25 +7045,52 @@ pure @system unittest
U u;
}
+ alias SRC = SafeRefCounted!S;
+}
+
+// Same as above but for old RefCounted and not @safe
+@betterC @system pure nothrow @nogc unittest
+{
+ union U {
+ size_t i;
+ void* p;
+ }
+
+ struct S {
+ U u;
+ }
+
alias SRC = RefCounted!S;
}
// https://issues.dlang.org/show_bug.cgi?id=6436
@betterC @system pure unittest
{
+ import std.meta : AliasSeq;
struct S
{
this(int rval) { assert(rval == 1); }
this(ref int lval) { assert(lval == 3); ++lval; }
}
- auto s1 = RefCounted!S(1);
- int lval = 3;
- auto s2 = RefCounted!S(lval);
- assert(lval == 4);
+ foreach (MyRefCounted; AliasSeq!(SafeRefCounted, RefCounted))
+ {
+ auto s1 = MyRefCounted!S(1);
+ int lval = 3;
+ auto s2 = MyRefCounted!S(lval);
+ assert(lval == 4);
+ }
}
// gc_addRange coverage
+@betterC @safe pure unittest
+{
+ struct S { int* p; }
+
+ auto s = SafeRefCounted!S(null);
+}
+
+// Same as above but for old RefCounted and not @safe
@betterC @system pure unittest
{
struct S { int* p; }
@@ -6996,69 +7100,253 @@ pure @system unittest
@betterC @system pure nothrow @nogc unittest
{
- RefCounted!int a;
- a = 5; //This should not assert
- assert(a == 5);
+ import std.meta : AliasSeq;
+ foreach (MyRefCounted; AliasSeq!(SafeRefCounted, RefCounted))
+ {
+ MyRefCounted!int a;
+ a = 5; //This should not assert
+ assert(a == 5);
- RefCounted!int b;
- b = a; //This should not assert either
- assert(b == 5);
+ MyRefCounted!int b;
+ b = a; //This should not assert either
+ assert(b == 5);
- RefCounted!(int*) c;
+ MyRefCounted!(int*) c;
+ }
}
// https://issues.dlang.org/show_bug.cgi?id=21638
@betterC @system pure nothrow @nogc unittest
{
+ import std.meta : AliasSeq;
static struct NoDefaultCtor
{
@disable this();
this(int x) @nogc nothrow pure { this.x = x; }
int x;
}
- auto rc = RefCounted!(NoDefaultCtor, RefCountedAutoInitialize.no)(5);
- assert(rc.x == 5);
+
+ foreach (MyRefCounted; AliasSeq!(SafeRefCounted, RefCounted))
+ {
+ auto rc = MyRefCounted!(NoDefaultCtor, RefCountedAutoInitialize.no)(5);
+ assert(rc.x == 5);
+ }
}
// https://issues.dlang.org/show_bug.cgi?id=20502
@system unittest
{
- import std.conv : to;
- // Check that string conversion is transparent for refcounted
- // structs that do not have either toString or alias this.
- static struct A { Object a; }
- auto a = A(new Object());
- auto r = refCounted(a);
- assert(to!string(r) == to!string(a));
- assert(to!string(cast(const) r) == to!string(cast(const) a));
- // Check that string conversion is still transparent for refcounted
- // structs that have alias this.
- static struct B { int b; alias b this; }
- static struct C { B b; alias b this; }
- assert(to!string(refCounted(C(B(123)))) == to!string(C(B(123))));
- // https://issues.dlang.org/show_bug.cgi?id=22093
- // Check that uninitialized refcounted structs that previously could be
- // converted to strings still can be.
- alias R = typeof(r);
- R r2;
- cast(void) (((const ref R a) => to!string(a))(r2));
- cast(void) to!string(RefCounted!(A, RefCountedAutoInitialize.no).init);
+ alias Types = AliasSeq!(SafeRefCounted, RefCounted);
+ alias funcs = AliasSeq!(safeRefCounted, refCounted);
+ static foreach (aliasI; 0 .. 2)
+ {{
+ alias MyRefCounted = Types[aliasI];
+ alias myRefCounted = funcs[aliasI];
+ import std.conv : to;
+
+ // Check that string conversion is transparent for refcounted
+ // structs that do not have either toString or alias this.
+ static struct A { Object a; }
+ auto a = A(new Object());
+ auto r = myRefCounted(a);
+ assert(to!string(r) == to!string(a));
+ assert(to!string(cast(const) r) == to!string(cast(const) a));
+ // Check that string conversion is still transparent for refcounted
+ // structs that have alias this.
+ static struct B { int b; alias b this; }
+ static struct C { B b; alias b this; }
+ assert(to!string(myRefCounted(C(B(123)))) == to!string(C(B(123))));
+ // https://issues.dlang.org/show_bug.cgi?id=22093
+ // Check that uninitialized refcounted structs that previously could be
+ // converted to strings still can be.
+ alias R = typeof(r);
+ R r2;
+ cast(void) (((const ref R a) => to!string(a))(r2));
+ cast(void) to!string(MyRefCounted!(A, RefCountedAutoInitialize.no).init);
+ }}
+}
+
+// We tried to make `refCountedPayload` `@safe` in
+// https://github.com/dlang/phobos/pull/8368 . It proved impossible, but it may
+// be possible in the future. This test checks for false `@safe` issues we
+// encountered.
+@safe unittest
+{
+ struct Container
+ {
+ int[] data;
+ }
+
+ int[] getArr1 (scope Container local)
+ {
+ // allowed because the argument is inferred as return scope.
+ return local.data;
+ }
+
+ int[] getArr2 (scope Container local)
+ {
+ SafeRefCounted!Container rc = local;
+ // Escapes a reference to expired reference counted struct
+ // don't do this!
+ return rc.refCountedPayload().data;
+ }
+
+ int destroyFirstAndUseLater()
+ {
+ auto rc = SafeRefCounted!int(123);
+ int* ptr = &rc.refCountedPayload();
+ destroy(rc);
+ return *ptr;
+ }
+
+ // This is here mainly to test that safety gets inferred correctly for the
+ // next tests
+ static assert(isSafe!getArr1);
+ // https://github.com/dlang/phobos/pull/8101#issuecomment-843017282
+ // This got apparently fixed automatically by compiler updates.
+ static assert(!isSafe!getArr2);
+ // As of writing, this is the issue that is still preventing payload access
+ // from being `@safe`
+ static assert(!isSafe!destroyFirstAndUseLater);
+}
+
+/**
+Borrows the payload of $(LREF SafeRefCounted) for use in `fun`. Inferred as `@safe`
+if `fun` is `@safe` and does not escape a reference to the payload.
+The reference count will be incremented for the duration of the operation,
+so destroying the last reference will not leave dangling references in
+`fun`.
+
+Params:
+ fun = A callable accepting the payload either by value or by reference.
+ refCount = The counted reference to the payload.
+Returns:
+ The return value of `fun`, if any. `ref` in the return value will be
+ forwarded.
+Issues:
+ For yet unknown reason, code that uses this function with UFCS syntax
+ will not be inferred as `@safe`. It will still compile if the code is
+ explicitly marked `@safe` and nothing in `fun` prevents that.
+*/
+template borrow(alias fun)
+{
+ import std.functional : unaryFun;
+
+ auto ref borrow(RC)(RC refCount) if
+ (
+ isInstanceOf!(SafeRefCounted, RC)
+ && is(typeof(unaryFun!fun(refCount.refCountedPayload)))
+ )
+ {
+ refCount.checkInit();
+
+ // If `fun` escapes a reference to the payload, it will be inferred
+ // as unsafe due to the scope storage class here.
+ scope plPtr = &refCount._refCounted._store._payload;
+ return unaryFun!fun(*plPtr);
+
+ // We destroy our copy of the reference here, automatically destroying
+ // the payload if `fun` destroyed the last reference outside.
+ }
+}
+
+/// This example can be marked `@safe` with `-preview=dip1000`.
+@safe pure nothrow unittest
+{
+ auto rcInt = safeRefCounted(5);
+ assert(rcInt.borrow!(theInt => theInt) == 5);
+ auto sameInt = rcInt;
+ assert(sameInt.borrow!"a" == 5);
+
+ // using `ref` in the function
+ auto arr = [0, 1, 2, 3, 4, 5, 6];
+ sameInt.borrow!(ref (x) => arr[x]) = 10;
+ assert(arr == [0, 1, 2, 3, 4, 10, 6]);
+
+ // modifying the payload via an alias
+ sameInt.borrow!"a*=2";
+ assert(rcInt.borrow!"a" == 10);
+}
+
+// Some memory safety penetration testing.
+@system unittest
+{
+ int* globalPtr;
+ int torpedoesFired = 0;
+ struct Destroyer { ~this() @safe { torpedoesFired++; } }
+
+ alias RcInt = typeof(safeRefCounted(0));
+ auto standardUsage(RcInt arg)
+ {
+ return borrow!((ref x) => x)(arg);
+ }
+ ref harmlessRefReturn(RcInt arg)
+ {
+ return borrow!(ref (ref x) => *globalPtr = x)(arg);
+ }
+ ref problematicRefReturn(RcInt arg)
+ {
+ return borrow!(ref (ref x) => x)(arg);
+ }
+ auto sideChannelEscape(RcInt arg)
+ {
+ return borrow!((ref x)
+ {
+ globalPtr = &x;
+ return x;
+ })(arg);
+ }
+ auto destroyDuringApply()
+ {
+ auto rc = safeRefCounted(Destroyer());
+ return borrow!((ref x)
+ {
+ // Destroys the last reference to the payload, decrementing it's
+ // reference count.
+ rc.__dtor();
+ // Destroy again! rc should be set to it's init value so that this
+ // won't decrement the reference count of the original payload.
+ rc.__dtor();
+ // The internal reference count increment done for duration of
+ // `apply` should make sure that the payload destructor is not yet
+ // run, and this value thus not incremented.
+ return torpedoesFired;
+ })(rc);
+ }
+
+ // First, let's verify the dangerous functions really do what they are
+ // supposed to do.
+ auto testRc = safeRefCounted(42);
+ assert(sideChannelEscape(testRc) == 42);
+ assert(&problematicRefReturn(testRc) == globalPtr);
+
+ // Now, are the @safe attributes inferred correctly?
+ assert(isSafe!standardUsage);
+ assert(isSafe!harmlessRefReturn);
+ assert(!isSafe!problematicRefReturn);
+ assert(!isSafe!sideChannelEscape);
+ assert(isSafe!destroyDuringApply);
+
+ // Finally, we test protection against early destruction during `apply`.
+ auto torpedoesUpToReturn = destroyDuringApply();
+ assert(torpedoesFired == torpedoesUpToReturn + 1);
}
/**
- * Initializes a `RefCounted` with `val`. The template parameter
- * `T` of `RefCounted` is inferred from `val`.
+ * Initializes a `SafeRefCounted` with `val`. The template parameter
+ * `T` of `SafeRefCounted` is inferred from `val`.
* This function can be used to move non-copyable values to the heap.
- * It also disables the `autoInit` option of `RefCounted`.
+ * It also disables the `autoInit` option of `SafeRefCounted`.
*
* Params:
* val = The value to be reference counted
* Returns:
- * An initialized `RefCounted` containing `val`.
+ * An initialized `SafeRefCounted` containing `val`.
* See_Also:
+ * $(LREF refCounted)
* $(HTTP en.cppreference.com/w/cpp/memory/shared_ptr/make_shared, C++'s make_shared)
*/
-RefCounted!(T, RefCountedAutoInitialize.no) refCounted(T)(T val)
+SafeRefCounted!(T, RefCountedAutoInitialize.no) safeRefCounted(T)(T val)
{
typeof(return) res;
res._refCounted.move(val);
@@ -7083,13 +7371,13 @@ RefCounted!(T, RefCountedAutoInitialize.no) refCounted(T)(T val)
assert(File.nDestroyed == 0);
- // make the file refcounted to share ownership
+ // make the file ref counted to share ownership
// Note:
- // We write a compound statement (brace-delimited scope) in which all `RefCounted!File` handles are created and deleted.
+ // We write a compound statement (brace-delimited scope) in which all `SafeRefCounted!File` handles are created and deleted.
// This allows us to see (after the scope) what happens after all handles have been destroyed.
{
// We move the content of `file` to a separate (and heap-allocated) `File` object,
- // managed-and-accessed via one-or-multiple (initially: one) `RefCounted!File` objects ("handles").
+ // managed-and-accessed via one-or-multiple (initially: one) `SafeRefCounted!File` objects ("handles").
// This "moving":
// (1) invokes `file`'s destructor (=> `File.nDestroyed` is incremented from 0 to 1 and `file.name` becomes `null`);
// (2) overwrites `file` with `File.init` (=> `file.name` becomes `null`).
@@ -7097,18 +7385,18 @@ RefCounted!(T, RefCountedAutoInitialize.no) refCounted(T)(T val)
// but please note that (2) is only performed if `File` defines a destructor (or post-blit operator),
// and in the absence of the `nDestroyed` instrumentation there would have been no reason to define a destructor.
import std.algorithm.mutation : move;
- auto rcFile = refCounted(move(file));
+ auto rcFile = safeRefCounted(move(file));
assert(rcFile.name == "name");
assert(File.nDestroyed == 1);
assert(file.name == null);
- // We create another `RefCounted!File` handle to the same separate `File` object.
+ // We create another `SafeRefCounted!File` handle to the same separate `File` object.
// While any of the handles is still alive, the `File` object is kept alive (=> `File.nDestroyed` is not modified).
auto rcFile2 = rcFile;
assert(rcFile.refCountedStore.refCount == 2);
assert(File.nDestroyed == 1);
}
- // The separate `File` object is deleted when the last `RefCounted!File` handle is destroyed
+ // The separate `File` object is deleted when the last `SafeRefCounted!File` handle is destroyed
// (i.e. at the closing brace of the compound statement above, which destroys both handles: `rcFile` and `rcFile2`)
// (=> `File.nDestroyed` is incremented again, from 1 to 2):
assert(File.nDestroyed == 2);
@@ -9823,3 +10111,265 @@ unittest
Nullable!S s2 = s1;
assert(s2.get().b == 3);
}
+
+/// The old version of $(LREF SafeRefCounted), before $(LREF borrow) existed.
+/// Old code may be relying on `@safe`ty of some of the member functions which
+/// cannot be safe in the new scheme, and
+/// can avoid breakage by continuing to use this. `SafeRefCounted` should be
+/// preferred, as this type is outdated and unrecommended for new code.
+struct RefCounted(T, RefCountedAutoInitialize autoInit =
+ RefCountedAutoInitialize.yes)
+{
+ version (D_BetterC)
+ {
+ private enum enableGCScan = false;
+ }
+ else
+ {
+ private enum enableGCScan = hasIndirections!T;
+ }
+
+ extern(C) private pure nothrow @nogc static
+ {
+ pragma(mangle, "free") void pureFree( void *ptr );
+ static if (enableGCScan)
+ import core.memory : GC;
+ }
+
+ struct RefCountedStore
+ {
+ private struct Impl
+ {
+ T _payload;
+ size_t _count;
+ }
+
+ private Impl* _store;
+
+ private void initialize(A...)(auto ref A args)
+ {
+ import core.lifetime : emplace, forward;
+
+ allocateStore();
+ version (D_Exceptions) scope(failure) deallocateStore();
+ emplace(&_store._payload, forward!args);
+ _store._count = 1;
+ }
+
+ private void move(ref T source) nothrow pure
+ {
+ import std.algorithm.mutation : moveEmplace;
+
+ allocateStore();
+ moveEmplace(source, _store._payload);
+ _store._count = 1;
+ }
+
+ // 'nothrow': can only generate an Error
+ private void allocateStore() nothrow pure
+ {
+ static if (enableGCScan)
+ {
+ import std.internal.memory : enforceCalloc;
+ _store = cast(Impl*) enforceCalloc(1, Impl.sizeof);
+ GC.addRange(&_store._payload, T.sizeof);
+ }
+ else
+ {
+ import std.internal.memory : enforceMalloc;
+ _store = cast(Impl*) enforceMalloc(Impl.sizeof);
+ }
+ }
+
+ private void deallocateStore() nothrow pure
+ {
+ static if (enableGCScan)
+ {
+ GC.removeRange(&this._store._payload);
+ }
+ pureFree(_store);
+ _store = null;
+ }
+
+ @property nothrow @safe pure @nogc
+ bool isInitialized() const
+ {
+ return _store !is null;
+ }
+
+ @property nothrow @safe pure @nogc
+ size_t refCount() const
+ {
+ return isInitialized ? _store._count : 0;
+ }
+
+ void ensureInitialized()()
+ {
+ // By checking for `@disable this()` and failing early we can
+ // produce a clearer error message.
+ static assert(__traits(compiles, { static T t; }),
+ "Cannot automatically initialize `" ~ fullyQualifiedName!T ~
+ "` because `" ~ fullyQualifiedName!T ~
+ ".this()` is annotated with `@disable`.");
+ if (!isInitialized) initialize();
+ }
+
+ }
+ RefCountedStore _refCounted;
+
+ @property nothrow @safe
+ ref inout(RefCountedStore) refCountedStore() inout
+ {
+ return _refCounted;
+ }
+
+ this(A...)(auto ref A args) if (A.length > 0)
+ out
+ {
+ assert(refCountedStore.isInitialized);
+ }
+ do
+ {
+ import core.lifetime : forward;
+ _refCounted.initialize(forward!args);
+ }
+
+ this(T val)
+ {
+ _refCounted.move(val);
+ }
+
+ this(this) @safe pure nothrow @nogc
+ {
+ if (!_refCounted.isInitialized) return;
+ ++_refCounted._store._count;
+ }
+
+ ~this()
+ {
+ if (!_refCounted.isInitialized) return;
+ assert(_refCounted._store._count > 0);
+ if (--_refCounted._store._count)
+ return;
+ // Done, destroy and deallocate
+ .destroy(_refCounted._store._payload);
+ _refCounted.deallocateStore();
+ }
+
+ void opAssign(typeof(this) rhs)
+ {
+ import std.algorithm.mutation : swap;
+
+ swap(_refCounted._store, rhs._refCounted._store);
+ }
+
+ void opAssign(T rhs)
+ {
+ import std.algorithm.mutation : move;
+
+ static if (autoInit == RefCountedAutoInitialize.yes)
+ {
+ _refCounted.ensureInitialized();
+ }
+ else
+ {
+ assert(_refCounted.isInitialized);
+ }
+ move(rhs, _refCounted._store._payload);
+ }
+
+ static if (autoInit == RefCountedAutoInitialize.yes)
+ {
+ //Can't use inout here because of potential mutation
+ @property
+ ref T refCountedPayload() return
+ {
+ _refCounted.ensureInitialized();
+ return _refCounted._store._payload;
+ }
+ }
+
+ @property nothrow @safe pure @nogc
+ ref inout(T) refCountedPayload() inout return
+ {
+ assert(_refCounted.isInitialized, "Attempted to access an uninitialized payload.");
+ return _refCounted._store._payload;
+ }
+
+ alias refCountedPayload this;
+
+ static if (is(T == struct) && !is(typeof((ref T t) => t.toString())))
+ {
+ string toString(this This)()
+ {
+ import std.conv : to;
+
+ static if (autoInit)
+ return to!string(refCountedPayload);
+ else
+ {
+ if (!_refCounted.isInitialized)
+ return This.stringof ~ "(RefCountedStore(null))";
+ else
+ return to!string(_refCounted._store._payload);
+ }
+ }
+ }
+}
+
+///
+@betterC pure @system nothrow @nogc unittest
+{
+ auto rc1 = RefCounted!int(5);
+ assert(rc1 == 5);
+ auto rc2 = rc1;
+ rc2 = 42;
+ assert(rc1 == 42);
+}
+
+// More unit tests below SafeRefCounted
+
+/**
+ * Like $(LREF safeRefCounted) but used to initialize $(LREF RefCounted)
+ * instead. Intended for backwards compatibility, otherwise it is preferable
+ * to use `safeRefCounted`.
+ */
+RefCounted!(T, RefCountedAutoInitialize.no) refCounted(T)(T val)
+{
+ typeof(return) res;
+ res._refCounted.move(val);
+ return res;
+}
+
+///
+@system unittest
+{
+ static struct File
+ {
+ static size_t nDestroyed;
+ string name;
+ @disable this(this); // not copyable
+ ~this() { name = null; ++nDestroyed; }
+ }
+
+ auto file = File("name");
+ assert(file.name == "name");
+ static assert(!__traits(compiles, {auto file2 = file;}));
+ assert(File.nDestroyed == 0);
+
+ {
+ import std.algorithm.mutation : move;
+ auto rcFile = refCounted(move(file));
+ assert(rcFile.name == "name");
+ assert(File.nDestroyed == 1);
+ assert(file.name == null);
+
+ auto rcFile2 = rcFile;
+ assert(rcFile.refCountedStore.refCount == 2);
+ assert(File.nDestroyed == 1);
+ }
+
+ assert(File.nDestroyed == 2);
+}
+
+// More unit tests below safeRefCounted
diff --git a/libphobos/src/std/uni/package.d b/libphobos/src/std/uni/package.d
index 8a032aa..81b949e 100644
--- a/libphobos/src/std/uni/package.d
+++ b/libphobos/src/std/uni/package.d
@@ -10193,16 +10193,7 @@ bool isAlpha(dchar c)
// optimization
if (c < 0xAA)
{
- size_t x = c - 'A';
- if (x <= 'Z' - 'A')
- return true;
- else
- {
- x = c - 'a';
- if (x <= 'z'-'a')
- return true;
- }
- return false;
+ return ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z');
}
return alphaTrie[c];