Skip to content

Reduce the number of arguments to fail/fail_bounds_check/begin_unwind #15792

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

Closed
pcwalton opened this issue Jul 18, 2014 · 2 comments · Fixed by #17602
Closed

Reduce the number of arguments to fail/fail_bounds_check/begin_unwind #15792

pcwalton opened this issue Jul 18, 2014 · 2 comments · Fixed by #17602
Labels
A-codegen Area: Code generation A-diagnostics Area: Messages for errors, warnings, and lints C-cleanup Category: PRs that clean code up or issues documenting cleanup. I-compiletime Issue: Problems and improvements with respect to compile times. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@pcwalton
Copy link
Contributor

These appear all the time and result in large code bloat. At least the file and line should be combined into a FailDescriptor static.

@pcwalton
Copy link
Contributor Author

Also, fail!() and fail!("static string") result in inefficient codegen and code bloat because they call into the string formatter when they don't need to.

@dotdash
Copy link
Contributor

dotdash commented Aug 17, 2014

This seems to be done for std. The macro in core still uses the string formatter for all invocations, but I don't even know how to use those.

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-diagnostics Area: Messages for errors, warnings, and lints C-cleanup Category: PRs that clean code up or issues documenting cleanup. I-compiletime Issue: Problems and improvements with respect to compile times. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants