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

Compile-time static stack size #4389

Closed
nwmcsween opened this issue Jan 9, 2013 · 7 comments
Closed

Compile-time static stack size #4389

nwmcsween opened this issue Jan 9, 2013 · 7 comments
Labels
A-codegen Area: Code generation E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.

Comments

@nwmcsween
Copy link

This is a possible idea to implement #3608 by static analysis of stack usage to create a statically sized stack depth at compile-time.

@bblum
Copy link
Contributor

bblum commented Jan 11, 2013

This could be done on its own, but I think it could also be an elegant sub-feature of a polymorphic effect system.

@emberian
Copy link
Member

emberian commented Jul 7, 2013

Still relevant

@pnkfelix
Copy link
Member

visiting for triage, email from 2013-08-26

switching from I-enhancement to I-wishlist.

(My personal thinking is that: 1. we are unlikely to get a polymorphic effect system in, at least not anytime soon, certainly not for rust 1.0, and 2. maybe one could implement this as a standalone tool for a subset of the language; but I have not really fleshed out much of my thinking about the latter.)

@nwmcsween
Copy link
Author

On Friday, August 30, 2013 3:13:15 AM, Felix S Klock II wrote:

visiting for triage, email from 2013-08-26

switching from |I-enhancement| to |I-wishlist|.

(My personal thinking is that: 1. we are unlikely to get a polymorphic
effect system in, at least not anytime soon, certainly not for rust
1.0, and 2. maybe one could implement this as a standalone tool for a
subset of the language; but I have not really fleshed out much of my
thinking about the latter.)


Reply to this email directly or view it on GitHub
#4389 (comment).

The reason this is an issue is rust currently relies on gcc / glibc
"split stacks" which 1. Is specific to glibc / gcc and 2. Is signal
unsafe.

@thestinger
Copy link
Contributor

There's no dependency on glibc or gcc for split stacks, since it's implemented by LLVM and it just calls our __morestack implementation. Signals can be dealt with by using sigaltstack.

@emberian
Copy link
Member

@thestinger
Copy link
Contributor

While this is an interesting prospect, it's not going to permit using recursion, function pointers, trait objects or closures. I'm not really sure the remaining language could still be considered as Rust. A specific proposal would need to be made through the RFC process, as this feature request isn't actionable without consensus on a design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.
Projects
None yet
Development

No branches or pull requests

5 participants