-
-
Notifications
You must be signed in to change notification settings - Fork 413
Do not call throwable's ctor from _d_newThrowable
#3823
Conversation
|
Thanks for your pull request and interest in making D better, @teodutu! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3823" |
200ab65 to
af45f6f
Compare
|
So, essentially, you are just allocating the exception and leaving it up to the compiler to call the constructor? This looks good to me. |
dkorpel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment still says "and call its constructor" and "It has the same interface as `rt.lifetime._d_newclass()"
|
How is this not breaking the test suite, doesn't current DMD before dlang/dmd#13494 depend on the constructor being called in the hook? |
There's only 1 runnable test in dmd and it doesn't verify any of the fields of the exception instance. It simply checks that the reference count is correct. |
How about buildkite? Surely there's some code in there that expects the constructor of Exceptions being actually called? |
|
-dip1008 is actually pretty unusable. I wouldn't be surprised if it wasn't used that much. Anyway, the dmd PR should get in shortly, so I wouldn't stress too much about it. |
Ah, so |
|
@teodutu could you update the function description so that we can merge this? |
a856964 to
344d4e7
Compare
|
@RazvanN7 done |
Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
344d4e7 to
90dfff7
Compare
dlang/dmd#13494 is blocked because it attempted to lower
new Exception(args)to_d_newThrowable!Exception(args)and have_d_newThrowablecallException's ctor. This created a few errors due to howforward!argsworks with -dip1008.Until -dip1008 is fixed, this PR removes the call to
Exception's ctor from_d_newThrowable, leaving this task to the compiler.