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

Allocate exception/its info lazily #21

Open
pfalcon opened this issue Dec 9, 2018 · 1 comment
Open

Allocate exception/its info lazily #21

pfalcon opened this issue Dec 9, 2018 · 1 comment

Comments

@pfalcon
Copy link
Owner

pfalcon commented Dec 9, 2018

Currently, uPy allocates exception and its attribute, like backtrace, eagerly. Might postpone e.g. traceback allocation until later, and store basic exception info statically. E.g., if exception is caught by except clause without as, then the actual exception object is not needed, only its type is needed.

@pfalcon
Copy link
Owner Author

pfalcon commented Dec 9, 2018

This is apparently possible only with stackless build, because it's the case where we have real chain of function frame records which we can walk (instead of capturing them as backtraces, as we unwind real C stack on which they may be stored.

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

No branches or pull requests

1 participant