Skip to content

betterC: add nothrow RAII for destructors in expressions#7304

Merged
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:betterC-nothrow
Nov 15, 2017
Merged

betterC: add nothrow RAII for destructors in expressions#7304
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:betterC-nothrow

Conversation

@WalterBright
Copy link
Member

This is a start on adding RAII support for -betterC by doing it the old-fashioned way - assume a nothrow environment. It's the way C++ worked before exceptions were added to the language.

Adding this support for statement level RAII comes later.

This also suggests a significant optimization for regular D if nothrow is tracked at the statement level rather than at the function level.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Copy link
Member

@andralex andralex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's get back to improving this real soon thx

* the best we can do.
* Nothrow needs to be tracked at the Statement level.
*/
return global.params.betterC;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dis kinda sux

@dlang-bot dlang-bot merged commit eeb7fd1 into dlang:master Nov 15, 2017
@WalterBright WalterBright deleted the betterC-nothrow branch November 15, 2017 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants