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

manual close() with StackFrame #196

Open
jposwiata opened this issue Jan 23, 2025 · 1 comment
Open

manual close() with StackFrame #196

jposwiata opened this issue Jan 23, 2025 · 1 comment

Comments

@jposwiata
Copy link

It is not possible to manually "close" StackFrame without passing makeEpilog arg to the constructor.
Pattern:

Xbyak::util::StackFrame sf(this, 1);
... some code ...
close();
readyRE();

causes exception, as second close() is forced from the destructor.
Is there any reason why close() doesn't check/clear makeEpilog_?
O/c "scoped" StackFrame object (closed in '{}' before readyRE() works fine.

@herumi
Copy link
Owner

herumi commented Jan 24, 2025

I was using close() to mean makeEpilog().
That was misleading.
I call makeEpilog() multiple times when I want to return from multiple places in a function.

How about this commit?
3a823ad
though it breaks backward compatibility.

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

2 participants