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

Fix issue 401 #443

Merged
merged 14 commits into from
Jul 29, 2024
Merged

Fix issue 401 #443

merged 14 commits into from
Jul 29, 2024

Conversation

andreaTP
Copy link
Collaborator

I ended up rewriting the entire control flow in a way that maps closely to the TypeValidator implementation.

Fix #401

@bhelx
Copy link
Contributor

bhelx commented Jul 26, 2024

This is great! Reads a lot better too. I think I have a bug I can test this on today.

@bhelx
Copy link
Contributor

bhelx commented Jul 26, 2024

The SNES emulator was crashing after 100 frames or so on the interpreter. Now working on this PR!

Screenshot 2024-07-26 at 9 10 00 AM

I think this PR fixed the stack effect bug :)

@andreaTP
Copy link
Collaborator Author

FWIW I tested Doom on this PR (the real DDD) and it looks much more solid than before.

Copy link
Contributor

@bhelx bhelx left a comment

Choose a reason for hiding this comment

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

Looks good to me! Would be good to get a second pair of eyes on someone more familiar with the control flow algorithm.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This could be trimmed as we only use fac-ssa

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

}

public static void doControlTransfer(CtrlFrame ctrlFrame, MStack stack) {
var endResults = ctrlFrame.startValues + ctrlFrame.endValues; // fix 401
Copy link
Collaborator

Choose a reason for hiding this comment

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

// unwind stack

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed

Copy link
Collaborator

@mariofusco mariofusco left a comment

Choose a reason for hiding this comment

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

Nice rework, much clearer now.

@andreaTP andreaTP merged commit fd90dc2 into dylibso:main Jul 29, 2024
13 checks passed
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.

Validate interpreter handling of stack unwinds
4 participants