Skip to content

Support expression evaluation inside of actors. #2902

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
wants to merge 1 commit into from

Conversation

adrian-prantl
Copy link

rdar://75905336

This is a draft to help make sense of swiftlang/swift#37155. It needs some more work.

@@ -0,0 +1,14 @@
actor Actor {
func f(_ n : Int) async {
f(0) // Force a coro-split.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not require an await?

Why does this require a forced coroutine split?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't. Originally I thought a .resume function would be more interesting, but there isn't really a difference for this case. I'll remove it.

Comment on lines 312 to 302
m_extension_decl = func_finder.m_extension_decl;
if (m_extension_decl) {
m_function_decl = func_finder.m_function_decl;
m_wrapper_decl = func_finder.m_wrapper_decl;
} else {
m_function_decl = func_finder.m_wrapper_decl;
m_wrapper_decl = nullptr;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to verify my reading, this and the above changes are NFC, correct?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They correcting for the fact that now both lldb_expr and lldb_wrapped_expr have the @LLDBDebuggerFunction attribute. I don't like the implementation as is and I hope to update this with something better.

@adrian-prantl
Copy link
Author

Updated patch is — I hope — much cleaner.

@adrian-prantl
Copy link
Author

test with swiftlang/swift#37155
@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

Closing, this has been superceded by #2904.

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

Successfully merging this pull request may close these issues.

2 participants