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

Convert upcalls to core Rust functions #2861

Closed
brson opened this issue Jul 10, 2012 · 6 comments
Closed

Convert upcalls to core Rust functions #2861

brson opened this issue Jul 10, 2012 · 6 comments
Labels
A-codegen Area: Code generation A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@brson
Copy link
Contributor

brson commented Jul 10, 2012

The main motivation is that the new failure code is written in Rust so calling it directly makes more sense than indirecting through native runtime code.

This also lets us to have fewer stack-switching mechanisms as upcalls are dealt with differently than other foreign functions.

@brson
Copy link
Contributor Author

brson commented Jul 10, 2012

Probably upcall_call_on_c_stack/call_on_rust_stack needs to remain a native function, same for upcall_new_stack/del_stack (which are not called by generated code but my __morestack).

@brson
Copy link
Contributor Author

brson commented Jul 10, 2012

Actually, upcall_call_on_x_stack should be fine as a rust functions. it should just be the upcalls called by __morestack that need to be special.

@elliottslaughter
Copy link
Contributor

This has been (partially) completed for fail in de82a9b and malloc/free in d257382. The current implementation is a very thin wrapper around the C runtime, but in the future it should be possible to move more functionality over to rust.

elliottslaughter pushed a commit to elliottslaughter/rust that referenced this issue Jul 24, 2012
We can't throw an exception from inside a landing pad without
corrupting the exception handler, so we have no hope of dealing with
these exceptions anyway. See:

http://llvm.org/docs/ExceptionHandling.html#cleanups

Part of rust-lang#2861.
@graydon
Copy link
Contributor

graydon commented Jun 6, 2013

Agree, properly tagged and milestoned as of 2013-06-05.

@emberian
Copy link
Member

emberian commented Aug 5, 2013

@brson is this still relevant?

@brson
Copy link
Contributor Author

brson commented Oct 10, 2013

@cmr Pretty much obsolete.

@brson brson closed this as completed Oct 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

4 participants