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.0-rc1] Issue 15253 - inliner prevent compilation #5241

Closed
wants to merge 1 commit into from

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Oct 30, 2015

https://issues.dlang.org/show_bug.cgi?id=15253

Setting again flag in expandInline is just wrong. From the reduced case, if a function that has a delegate parameter contains recursive call, inliner will go into infinite scanning loop.

OTOH, the "repeated scanning" idea to see more inline possibility is still good. So I think we don't have to remove the loop in InlineScanVisitor.visit(FuncDeclaration fd) and InlineScanVisitor.again field. After this change they will become unused, but may be reused in future changes.

Setting `again` flag in `expandInline` is just wrong. From the reduced
case, if a function that has a delegate parameter contains recursive call,
inliner will go into infinite scanning loop.

OTOH, the "repeated scanning" idea to see more inline possibility is still good.
So I think we don't have to remove the loop in `InlineScanVisitor.visit(FuncDeclaration fd)` and
`InlineScanVisitor.again` field. After this change they will become unused,
but may be reused in future changes.
@9rnsr
Copy link
Contributor Author

9rnsr commented Oct 30, 2015

See also my comments in #5117:
#5117 (comment)
#5117 (comment)

@WalterBright
Copy link
Member

This is the wrong fix - it fixes it by breaking the improvements I'd added earlier (inlining delegate calls). I need to think of how to fix it by not doing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants