Issue 4360 - Allow intrinsics in core.bitop to operate as intrinsics#4
Closed
complexmath wants to merge 2 commits intodlang:masterfrom
complexmath:master
Closed
Issue 4360 - Allow intrinsics in core.bitop to operate as intrinsics#4complexmath wants to merge 2 commits intodlang:masterfrom complexmath:master
complexmath wants to merge 2 commits intodlang:masterfrom
complexmath:master
Conversation
Contributor
Author
|
If this pull request is accepted, the following druntime pull request should be accepted as well: |
Member
|
looks like your source tree is in an odd state. This wasn't a small diff, it was a file add. I'm in favor of it. imho, the entire compiler interface belongs in druntime, and this is clearly part of that interface. Included in what I think should move is the std.math intrinsics. |
…rinsics" This reverts commit 6882834.
Contributor
Author
|
The pull should happen from my branch issue-4360 instead. That is in the correct state. |
braddr
pushed a commit
to braddr/dmd
that referenced
this pull request
Sep 15, 2011
MartinNowak
pushed a commit
to MartinNowak/dmd
that referenced
this pull request
Feb 15, 2017
Revert "Merge pull request #2 from MartinNowak/test-pr-2"
thewilsonator
added a commit
to thewilsonator/dmd
that referenced
this pull request
Sep 22, 2022
The test checks the stack frame of `_Dmain` is in the backtrace, however if unused locals are optimised out and`test` is inlined into `main`
```d
void test()
{
int innerLocal = 20;
throw new Exception("foo");
}
void main(string[] args)
{
string myLocal = "bar";
test();
}
```
then the point at which the untapped exception is thrown is at the start of D main - not somewhere in the middle of it - and so GDB prints
```
...
dlang#4 D main (args=...)
```
rather than
```
...
dlang#4 0xSOMEADDRESS in D main (args=...)
```
thewilsonator
added a commit
to thewilsonator/dmd
that referenced
this pull request
Nov 2, 2022
The test checks the stack frame of `_Dmain` is in the backtrace, however if unused locals are optimised out and`test` is inlined into `main`
```d
void test()
{
int innerLocal = 20;
throw new Exception("foo");
}
void main(string[] args)
{
string myLocal = "bar";
test();
}
```
then the point at which the untapped exception is thrown is at the start of D main - not somewhere in the middle of it - and so GDB prints
```
...
dlang#4 D main (args=...)
```
rather than
```
...
dlang#4 0xSOMEADDRESS in D main (args=...)
```
dlang-bot
pushed a commit
that referenced
this pull request
Nov 2, 2022
The test checks the stack frame of `_Dmain` is in the backtrace, however if unused locals are optimised out and`test` is inlined into `main`
```d
void test()
{
int innerLocal = 20;
throw new Exception("foo");
}
void main(string[] args)
{
string myLocal = "bar";
test();
}
```
then the point at which the untapped exception is thrown is at the start of D main - not somewhere in the middle of it - and so GDB prints
```
...
#4 D main (args=...)
```
rather than
```
...
#4 0xSOMEADDRESS in D main (args=...)
```
deadalnix
pushed a commit
to deadalnix/dmd
that referenced
this pull request
Sep 2, 2024
__sd_run_finalizer => __sd_gc_finalize
gorsing
referenced
this pull request
in gorsing/dmd
Jul 14, 2025
# This is the 1st commit message: refactoring # This is the commit message #2: refactoring # This is the commit message #3: refactoring # This is the commit message #4: refactoring # This is the commit message #5: refactoring # This is the commit message #6: refactoring # This is the commit message #7: refactoring # This is the commit message #8: refactor/irstate-attrs refactoring add pragma(inline, true) change pragma(inline, true) -> pragma(inline, false) introduce root.Array.only and test it out in expressionsem (dlang#21520) [attrib.d] remove unused semantic import [dstruct.d] remove unused import [aggregate.d] move `searchCtor` to `expressionsem.d` remove some now unused semantic symbols from the import list. [cond.d] remove unused `typesem` import (dlang#21538) [expression.d] restrict `typesem` import fix dlang#19587 No debug line info for simple code blocks (dlang#21544) set location info on return statement, not only on return expression [dsymbol.d] remove dependance on glue layer (dlang#21532) move `loadModuleFromLibrary` to `dsymbolsem.d` (dlang#21535) remove `dmodule.d` dependance of a few more `dsymbolsem.d` symbols. [func.d] remove dependance on glue layer (dlang#21534) [aggregate.d] move `checkOverlappedFields` to `dsymbolsem.d` (dlang#21542) and make private Templatize `_adEq2` (dlang#21513) * Mark array literals as `on-stack` to bypass `@nogc` analysis * Update `fail_compilation` test output After updating the memcmp-ability criteria, now dynamic array can also be compared using `memcmp` if their element type is comparable bit by bit. refactor: use new array constructor throughout expressionsem refactoring refactoring refactoring refactoring refactoring refactoring refactoring refactoring refactoring
ibuclaw
added a commit
to ibuclaw/dmd
that referenced
this pull request
Sep 11, 2025
Limit the number of platforms that this is done on. A inspection of some libc implementations of fork has identified the main culprits, don't need to apply this to any others. MacOS testsuite also regressed as a result on calling this code, it's not clear why, but the backtrace is: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00007ff81abe6ee3 libsystem_platform.dylib`_os_unfair_lock_recursive_abort + 23 frame #1: 0x00007ff81abe12da libsystem_platform.dylib`_os_unfair_lock_lock_slow + 247 frame #2: 0x00007ff81abccd44 libsystem_pthread.dylib`_pthread_atfork_prepare_handlers + 48 frame dlang#3: 0x00007ff825dc2705 libSystem.B.dylib`libSystem_atfork_prepare + 25 frame dlang#4: 0x00007ff81aac17e1 libsystem_c.dylib`fork + 24 frame dlang#5: 0x0000000101f730ee test_runner`core.internal.backtrace.dwarf.resolveAddressesWithAtos(Location[]) + 210 ```
thewilsonator
pushed a commit
that referenced
this pull request
Sep 11, 2025
Limit the number of platforms that this is done on. A inspection of some libc implementations of fork has identified the main culprits, don't need to apply this to any others. MacOS testsuite also regressed as a result on calling this code, it's not clear why, but the backtrace is: ``` * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) * frame #0: 0x00007ff81abe6ee3 libsystem_platform.dylib`_os_unfair_lock_recursive_abort + 23 frame #1: 0x00007ff81abe12da libsystem_platform.dylib`_os_unfair_lock_lock_slow + 247 frame #2: 0x00007ff81abccd44 libsystem_pthread.dylib`_pthread_atfork_prepare_handlers + 48 frame #3: 0x00007ff825dc2705 libSystem.B.dylib`libSystem_atfork_prepare + 25 frame #4: 0x00007ff81aac17e1 libsystem_c.dylib`fork + 24 frame #5: 0x0000000101f730ee test_runner`core.internal.backtrace.dwarf.resolveAddressesWithAtos(Location[]) + 210 ```
This pull request was closed.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
druntime currently has to include std.intrinsic so its modules can use intrinsic operations, but the routines are exposed via core.bitop. DMD should recognize core.bitop.bsr as an alias for std.intrinsic.bsr, etc.
http://d.puremagic.com/issues/show_bug.cgi?id=4360