This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Merge remote-tracking branch 'upstream/master' into merge_master#1796
Merged
MartinNowak merged 136 commits intodlang:stablefrom Mar 22, 2017
Merged
Merge remote-tracking branch 'upstream/master' into merge_master#1796MartinNowak merged 136 commits intodlang:stablefrom
MartinNowak merged 136 commits intodlang:stablefrom
Conversation
This adds core.sys.linux.file module which contains flock function definition and values of the parameters to pass.
Implementing them (wrongly btw, ignoring the msg) leads to an implicit call to the `super` ctor of base class `core.stdcpp.exception.std.exception`, which is only declared in D. Even if the ctor signature was correct (see below), it's mangled differently (see dlang/dmd#5884), so there'd be an unresolved external anyway. So don't implement it, just declare it (also done for Glibc) to defer the linking error. Quality-wise, the 2 `core.stdcpp` modules are at most at an alpha stage for MSVCRT. Other issues I've noted so far using **VS 2015**: * The signature of the `core.stdcpp.exception.std.exception.this()` ctor is wrong. There's no default, i.e., parameter-less one, only `std::exception::exception(const char *_Message = "unknown", int x=1)`. * `std::exception` only contains a pointer, no additional `bool` field. * The signature of `core.stdcpp.typeinfo.std.type_info.name()` is wrong. It doesn't take any arguments. The first 2 aren't crucial, as these C++ exceptions are most likely never constructed on the D side. But the last one will need to be fixed. @rainers: Which VS versions does DMD currently support?
This commit adds attributes to those functions in `core.thread` that don't require changes outside of the module. Not much of this has profound effect to the users but makes adding a templated `Thread`/`Fiber` classes on the user's callback much easier later on, which should help address the need for `@nogc` and `nothrow` threading primitives.
This commit fixes `Thread.~this()`, `thread_attachThis`
and partially `thread_entryPoint` and `thread_attachByAddrB`.
`thread_entryPoint` can't be made `@nogc` because it calls
`Thread.run`, `rt_moduleTlsCtor` and `rt_moduleTlsDtor`,
which can execute arbitrary user code.
`thread_attachByAddrB` can't be made `@nogc` because
it calls `thread_findByAddr`, which calls `Thread.opApply`,
which can't be `@nogc` because it calls a non-`@nogc`
delegate.
This change is a bit large because many call-sites needed
to be fixed in one go:
* On posix, `thread_entryPoint` calls `inheritLoadedLibraries`
and `cleanupLoadedLibraries`, and `Thread.start` calls
`rt.sections.pinLoadedLibraries` and `unpinLoadedLibraries`.
* `Thread.~this()` calls `rt.tlsgc.destroy`, which in turn
calls `rt.sections.finiTLSRanges`, which is implemented
in `rt.secions_{platform}`.
* Similarly, `thread_attachThis` calls `rt.tlsgc.init`, which in
turn calls `rt.sections.initTLSRanges`, which is implemented
in `rt.secions_{platform}`. On some platforms
`rt.sections.initTLSRanges` calls `rt.minfo.ModuleGroup.this`,
so I made it `nothrow` and `@nogc` too.
* Additionally, `rt.sections.initSections` and `finiSections` were
easy to fix, so I added appropriate attributes to them, even
though they are called only from `rt.dmain2.rt_init`.
Finally, some function from `rt.sections_elf_shared` was accessing
`ModuleInfo.name` which wasn't marked as `@nogc`, so I went
through `object.ModuleInfo` and made all of its members
`@nogc` (they were already `nothrow`).
This commit adds attributes to Fiber.callImpl.
The call chain looks like this:
-> core.thread.Fiber.callImpl
-> core.Fiber.switchIn
-> core.Thread.pushContext/core.Thread.popContext
-> core.thread.swapContext
-> depending on the platform:
-> rt.deh_win32/deh_win64_posix._d_eh_swapContext (On Windows and sometimes on Posix)
-> rt.dwarfeh._d_eh_swapContextDwarf (on Posix)
[MSVCRT] core.stdcpp.typeinfo: Don't implement exception ctors
Workaround Issue 17081 - Bodies in extern cpp functions in D files are not linked
Merge remote-tracking branch 'upstream/stable' into merge_stable
compile with -dip1000
Add linux-specific `core.sys.linux.file` module
Always use same-type pointers when subtracting them
Merge remote-tracking branch 'upstream/stable' into merge_stable merged-on-behalf-of: Martin Nowak <code@dawg.eu>
Additionally add `shared` overloads to: + core.sys.windows.winbase: * EnterCriticalSection * LeaveCriticalSection * TryEnterCriticalSection + core.sys.posix.pthread: * pthread_mutex_lock * pthread_mutex_unlock * pthread_mutex_trylock Also add `tryLock_nothrow` version of `Mutex.tryLock`.
* Also make the error messages more descriptive
One more pass through __cmp
We already have the type with Args[i], so there's no need to ask args[i] for its type.
- to avoid executor startvation, see dlang/ci#30
run pipeline outside of node block
[trivial] Small code simplification in core.time.
Remove dmd.conf target from CircleCi
fix Jenkinsfile
NetBSD path merged-on-behalf-of: David Nadlinger <code@klickverbot.at>
Add missing function to iconv. merged-on-behalf-of: Martin Nowak <code@dawg.eu>
netbsd patch: core/sys/posix merged-on-behalf-of: David Nadlinger <code@klickverbot.at>
_equals druntime template for structs merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
Fix issue 8411 - add opCast!bool support for Duration.
Remove a catch of Throwable in object.d merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.