-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixes for step-back with async #4796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -896,7 +896,8 @@ namespace TTD | |||
//we moved to a new statement | |||
Js::FunctionBody::StatementMap* pstmt = fb->GetStatementMaps()->Item(cIndex); | |||
bool newstmt = (cIndex != cfinfo.CurrentStatementIndex && pstmt->byteCodeSpan.begin <= (int)bytecodeOffset && (int)bytecodeOffset <= pstmt->byteCodeSpan.end); | |||
if (newstmt) | |||
bool startUnaligned = (cfinfo.CurrentStatementIndex == -1) && (pstmt->byteCodeSpan.begin != (int)bytecodeOffset); //make sure async step back is ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I mildly prefer testing against the positive case rather than testing the inverse of the negative case (i.e have a variable called startAligned instead).
What is expected to happen if the statement is not aligned?
I'm also unclear as to the circumstances when pstmt->byteCodeSpan.begin != byteCodeOffset- I can believe it happens but I'm not sure why it's related to async calls- can you add a clarifying comment here that speaks to that?
Nit: not your current change but since you're touching this file anyway- should this be &&? Refers to: lib/Runtime/Debug/TTExecutionInfo.cpp:883 in 5784b7b. [](commit_id = 5784b7b, deletion_comment = False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge pull request #4796 from mrkmarron:asyncfixes19 Add missing snapshot visit location. Fix previous line logic for inline awaits.
Merge pull request #4796 from mrkmarron:asyncfixes19 Add missing snapshot visit location. Fix previous line logic for inline awaits.
Add missing snapshot visit location.
Fix previous line logic for inline awaits.