Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REG2.069] Issue 15296 - cannot inline simple function that calls use non-inlinable statements #5277

Merged
merged 1 commit into from Nov 21, 2015

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Nov 20, 2015

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
15296 [REG2.069] cannot inline simple function that calls use non-inlinable statements

@9rnsr 9rnsr force-pushed the fix15296 branch 2 times, most recently from 4e6a915 to d167f32 Compare November 20, 2015 09:00
{
CallExp ce = cast(CallExp)s.exp;
if (ce.e1.op == TOKvar) // workaround for Bugzilla 15296
visitCallExp(ce, null, true);
Copy link
Member

Choose a reason for hiding this comment

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

How does restricting the inlining to a specific case help to fix an issue where something is not inlined?
Also visitCallExp already handles TOKvar as first branch (see here).
The comment isn't useful either b/c the bugzilla page doesn't contain any information other than the bug report. Please don't introduce obscure special cases w/o any explanation at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I added more detailed comment.

As I wrote, the essential problem is a inlineScan call in a few lines before. First I tried to fix it, but it was not possible quickly.

…linable statements

Add workaround to do inlining same with the old code.
MartinNowak added a commit that referenced this pull request Nov 21, 2015
[REG2.069] Issue 15296 - cannot inline simple function that calls use non-inlinable statements
@MartinNowak MartinNowak merged commit 6a407df into dlang:stable Nov 21, 2015
@9rnsr 9rnsr deleted the fix15296 branch November 21, 2015 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants